com.alveole.studio.web.managers
Class PackageToAnyLinksManager

java.lang.Object
  extended by com.alveole.studio.web.managers.BasicLinkManager
      extended by com.alveole.studio.web.managers.PackageToAnyLinksManager
All Implemented Interfaces:
LinkManager

public class PackageToAnyLinksManager
extends BasicLinkManager

This class handles package to package links.

Author:
sylvain

Nested Class Summary
 class PackageToAnyLinksManager.CreateLinkListener
          A data-model associated to a View Editor.
 class PackageToAnyLinksManager.EditLinkListener
          A data-model associated to a View Editor.
 
Field Summary
static java.lang.String ExtId
          This plguin ID.
 
Fields inherited from class com.alveole.studio.web.managers.BasicLinkManager
xmlns, xmlprefix
 
Constructor Summary
PackageToAnyLinksManager()
           
 
Method Summary
 boolean canLink(ProjectContext context, NodeContainer node1, NodeContainer node2)
          Check if can link.
 NodeLink copyLink(ProjectContext context, NodeLink original, NodeContainer node1, NodeContainer node2)
          Create a copy of this link.
 void createLink(ProjectContext context, NodeContainer node1, NodeContainer node2)
          Create a link.
 void editLink(ProjectContext context, NodeLink link, boolean shortView)
          Edit a link.
 
Methods inherited from class com.alveole.studio.web.managers.BasicLinkManager
deleteLink, serialize, unserialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ExtId

public static final java.lang.String ExtId
This plguin ID.

See Also:
Constant Field Values
Constructor Detail

PackageToAnyLinksManager

public PackageToAnyLinksManager()
Method Detail

canLink

public boolean canLink(ProjectContext context,
                       NodeContainer node1,
                       NodeContainer node2)
Check if can link.

Parameters:
context - The project context.
node1 - The origin node.
node2 - The target node.
Returns:
true if this manager can perform linking of these two nodes.

copyLink

public NodeLink copyLink(ProjectContext context,
                         NodeLink original,
                         NodeContainer node1,
                         NodeContainer node2)
Create a copy of this link.

Parameters:
context - The project context.
original - The origin node for this link.
node1 - The copy of the origin node.
node2 - The copy of the target node.
Returns:
The copy or null if link cannot be copied.

createLink

public void createLink(ProjectContext context,
                       NodeContainer node1,
                       NodeContainer node2)
Create a link.

Parameters:
context - the project context.
node1 - The origin node.
node2 - The target node.

editLink

public void editLink(ProjectContext context,
                     NodeLink link,
                     boolean shortView)
Edit a link.

Parameters:
context - The project context.
link - The link to edit.
shortView - The edition mode.