org.eclipse.tigerstripe.workbench.model
Interface IComponentNameProvider


public interface IComponentNameProvider

Objects implementing this interface should provide a name for any type of ModelComponent. If an implementation returns null, then the default will be used. The methods all takes in : - an object which defines the SCOPE within which we can evaluate the name. eg for an Artifact, we need to make sure its unique in the scope of the PROJECT. for a Field, the scope is the ARTIFACT to which it is to be added.

Author:
rcraddoc

Field Summary
static int AEND
           
static int ZEND
           
 
Method Summary
 java.lang.String getNewArgumentName(IMethod method)
          This version should be used to select a name of an IArgument where the existing arguments on the method is required for validity checking
 java.lang.String getNewArtifactName(org.eclipse.tigerstripe.workbench.patterns.IPattern pattern, java.lang.Class artifactClass, ITigerstripeModelProject project, java.lang.String packageName)
          This version should be used to get the new name for an artifact - the name will be based on the class The "target" packageName is provided in case naming rule needs to ensure artifact uniqueness within a package.
 java.lang.String getNewAssociationEndName(org.eclipse.tigerstripe.workbench.patterns.IPattern pattern, IAbstractArtifact artifact, int whichEnd)
          This version should be used to select a name of an AssociationEnd - where the existing methods on the artifact is required for validity checking
 java.lang.String getNewFieldName(IAbstractArtifact artifact)
          This version should be used to select a name of an IField - where the existing fields on the artifact is required for validity checking
 java.lang.String getNewLiteralName(IAbstractArtifact artifact)
          This version should be used to select a name of an ILiteral - where the existing literals on the artifact is required for validity checking
 java.lang.String getNewMethodName(IAbstractArtifact artifact)
          This version should be used to select a name of an IMethod - where the existing methods on the artifact is required for validity checking
 java.lang.String getNewRelationshipName(org.eclipse.tigerstripe.workbench.patterns.IPattern pattern, java.lang.Class artifactClass, ITigerstripeModelProject project, java.lang.String packageName, java.lang.String aEndTypeFQN, java.lang.String zEndTypeFQN)
          This version should be used to get the new name for an artifact - the name will be based on the class, and potentially on the ends of associations.
 

Field Detail

AEND

static final int AEND
See Also:
Constant Field Values

ZEND

static final int ZEND
See Also:
Constant Field Values
Method Detail

getNewArtifactName

java.lang.String getNewArtifactName(org.eclipse.tigerstripe.workbench.patterns.IPattern pattern,
                                    java.lang.Class artifactClass,
                                    ITigerstripeModelProject project,
                                    java.lang.String packageName)
This version should be used to get the new name for an artifact - the name will be based on the class The "target" packageName is provided in case naming rule needs to ensure artifact uniqueness within a package.

Parameters:
artifactClass -
project -
packageName -
Returns:

getNewRelationshipName

java.lang.String getNewRelationshipName(org.eclipse.tigerstripe.workbench.patterns.IPattern pattern,
                                        java.lang.Class artifactClass,
                                        ITigerstripeModelProject project,
                                        java.lang.String packageName,
                                        java.lang.String aEndTypeFQN,
                                        java.lang.String zEndTypeFQN)
This version should be used to get the new name for an artifact - the name will be based on the class, and potentially on the ends of associations. The "target" packageName is provided in case naming rule needs to ensure artifact uniqueness within a package.

Parameters:
artifactClass - - should only be used for Association & AssociationClass
project -
packageName -
aEndType - - the FQN of type of the artifact at the aEnd of the relationship
zEndType - - the FQN of type of the artifact at the aEnd of the relationship
Returns:

getNewFieldName

java.lang.String getNewFieldName(IAbstractArtifact artifact)
This version should be used to select a name of an IField - where the existing fields on the artifact is required for validity checking

Parameters:
artifact -
Returns:

getNewLiteralName

java.lang.String getNewLiteralName(IAbstractArtifact artifact)
This version should be used to select a name of an ILiteral - where the existing literals on the artifact is required for validity checking

Parameters:
artifact -
Returns:

getNewMethodName

java.lang.String getNewMethodName(IAbstractArtifact artifact)
This version should be used to select a name of an IMethod - where the existing methods on the artifact is required for validity checking

Parameters:
artifact -
Returns:

getNewArgumentName

java.lang.String getNewArgumentName(IMethod method)
This version should be used to select a name of an IArgument where the existing arguments on the method is required for validity checking

Parameters:
method -
Returns:

getNewAssociationEndName

java.lang.String getNewAssociationEndName(org.eclipse.tigerstripe.workbench.patterns.IPattern pattern,
                                          IAbstractArtifact artifact,
                                          int whichEnd)
This version should be used to select a name of an AssociationEnd - where the existing methods on the artifact is required for validity checking

Parameters:
artifact - - must be an IAssociationArtifact or IAssociationClassArtifact
whichEnd - - should be one of AEND or ZEND
Returns: