| java.lang.Object org.andromda.core.metafacade.MetafacadeFactory
MetafacadeFactory | public class MetafacadeFactory (Code) | | The factory in charge of constructing Metafacade instances. In order for a
metafacade (i.e. a facade around a meta model element) to be constructed, it
must be constructed through this factory.
author: Matthias Bohlen author: Chad Brandon author: Peter Friese |
Method Summary | |
public void | clearCaches() Clears out the factory's internal caches (other
than namespace properties, which can be cleared by
calling
org.andromda.core.configuration.Namespaces.clear . | public MetafacadeBase | createFacadeImpl(String interfaceName, Object mappingObject, String context) Create a facade implementation object for a mappingObject. | public MetafacadeBase | createMetafacade(Object mappingObject, String context) Returns a metafacade for a mappingObject, depending on its
mappingClass and (optionally) its sterotypes
and context .
Parameters: mappingObject - the object used to map the metafacade (a meta modelobject or a metafacade itself). Parameters: context - the name of the context the meta model element isregistered under. | protected MetafacadeBase | createMetafacade(Object mappingObject, MetafacadeMapping mapping) Creates a metacade from the passed in mappingObject , and
mapping instance. | public MetafacadeBase | createMetafacade(Object mappingObject) Returns a metafacade for a mappingObject, depending on its mappingClass . | protected Collection | createMetafacades(Collection mappingObjects, String contextName) Returns a metafacade for each mappingObject, contained within the
mappingObjects collection depending on its
mappingClass and (optionally) its sterotypes ,
and contextName .
Parameters: mappingObjects - the meta model element. Parameters: contextName - the name of the context the meta model element isregistered under. | public Collection | createMetafacades(Collection mappingObjects) Returns a metafacade for each mappingObject, contained within the
mappingObjects collection depending on its
mappingClass .
Parameters: mappingObjects - the objects used to map the metafacades (can be ameta model element or an actual metafacade itself). | public Collection | getAllMetafacades()
Gets all metafacades for the entire model for the
current namespace set within the factory. | public static MetafacadeFactory | getInstance() Returns the facade factory singleton. | final Logger | getLogger() | public Collection | getMetafacadesByStereotype(String stereotype)
Gets all metafacades for the entire model having the given
stereotype.
NOTE: The model package filter is applied
before returning the results (if defined within the factory).
Parameters: stereotype - the stereotype by which to perform the search. | public ModelAccessFacade | getModel() Gets the model which provides access to the underlying model and is used
to construct metafacades. | public String | getNamespace() Returns the name of the active namespace. | final Object | getRegisteredProperty(MetafacadeBase metafacade, String name) Gets the registered property registered under the namespace
with the name
Parameters: metafacade - the metafacade to search Parameters: name - the name of the property to check. | public List | getValidationMessages() Gets the list of all validation messages collection during model processing. | public void | initialize() Performs any initialization required by the factory (i.e. | final boolean | isPropertyRegistered(MetafacadeBase metafacade, String name) Returns true if this property is registered under the given
namespace , false otherwise.
Parameters: metafacade - the metafacade to search. Parameters: name - the name of the property. | final void | registerProperty(String namespace, String metafacadeName, String name, Object value) Registers a property with the specified name in the given
namespace . | final void | registerProperty(String metafacadeName, String name, Object value) Registers a property with the specified name in the namespace
that is currently set within the factory. | public void | reset() Entirely resets all the internal resources within this factory instance (such
as the caches, etc). | public void | setModel(ModelAccessFacade model, String metafacadeModelNamespace) The model access facade instance (provides access to the meta model). | public void | setNamespace(String namespace) Sets the active namespace. | public void | shutdown() Performs shutdown procedures for the factory. | public void | validateAllMetafacades() Validates all metafacdes for the current namespace
and collects the messages in the interal validation messages
collection. |
createFacadeImpl | public MetafacadeBase createFacadeImpl(String interfaceName, Object mappingObject, String context)(Code) | | Create a facade implementation object for a mappingObject. The facade
implementation object must be found in a way that it implements the
interface interfaceName .
Parameters: interfaceName - the name of the interface that the implementationobject has to implement Parameters: mappingObject - the mappingObject for which a facade shall becreated Parameters: context - the context in which this metafacade will be created. MetafacadeBase the metafacade |
createMetafacade | public MetafacadeBase createMetafacade(Object mappingObject, String context)(Code) | | Returns a metafacade for a mappingObject, depending on its
mappingClass and (optionally) its sterotypes
and context .
Parameters: mappingObject - the object used to map the metafacade (a meta modelobject or a metafacade itself). Parameters: context - the name of the context the meta model element isregistered under. the new metafacade |
createMetafacade | protected MetafacadeBase createMetafacade(Object mappingObject, MetafacadeMapping mapping)(Code) | | Creates a metacade from the passed in mappingObject , and
mapping instance.
Parameters: mappingObject - the mapping object for which to create themetafacade. Parameters: mapping - the mapping from which to create the metafacade the metafacade, or null if it can't be created. |
createMetafacade | public MetafacadeBase createMetafacade(Object mappingObject)(Code) | | Returns a metafacade for a mappingObject, depending on its mappingClass .
Parameters: mappingObject - the object which is used to map to the metafacade MetafacadeBase the facade object (not yet attached to mappingClass object) |
createMetafacades | protected Collection createMetafacades(Collection mappingObjects, String contextName)(Code) | | Returns a metafacade for each mappingObject, contained within the
mappingObjects collection depending on its
mappingClass and (optionally) its sterotypes ,
and contextName .
Parameters: mappingObjects - the meta model element. Parameters: contextName - the name of the context the meta model element isregistered under. the Collection of newly created Metafacades. |
createMetafacades | public Collection createMetafacades(Collection mappingObjects)(Code) | | Returns a metafacade for each mappingObject, contained within the
mappingObjects collection depending on its
mappingClass .
Parameters: mappingObjects - the objects used to map the metafacades (can be ameta model element or an actual metafacade itself). Collection of metafacades |
getAllMetafacades | public Collection getAllMetafacades()(Code) | |
Gets all metafacades for the entire model for the
current namespace set within the factory.
NOTE: The model package filter is applied
before returning the results (if defined within the factory).
all metafacades |
getInstance | public static MetafacadeFactory getInstance()(Code) | | Returns the facade factory singleton.
the only instance |
getLogger | final Logger getLogger()(Code) | | Gets the correct logger based on whether or not an namespace logger should be used
the logger |
getMetafacadesByStereotype | public Collection getMetafacadesByStereotype(String stereotype)(Code) | |
Gets all metafacades for the entire model having the given
stereotype.
NOTE: The model package filter is applied
before returning the results (if defined within the factory).
Parameters: stereotype - the stereotype by which to perform the search. the metafacades having the given stereotype . |
getModel | public ModelAccessFacade getModel()(Code) | | Gets the model which provides access to the underlying model and is used
to construct metafacades.
the model access facade. |
getNamespace | public String getNamespace()(Code) | | Returns the name of the active namespace.
String the namespace name |
getRegisteredProperty | final Object getRegisteredProperty(MetafacadeBase metafacade, String name)(Code) | | Gets the registered property registered under the namespace
with the name
Parameters: metafacade - the metafacade to search Parameters: name - the name of the property to check. the registered property |
initialize | public void initialize()(Code) | | Performs any initialization required by the factory (i.e. discovering all
metafacade mappings, etc).
|
isPropertyRegistered | final boolean isPropertyRegistered(MetafacadeBase metafacade, String name)(Code) | | Returns true if this property is registered under the given
namespace , false otherwise.
Parameters: metafacade - the metafacade to search. Parameters: name - the name of the property. true if the property is registered, false otherwise. |
registerProperty | final void registerProperty(String namespace, String metafacadeName, String name, Object value)(Code) | | Registers a property with the specified name in the given
namespace .
Parameters: namespace - the namespace in which the property is stored. Parameters: metafacadeName - the name of the metafacade under which the property is registered Parameters: name - the name of the property Parameters: value - to give the property |
registerProperty | final void registerProperty(String metafacadeName, String name, Object value)(Code) | | Registers a property with the specified name in the namespace
that is currently set within the factory.
Parameters: metafacadeName - the name of the metafacade under which the property is registered Parameters: name - the name of the property Parameters: value - to give the property |
reset | public void reset()(Code) | | Entirely resets all the internal resources within this factory instance (such
as the caches, etc).
|
setModel | public void setModel(ModelAccessFacade model, String metafacadeModelNamespace)(Code) | | The model access facade instance (provides access to the meta model).
Parameters: model - the model Parameters: metafacadeModelNamespace - the namespace that contains the metafacade facade implementation. |
setNamespace | public void setNamespace(String namespace)(Code) | | Sets the active namespace. The AndroMDA core and each cartridge have their own namespace for metafacade
registration.
Parameters: namespace - the name of the active namespace. |
shutdown | public void shutdown()(Code) | | Performs shutdown procedures for the factory. This should be called ONLY when model processing has
completed.
|
validateAllMetafacades | public void validateAllMetafacades()(Code) | | Validates all metafacdes for the current namespace
and collects the messages in the interal validation messages
collection.
See Also: MetafacadeFactory.getValidationMessages() |
|
|