org.andromda.core.metafacade
Class MetafacadeMapping

java.lang.Object
  extended by org.andromda.core.metafacade.MetafacadeMapping

public class MetafacadeMapping
extends java.lang.Object

A meta facade mapping class. This class is a child of MetafacadeMappings (that is: instances of this class below to an instance of MetafacadeMappings).

Author:
Chad Brandon

Constructor Summary
MetafacadeMapping()
           
 
Method Summary
 void addMappingProperty(java.lang.String name, java.lang.String value)
          Adds a mapping property.
 void addPropertyReference(java.lang.String reference)
          Adds a mapping property reference.
 void addPropertyReferences(java.util.Collection propertyReferences)
          Adds all propertyReferences to the property references contained in this MetafacadeMapping instance.
 void addStereotype(java.lang.String stereotype)
          Adds a stereotype to the stereotypes.
protected  java.lang.String getMappingClassName()
          Gets the name of the metaobject class used for this mapping.
 java.lang.Class getMetafacadeClass()
          Gets the metafacadeClass for this mapping.
 java.util.Collection getPropertyReferences()
          Returns all mapping references for this MetafacadeMapping instance.
 boolean isContextRoot()
          

Gets whether or not this mapping represents a contextRoot, by default a mapping is NOT a contextRoot.

 void setContext(java.lang.String context)
          Sets the context to which this mapping applies.
 void setContextRoot(boolean contextRoot)
          Sets the name of the contextRoot for this mapping.
 void setMappingClassName(java.lang.String mappingClassName)
          The name of the metaobject class to use for this mapping.
 void setMetafacadeClassName(java.lang.String metafacadeClassName)
          Sets the metafacadeClassName for this mapping.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetafacadeMapping

public MetafacadeMapping()
Method Detail

getMetafacadeClass

public java.lang.Class getMetafacadeClass()
Gets the metafacadeClass for this mapping.

Returns:
Returns the metafacadeClass.

setMetafacadeClassName

public void setMetafacadeClassName(java.lang.String metafacadeClassName)
Sets the metafacadeClassName for this mapping.

Parameters:
metafacadeClassName - The name of the metafaacde class to set.

getMappingClassName

protected java.lang.String getMappingClassName()
Gets the name of the metaobject class used for this mapping.

Returns:
Returns the mappingClassName.

setMappingClassName

public void setMappingClassName(java.lang.String mappingClassName)
The name of the metaobject class to use for this mapping.

Parameters:
mappingClassName - The mappingClassName to set.

isContextRoot

public boolean isContextRoot()

Gets whether or not this mapping represents a contextRoot, by default a mapping is NOT a contextRoot. You'll want to specify this as true when other metafacades need to be created within the context of this metafacade.

Returns:
Returns the contextRoot.

setContextRoot

public void setContextRoot(boolean contextRoot)
Sets the name of the contextRoot for this mapping.

Parameters:
contextRoot - The contextRoot to set.
See Also:
isContextRoot()

addStereotype

public void addStereotype(java.lang.String stereotype)
Adds a stereotype to the stereotypes.

Parameters:
stereotype -

addPropertyReference

public void addPropertyReference(java.lang.String reference)
Adds a mapping property reference. These are used to populate metafacade impl classes with mapping files, etc. The property reference applies to the given mapping.

Parameters:
reference - the name of the reference.
See Also:
MetafacadeMappings.addPropertyReference(String)

getPropertyReferences

public java.util.Collection getPropertyReferences()
Returns all mapping references for this MetafacadeMapping instance.


addMappingProperty

public void addMappingProperty(java.lang.String name,
                               java.lang.String value)
Adds a mapping property. This are used to narrow the metafacade to which the mapping can apply. The properties must exist and must evaluate to the specified value if given for the mapping to match.

Parameters:
name - the name of the reference.
value - the default value of the property reference.

addPropertyReferences

public void addPropertyReferences(java.util.Collection propertyReferences)
Adds all propertyReferences to the property references contained in this MetafacadeMapping instance.

Parameters:
propertyReferences - the property references to add.

setContext

public void setContext(java.lang.String context)
Sets the context to which this mapping applies.

Parameters:
context - The metafacade context name to set.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2003-2008 AndroMDA.org. All Rights Reserved.