Package org.ametys.odf.orgunit.actions
Class AddOrgUnitAction
- java.lang.Object
-
- All Implemented Interfaces:
Initializable
,Component
,LogEnabled
,Serviceable
,Action
public class AddOrgUnitAction extends InitializeContentWorkflowAction
Action for creating a new org unit
-
-
Field Summary
Fields Modifier and Type Field Description private CurrentUserProvider
_currentUserProvider
protected ObservationManager
_observationManager
Observation manager available to subclasses.protected AmetysObjectResolver
_resolver
Ametys object resolver available to subclasses.private RootOrgUnitProvider
_rootOUProvider
static String
CONTENT_PARENT_ID
Constant for parent identifier-
Fields inherited from class org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction
_workflowProvider
-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description AddOrgUnitAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map
_act(Redirector redirector, Map objectModel, String source, Parameters parameters, int actionId, Map inputs)
Initialize or act on a workflow instance.protected void
applyChangesToParent(OrgUnit ou)
Apply changes to parentOrgUnit
void
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.cms.workflow.InitializeContentWorkflowAction
_getInputs, _getParameters, _getWorkflowName, _processWorkflowException
-
Methods inherited from class org.ametys.plugins.workflow.cocoon.InitializeWorkflowAction
_getActionResult, _getExceptionContext
-
Methods inherited from class org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction
_getActionId, _getFailConditions, _getWorkflowErrors, _getWorkflowWarns, _processInvalidActionException, act, initialize
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
CONTENT_PARENT_ID
public static final String CONTENT_PARENT_ID
Constant for parent identifier
-
_resolver
protected AmetysObjectResolver _resolver
Ametys object resolver available to subclasses.
-
_observationManager
protected ObservationManager _observationManager
Observation manager available to subclasses.
-
_rootOUProvider
private RootOrgUnitProvider _rootOUProvider
-
_currentUserProvider
private CurrentUserProvider _currentUserProvider
-
-
Constructor Detail
-
AddOrgUnitAction
public AddOrgUnitAction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
_act
protected Map _act(Redirector redirector, Map objectModel, String source, Parameters parameters, int actionId, Map inputs) throws com.opensymphony.workflow.InvalidInputException, com.opensymphony.workflow.WorkflowException
Description copied from class:AbstractWorkflowAction
Initialize or act on a workflow instance.- Overrides:
_act
in classInitializeContentWorkflowAction
- Parameters:
redirector
- the redirector.objectModel
- the current object model.source
- the current source.parameters
- the current parameters.actionId
- the action id to use.inputs
- the inputs to use- Returns:
- the action result.
- Throws:
com.opensymphony.workflow.InvalidInputException
- if the action id is not valid.com.opensymphony.workflow.WorkflowException
- if the action failed.
-
applyChangesToParent
protected void applyChangesToParent(OrgUnit ou) throws com.opensymphony.workflow.WorkflowException
Apply changes to parentOrgUnit
- Parameters:
ou
- The parent orgunit- Throws:
com.opensymphony.workflow.WorkflowException
- if failed to apply changes to parent
-
-