com.flexive.war.javascript.tree
Class ContentTreeEditor

java.lang.Object
  extended by com.flexive.war.javascript.tree.ContentTreeEditor
All Implemented Interfaces:
java.io.Serializable

public class ContentTreeEditor
extends java.lang.Object
implements java.io.Serializable

Content tree edit actions invoked via JSON/RPC.

Version:
$Rev: 2919 $
Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Constructor Summary
ContentTreeEditor()
           
 
Method Summary
 java.lang.String activate(long nodeId, boolean includeChildren)
           
 java.lang.String addReferences(long nodeId, long[] referenceIds)
           
 java.lang.String copy(long nodeId, long newParentId, int index, boolean live)
           
 java.lang.String copyAbove(long nodeId, long targetId, int index, boolean live)
           
 java.lang.String copyBelow(long nodeId, long targetId, int index, boolean live)
           
 java.lang.String copyReferences(long nodeId, long newParentId, int index, boolean live)
           
 java.lang.String copyReferencesAbove(long nodeId, long targetId, int index, boolean live)
           
 java.lang.String copyReferencesBelow(long nodeId, long targetId, int index, boolean live)
           
 java.lang.String createFolder(long parentNodeId, java.lang.String folderName)
           
 java.lang.String lockContent(long contentId, boolean live)
           
 java.lang.String lockSubtree(long nodeId, boolean live)
           
 java.lang.String move(long nodeId, long newParentId, int index, boolean live)
          Move the given node to the new parent at position index
 java.lang.String moveAbove(long nodeId, long targetId, int index, boolean live)
          Move the given node above the target node ID.
 java.lang.String moveBelow(long nodeId, long targetId, int index, boolean live)
          Move the given node below the target node ID.
 java.lang.String remove(long nodeId, boolean removeContent, boolean live, boolean deleteChildren)
          Remove a tree node and (depending on the removeContent parameter) the attached content instance.
 java.lang.String saveLabel(long nodeId, java.lang.String label, boolean liveTree, boolean pathMode)
          Update the tree node's label.
 java.lang.String unlockContent(long contentId, boolean live)
           
 java.lang.String unlockSubtree(long nodeId, boolean live)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentTreeEditor

public ContentTreeEditor()
Method Detail

saveLabel

public java.lang.String saveLabel(long nodeId,
                                  java.lang.String label,
                                  boolean liveTree,
                                  boolean pathMode)
                           throws java.io.IOException
Update the tree node's label.

Parameters:
nodeId - the node id
label - the new label
liveTree - true if the live tree should be rendered, false for the edit tree
pathMode - true if node labels should be paths instead of content captions
Returns:
nothing
Throws:
java.io.IOException - if the response could not be created

move

public java.lang.String move(long nodeId,
                             long newParentId,
                             int index,
                             boolean live)
                      throws java.lang.Exception
Move the given node to the new parent at position index

Parameters:
nodeId - the tree node to be moved
newParentId - the the parent node
index - the new position
live - if the live tree should be used
Returns:
nothing
Throws:
java.lang.Exception - if an error occured

moveAbove

public java.lang.String moveAbove(long nodeId,
                                  long targetId,
                                  int index,
                                  boolean live)
                           throws java.lang.Exception
Move the given node above the target node ID.

Parameters:
nodeId - the tree node to be moved
targetId - the target node ID
index - (unused)
live - if the live tree should be used
Returns:
nothing
Throws:
java.lang.Exception - if an error occured

moveBelow

public java.lang.String moveBelow(long nodeId,
                                  long targetId,
                                  int index,
                                  boolean live)
                           throws java.lang.Exception
Move the given node below the target node ID.

Parameters:
nodeId - the tree node to be moved
targetId - the target node ID
index - (unused)
live - if the live tree should be used
Returns:
nothing
Throws:
java.lang.Exception - if an error occured

remove

public java.lang.String remove(long nodeId,
                               boolean removeContent,
                               boolean live,
                               boolean deleteChildren)
                        throws java.lang.Exception
Remove a tree node and (depending on the removeContent parameter) the attached content instance.

Parameters:
nodeId - the tree node ID
removeContent - if true, the attached content instance will also be removed
live - if the tree is in live mode
deleteChildren - if the node children should also be deleted
Returns:
nothing
Throws:
java.lang.Exception - if an error occured

addReferences

public java.lang.String addReferences(long nodeId,
                                      long[] referenceIds)
                               throws java.lang.Exception
Throws:
java.lang.Exception

createFolder

public java.lang.String createFolder(long parentNodeId,
                                     java.lang.String folderName)
                              throws java.lang.Exception
Throws:
java.lang.Exception

lockContent

public java.lang.String lockContent(long contentId,
                                    boolean live)
                             throws java.lang.Exception
Throws:
java.lang.Exception

unlockContent

public java.lang.String unlockContent(long contentId,
                                      boolean live)
                               throws java.lang.Exception
Throws:
java.lang.Exception

lockSubtree

public java.lang.String lockSubtree(long nodeId,
                                    boolean live)
                             throws java.lang.Exception
Throws:
java.lang.Exception

unlockSubtree

public java.lang.String unlockSubtree(long nodeId,
                                      boolean live)
                               throws java.lang.Exception
Throws:
java.lang.Exception

activate

public java.lang.String activate(long nodeId,
                                 boolean includeChildren)
                          throws java.lang.Exception
Throws:
java.lang.Exception

copy

public java.lang.String copy(long nodeId,
                             long newParentId,
                             int index,
                             boolean live)
                      throws java.lang.Exception
Throws:
java.lang.Exception

copyAbove

public java.lang.String copyAbove(long nodeId,
                                  long targetId,
                                  int index,
                                  boolean live)
                           throws java.lang.Exception
Throws:
java.lang.Exception

copyBelow

public java.lang.String copyBelow(long nodeId,
                                  long targetId,
                                  int index,
                                  boolean live)
                           throws java.lang.Exception
Throws:
java.lang.Exception

copyReferences

public java.lang.String copyReferences(long nodeId,
                                       long newParentId,
                                       int index,
                                       boolean live)
                                throws java.lang.Exception
Throws:
java.lang.Exception

copyReferencesAbove

public java.lang.String copyReferencesAbove(long nodeId,
                                            long targetId,
                                            int index,
                                            boolean live)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

copyReferencesBelow

public java.lang.String copyReferencesBelow(long nodeId,
                                            long targetId,
                                            int index,
                                            boolean live)
                                     throws java.lang.Exception
Throws:
java.lang.Exception