ilog.views.diagrammer.servlet
Class IlvDiagrammerCreateActionListener

java.lang.Object
  extended by ilog.views.diagrammer.servlet.IlvDiagrammerCreateActionListener
All Implemented Interfaces:
ServerActionListener, EventListener

public class IlvDiagrammerCreateActionListener
extends Object
implements ServerActionListener

This class defines a server action that is in charge of creating diagrammer nodes or links.

This action is triggered by the action name "createObject" and takes the following parameters:

Since:
JViews 8.0

Field Summary
static String ACTION_NAME
          The action name used to identify the actions that create node or link.
 
Constructor Summary
IlvDiagrammerCreateActionListener()
          Creates a new IlvDiagrammerCreateActionListener instance.
 
Method Summary
 void actionPerformed(ServerActionEvent event)
          Performs the action requested from the client side.
protected  void applyProperties(ServerActionEvent event, IlvDiagrammer diagrammer, Object object)
          Applies the properties to the created object.
protected  Object createLink(ServerActionEvent event, IlvDiagrammer diagrammer, String tag, Object source, Object target)
          This method creates a diagrammer link.
protected  Object createNode(ServerActionEvent event, IlvDiagrammer diagrammer, String tag)
          This method creates a diagrammer node.
protected  Map getProperties(javax.servlet.http.HttpServletRequest request)
          Returns the properties that might have been set for creation time on the client side.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_NAME

public static final String ACTION_NAME
The action name used to identify the actions that create node or link.

See Also:
Constant Field Values
Constructor Detail

IlvDiagrammerCreateActionListener

public IlvDiagrammerCreateActionListener()
Creates a new IlvDiagrammerCreateActionListener instance.

Method Detail

actionPerformed

public void actionPerformed(ServerActionEvent event)
                     throws javax.servlet.ServletException
Performs the action requested from the client side.

Specified by:
actionPerformed in interface ServerActionListener
Parameters:
event - The server action event.
Throws:
javax.servlet.ServletException

createLink

protected Object createLink(ServerActionEvent event,
                            IlvDiagrammer diagrammer,
                            String tag,
                            Object source,
                            Object target)
This method creates a diagrammer link. This can be redefined to specialize the link creation.

Parameters:
event - The event at the origin of the link creation.
diagrammer - The diagrammer.
tag - The required tag.
source - The source of the link.
target - The target of the link.
Returns:
The created link.

createNode

protected Object createNode(ServerActionEvent event,
                            IlvDiagrammer diagrammer,
                            String tag)
This method creates a diagrammer node. This can be redefined to specialize the node creation.

Parameters:
event - The event at the origin of the node creation.
diagrammer - The diagrammer.
tag - The required tag.
Returns:
The created node.

getProperties

protected final Map getProperties(javax.servlet.http.HttpServletRequest request)
Returns the properties that might have been set for creation time on the client side.

Parameters:
request - The HTTP request.

applyProperties

protected void applyProperties(ServerActionEvent event,
                               IlvDiagrammer diagrammer,
                               Object object)
Applies the properties to the created object. This implementation directly sets the properties and values on the diagrammer model without any conversion or filtering.

Parameters:
event - The event at the origin of the node creation.
diagrammer - The diagrammer.
object - The created object
See Also:
getProperties(HttpServletRequest)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.