org.openarchitectureware.xpand2
Class GeneratorAdvice

java.lang.Object
  extended by org.openarchitectureware.workflow.lib.AbstractWorkflowComponent
      extended by org.openarchitectureware.workflow.ao.AbstractWorkflowAdvice
          extended by org.openarchitectureware.expression.AbstractExpressionsUsingWorkflowAdvice
              extended by org.openarchitectureware.xpand2.GeneratorAdvice
All Implemented Interfaces:
WorkflowComponent, WorkflowComponentWithID

public class GeneratorAdvice
extends AbstractExpressionsUsingWorkflowAdvice

Weaves aspect templates into a generator component.

Parameters

Name Multiplicity Type Description
adviceTarget 1 String The id of a Generator component
advices 0..n String Comma seperated list of qualified aspect templates
advice 0..n String Qualified name of an aspect template
extensionAdvice 0..n String Comma seperated list of qualified aspect extensions
metaModel 0..n org.openarchitectureware.type.MetaModel Additional metamodels needed for the advices.
globalVarDef 0..n GlobalVarDef Additional global vars needed for the advices.


Field Summary
 
Fields inherited from class org.openarchitectureware.expression.AbstractExpressionsUsingWorkflowAdvice
metaModels
 
Constructor Summary
GeneratorAdvice()
           
 
Method Summary
 void addAdvice(java.lang.String advice)
          Adds an advice.
 void addAdvices(java.lang.String advices)
          Deprecated. Use addAdvice(String) instead.
 void addExtensionAdvice(java.lang.String extensionAdvice)
          Adds an extension advice,
 void addExtensionAdvices(java.lang.String extensionAdvices)
          Deprecated. Use addExtensionAdvice(String) instead.
 void checkConfiguration(Issues issues)
          Validates the configuration before invocation.
 java.lang.String getComponentName()
          Override this method by custom components.
 java.lang.String getLogMessage()
          Returns the log message,
 void setFileEncoding(java.lang.String fileEncoding)
          Sets the file encoding to use for the target generator.
 void weave(WorkflowComponent c, Issues issues)
          Weaves the advices into the specified component.
 
Methods inherited from class org.openarchitectureware.expression.AbstractExpressionsUsingWorkflowAdvice
addGlobalVarDef, addMetaModel
 
Methods inherited from class org.openarchitectureware.workflow.ao.AbstractWorkflowAdvice
buildList, getAdviceTarget, invoke, setAdviceTarget
 
Methods inherited from class org.openarchitectureware.workflow.lib.AbstractWorkflowComponent
checkRequiredConfigProperty, getContainer, getId, getLocation, setContainer, setId, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneratorAdvice

public GeneratorAdvice()
Method Detail

addAdvices

@Deprecated
public void addAdvices(java.lang.String advices)
Deprecated. Use addAdvice(String) instead.


addExtensionAdvices

@Deprecated
public void addExtensionAdvices(java.lang.String extensionAdvices)
Deprecated. Use addExtensionAdvice(String) instead.


addAdvice

public void addAdvice(java.lang.String advice)
Adds an advice.

Parameters:
advice - the advice

addExtensionAdvice

public void addExtensionAdvice(java.lang.String extensionAdvice)
Adds an extension advice,

Parameters:
extensionAdvice - the extension advice

setFileEncoding

public void setFileEncoding(java.lang.String fileEncoding)
Sets the file encoding to use for the target generator.

Parameters:
fileEncoding - Encoding string, e.g. 'ISO-8859-1'
Since:
4.2
See Also:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=195042

checkConfiguration

public void checkConfiguration(Issues issues)
Description copied from interface: WorkflowComponent
Validates the configuration before invocation.

Specified by:
checkConfiguration in interface WorkflowComponent
Overrides:
checkConfiguration in class AbstractWorkflowAdvice
Parameters:
issues - facility for reporting configuration issues.
See Also:
AbstractWorkflowAdvice.checkConfiguration(org.openarchitectureware.workflow.issues.Issues)

weave

public void weave(WorkflowComponent c,
                  Issues issues)
Description copied from class: AbstractWorkflowAdvice
Weaves the advices into the specified component.

Overrides:
weave in class AbstractExpressionsUsingWorkflowAdvice
Parameters:
c - the component
issues - facility for reporting possible issues during weaving.
See Also:
AbstractExpressionsUsingWorkflowAdvice.weave(org.openarchitectureware.workflow.WorkflowComponent, org.openarchitectureware.workflow.issues.Issues)

getLogMessage

public java.lang.String getLogMessage()
Description copied from interface: WorkflowComponentWithID
Returns the log message,

Specified by:
getLogMessage in interface WorkflowComponentWithID
Overrides:
getLogMessage in class AbstractWorkflowComponent
Returns:
the log message
See Also:
WorkflowComponentWithID.getLogMessage()

getComponentName

public java.lang.String getComponentName()
Description copied from class: AbstractWorkflowComponent
Override this method by custom components.

Specified by:
getComponentName in interface WorkflowComponent
Overrides:
getComponentName in class AbstractWorkflowComponent
Returns:
Simple class name as default.