org.openarchitectureware.workflow.lib
Class AbstractWorkflowComponent

java.lang.Object
  extended by org.openarchitectureware.workflow.lib.AbstractWorkflowComponent
All Implemented Interfaces:
WorkflowComponent, WorkflowComponentWithID
Direct Known Subclasses:
AbstractWorkflowAdvice, AbstractWorkflowComponent2, CompositeComponent, PassiveWorkflowComponent, SimpleJavaTransformationComponent, WorkflowComponentWithModelSlot

public abstract class AbstractWorkflowComponent
extends java.lang.Object
implements WorkflowComponentWithID

Base class useful for implementing custom WorkflowComponents.

Since:
4.0
Author:
Markus Voelter (impl), Karsten Thoms (doc)

Constructor Summary
AbstractWorkflowComponent()
           
 
Method Summary
 void checkRequiredConfigProperty(java.lang.String configPropertyName, java.lang.Object configPropertyValue, Issues issues)
          Utility method that can be used in method checkConfiguration to check required properties.
 java.lang.String getComponentName()
          Override this method by custom components.
 CompositeComponent getContainer()
          Returns the containing component, if there is one.
 java.lang.String getId()
          Returns the ID of the component.
 Location getLocation()
          Returns the location in the source file that invokes the current component.
 java.lang.String getLogMessage()
          Returns the log message,
 void setContainer(CompositeComponent container)
          Sers the containing component.
 void setId(java.lang.String id)
          Sets the ID of the workflow component.
 void setLocation(Location location)
          Sets the location in the source file that invokes the current component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openarchitectureware.workflow.WorkflowComponent
checkConfiguration, invoke
 

Constructor Detail

AbstractWorkflowComponent

public AbstractWorkflowComponent()
Method Detail

getId

public java.lang.String getId()
Description copied from interface: WorkflowComponentWithID
Returns the ID of the component.

Specified by:
getId in interface WorkflowComponentWithID
Returns:
the component ID
See Also:
WorkflowComponentWithID.getId()

setId

public void setId(java.lang.String id)
Description copied from interface: WorkflowComponentWithID
Sets the ID of the workflow component.

Specified by:
setId in interface WorkflowComponentWithID
Parameters:
id - the ID
See Also:
WorkflowComponentWithID.setId(java.lang.String)

getContainer

public CompositeComponent getContainer()
Description copied from interface: WorkflowComponent
Returns the containing component, if there is one.

Specified by:
getContainer in interface WorkflowComponent
Returns:
the container
See Also:
WorkflowComponent.getContainer()

setContainer

public void setContainer(CompositeComponent container)
Description copied from interface: WorkflowComponent
Sers the containing component.

Specified by:
setContainer in interface WorkflowComponent
Parameters:
container - The containing component

getLogMessage

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

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

getLocation

public Location getLocation()
Description copied from interface: WorkflowComponent
Returns the location in the source file that invokes the current component.

Specified by:
getLocation in interface WorkflowComponent
Returns:
the location
See Also:
WorkflowComponent.getLocation()

setLocation

public void setLocation(Location location)
Description copied from interface: WorkflowComponent
Sets the location in the source file that invokes the current component.

Specified by:
setLocation in interface WorkflowComponent
Parameters:
location - the location
See Also:
WorkflowComponent.setLocation(org.openarchitectureware.workflow.ast.parser.Location)

getComponentName

public java.lang.String getComponentName()
Override this method by custom components.

Specified by:
getComponentName in interface WorkflowComponent
Returns:
Simple class name as default.
Since:
4.3.1

checkRequiredConfigProperty

public void checkRequiredConfigProperty(java.lang.String configPropertyName,
                                        java.lang.Object configPropertyValue,
                                        Issues issues)
Utility method that can be used in method checkConfiguration to check required properties. If configPropertyValue is null or a blank string then this method will add an error issue.

Parameters:
configPropertyName - Name of the checked config property.
configPropertyValue - The config property value.
issues - The Issues instance.