|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.servlets.MVCServletHandlerImpl info.magnolia.cms.servlets.CommandBasedMVCServletHandler info.magnolia.module.admininterface.AdminTreeMVCHandler
public class AdminTreeMVCHandler
this class wrapes the tree control. The AdminInterfaceServlet instantiates a subclass. To build your own tree you have to override the prepareTree() method
Field Summary | |
---|---|
protected boolean |
browseMode
Used to display the same tree in the linkbrowser |
protected static String |
COMMAND_ACTIVATE
|
protected static String |
COMMAND_COPY_NODE
|
protected static String |
COMMAND_CREATE_NODE
|
protected static String |
COMMAND_DEACTIVATE
|
protected static String |
COMMAND_DELETE_NODE
|
protected static String |
COMMAND_MOVE_NODE
|
protected static String |
COMMAND_SAVE_VALUE
|
protected static String |
COMMAND_SHOW_TREE
this are the used actions |
protected AdminTreeConfiguration |
configuration
The configuration used to configure the tree |
protected String |
createItemType
|
protected String |
displayValue
Used to pass the saved value to the view |
protected String |
newNodeName
|
protected String |
newPath
|
protected String |
path
|
protected String |
pathOpen
|
protected String |
pathSelected
|
protected String |
rootPath
|
protected info.magnolia.cms.gui.control.Tree |
tree
name of the tree (not the repository) |
protected static String |
VIEW_COPY_MOVE
|
protected static String |
VIEW_CREATE
|
protected static String |
VIEW_NOTHING
|
protected static String |
VIEW_TREE
The view names |
protected static String |
VIEW_VALUE
|
Fields inherited from class info.magnolia.cms.servlets.MVCServletHandlerImpl |
---|
exception, request, response, VIEW_ERROR, VIEW_SUCCESS |
Constructor Summary | |
---|---|
AdminTreeMVCHandler(String name,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
Method Summary | |
---|---|
String |
copy()
Copy a node |
info.magnolia.cms.core.Content |
copyMoveNode(String source,
String destination,
boolean move)
|
void |
copyNode(String source,
String destination)
|
String |
createNode()
Create a new node and show the tree |
void |
deactivateNode(String path)
Execute the deactivation command |
String |
delete()
|
void |
deleteNode(String path)
|
void |
deleteNode(String parentPath,
String label)
|
protected org.apache.commons.chain.Command |
findCommand(String commandName)
Allow default catalogue |
info.magnolia.cms.exchange.Syndicator |
getActivationSyndicator(String path)
Create the Syndicator to activate the specified path. |
String |
getCommand()
Depending on the request it is generating a logical command name |
protected info.magnolia.context.Context |
getCommandContext(String commandName)
TODO: this is a temporary solution |
AdminTreeConfiguration |
getConfiguration()
Returns the configuration object for this tree; if it's not been instanciated yet, this method attempts to instanciate the configurationClass. |
String |
getConfigurationClass()
|
String |
getCreateItemType()
|
info.magnolia.cms.core.HierarchyManager |
getHierarchyManager()
|
String |
getI18nBasename()
|
String |
getNewNodeName()
|
protected String |
getPath()
|
protected String |
getPathSelected()
|
String |
getRepository()
Override this method if you are not using the same name for the tree and the repository |
String |
getRootPath()
|
protected info.magnolia.cms.gui.control.Tree |
getTree()
|
String |
getTreeClass()
|
protected String |
getViewNameAfterExecution(String commandName,
info.magnolia.context.Context ctx)
Show the tree after execution of a command |
void |
init()
|
boolean |
isBrowseMode()
|
boolean |
isEnableDeleteConfirmation()
|
String |
move()
Move a node |
void |
moveNode(String source,
String destination)
|
String |
pasteNode(String pathOrigin,
String pathSelected,
int pasteType,
int action)
|
protected String |
rename(String value)
Called during a renaming of a node. |
String |
renameNode(String newLabel)
|
protected void |
renderHeaderIncludes(StringBuffer html)
|
void |
renderHtml(String view)
Render the tree depending on the view name. |
protected void |
renderTree(StringBuffer html)
Create the html for the tree. |
String |
saveValue()
Saves a value edited directly inside the tree. |
void |
setBrowseMode(boolean browseMode)
|
void |
setConfiguration(AdminTreeConfiguration configuration)
|
void |
setConfigurationClass(String configClass)
|
void |
setCreateItemType(String createItemType)
|
void |
setEnableDeleteConfirmation(boolean enableConfirmation)
|
void |
setI18nBasename(String i18nBasename)
|
void |
setNewNodeName(String newNodeName)
|
void |
setRepository(String repository)
|
void |
setRootPath(String rootPath)
|
protected void |
setTree(info.magnolia.cms.gui.control.Tree tree)
|
void |
setTreeClass(String treeClass)
|
String |
show()
Show the tree |
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 |
Field Detail |
---|
protected static final String COMMAND_SHOW_TREE
protected static final String COMMAND_COPY_NODE
protected static final String COMMAND_MOVE_NODE
protected static final String COMMAND_ACTIVATE
protected static final String COMMAND_DEACTIVATE
protected static final String COMMAND_CREATE_NODE
protected static final String COMMAND_DELETE_NODE
protected static final String COMMAND_SAVE_VALUE
protected static final String VIEW_TREE
protected static final String VIEW_CREATE
protected static final String VIEW_VALUE
protected static final String VIEW_NOTHING
protected static final String VIEW_COPY_MOVE
protected info.magnolia.cms.gui.control.Tree tree
protected AdminTreeConfiguration configuration
protected String newNodeName
protected String createItemType
protected String path
protected String pathOpen
protected String pathSelected
protected String rootPath
protected String displayValue
protected String newPath
protected boolean browseMode
Constructor Detail |
---|
public AdminTreeMVCHandler(String name, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Method Detail |
---|
public String getRepository()
public void setRepository(String repository)
public info.magnolia.cms.core.HierarchyManager getHierarchyManager()
public void init()
init
in interface info.magnolia.cms.servlets.MVCServletHandler
init
in class info.magnolia.cms.servlets.MVCServletHandlerImpl
public String getCommand()
getCommand
in interface info.magnolia.cms.servlets.MVCServletHandler
getCommand
in class info.magnolia.cms.servlets.MVCServletHandlerImpl
protected info.magnolia.context.Context getCommandContext(String commandName)
getCommandContext
in class info.magnolia.cms.servlets.CommandBasedMVCServletHandler
protected org.apache.commons.chain.Command findCommand(String commandName)
findCommand
in class info.magnolia.cms.servlets.CommandBasedMVCServletHandler
protected String getViewNameAfterExecution(String commandName, info.magnolia.context.Context ctx)
getViewNameAfterExecution
in class info.magnolia.cms.servlets.CommandBasedMVCServletHandler
public String show()
public String createNode()
public String copy()
public String move()
public void deleteNode(String parentPath, String label) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
javax.jcr.RepositoryException
public void deleteNode(String path) throws Exception
Exception
public String delete()
public info.magnolia.cms.exchange.Syndicator getActivationSyndicator(String path)
Syndicator
to activate the specified path. method implementation will make sure that
proper node collection Rule and Sysdicator is used
path
- node path to be activated
Syndicator
used to activatepublic void deactivateNode(String path) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
path
-
info.magnolia.cms.exchange.ExchangeException
javax.jcr.RepositoryException
public info.magnolia.cms.core.Content copyMoveNode(String source, String destination, boolean move) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
javax.jcr.RepositoryException
public void moveNode(String source, String destination) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
javax.jcr.RepositoryException
public void copyNode(String source, String destination) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
javax.jcr.RepositoryException
public String renameNode(String newLabel) throws info.magnolia.cms.security.AccessDeniedException, info.magnolia.cms.exchange.ExchangeException, javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
info.magnolia.cms.security.AccessDeniedException
info.magnolia.cms.exchange.ExchangeException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
public String saveValue()
protected String rename(String value)
value
- the new name
public String pasteNode(String pathOrigin, String pathSelected, int pasteType, int action) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
javax.jcr.RepositoryException
public void renderHtml(String view) throws IOException
view
-
IOException
protected void renderTree(StringBuffer html)
html
- protected void renderHeaderIncludes(StringBuffer html)
html
- protected void setTree(info.magnolia.cms.gui.control.Tree tree)
protected info.magnolia.cms.gui.control.Tree getTree()
public String getNewNodeName()
public void setNewNodeName(String newNodeName)
protected String getPath()
protected String getPathSelected()
public String getCreateItemType()
public void setCreateItemType(String createItemType)
public boolean isBrowseMode()
public void setBrowseMode(boolean browseMode)
browseMode
- The browseMode to set.public AdminTreeConfiguration getConfiguration()
public void setConfiguration(AdminTreeConfiguration configuration)
configuration
- The configuration to set.public String getConfigurationClass()
public void setConfigurationClass(String configClass)
public String getTreeClass()
public void setTreeClass(String treeClass)
public String getI18nBasename()
public void setI18nBasename(String i18nBasename)
public String getRootPath()
public void setRootPath(String rootPath)
public boolean isEnableDeleteConfirmation()
public void setEnableDeleteConfirmation(boolean enableConfirmation)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |