info.magnolia.module.admininterface.setup
Class AddMainMenuItemTask

java.lang.Object
  extended by info.magnolia.module.delta.AbstractTask
      extended by info.magnolia.module.admininterface.setup.AddMainMenuItemTask
All Implemented Interfaces:
Task
Direct Known Subclasses:
AddSubMenuItemTask

public class AddMainMenuItemTask
extends AbstractTask

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Field Summary
 
Fields inherited from class info.magnolia.module.delta.AbstractTask
log
 
Constructor Summary
AddMainMenuItemTask(java.lang.String menuName, java.lang.String label, java.lang.String i18nBasename, java.lang.String onClick, java.lang.String icon, java.lang.String orderBefore)
           
 
Method Summary
 void execute(InstallContext ctx)
          A good-citizen task should execute itself responsibly: it should know what to do in case of problems: for instance, fixable or irrelevant issues should usually just be logged used the InstallContext methods, when the user can fix them later on.
protected  Content getParentNode(InstallContext ctx)
           
 
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

AddMainMenuItemTask

public AddMainMenuItemTask(java.lang.String menuName,
                           java.lang.String label,
                           java.lang.String i18nBasename,
                           java.lang.String onClick,
                           java.lang.String icon,
                           java.lang.String orderBefore)
Parameters:
orderBefore - the menu name before which this new menu should be positioned. ignored if null.
i18nBasename - ignored if null.
Method Detail

execute

public void execute(InstallContext ctx)
             throws TaskExecutionException
Description copied from interface: Task
A good-citizen task should execute itself responsibly: it should know what to do in case of problems: for instance, fixable or irrelevant issues should usually just be logged used the InstallContext methods, when the user can fix them later on. The task could also potentially do backups of nodes it needs to modify extensively, so the user could refer to the backups in case of problem. In the event of an unrecoverable issue, the Task could also throw a TaskExecutionException, knowing that will cancel the whole module's installation, update and startup. If a TaskExecutionException must be thrown, keep in mind that the exception message will still be shown to the end user, so try to keep them human readable.

Throws:
TaskExecutionException

getParentNode

protected Content getParentNode(InstallContext ctx)
                         throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException


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