Package com.iizigo.link
Interface ILinkOperation
- All Known Implementing Classes:
AddAnnotationPrecondition
,ButtonBuilderSubOp
,ComboBoxBuilderSubOp
,LayoutNewComponentsOperation
,LopAssignVirtualSpace
,LopVSAction
,LopVSComponent
,LopVSField
,MenuItemBuilderSubOp
,TextAreaBuilderSubOp
,TextBuilderSubOp
,UIBuilderOperation
,UIBuilderSubOperation
,VSActionBuilderSubOp
,VSFieldBuilderSubOp
public interface ILinkOperation
The link operation contains the information required to identify the link operation to perform, potentially present what should be done to the user for his/her selection. The operation must also be able to verify if it is incompatible with other operations in the global operation. Perhaps one operation may require others to be performed in order to be successful (e.g. create a VS Field reference for a panel component may required the panel to become VirtualSpace participant first).
The "equals(Object)" method MUST be implemented in the link operation class. This equal method must return equality if two operations would produce the SAME result if executed.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptiondefault void
addPages
(LinkWizard wizard) Called when the wizard is created and allows the creation of additional wizard pages required.Creates the operation node for presentation in the link wizard main page.boolean
Checks if two operations are equal.Executes the operation.default List<ILinkOperation>
Returns the dependent operations that must be performed in order for this operation to be able to complete.Returns if the operation is enabled for execution, regardless of any preconditions.default IStatus
isOperationEnabled
(List<ILinkOperation> allOperations) Returns if the operation is enabled for execution, regardless of any preconditions.default boolean
Returns if the operation is a precondition required to run BEFORE the parent operation runs, or if it should be run AFTERWARDS.default boolean
Returns if this operation is selected or not.default boolean
Returns if the link wizard dialog must be shown.default IStatus
validateOperations
(List<ILinkOperation> operations) Verifies all the operations for each operation using this call.
Method Details
isPrecondition
default boolean isPrecondition()Returns if the operation is a precondition required to run BEFORE the parent operation runs, or if it should be run AFTERWARDS.- Returns:
- true to run BEFORE, false to run AFTERWARDS.
isSelected
default boolean isSelected()Returns if this operation is selected or not.This method is used e.g. in the build operations where a page shouldn't be displayed if the build wizard is not selected.
- Returns:
- true by default.
isOperationEnabled
IStatus isOperationEnabled()Returns if the operation is enabled for execution, regardless of any preconditions. These are tested once all parties have agreed that the operation might be a "go".- Returns:
- The status for the operation.
isOperationEnabled
Returns if the operation is enabled for execution, regardless of any preconditions. These are tested once all parties have agreed that the operation might be a "go".- Parameters:
allOperations
- A list of all operations, including the preconditions.- Returns:
- The status for the operation, default is to return
.isOperationEnabled()
getDependentOperations
Returns the dependent operations that must be performed in order for this operation to be able to complete.- Returns:
- The collection of dependency operations, default empty list.
isWizardDialogRequired
default boolean isWizardDialogRequired()Returns if the link wizard dialog must be shown.- Returns:
- true in order to present user choices, etc, false otherwise, default false.
validateOperations
Verifies all the operations for each operation using this call. This makes it possible for link operations that are not compatible or e.g. defined multiple times with different targets (or same target for multiple sources) and this is not allowed.- Parameters:
operations
- All link operations, including preconditions.- Returns:
- The status of the validation, default OK.
addPages
Called when the wizard is created and allows the creation of additional wizard pages required. All created pages MUST implement done to get the link wizard information.executeOperation
Executes the operation.- Parameters:
op
- The complex operation.- Returns:
- The status of the operation. A complex operation would have a
MultiStatus
return code. - Throws:
CoreException
- If the execution failed.
equalsOp
Checks if two operations are equal.- Parameters:
op
- Operation to compare with.- Returns:
- true if they produce the same result, false otherwise.