com.alveole.studio.web.data
Class NodeAction

java.lang.Object
  extended by com.alveole.studio.web.data.NodeContainer
      extended by com.alveole.studio.web.data.NodeAction

public class NodeAction
extends NodeContainer

This class represents a MVC controller part (an Action in Struts).

Author:
sylvain

Field Summary
protected  Project context
          The project context.
protected  java.lang.Object customObject
          The custom object for the specific part of this action.
protected  java.util.Properties customProperties
          The custom properties for the specific part of this action.
protected  java.lang.String mgrId
          The associated plugin ID of the ActionManager.
 
Fields inherited from class com.alveole.studio.web.data.NodeContainer
ID, label, parent, project, uiPreferences
 
Constructor Summary
NodeAction(Project context, NodePackage parent)
          Constructor.
 
Method Summary
<T> T
getAdapter(java.lang.Class<T> cls)
          Gets an adapter for this node.
 java.lang.Object getCustomObject()
          Get specific object for customized part of this action.
 java.util.Properties getCustomProperties()
          Get custom properties for specific part of thid action.
 java.lang.String getMgrId()
          Get ActionManager plugin ID for this node.
 void serialize(org.w3c.dom.Element parent)
          Save this action to XML.
 void setCustomObject(java.lang.Object customObject)
          Sets specific object of this node.
 void setCustomProperties(java.util.Properties customProperties)
          Set custom properties for specific part of this action.
 void setMgrId(java.lang.String mgrId)
          Set ActionManager plugin ID for thid node.
 void unserialize(org.w3c.dom.Element element)
          Initialize this action given a stored XML node.
 
Methods inherited from class com.alveole.studio.web.data.NodeContainer
getID, getLabel, getParent, getProject, getUiPreferences, serializeUiPrefs, setID, setLabel, setParent, setProject, setUiPreferences, unserializeUiPrefs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

customProperties

protected java.util.Properties customProperties
The custom properties for the specific part of this action.


customObject

protected java.lang.Object customObject
The custom object for the specific part of this action.


mgrId

protected java.lang.String mgrId
The associated plugin ID of the ActionManager.


context

protected Project context
The project context.

Constructor Detail

NodeAction

public NodeAction(Project context,
                  NodePackage parent)
Constructor.

Parameters:
context - Thr belongin project context.
parent - The parent package.
Method Detail

serialize

public void serialize(org.w3c.dom.Element parent)
Save this action to XML.

Specified by:
serialize in class NodeContainer
Parameters:
parent - The parent XML node.

unserialize

public void unserialize(org.w3c.dom.Element element)
                 throws javax.xml.xpath.XPathException
Initialize this action given a stored XML node.

Specified by:
unserialize in class NodeContainer
Parameters:
element - The stored XML element for this action.
Throws:
javax.xml.xpath.XPathException - If XPath error.

getCustomProperties

public java.util.Properties getCustomProperties()
Get custom properties for specific part of thid action.

Returns:
The properties.

setCustomProperties

public void setCustomProperties(java.util.Properties customProperties)
Set custom properties for specific part of this action.

Parameters:
customProperties - The proeprties.

getCustomObject

public java.lang.Object getCustomObject()
Get specific object for customized part of this action.

Returns:
The object.

setCustomObject

public void setCustomObject(java.lang.Object customObject)
Sets specific object of this node.

Parameters:
customObject - he object.

getMgrId

public java.lang.String getMgrId()
Get ActionManager plugin ID for this node.

Returns:
The ID.

setMgrId

public void setMgrId(java.lang.String mgrId)
Set ActionManager plugin ID for thid node.

Parameters:
mgrId - The ID.

getAdapter

public <T> T getAdapter(java.lang.Class<T> cls)
Gets an adapter for this node. Underlying ActionManager is called to provides specific extensions for the action.

Specified by:
getAdapter in class NodeContainer
Parameters:
cls - Thet target class.
Returns:
An implementation for the required class, or null.