org.olat.core.gui.control.generic.ajax.tree
Class MoveTreeNodeEvent

java.lang.Object
  extended by org.olat.core.gui.control.Event
      extended by org.olat.core.gui.control.generic.ajax.tree.MoveTreeNodeEvent
All Implemented Interfaces:
java.io.Serializable

public class MoveTreeNodeEvent
extends Event

Description:

Event fired when a tree node has been moved within the tree.

Initial Date: 04.07.2007

Author:
Florian Gnaegi, frentix GmbH, http://www.frentix.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.olat.core.gui.control.Event
BACK_EVENT, CANCELLED_EVENT, CHANGED_EVENT, DONE_EVENT, FAILED_EVENT
 
Constructor Summary
MoveTreeNodeEvent(java.lang.String nodeId, java.lang.String oldParentNodeId, java.lang.String newParentNodeId, int position)
          Constructor
 
Method Summary
 java.lang.String getNewParentNodeId()
           
 java.lang.String getNodeId()
           
 java.lang.String getOldParentNodeId()
           
 int getPosition()
           
 java.lang.String getResultFailureMessage()
           
 java.lang.String getResultFailureTitle()
           
 boolean isResultSuccess()
           
 void setResult(boolean isSuccess, java.lang.String failureTitle, java.lang.String failureMessage)
          Set the result of this move operation.
 
Methods inherited from class org.olat.core.gui.control.Event
getCommand, hashCode, toString
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MoveTreeNodeEvent

public MoveTreeNodeEvent(java.lang.String nodeId,
                         java.lang.String oldParentNodeId,
                         java.lang.String newParentNodeId,
                         int position)
Constructor

Parameters:
nodeId - ID of the moved tree node
oldParentNodeId - ID of the parent tree node before move
newParentNodeId - ID of the parent tree node after move
position - position in the parents child list after move
Method Detail

getPosition

public int getPosition()
Returns:
The position in the parents child list after move

getNewParentNodeId

public java.lang.String getNewParentNodeId()
Returns:
ID of the parent tree node after move

getNodeId

public java.lang.String getNodeId()
Returns:
ID of the moved tree node

getOldParentNodeId

public java.lang.String getOldParentNodeId()
Returns:
ID of the parent tree node before move

setResult

public void setResult(boolean isSuccess,
                      java.lang.String failureTitle,
                      java.lang.String failureMessage)
Set the result of this move operation. The event object is used as callback.

Parameters:
isSuccess - true if move is allowed and performed on the data model; false if move not allowed or an error occured.
failureTitle - The title of the message in case of success = false
failureMessage - The message showed to the user in case of success = false

isResultSuccess

public boolean isResultSuccess()
Returns:
true if move is allowed and performed on the data model; false if move not allowed or an error occured.

getResultFailureTitle

public java.lang.String getResultFailureTitle()
Returns:
The title of the message in case of success = false or NULL if not set

getResultFailureMessage

public java.lang.String getResultFailureMessage()
Returns:
The message showed to the user in case of success = false or NULL if not set