com.alveole.studio.web.managers
Class Struts2LinkManager

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

public class Struts2LinkManager
extends BasicLinkManager

Link manager for struts2 actions. It enables to manage links from struts2 actions to any type of view.

Author:
sylvain

Field Summary
static java.lang.String ExtId
          This plugin ID.
 
Fields inherited from class com.alveole.studio.web.managers.BasicLinkManager
xmlns, xmlprefix
 
Constructor Summary
Struts2LinkManager()
          Constructor.
 
Method Summary
 boolean canLink(ProjectContext context, NodeContainer node1, NodeContainer node2)
          Check if this plugin can perfmorm this kind of link.
 NodeLink copyLink(ProjectContext context, NodeLink original, NodeContainer node1, NodeContainer node2)
          Perform a copy of the given link.
 void createLink(ProjectContext context, NodeContainer node1, NodeContainer node2)
          Create a new link from a Struts2 node and any URL's node.
 void editLink(ProjectContext context, NodeLink link, boolean shortView)
          Edit a link that is managed by this plugin.
 void serialize(NodeLink link, org.w3c.dom.Element element)
          Default "serialize implementation stores all specific properties in XML element.
 void unserialize(NodeLink link, org.w3c.dom.Element element)
          Default implementation only read specific attributes.
 
Methods inherited from class com.alveole.studio.web.managers.BasicLinkManager
deleteLink
 
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 plugin ID.

See Also:
Constant Field Values
Constructor Detail

Struts2LinkManager

public Struts2LinkManager()
Constructor.

Method Detail

canLink

public boolean canLink(ProjectContext context,
                       NodeContainer node1,
                       NodeContainer node2)
Check if this plugin can perfmorm this kind of link.

Parameters:
context - The project context.
node1 - The first 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)
Perform a copy of the given 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 new link from a Struts2 node and any URL's node.

Parameters:
context - The project context.
node1 - The original node.
node2 - The target node.

editLink

public void editLink(ProjectContext context,
                     NodeLink link,
                     boolean shortView)
Edit a link that is managed by this plugin.

Parameters:
context - The current project context.
link - The node link to be edited.
shortView - true if link is simply selected, false if link has been dbl-clicked.

serialize

public void serialize(NodeLink link,
                      org.w3c.dom.Element element)
Default "serialize implementation stores all specific properties in XML element.

Specified by:
serialize in interface LinkManager
Overrides:
serialize in class BasicLinkManager
Parameters:
link - The link to customize given the serialized data.
element - The specific DOM element that stores properties.

unserialize

public void unserialize(NodeLink link,
                        org.w3c.dom.Element element)
Default implementation only read specific attributes.

Specified by:
unserialize in interface LinkManager
Overrides:
unserialize in class BasicLinkManager
Parameters:
link - The node link.
element - The DOM element in which specific properties from link should be stored.