org.infoglue.cms.util.workflow
Class OwnerStepFilter

java.lang.Object
  extended by 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.10 $ $Date: 2006/03/06 17:28:55 $
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
protected  InfoGluePrincipal getUserPrincipal()
           
 boolean isAllowed(WorkflowStepVO step)
          Indicates whether the step is allowed
protected  boolean isUserAdministrator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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.

isUserAdministrator

protected boolean isUserAdministrator()

getUserPrincipal

protected InfoGluePrincipal getUserPrincipal()


Copyright © 2005 InfoGlue.org All Rights Reserved.