Class CompositeComponent
java.lang.Object
org.eclipse.emf.mwe.core.container.CompositeComponent
- All Implemented Interfaces:
WorkflowComponent
,WorkflowComponentWithID
,IWorkflowComponent
- Direct Known Subclasses:
ConditionalComponent
,Workflow
public class CompositeComponent
extends Object
implements WorkflowComponentWithID, IWorkflowComponent
A composite WorkflowComponent.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<WorkflowComponent>
All components aggregated by this compositeprotected static final org.apache.commons.logging.Log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a bean.void
addCartridge
(Workflow cartridge) Sets the aggregated components of this composite.void
addComponent
(WorkflowComponent component) Sets the aggregated components of this composite.void
addFeature
(FeatureComponent comp) adds a feature components to the list of componentsvoid
addIf
(IfComponent comp) adds a conditionalcompositecomponent to the list of componentsvoid
checkConfiguration
(Issues issues) Called by the container after configuration so the component can validate the configuration before invocation.protected Mwe2Bridge
Returns the name of the component.Returns a list of aggregated components.Returns the containing component if there is one.getId()
Returns the ID of the component.Returns the location of the entry in the parent workflow file.Returns the log message,getName()
Returns the name of the component.Returns the location of the start and closing tags in the actual workflow file.Returns the filename of the workflow.void
invoke
(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) Dispatches the invocation to all aggregated components.void
invoke
(IWorkflowContext ctx) void
void
void
put
(String name, WorkflowComponent comp) Adds a workflow component.void
setContainer
(CompositeComponent container) Sets the containing component.void
Sets the ID of the workflow component.void
setLocation
(Location location) Sets the location in the source file that invokes the current component.void
setOwnLocation
(Location endLocation) Sets the location of the start and closing tags in the actual workflow file.void
setResource
(String resource) Sets the filename of the workflow.
-
Field Details
-
log
protected static final org.apache.commons.logging.Log log -
components
All components aggregated by this composite
-
-
Constructor Details
-
CompositeComponent
-
-
Method Details
-
getComponents
Returns a list of aggregated components.- Returns:
- list of components
-
getId
Description copied from interface:WorkflowComponentWithID
Returns the ID of the component.- Specified by:
getId
in interfaceWorkflowComponentWithID
- Returns:
- the component ID
-
setId
Description copied from interface:WorkflowComponentWithID
Sets the ID of the workflow component.- Specified by:
setId
in interfaceWorkflowComponentWithID
- Parameters:
id
- the ID
-
getLogMessage
Description copied from interface:WorkflowComponentWithID
Returns the log message,- Specified by:
getLogMessage
in interfaceWorkflowComponentWithID
- Returns:
- the log message
-
invoke
Dispatches the invocation to all aggregated components.- Specified by:
invoke
in interfaceWorkflowComponent
- Parameters:
ctx
- current workflow contextmonitor
- implementors should provide some feedback about the progress using this monitor
-
checkConfiguration
Description copied from interface:WorkflowComponent
Called by the container after configuration so the component can validate the configuration before invocation.- Specified by:
checkConfiguration
in interfaceWorkflowComponent
- Parameters:
issues
- implementors should report configuration issues to this.- Throws:
ConfigurationException
-
getName
Returns the name of the component.- Returns:
- name of component
-
getResource
Returns the filename of the workflow.- Returns:
- the filename
-
setResource
Sets the filename of the workflow.- Parameters:
resource
- the filename
-
getLocation
Returns the location of the entry in the parent workflow file.- Specified by:
getLocation
in interfaceWorkflowComponent
- Returns:
- the location
- See Also:
-
setLocation
Description copied from interface:WorkflowComponent
Sets the location in the source file that invokes the current component.- Specified by:
setLocation
in interfaceWorkflowComponent
- Parameters:
location
- the location
-
getOwnLocation
Returns the location of the start and closing tags in the actual workflow file.- Returns:
- the location
-
setOwnLocation
Sets the location of the start and closing tags in the actual workflow file.- Parameters:
endLocation
- the location
-
addBean
Adds a bean.- Parameters:
obj
- the bean
-
addComponent
Sets the aggregated components of this composite.- Parameters:
component
- Components to add.
-
addCartridge
Sets the aggregated components of this composite.- Parameters:
cartridge
- cartridge to add.
-
addIf
adds a conditionalcompositecomponent to the list of components- Parameters:
comp
- the conditional component
-
addFeature
adds a feature components to the list of components- Parameters:
comp
- the feature component
-
getContainer
Description copied from interface:WorkflowComponent
Returns the containing component if there is one.- Specified by:
getContainer
in interfaceWorkflowComponent
- Returns:
- the containing component
- See Also:
-
setContainer
Description copied from interface:WorkflowComponent
Sets the containing component.- Specified by:
setContainer
in interfaceWorkflowComponent
- Parameters:
container
- the containing component- See Also:
-
put
Adds a workflow component.- Parameters:
comp
- the component
-
getComponentName
Description copied from interface:WorkflowComponent
Returns the name of the component.- Specified by:
getComponentName
in interfaceWorkflowComponent
- Returns:
- the component name
- See Also:
-
getBridge
-
preInvoke
public void preInvoke()- Specified by:
preInvoke
in interfaceIWorkflowComponent
-
invoke
- Specified by:
invoke
in interfaceIWorkflowComponent
-
postInvoke
public void postInvoke()- Specified by:
postInvoke
in interfaceIWorkflowComponent
-