|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.core.metafacade.MetafacadeFactory
public class MetafacadeFactory
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.
| Method Summary | |
|---|---|
void |
clearCaches()
Clears out the factory's internal caches (other than namespace properties, which can be cleared by calling Namespaces.clear(). |
MetafacadeBase |
createFacadeImpl(java.lang.String interfaceName,
java.lang.Object mappingObject,
java.lang.String context)
Create a facade implementation object for a mappingObject. |
MetafacadeBase |
createMetafacade(java.lang.Object mappingObject)
Returns a metafacade for a mappingObject, depending on its mappingClass. |
protected MetafacadeBase |
createMetafacade(java.lang.Object mappingObject,
MetafacadeMapping mapping)
Creates a metacade from the passed in mappingObject, and
mapping instance. |
MetafacadeBase |
createMetafacade(java.lang.Object mappingObject,
java.lang.String context)
Returns a metafacade for a mappingObject, depending on its mappingClass and (optionally) its sterotypes
and context. |
java.util.Collection |
createMetafacades(java.util.Collection mappingObjects)
Returns a metafacade for each mappingObject, contained within the mappingObjects collection depending on its
mappingClass. |
protected java.util.Collection |
createMetafacades(java.util.Collection mappingObjects,
java.lang.String contextName)
Returns a metafacade for each mappingObject, contained within the mappingObjects collection depending on its
mappingClass and (optionally) its sterotypes,
and contextName. |
java.util.Collection |
getAllMetafacades()
Gets all metafacades for the entire model for the current namespace set within the factory. |
static MetafacadeFactory |
getInstance()
Returns the facade factory singleton. |
java.util.Collection |
getMetafacadesByStereotype(java.lang.String stereotype)
Gets all metafacades for the entire model having the given stereotype. |
ModelAccessFacade |
getModel()
Gets the model which provides access to the underlying model and is used to construct metafacades. |
java.lang.String |
getNamespace()
Returns the name of the active namespace. |
java.util.List |
getValidationMessages()
Gets the list of all validation messages collection during model processing. |
void |
initialize()
Performs any initialization required by the factory (i.e. |
void |
reset()
Entirely resets all the internal resources within this factory instance (such as the caches, etc). |
void |
setModel(ModelAccessFacade model,
java.lang.String metafacadeModelNamespace)
The model access facade instance (provides access to the meta model). |
void |
setNamespace(java.lang.String namespace)
Sets the active namespace. |
void |
shutdown()
Performs shutdown procedures for the factory. |
void |
validateAllMetafacades()
Validates all metafacdes for the current namespace and collects the messages in the interal validation messages collection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MetafacadeFactory getInstance()
public void initialize()
metafacade mappings, etc).
public void setNamespace(java.lang.String namespace)
namespace - the name of the active namespace.public java.lang.String getNamespace()
public MetafacadeBase createMetafacade(java.lang.Object mappingObject,
java.lang.String context)
mappingClass and (optionally) its sterotypes
and context.
mappingObject - the object used to map the metafacade (a meta model
object or a metafacade itself).context - the name of the context the meta model element is
registered under.
public void validateAllMetafacades()
getValidationMessages()
protected MetafacadeBase createMetafacade(java.lang.Object mappingObject,
MetafacadeMapping mapping)
mappingObject, and
mapping instance.
mappingObject - the mapping object for which to create the
metafacade.mapping - the mapping from which to create the metafacade
public MetafacadeBase createMetafacade(java.lang.Object mappingObject)
mappingClass.
mappingObject - the object which is used to map to the metafacade
public MetafacadeBase createFacadeImpl(java.lang.String interfaceName,
java.lang.Object mappingObject,
java.lang.String context)
interfaceName.
interfaceName - the name of the interface that the implementation
object has to implementmappingObject - the mappingObject for which a facade shall be
createdcontext - the context in which this metafacade will be created.
protected java.util.Collection createMetafacades(java.util.Collection mappingObjects,
java.lang.String contextName)
mappingObjects collection depending on its
mappingClass and (optionally) its sterotypes,
and contextName.
mappingObjects - the meta model element.contextName - the name of the context the meta model element is
registered under.
public java.util.Collection createMetafacades(java.util.Collection mappingObjects)
mappingObjects collection depending on its
mappingClass.
mappingObjects - the objects used to map the metafacades (can be a
meta model element or an actual metafacade itself).
public ModelAccessFacade getModel()
public void setModel(ModelAccessFacade model,
java.lang.String metafacadeModelNamespace)
model - the modelmetafacadeModelNamespace - the namespace that contains the metafacade facade implementation.public java.util.List getValidationMessages()
validateAllMetafacades()public java.util.Collection getAllMetafacades()
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).
public java.util.Collection getMetafacadesByStereotype(java.lang.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).
stereotype - the stereotype by which to perform the search.
stereotype.public void shutdown()
public void reset()
public void clearCaches()
Namespaces.clear().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||