Package org.bonitasoft.engine.page
Class IsTaskAvailableForUserRule
java.lang.Object
org.bonitasoft.engine.page.IsTaskAvailableForUserRule
- All Implemented Interfaces:
AuthorizationRule
- Author:
- Emmanuel Duchastenier, Anthony Birembaut
-
Constructor Summary
ConstructorsConstructorDescriptionIsTaskAvailableForUserRule(ActivityInstanceService activityInstanceService, SessionService sessionService, SessionAccessor sessionAccessor) -
Method Summary
Modifier and TypeMethodDescriptiongetId()booleanisAllowed(String key, Map<String, Serializable> context) Execute this rule and, according to the context, says whether the rule is valid.protected booleanisTaskAvailableForOrExecutedByUser(long taskInstanceId, long userId)
-
Constructor Details
-
IsTaskAvailableForUserRule
public IsTaskAvailableForUserRule(ActivityInstanceService activityInstanceService, SessionService sessionService, SessionAccessor sessionAccessor)
-
-
Method Details
-
isAllowed
Description copied from interface:AuthorizationRuleExecute this rule and, according to the context, says whether the rule is valid.- Specified by:
isAllowedin interfaceAuthorizationRule- Parameters:
key- the page mapping keycontext- the information necessary to execute this rule.- Returns:
- true if allowed, false otherwise.If determination cannot be fulfilled, an Exception should be thrown.
- Throws:
SExecutionException- exception thrown if authorization cannot be determined.
-
isTaskAvailableForOrExecutedByUser
protected boolean isTaskAvailableForOrExecutedByUser(long taskInstanceId, long userId) throws SActivityReadException, SBonitaReadException, SActivityInstanceNotFoundException -
getId
- Specified by:
getIdin interfaceAuthorizationRule- Returns:
- the identifier for this authorization rule
-