info.magnolia.ui.admincentral.setup
Class JcrBrowserContentAppTask

java.lang.Object
  extended by info.magnolia.module.delta.AbstractTask
      extended by info.magnolia.ui.admincentral.setup.JcrBrowserContentAppTask
All Implemented Interfaces:
info.magnolia.module.delta.Task

public class JcrBrowserContentAppTask
extends info.magnolia.module.delta.AbstractTask

A task to create a JCR browser content app. The app configuration will be created under /modules/ui-admincentral/apps. An entry for the app will be also created in the app launcher layout under the specified app group. The app group is assumed to be existing at the time of executing this task. The task relies on the existence of the ui-admincentral (part of Magnolia UI project) at its default location under /modules/ui-admincentral as it uses Magnolia's extension mechanism in order to inherit most of its configuration. Being the configuration inherited from ui-admincentral the tree will be editable and include properties.


Field Summary
 
Fields inherited from class info.magnolia.module.delta.AbstractTask
log
 
Constructor Summary
JcrBrowserContentAppTask(String appName, String label, String appGroup, String icon, String workspace, String absRootPath)
           
JcrBrowserContentAppTask(String appName, String label, String appGroup, String icon, String workspace, String absRootPath, NodeTypeDefinition mainNodeType)
           
 
Method Summary
protected  void createMainSubapp(javax.jcr.Node appNode)
           
 void execute(info.magnolia.module.InstallContext ctx)
           
 String getAppGroup()
           
 String getAppName()
           
 String getIcon()
           
 String getLabel()
           
 NodeTypeDefinition getMainNodeType()
           
 String getRootPath()
           
 String getWorkspace()
           
 
Methods inherited from class info.magnolia.module.delta.AbstractTask
getDescription, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JcrBrowserContentAppTask

public JcrBrowserContentAppTask(String appName,
                                String label,
                                String appGroup,
                                String icon,
                                String workspace,
                                String absRootPath)
Parameters:
appName - a string representing a unique name for this app. If not unique, the task will fail.
label - the app label to be displayed in the app launcher.
appGroup - a string representing one of the default app groups (i.e. edit, manage, dev, tools) or a custom one (which is assumed to be already existing when running this task).
icon - a string representing an icon. If not set defaults to icon-app.
workspace - name of the workspace. If null or empty the task will fail.
absRootPath - the absolute path to use as the root for the content app to be created. If not set, defaults to /. If not absolute, the task will fail.

JcrBrowserContentAppTask

public JcrBrowserContentAppTask(String appName,
                                String label,
                                String appGroup,
                                String icon,
                                String workspace,
                                String absRootPath,
                                NodeTypeDefinition mainNodeType)
Parameters:
mainNodeType - the main node type for the specified workspace. If null, the name defaults to NodeTypes.ContentNode.NAME.
See Also:
JcrBrowserContentAppTask
Method Detail

execute

public final void execute(info.magnolia.module.InstallContext ctx)
                   throws info.magnolia.module.delta.TaskExecutionException
Throws:
info.magnolia.module.delta.TaskExecutionException

createMainSubapp

protected void createMainSubapp(javax.jcr.Node appNode)
                         throws info.magnolia.module.delta.TaskExecutionException
Throws:
info.magnolia.module.delta.TaskExecutionException

getAppName

public String getAppName()

getLabel

public String getLabel()

getAppGroup

public String getAppGroup()

getIcon

public String getIcon()

getRootPath

public String getRootPath()

getWorkspace

public String getWorkspace()

getMainNodeType

public NodeTypeDefinition getMainNodeType()


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