Package org.bonitasoft.engine.page
Class IsTaskAvailableForUserRule
- java.lang.Object
-
- org.bonitasoft.engine.page.IsTaskAvailableForUserRule
-
- All Implemented Interfaces:
AuthorizationRule
public class IsTaskAvailableForUserRule extends java.lang.Object implements AuthorizationRule
- Author:
- Emmanuel Duchastenier, Anthony Birembaut
-
-
Constructor Summary
Constructors Constructor Description IsTaskAvailableForUserRule(ActivityInstanceService activityInstanceService, SessionService sessionService, SessionAccessor sessionAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetId()booleanisAllowed(java.lang.String key, java.util.Map<java.lang.String,java.io.Serializable> context)Execute this rule and, according to the context, says whether the rule is valid.protected booleanisTaskAvailableForOrExecutedByUser(long taskInstanceId, long userId)
-
-
-
Constructor Detail
-
IsTaskAvailableForUserRule
public IsTaskAvailableForUserRule(ActivityInstanceService activityInstanceService, SessionService sessionService, SessionAccessor sessionAccessor)
-
-
Method Detail
-
isAllowed
public boolean isAllowed(java.lang.String key, java.util.Map<java.lang.String,java.io.Serializable> context) throws SExecutionExceptionDescription 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
public java.lang.String getId()
- Specified by:
getIdin interfaceAuthorizationRule- Returns:
- the identifier for this authorization rule
-
-