org.eclipse.tigerstripe.plugins
Interface IExpander


public interface IExpander


Field Summary
static java.lang.String PROP_TAG
          The tag that is used to identify a pluginProperty
 
Method Summary
 java.lang.String expandVar(java.lang.String inString)
          This does the actual expansion, using the syntax below.
 java.lang.String expandVar(java.lang.String inString, ITigerstripeProject project)
          As for the simple expandVar case, but passing in teh project to be used.
 java.lang.String getModelName()
          Get the "name" of the model.
 void setCurrentArtifact(IAbstractArtifact currentArtifact)
          Allows to set a "current artifact" for this expander.
 void setCurrentModel(IArtifactModel currentModel)
          As for current Artifact, can set a "Current Model" for this expander This can be used to extract things like the TargetPackage from the model - especially useful for making file names!
 void setCurrentModel(IArtifactModel currentModel, java.lang.String modelName)
          As for current Artifact, can set a "Current Model" for this expander This can be used to extract things like the TargetPackage from the model - especially useful for making file names! This variant is necessary in case the model has been named something other than "model"
 void setModelName(java.lang.String modelName)
          Set the "name" of the model.
 void setPluginRef(IPluginReference pluginRef)
          Sets the pluginRef for the expander.
 

Field Detail

PROP_TAG

static final java.lang.String PROP_TAG
The tag that is used to identify a pluginProperty

See Also:
Constant Field Values
Method Detail

setPluginRef

void setPluginRef(IPluginReference pluginRef)
Sets the pluginRef for the expander. This is needed in all cases unless you want to just get the project properties.

Parameters:
pluginRef -

setCurrentArtifact

void setCurrentArtifact(IAbstractArtifact currentArtifact)
Allows to set a "current artifact" for this expander. When a current artifact is set, additional variable may expanded. This is used in the context of Artifact-based plugin rules so that the user can get access to details about the current artifact

Parameters:
currentArtifact -
Since:
1.2

setCurrentModel

void setCurrentModel(IArtifactModel currentModel)
As for current Artifact, can set a "Current Model" for this expander This can be used to extract things like the TargetPackage from the model - especially useful for making file names!

Parameters:
currentModel -

setCurrentModel

void setCurrentModel(IArtifactModel currentModel,
                     java.lang.String modelName)
As for current Artifact, can set a "Current Model" for this expander This can be used to extract things like the TargetPackage from the model - especially useful for making file names! This variant is necessary in case the model has been named something other than "model"

Parameters:
currentModel -

expandVar

java.lang.String expandVar(java.lang.String inString)
This does the actual expansion, using the syntax below. Expander Variable Syntax ${project.Version} and ${project.Name}: This returns will replace your Version and Name properties of your current project. ${artifact.Name}, ${artifact.Package} and ${artifact.Path}: This returns a name, package, and a path-like String for your package (eg com/mycompany/myPackage) of the current Artifact. This variable is only useful for Artifact based rules. ${ppProp.propertyName}: This returns the value of the Global Property named propertyName in your plug-in. ${model.attributeName}: This returns the value of the attribute named attributeName in your model. Note: The Model should be replaced with the name of the model set in the rule specification.

Parameters:
inString -
Returns:

expandVar

java.lang.String expandVar(java.lang.String inString,
                           ITigerstripeProject project)
As for the simple expandVar case, but passing in teh project to be used.

Parameters:
inString -
project -
Returns:

setModelName

void setModelName(java.lang.String modelName)
Set the "name" of the model. This is only necessary if the default has been change in a rule defintion.

Parameters:
modelName -

getModelName

java.lang.String getModelName()
Get the "name" of the model.

Returns: