com.sysord.mad.configuration
Interface ConfigurationManager


public interface ConfigurationManager

Extract editor configuration for a model element type.

Author:
philippe.palau@sysord.com http://www.sysord.com

Nested Class Summary
static interface ConfigurationManager.ConfigurationManagerListener
          Listener for configuration chain notification.
 
Field Summary
static java.lang.String DEFAULT_MAD_CONFIG
          Default Mad config
static java.lang.String I18N_PREFIX
          Main Layer ID
static java.lang.String MAIN_LAYER
          Main Layer ID
 
Method Summary
 void addListener(ConfigurationManager.ConfigurationManagerListener listener)
          Adds the given ConfigurationManager.ConfigurationManagerListener to this ConfigurationManager.
 TypeConfiguration getConfiguration(org.eclipse.emf.ecore.EClass type)
          Extracts the configuration of the given type from the mad configuration repository.
 java.util.Collection<java.lang.String> getImportedResourcesNsURIs()
          Returns all the NS URI used in the declared MAD configurations.
 java.util.Collection<java.lang.String> getImportedResourcesNsURIs(com.sysord.mad.configuration.madConfigDsl.MADConfiguration madConfig)
          Returns the NS URI used by the given MAD configuration.
 java.util.Collection<org.eclipse.emf.common.util.URI> getImportedURIs()
          Returns all the URIs used in the declared MAD configurations.
 java.util.Collection<org.eclipse.emf.common.util.URI> getImportedURIs(com.sysord.mad.configuration.madConfigDsl.MADConfiguration madConfig)
          Returns the URIs used by the given MAD configuration.
 java.lang.String getLabelProviderExpressionForType(org.eclipse.emf.ecore.EClass type)
          Returns the label provider expression for the given type.
 Layer getLayerById(java.lang.String layerId)
          Returns the layer with the given ID, or null if no layer exists with this id.
 Layer getMainLayer()
          Returns the root layer.
 void initialize()
          Initializes this ConfigurationManager.
 void removeListener(ConfigurationManager.ConfigurationManagerListener listener)
          Removes the given ConfigurationManager.ConfigurationManagerListener from this ConfigurationManager.
 

Field Detail

MAIN_LAYER

static final java.lang.String MAIN_LAYER
Main Layer ID

See Also:
Constant Field Values

DEFAULT_MAD_CONFIG

static final java.lang.String DEFAULT_MAD_CONFIG
Default Mad config

See Also:
Constant Field Values

I18N_PREFIX

static final java.lang.String I18N_PREFIX
Main Layer ID

See Also:
Constant Field Values
Method Detail

initialize

void initialize()
Initializes this ConfigurationManager.


getConfiguration

TypeConfiguration getConfiguration(org.eclipse.emf.ecore.EClass type)
Extracts the configuration of the given type from the mad configuration repository.

Parameters:
type - Type of the element for which we want the MAD configuration.
Returns:
the MAD configuration of the given type or null if no configuration exists for the element type.

getLabelProviderExpressionForType

java.lang.String getLabelProviderExpressionForType(org.eclipse.emf.ecore.EClass type)
Returns the label provider expression for the given type.

This is a format expression usable for all MAD configuration labels (see FormatExpressionEvaluationService for more details).

Parameters:
type - Type of the element for which we want the label provider expression.
Returns:
the label provider expression for the given type.

getMainLayer

Layer getMainLayer()
Returns the root layer.

There is always a main layer, this is the default layer implicitly created by the configuration.

Returns:
the root layer.

getLayerById

Layer getLayerById(java.lang.String layerId)
Returns the layer with the given ID, or null if no layer exists with this id.

Parameters:
layerId - The ID of the layer to retrieve.
Returns:
The layer with the given ID, or null.

getImportedURIs

java.util.Collection<org.eclipse.emf.common.util.URI> getImportedURIs()
Returns all the URIs used in the declared MAD configurations.

Returns:
all the used URIs.

getImportedURIs

java.util.Collection<org.eclipse.emf.common.util.URI> getImportedURIs(com.sysord.mad.configuration.madConfigDsl.MADConfiguration madConfig)
Returns the URIs used by the given MAD configuration.

Parameters:
madConfig - The configuration from which we want the used URIs.
Returns:
the URIs used by the given MAD configuration.

getImportedResourcesNsURIs

java.util.Collection<java.lang.String> getImportedResourcesNsURIs()
Returns all the NS URI used in the declared MAD configurations.

Returns:
all the used NS URI.

getImportedResourcesNsURIs

java.util.Collection<java.lang.String> getImportedResourcesNsURIs(com.sysord.mad.configuration.madConfigDsl.MADConfiguration madConfig)
Returns the NS URI used by the given MAD configuration.

Returns:
the NS URI used by the given MAD configuration.

addListener

void addListener(ConfigurationManager.ConfigurationManagerListener listener)
Adds the given ConfigurationManager.ConfigurationManagerListener to this ConfigurationManager.

Parameters:
listener - The listener to add.

removeListener

void removeListener(ConfigurationManager.ConfigurationManagerListener listener)
Removes the given ConfigurationManager.ConfigurationManagerListener from this ConfigurationManager.

Parameters:
listener - The listener to remove.