info.magnolia.module.delta
Class AddRoleToGroupTask

java.lang.Object
  extended by info.magnolia.module.delta.AbstractTask
      extended by info.magnolia.module.delta.AbstractRepositoryTask
          extended by info.magnolia.module.delta.AddRoleToGroupTask
All Implemented Interfaces:
Task

public class AddRoleToGroupTask
extends AbstractRepositoryTask

A task to add a role to a group, using GroupManager.


Field Summary
 
Fields inherited from class info.magnolia.module.delta.AbstractTask
DO_NOTHING, log
 
Constructor Summary
AddRoleToGroupTask(String taskName, String roleName, String groupName)
           
 
Method Summary
protected  void doExecute(InstallContext ctx)
          Executes task and adds role to the specified group.
 
Methods inherited from class info.magnolia.module.delta.AbstractRepositoryTask
execute
 
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

AddRoleToGroupTask

public AddRoleToGroupTask(String taskName,
                          String roleName,
                          String groupName)
Method Detail

doExecute

protected void doExecute(InstallContext ctx)
                  throws javax.jcr.RepositoryException,
                         TaskExecutionException
Executes task and adds role to the specified group. During execute nothing should be saved, as the save should occur after each batch of delta/install/update for rollbacks to still be possible if an error occurs.

Specified by:
doExecute in class AbstractRepositoryTask
Throws:
javax.jcr.RepositoryException
TaskExecutionException
See Also:
- to see what a good-citizen task should do. TODO: The groupManager saves at node level, thus breaking the "save once per module install/update" rule


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