|
||||||||||
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 java.lang.String |
COMMAND_ACTIVATE
|
protected static java.lang.String |
COMMAND_COPY_NODE
|
protected static java.lang.String |
COMMAND_CREATE_NODE
|
protected static java.lang.String |
COMMAND_DEACTIVATE
|
protected static java.lang.String |
COMMAND_DELETE_NODE
|
protected static java.lang.String |
COMMAND_MOVE_NODE
|
protected static java.lang.String |
COMMAND_SAVE_VALUE
|
protected static java.lang.String |
COMMAND_SHOW_TREE
this are the used actions |
protected AdminTreeConfiguration |
configuration
The configuration used to configure the tree |
protected java.lang.String |
createItemType
|
protected java.lang.String |
displayValue
Used to pass the saved value to the view |
protected java.lang.String |
newNodeName
|
protected java.lang.String |
newPath
|
protected java.lang.String |
path
|
protected java.lang.String |
pathOpen
|
protected java.lang.String |
pathSelected
|
protected java.lang.String |
rootPath
|
protected Tree |
tree
name of the tree (not the repository) |
protected static java.lang.String |
VIEW_COPY_MOVE
|
protected static java.lang.String |
VIEW_CREATE
|
protected static java.lang.String |
VIEW_NOTHING
|
protected static java.lang.String |
VIEW_TREE
The view names |
protected static java.lang.String |
VIEW_VALUE
|
Fields inherited from class info.magnolia.cms.servlets.MVCServletHandlerImpl |
---|
exception, request, response, VIEW_ERROR, VIEW_SUCCESS |
Constructor Summary | |
---|---|
AdminTreeMVCHandler(java.lang.String name,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
Method Summary | |
---|---|
java.lang.String |
copy()
Copy a node |
Content |
copyMoveNode(java.lang.String source,
java.lang.String destination,
boolean move)
|
void |
copyNode(java.lang.String source,
java.lang.String destination)
|
java.lang.String |
createNode()
Create a new node and show the tree |
void |
deactivateNode(java.lang.String path)
Execute the deactivation command |
java.lang.String |
delete()
|
void |
deleteNode(java.lang.String path)
|
void |
deleteNode(java.lang.String parentPath,
java.lang.String label)
|
protected org.apache.commons.chain.Command |
findCommand(java.lang.String commandName)
Allow default catalogue |
Syndicator |
getActivationSyndicator(java.lang.String path)
Create the Syndicator to activate the specified path. |
java.lang.String |
getCommand()
Depending on the request it is generating a logical command name |
protected Context |
getCommandContext(java.lang.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. |
java.lang.String |
getConfigurationClass()
|
java.lang.String |
getCreateItemType()
|
HierarchyManager |
getHierarchyManager()
|
java.lang.String |
getI18nBasename()
|
java.lang.String |
getNewNodeName()
|
protected java.lang.String |
getPath()
|
protected java.lang.String |
getPathSelected()
|
java.lang.String |
getRepository()
Override this method if you are not using the same name for the tree and the repository |
java.lang.String |
getRootPath()
|
protected Tree |
getTree()
|
java.lang.String |
getTreeClass()
|
protected java.lang.String |
getViewNameAfterExecution(java.lang.String commandName,
Context ctx)
Show the tree after execution of a command |
void |
init()
Called after instantiating. |
boolean |
isBrowseMode()
|
boolean |
isEnableDeleteConfirmation()
|
java.lang.String |
move()
Move a node |
void |
moveNode(java.lang.String source,
java.lang.String destination)
|
java.lang.String |
pasteNode(java.lang.String pathOrigin,
java.lang.String pathSelected,
int pasteType,
int action)
|
protected java.lang.String |
rename(java.lang.String value)
Called during a renaming of a node. |
java.lang.String |
renameNode(java.lang.String newLabel)
|
protected void |
renderHeaderIncludes(java.lang.StringBuffer html)
|
void |
renderHtml(java.lang.String view)
Render the tree depending on the view name. |
protected void |
renderTree(java.lang.StringBuffer html)
Create the html for the tree. |
java.lang.String |
saveValue()
Saves a value edited directly inside the tree. |
void |
setBrowseMode(boolean browseMode)
|
void |
setConfiguration(AdminTreeConfiguration configuration)
|
void |
setConfigurationClass(java.lang.String configClass)
|
void |
setCreateItemType(java.lang.String createItemType)
|
void |
setEnableDeleteConfirmation(boolean enableConfirmation)
|
void |
setI18nBasename(java.lang.String i18nBasename)
|
void |
setNewNodeName(java.lang.String newNodeName)
|
void |
setRepository(java.lang.String repository)
|
void |
setRootPath(java.lang.String rootPath)
|
protected void |
setTree(Tree tree)
|
void |
setTreeClass(java.lang.String treeClass)
|
java.lang.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 java.lang.String COMMAND_SHOW_TREE
protected static final java.lang.String COMMAND_COPY_NODE
protected static final java.lang.String COMMAND_MOVE_NODE
protected static final java.lang.String COMMAND_ACTIVATE
protected static final java.lang.String COMMAND_DEACTIVATE
protected static final java.lang.String COMMAND_CREATE_NODE
protected static final java.lang.String COMMAND_DELETE_NODE
protected static final java.lang.String COMMAND_SAVE_VALUE
protected static final java.lang.String VIEW_TREE
protected static final java.lang.String VIEW_CREATE
protected static final java.lang.String VIEW_VALUE
protected static final java.lang.String VIEW_NOTHING
protected static final java.lang.String VIEW_COPY_MOVE
protected Tree tree
protected AdminTreeConfiguration configuration
protected java.lang.String newNodeName
protected java.lang.String createItemType
protected java.lang.String path
protected java.lang.String pathOpen
protected java.lang.String pathSelected
protected java.lang.String rootPath
protected java.lang.String displayValue
protected java.lang.String newPath
protected boolean browseMode
Constructor Detail |
---|
public AdminTreeMVCHandler(java.lang.String name, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Method Detail |
---|
public java.lang.String getRepository()
public void setRepository(java.lang.String repository)
public HierarchyManager getHierarchyManager()
public void init()
MVCServletHandler
init
in interface MVCServletHandler
init
in class MVCServletHandlerImpl
public java.lang.String getCommand()
getCommand
in interface MVCServletHandler
getCommand
in class MVCServletHandlerImpl
protected Context getCommandContext(java.lang.String commandName)
getCommandContext
in class CommandBasedMVCServletHandler
commandName
- the name of the command to be called
protected org.apache.commons.chain.Command findCommand(java.lang.String commandName)
findCommand
in class CommandBasedMVCServletHandler
protected java.lang.String getViewNameAfterExecution(java.lang.String commandName, Context ctx)
getViewNameAfterExecution
in class CommandBasedMVCServletHandler
public java.lang.String show()
public java.lang.String createNode()
public java.lang.String copy()
public java.lang.String move()
public void deleteNode(java.lang.String parentPath, java.lang.String label) throws ExchangeException, javax.jcr.RepositoryException
ExchangeException
javax.jcr.RepositoryException
public void deleteNode(java.lang.String path) throws java.lang.Exception
java.lang.Exception
public java.lang.String delete()
public Syndicator getActivationSyndicator(java.lang.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(java.lang.String path) throws ExchangeException, javax.jcr.RepositoryException
path
-
ExchangeException
javax.jcr.RepositoryException
public Content copyMoveNode(java.lang.String source, java.lang.String destination, boolean move) throws ExchangeException, javax.jcr.RepositoryException
ExchangeException
javax.jcr.RepositoryException
public void moveNode(java.lang.String source, java.lang.String destination) throws ExchangeException, javax.jcr.RepositoryException
ExchangeException
javax.jcr.RepositoryException
public void copyNode(java.lang.String source, java.lang.String destination) throws ExchangeException, javax.jcr.RepositoryException
ExchangeException
javax.jcr.RepositoryException
public java.lang.String renameNode(java.lang.String newLabel) throws AccessDeniedException, ExchangeException, javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
AccessDeniedException
ExchangeException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
public java.lang.String saveValue()
protected java.lang.String rename(java.lang.String value)
value
- the new name
public java.lang.String pasteNode(java.lang.String pathOrigin, java.lang.String pathSelected, int pasteType, int action) throws ExchangeException, javax.jcr.RepositoryException
ExchangeException
javax.jcr.RepositoryException
public void renderHtml(java.lang.String view) throws java.io.IOException
view
-
java.io.IOException
protected void renderTree(java.lang.StringBuffer html)
html
- protected void renderHeaderIncludes(java.lang.StringBuffer html)
html
- protected void setTree(Tree tree)
protected Tree getTree()
public java.lang.String getNewNodeName()
public void setNewNodeName(java.lang.String newNodeName)
protected java.lang.String getPath()
protected java.lang.String getPathSelected()
public java.lang.String getCreateItemType()
public void setCreateItemType(java.lang.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 java.lang.String getConfigurationClass()
public void setConfigurationClass(java.lang.String configClass)
public java.lang.String getTreeClass()
public void setTreeClass(java.lang.String treeClass)
public java.lang.String getI18nBasename()
public void setI18nBasename(java.lang.String i18nBasename)
public java.lang.String getRootPath()
public void setRootPath(java.lang.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 |