Package com.iizigo.vs.link
Class VSLinkInfo<VSCOMP extends IVSComponent>
java.lang.Object
com.iizigo.vs.link.VSLinkInfo<VSCOMP>
- Direct Known Subclasses:
VSLinkAction
,VSLinkField
,VSLinkVirtualSpace
Class holding the setup for an individual link type and how to create it.
- Author:
- Christopher Mindus
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionprotected String
Returns the message a component is already linked.protected String
Returns the message when no components apply to this.protected abstract String
getOperation
(PropCnr target, VSCOMP component) Returns the operation that linking will produce.protected VSSubLinkInfo
Returns the sub-operations for the operation.Returns the class used for linking.protected abstract boolean
isAlreadyLinked
(PropCnr target, VSCOMP component) Verifies if the component has been linked already.protected abstract boolean
Returns if the linker implementation supports multiple components or a single one.protected boolean
Returns if the dialog box always should be displayed, regardless of the "skip dialog" setting.protected abstract PropCnr
runOperation
(PropCnr target, ArrayList<VSCOMP> components, VSSubLinkInfo subOperations, PropCnr mainContainer, ComplexOperation op) Runs the main operation.
Constructor Details
VSLinkInfo
public VSLinkInfo()
Method Details
getVSClass
Returns the class used for linking.- Returns:
- VirtualSpace.class, VSTable.class, VSColumnHEader.class, VSField.class or VSAction.class.
isAlreadyLinked
Verifies if the component has been linked already.- Parameters:
target
- The target for linking.component
- The component.- Returns:
- true if already handled by this link info.
getAlreadyLinkedMessage
Returns the message a component is already linked.- Returns:
- E.g. "Component is already linked" (default).
getNoComponentsMessage
Returns the message when no components apply to this.- Returns:
- E.g. "No linking operation remains to perform" (default);
isMultipleComponentsSupported
protected abstract boolean isMultipleComponentsSupported()Returns if the linker implementation supports multiple components or a single one.- Returns:
- true if multiple components can be handled, or false for a single one in the list of components for the
operation.runOperation(PropCnr, ArrayList, VSSubLinkInfo, PropCnr, ComplexOperation)
isSkipDialogAllowed
protected boolean isSkipDialogAllowed()Returns if the dialog box always should be displayed, regardless of the "skip dialog" setting.- Returns:
- true to enable dialog to be skipped (default), or false to force display.
getSubOperations
Returns the sub-operations for the operation. This method is called when the dialog box is displayed to perform user-selection of what should be done.- Returns:
- null (default) for no sub-operations, otherwise the instance.
getOperation
Returns the operation that linking will produce.- Parameters:
target
- The target for linking.component
- The component to link.- Returns:
- The text inserted to the table.
runOperation
protected abstract PropCnr runOperation(PropCnr target, ArrayList<VSCOMP> components, VSSubLinkInfo subOperations, PropCnr mainContainer, ComplexOperation op) Runs the main operation.- Parameters:
target
- The target for linking.components
- The component to link.subOperations
- Sub-operations to execute, null for none.mainContainer
- The main container from a parent operation, null for main operation.op
- The complex operation.- Returns:
- Potential property container created, for use in sub-operations.