public class Scufl2Tools extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Scufl2Tools.BindingComparator
Compare
ProcessorBinding s by their
ProcessorBinding.getActivityPosition() . |
static class |
Scufl2Tools.ProcessorSplit
Result bean returned from
splitProcessors(Collection, Processor) . |
Modifier and Type | Field and Description |
---|---|
static URI |
NESTED_WORKFLOW |
static URI |
PORT_DEFINITION |
Constructor and Description |
---|
Scufl2Tools() |
public static URI PORT_DEFINITION
public static URI NESTED_WORKFLOW
public Configuration configurationFor(Configurable configurable, Profile profile)
configurable
- the Configurable
to find a
Configuration
forprofile
- the Profile
to look for the
Configuration
inConfiguration
for a Configurable
in
the given Profile
public Configuration configurationForActivityBoundToProcessor(Processor processor, Profile profile)
public List<Configuration> configurationsFor(Configurable configurable, Profile profile)
configurable
- the Configurable
to find a
Configuration
forprofile
- the Profile
to look for the
Configuration
inConfigurations
for a
Configurable
in the given Profile
public List<BlockingControlLink> controlLinksBlocking(Processor blocked)
public List<BlockingControlLink> controlLinksWaitingFor(Processor untilFinished)
public List<DataLink> datalinksFrom(SenderPort senderPort)
public List<DataLink> datalinksTo(ReceiverPort receiverPort)
public <T extends WorkflowBean> T findParent(Class<T> parentClass, Child<?> child)
public PropertyResource portDefinitionFor(ActivityPort activityPort, Profile profile) throws PropertyException
PropertyException
public ProcessorBinding processorBindingForProcessor(Processor processor, Profile profile)
public List<ProcessorBinding> processorBindingsForProcessor(Processor processor, Profile profile)
public List<ProcessorBinding> processorBindingsToActivity(Activity activity)
public ProcessorInputPortBinding processorPortBindingForPort(InputPort inputPort, Profile profile)
public ProcessorOutputPortBinding processorPortBindingForPort(OutputPort outputPort, Profile profile)
protected ProcessorPortBinding processorPortBindingForPortInternal(Port port, Profile profile)
protected ProcessorPortBinding processorPortBindingInternalInBinding(Port port, ProcessorBinding procBinding)
public void setParents(WorkflowBundle bundle)
public DispatchStackLayer dispatchStackByType(Processor processor, URI type)
public Set<Processor> possibleDownStreamProcessors(Workflow dataflow, Processor processor)
This is calculated as all processors in the dataflow, except the processor itself, and any processor upstream, following both data links and conditional links.
dataflow
- Dataflow from where to find processorsprocessor
- Processor which is to be connected#possibleUpStreamProcessors(Dataflow, Processor)
,
splitProcessors(Collection, Processor)
public Set<Processor> possibleUpStreamProcessors(Workflow dataflow, Processor firstProcessor)
This is calculated as all processors in the dataflow, except the processor itself, and any processor downstream, following both data links and conditional links.
dataflow
- Dataflow from where to find processorsprocessor
- Processor which is to be connected#possibleDownStreamProcessors(Dataflow, Processor)
,
splitProcessors(Collection, Processor)
public Scufl2Tools.ProcessorSplit splitProcessors(Collection<Processor> processors, Processor splitPoint)
processors
- splitPoint
- public Workflow nestedWorkflowForProcessor(Processor processor, Profile profile)
A nested workflow is an activity bound to the processor with the configurable type equal to .
This method returns null
if no such workflow was found,
otherwise the configured workflow.
nestedWorkflowsForProcessor(Processor, Profile)
.
processor
- Processor which might have a nested workflowprofile
- Profile to look for nested workflow activity/configuration.
The profile must have a WorkflowBundle
set as its
Profile.setParent(WorkflowBundle)
.NullPointerException
- if the given profile does not have a parentIllegalStateException
- if a nested workflow configuration is invalid, or more than
one possible workflow is foundpublic List<Workflow> nestedWorkflowsForProcessor(Processor processor, Profile profile)
A nested workflow is an activity bound to the processor with the configurable type equal to .
This method returns a list of 0 or more workflows, as every matching
ProcessorBinding
and every matching Configuration
for the
bound activity is considered. Normally there will only be a single nested
workflow, in which case the
nestedWorkflowForProcessor(Processor, Profile)
method should be
used instead.
Note that even if several bindings/configurations map to the same workflow, each workflow is only included once in the list. Nested workflow configurations that are incomplete or which #workflow can't be found within the workflow bundle of the profile will be silently ignored.
processor
- Processor which might have a nested workflowprofile
- Profile to look for nested workflow activity/configuration.
The profile must have a WorkflowBundle
set as its
Profile.setParent(WorkflowBundle)
.NullPointerException
- if the given profile does not have a parentIllegalStateException
- if a nested workflow configuration is invalidpublic boolean containsNestedWorkflow(Processor processor)
public boolean containsNestedWorkflow(Processor processor, Profile profile)
public void createActivityPortsFromProcessor(Activity activity, Processor processor)
public void createProcessorPortsFromActivity(Processor processor, Activity activity)
public ProcessorBinding bindActivityToProcessorByMatchingPorts(Activity activity, Processor processor)
public void bindActivityToProcessorByMatchingPorts(ProcessorBinding binding)
public ProcessorBinding createProcessorAndBindingFromActivity(Activity activity)
public Activity createActivityFromProcessor(Processor processor, Profile profile)
public void removePortsBindingForUnknownPorts(ProcessorBinding binding)
public void updateBindingByMatchingPorts(ProcessorBinding binding)
Copyright © 2013 myGrid. All rights reserved.