gr.uoa.di.madgik.execution.plan.element
Interface IPlanElement

All Known Implementing Classes:
BagPlanElement, BoundaryPlanElement, BreakPlanElement, CheckpointPlanElement, ConditionalPlanElement, FileTransferPlanElement, FlowPlanElement, LoopPlanElement, ParameterProcessingPlanElement, PlanElementBase, PojoPlanElement, SequencePlanElement, ShellPlanElement, TryCatchFinallyPlanElement, WaitPlanElement, WSRESTPlanElement, WSSOAPPlanElement

public interface IPlanElement

This interface is implemented by all plan elements that can be used to assemble the ExecutionPlan

Author:
gpapanikos

Nested Class Summary
static class IPlanElement.PlanElementType
          The type of the plan element
 
Method Summary
 void Execute(ExecutionHandle Handle)
          Execute the element
 void FromXML(Element XML)
          Populate the element from its xml serialization as returned by ToXML()
 void FromXML(String XML)
          Populate the element from its xml serialization as returned by ToXML()
 List<ContingencyTrigger> GetContingencyTriggers()
          Gets the contingency triggers.
 String GetID()
          Gets the id.
 Set<String> GetModifiedVariableNames()
          Gets the modified variable names of the element and of the elements contained.
 String GetName()
          Gets the name.
 Set<String> GetNeededVariableNames()
          Gets the needed variable names of the element and of the elements contained.
 IPlanElement.PlanElementType GetPlanElementType()
          Gets the plan element type.
 IPlanElement Locate(String ID)
          Locate the plan element with the provided id.
 Set<IPlanElement> LocateActionElements()
          Retrieves the Action elements under this elements
 void SetContingencyResourcePick(ExecutionHandle Handle, String Pick)
          Sets the picked resource in case the IContingencyReaction.ReactionType#Pick reaction is supported
 void SetName(String Name)
          Sets the name.
 IContingencyReaction.ReactionType[] SupportedContingencyTriggers()
          Retrieves the supported contingency triggers.
 boolean SupportsContingencyTriggers()
          Checks if the element supports contingency triggers.
 String ToXML()
          Serialize to xml the element and all its contained elements
 void Validate()
          Validate the element and any sub element it contains
 void ValidatePreExecution(ExecutionHandle Handle)
          Validate the element and any sub element it contains before it is executed
 

Method Detail

GetPlanElementType

IPlanElement.PlanElementType GetPlanElementType()
Gets the plan element type.

Returns:
the plan element type

GetID

String GetID()
Gets the id.

Returns:
the id of the element

GetName

String GetName()
Gets the name.

Returns:
the name

SetName

void SetName(String Name)
Sets the name.

Parameters:
Name - the name

Validate

void Validate()
              throws ExecutionValidationException
Validate the element and any sub element it contains

Throws:
ExecutionValidationException - A validation error occurred

ValidatePreExecution

void ValidatePreExecution(ExecutionHandle Handle)
                          throws ExecutionValidationException
Validate the element and any sub element it contains before it is executed

Parameters:
Handle - the execution handle
Throws:
ExecutionValidationException - A validation error occurred

Locate

IPlanElement Locate(String ID)
Locate the plan element with the provided id. If this is the element requested return this instance. Otherwise forward the request to any sub elements contained. If the element does not belong to the hierarchy under this element, return null

Parameters:
ID - the iD
Returns:
the plan element with the provided id. or null if not found

LocateActionElements

Set<IPlanElement> LocateActionElements()
Retrieves the Action elements under this elements

Returns:
The action ELements

ToXML

String ToXML()
             throws ExecutionSerializationException
Serialize to xml the element and all its contained elements

Returns:
the serialization
Throws:
ExecutionSerializationException - A serialization error occurred

FromXML

void FromXML(String XML)
             throws ExecutionSerializationException
Populate the element from its xml serialization as returned by ToXML()

Parameters:
XML - the xML serialization
Throws:
ExecutionSerializationException - A serialization error occurred

FromXML

void FromXML(Element XML)
             throws ExecutionSerializationException
Populate the element from its xml serialization as returned by ToXML()

Parameters:
XML - the xML serialization
Throws:
ExecutionSerializationException - A serialization error occurred

SupportsContingencyTriggers

boolean SupportsContingencyTriggers()
Checks if the element supports contingency triggers.

Returns:
true, if it does

SupportedContingencyTriggers

IContingencyReaction.ReactionType[] SupportedContingencyTriggers()
Retrieves the supported contingency triggers.

Returns:
the supported contingency triggers types.

GetContingencyTriggers

List<ContingencyTrigger> GetContingencyTriggers()
Gets the contingency triggers.

Returns:
the list of contingency trigger that are applicable to the element.

SetContingencyResourcePick

void SetContingencyResourcePick(ExecutionHandle Handle,
                                String Pick)
                                throws ExecutionRunTimeException
Sets the picked resource in case the IContingencyReaction.ReactionType#Pick reaction is supported

Parameters:
Handle - the execution handle handle
Pick - the picked resource
Throws:
ExecutionRunTimeException - A runtime error occurred

GetNeededVariableNames

Set<String> GetNeededVariableNames()
Gets the needed variable names of the element and of the elements contained. These include the variables that are needed to be present for the element and its hierarchy to be executed.

Returns:
the set of the variable names that are needed by this element and its contained elements

GetModifiedVariableNames

Set<String> GetModifiedVariableNames()
Gets the modified variable names of the element and of the elements contained. These include the variables that are modified by the element and its hierarchy when executed.

Returns:
the set of the variable names that are modified by this element and its contained elements

Execute

void Execute(ExecutionHandle Handle)
             throws ExecutionRunTimeException,
                    ExecutionInternalErrorException,
                    ExecutionCancelException,
                    ExecutionBreakException
Execute the element

Parameters:
Handle - the execution handle
Throws:
ExecutionRunTimeException - A runtime error occurred
ExecutionInternalErrorException - An internal error occurred
ExecutionCancelException - The execution is canceled
ExecutionBreakException - The execution was terminated after an explicit request


Copyright © 2013. All Rights Reserved.