info.magnolia.module.admininterface.trees
Class HierarchicalUsersTreeHandler

java.lang.Object
  extended by info.magnolia.cms.servlets.MVCServletHandlerImpl
      extended by info.magnolia.cms.servlets.CommandBasedMVCServletHandler
          extended by info.magnolia.module.admininterface.AdminTreeMVCHandler
              extended by info.magnolia.module.admininterface.trees.HierarchicalUsersTreeHandler
All Implemented Interfaces:
info.magnolia.cms.servlets.MVCServletHandler

public class HierarchicalUsersTreeHandler
extends AdminTreeMVCHandler

This handler prevents from creating users with same names.


Field Summary
 
Fields inherited from class info.magnolia.module.admininterface.AdminTreeMVCHandler
browseMode, COMMAND_ACTIVATE, COMMAND_COPY_NODE, COMMAND_CREATE_NODE, COMMAND_DEACTIVATE, COMMAND_DELETE_NODE, COMMAND_MOVE_NODE, COMMAND_SAVE_VALUE, COMMAND_SHOW_TREE, configuration, createItemType, displayValue, newNodeName, newPath, path, pathOpen, pathSelected, rootPath, tree, VIEW_COPY_MOVE, VIEW_CREATE, VIEW_NOTHING, VIEW_TREE, VIEW_VALUE
 
Fields inherited from class info.magnolia.cms.servlets.MVCServletHandlerImpl
exception, request, response, VIEW_ERROR, VIEW_SUCCESS
 
Constructor Summary
HierarchicalUsersTreeHandler(String name, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Method Summary
 info.magnolia.cms.core.Content copyMoveNode(String source, String destination, boolean move)
           
 String createNode()
          Create a new node and show the tree
protected static String generateNewName(String value)
          Generates new user name.
 String renameNode(String newLabel)
           
 
Methods inherited from class info.magnolia.module.admininterface.AdminTreeMVCHandler
copy, copyNode, deactivateNode, delete, deleteNode, deleteNode, encodeHTML, findCommand, getActivationSyndicator, getCommand, getCommandContext, getConfiguration, getConfigurationClass, getCreateItemType, getHierarchyManager, getI18nBasename, getNewNodeName, getPath, getPathSelected, getRepository, getRootPath, getTree, getTreeClass, getViewNameAfterExecution, init, isBrowseMode, isEnableDeleteConfirmation, move, moveNode, pasteNode, rename, renderHeaderIncludes, renderHtml, renderTree, saveValue, setBrowseMode, setConfiguration, setConfigurationClass, setCreateItemType, setEnableDeleteConfirmation, setI18nBasename, setNewNodeName, setRepository, setRootPath, setTree, setTreeClass, show
 
Methods inherited from class info.magnolia.cms.servlets.CommandBasedMVCServletHandler
execute, getCatalogueName, setCatalogueName
 
Methods inherited from class info.magnolia.cms.servlets.MVCServletHandlerImpl
getException, getExceptionStackTrace, getName, getRequest, getResponse, populateFromRequest, setCommand, setRequest, setResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchicalUsersTreeHandler

public HierarchicalUsersTreeHandler(String name,
                                    javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response)
Method Detail

createNode

public String createNode()
Description copied from class: AdminTreeMVCHandler
Create a new node and show the tree

Overrides:
createNode in class AdminTreeMVCHandler
Returns:
newly created content node

renameNode

public String renameNode(String newLabel)
                  throws info.magnolia.cms.security.AccessDeniedException,
                         info.magnolia.cms.exchange.ExchangeException,
                         javax.jcr.PathNotFoundException,
                         javax.jcr.RepositoryException
Overrides:
renameNode in class AdminTreeMVCHandler
Throws:
info.magnolia.cms.security.AccessDeniedException
info.magnolia.cms.exchange.ExchangeException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException

copyMoveNode

public info.magnolia.cms.core.Content copyMoveNode(String source,
                                                   String destination,
                                                   boolean move)
                                            throws info.magnolia.cms.exchange.ExchangeException,
                                                   javax.jcr.RepositoryException
Overrides:
copyMoveNode in class AdminTreeMVCHandler
Throws:
info.magnolia.cms.exchange.ExchangeException
javax.jcr.RepositoryException

generateNewName

protected static String generateNewName(String value)
Generates new user name. If user exists it simply adds an int value to end of user name.



Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.