org.infoglue.cms.util.workflow
Class OwnerStepFilter

java.lang.Object
  |
  +--org.infoglue.cms.util.workflow.OwnerStepFilter
All Implemented Interfaces:
StepFilter

public class OwnerStepFilter
extends java.lang.Object
implements StepFilter

Filters steps according to owner. If a step has no owner, it is assumed that anyone can view it. An administrator can view all steps regardless of owner.

Version:
$Revision: 1.8 $ $Date: 2005/01/07 14:15:14 $
Author:
Jed Prentice

Constructor Summary
OwnerStepFilter()
          Constructs an OwnerStepFilter from the user associated with the current session/action context
OwnerStepFilter(InfoGluePrincipal userPrincipal)
          Constructs an owner step filter with the given user principal
 
Method Summary
 boolean isAllowed(WorkflowStepVO step)
          Indicates whether the step is allowed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwnerStepFilter

public OwnerStepFilter()
Constructs an OwnerStepFilter from the user associated with the current session/action context


OwnerStepFilter

public OwnerStepFilter(InfoGluePrincipal userPrincipal)
Constructs an owner step filter with the given user principal

Parameters:
userPrincipal - an InfoGluePrincipal representing a user
Method Detail

isAllowed

public boolean isAllowed(WorkflowStepVO step)
Indicates whether the step is allowed

Specified by:
isAllowed in interface StepFilter
Parameters:
step - a workflow step.
Returns:
true if the step is owned by the current user, the current user is an administrator, or if the owner of the step is null; otherwise returns false.