org.apache.lenya.cms.workflow
Class RoleCondition

java.lang.Object
  extended by org.apache.lenya.workflow.impl.AbstractCondition
      extended by org.apache.lenya.cms.workflow.RoleCondition
All Implemented Interfaces:
Condition

public class RoleCondition
extends AbstractCondition


Field Summary
protected static java.lang.String SEPARATOR
           
 
Constructor Summary
RoleCondition()
           
 
Method Summary
 boolean isComplied(Situation situation, WorkflowInstance instance)
          Returns if the condition is complied in a certain situation.
 void setExpression(java.lang.String expression)
          Sets the expression for this condition.
 
Methods inherited from class org.apache.lenya.workflow.impl.AbstractCondition
getExpression, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SEPARATOR

protected static final java.lang.String SEPARATOR
See Also:
Constant Field Values
Constructor Detail

RoleCondition

public RoleCondition()
Method Detail

setExpression

public void setExpression(java.lang.String expression)
                   throws WorkflowException
Description copied from interface: Condition
Sets the expression for this condition.

Specified by:
setExpression in interface Condition
Overrides:
setExpression in class AbstractCondition
Parameters:
expression - The expression.
Throws:
WorkflowException - when the expression is not valid.
See Also:
Condition.setExpression(java.lang.String)

isComplied

public boolean isComplied(Situation situation,
                          WorkflowInstance instance)
                   throws WorkflowException
Returns if the condition is complied in a certain situation. The condition is complied when the current user has the role that is required by the RoleCondition.

Parameters:
situation - The situation to check.
instance - The workflow instance to check the condition on.
Returns:
if the condition is complied.
Throws:
WorkflowException - when the expression could not be evaluated.
See Also:
Condition.isComplied(Situation, WorkflowInstance)


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.