Package com.iizigo.vs.link
Class VSLinkVirtualSpace
- java.lang.Object
- com.iizigo.vs.link.VSLinkInfo<EditorVirtualSpace>
- com.iizigo.vs.link.VSLinkVirtualSpace
public class VSLinkVirtualSpace extends VSLinkInfo<EditorVirtualSpace>
Links a VirtualSpace to a target component, or replaces an existing VirtualSpace.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description VSLinkVirtualSpace()
The constructor for a VirtualSpace participant where the property of VSParticipant is named Atom.VIRTUALSPACE.VSLinkVirtualSpace(Atom atom, boolean isParticipant)
The constructor takes the VirtualSpace atom for the operation and if it's a VirtualSpace reference or a VirtualSpace participant.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getOperation(PropCnr target, EditorVirtualSpace component)
Returns the operation that linking will produce.java.lang.Class<EditorVirtualSpace>
getVSClass()
Returns the class used for linking.protected boolean
isAlreadyLinked(PropCnr target, EditorVirtualSpace component)
Verifies if the component has been linked already.protected boolean
isMultipleComponentsSupported()
Returns if the linker implementation supports multiple components or a single one.protected PropCnr
runOperation(PropCnr target, java.util.ArrayList<EditorVirtualSpace> virtualSpaces, VSSubLinkInfo subOperations, PropCnr mainContainer, ComplexOperation op)
Runs the main operation.Methods inherited from class com.iizigo.vs.link.VSLinkInfo
getAlreadyLinkedMessage, getNoComponentsMessage, getSubOperations, isSkipDialogAllowed
Constructor Detail
VSLinkVirtualSpace
public VSLinkVirtualSpace()
The constructor for a VirtualSpace participant where the property of VSParticipant is named Atom.VIRTUALSPACE.
VSLinkVirtualSpace
public VSLinkVirtualSpace(Atom atom, boolean isParticipant)
The constructor takes the VirtualSpace atom for the operation and if it's a VirtualSpace reference or a VirtualSpace participant.- Parameters:
atom
- The atom for the reference property.isParticipant
- Flag indicating VirtualSpace participant.
Method Detail
getVSClass
public java.lang.Class<EditorVirtualSpace> getVSClass()
Returns the class used for linking.- Specified by:
getVSClass
in classVSLinkInfo<EditorVirtualSpace>
- Returns:
- EditorVirtualSpace.class.
isAlreadyLinked
protected boolean isAlreadyLinked(PropCnr target, EditorVirtualSpace component)
Verifies if the component has been linked already.- Specified by:
isAlreadyLinked
in classVSLinkInfo<EditorVirtualSpace>
- Parameters:
target
- The target for linking.component
- The component.- Returns:
- true if already handled by this link info.
getOperation
protected java.lang.String getOperation(PropCnr target, EditorVirtualSpace component)
Returns the operation that linking will produce.- Specified by:
getOperation
in classVSLinkInfo<EditorVirtualSpace>
- Parameters:
target
- The target for linking.component
- The component to link.- Returns:
- The text inserted to the table.
isMultipleComponentsSupported
protected boolean isMultipleComponentsSupported()
Returns if the linker implementation supports multiple components or a single one.- Specified by:
isMultipleComponentsSupported
in classVSLinkInfo<EditorVirtualSpace>
- 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)
runOperation
protected PropCnr runOperation(PropCnr target, java.util.ArrayList<EditorVirtualSpace> virtualSpaces, VSSubLinkInfo subOperations, PropCnr mainContainer, ComplexOperation op)
Runs the main operation.- Specified by:
runOperation
in classVSLinkInfo<EditorVirtualSpace>
- Parameters:
target
- The target for linking.virtualSpaces
- The VirtualSpaces to link (just one due to "isMultipleComponentsSupported()==false").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.