public interface ActionPermissionManager
Modifier and Type | Method and Description |
---|---|
Action |
getActionById(String actionId,
com.google.common.base.Optional<? extends com.edorasware.commons.core.entity.WorkObjectId> workObjectId)
Returns the
Action instance for the given action id. |
com.google.common.collect.ImmutableCollection<Action> |
getAllowedActions(ContextAction context,
com.google.common.base.Optional<? extends com.edorasware.commons.core.entity.WorkObjectId> workObjectId)
Returns the allowed
Action s for the specified ContextAction and the work object id. |
com.google.common.collect.ImmutableCollection<Action> |
getAllowedActionsForType(TypeAction typeAction)
Returns the allowed
Action s for the specified TypeAction . |
boolean |
isActionAllowed(ActionName action,
ContextAction context,
com.google.common.base.Optional<? extends com.edorasware.commons.core.entity.WorkObjectId> workObjectId)
Checks if the action is allowed in the given context and for the given work object.
|
com.google.common.collect.ImmutableCollection<Action> getAllowedActions(ContextAction context, com.google.common.base.Optional<? extends com.edorasware.commons.core.entity.WorkObjectId> workObjectId)
Action
s for the specified ContextAction
and the work object id. The privileges of the current user are also involved in the permission
process.context
- the action context for which the allowed actions should be returnedworkObjectId
- the work object id for which the allowed actions should be returnedIllegalArgumentException
- if an input parameter is not validRuntimeException
- if an error occurs while getting the allowed actions for the current usercom.google.common.collect.ImmutableCollection<Action> getAllowedActionsForType(TypeAction typeAction)
Action
s for the specified TypeAction
.typeAction
- the type for which to retrieve the actionsIllegalArgumentException
- if the type is not knownRuntimeException
- if an error occurs while getting the allowed actions for the typeboolean isActionAllowed(ActionName action, ContextAction context, com.google.common.base.Optional<? extends com.edorasware.commons.core.entity.WorkObjectId> workObjectId)
action
- the action which is checked if it is allowedcontext
- the context for which the action is checked if it is allowedworkObjectId
- the work object id for which the action is checked if it is allowedIllegalArgumentException
- if an input parameter is not validRuntimeException
- if an error occurs while checking if the action is allowedAction getActionById(String actionId, com.google.common.base.Optional<? extends com.edorasware.commons.core.entity.WorkObjectId> workObjectId)
Action
instance for the given action id. If the id is not known a generated "unknown" action is returned.actionId
- the action id for which the action instance should be createdworkObjectId
- the work object id for which the action should be returnedRuntimeException
- if the action is not allowed in the context of the given work object idCopyright © 2010 - 2017 edorasware ag. All Rights Reserved.