@Manager public class DefaultActionManager extends Object implements ActionManager
Implementation of the action permission manager.
Constructor and Description |
---|
DefaultActionManager(WorkObjectService workObjectService,
ActionProvider actionProvider,
ActionJoiner actionJoiner,
UserManager userManager,
org.springframework.context.MessageSource messageSource) |
DefaultActionManager(WorkObjectService workObjectService,
List<ActionProvider> actionProviders,
ActionJoiner actionJoiner,
UserManager userManager,
org.springframework.context.MessageSource messageSource) |
Modifier and Type | Method and Description |
---|---|
Action |
getActionByGlobalId(String actionId,
String globalId,
Locale locale)
Returns the
Action instance for the given action id. |
com.google.common.collect.ImmutableList<Action> |
getAllowedActions(ActionContext actionContext,
Locale locale)
Returns the allowed
Action s for the specified context and the work object id. |
List<ActionGroup> |
getAllowedActions(String context,
String globalId,
Locale locale)
Returns the allowed
ActionGroup s for the specified context and the work object id. |
List<Action> |
getAllowedActionsForType(String typeAction,
Optional<String> qualifier,
Locale locale)
Returns the allowed
Action s for the specified Type. |
public DefaultActionManager(WorkObjectService workObjectService, List<ActionProvider> actionProviders, ActionJoiner actionJoiner, UserManager userManager, org.springframework.context.MessageSource messageSource)
public DefaultActionManager(WorkObjectService workObjectService, ActionProvider actionProvider, ActionJoiner actionJoiner, UserManager userManager, org.springframework.context.MessageSource messageSource)
public List<ActionGroup> getAllowedActions(String context, String globalId, Locale locale)
ActionManager
Returns the allowed ActionGroup
s for the specified context and the work object id. The privileges of the current user are also involved in the permission
process.
getAllowedActions
in interface ActionManager
context
- the action context for which the allowed actions should be returnedglobalId
- the work object global id for which the allowed actions should be returnedlocale
- the translation localepublic com.google.common.collect.ImmutableList<Action> getAllowedActions(ActionContext actionContext, Locale locale)
ActionManager
Returns the allowed Action
s for the specified context and the work object id. The privileges of the current user are also involved in the permission
process.
getAllowedActions
in interface ActionManager
actionContext
- the action context for which the allowed actions should be returnedlocale
- the translation localepublic List<Action> getAllowedActionsForType(String typeAction, Optional<String> qualifier, Locale locale)
ActionManager
Returns the allowed Action
s for the specified Type.
getAllowedActionsForType
in interface ActionManager
typeAction
- the type for which to retrieve the actionsqualifier
- action type qualifierlocale
- the translation localepublic Action getActionByGlobalId(String actionId, String globalId, Locale locale)
ActionManager
Returns the Action
instance for the given action id. If the id is not known a generated "unknown" action is returned.
getActionByGlobalId
in interface ActionManager
actionId
- the action id for which the action instance should be createdglobalId
- the work object global id for which the action should be returnedlocale
- the translation localeCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.