org.nodal.util
Class CapabilityImpl

java.lang.Object
  extended byorg.nodal.util.CapabilityImpl
All Implemented Interfaces:
Capability

public final class CapabilityImpl
extends java.lang.Object
implements Capability

Version:
May 23, 2002
Author:
Lee Iverson

Field Summary
 
Fields inherited from interface org.nodal.security.Capability
DELEGATE_EDIT, DELEGATE_HISTORY, DELEGATE_READ, EDIT, HISTORY, READ
 
Method Summary
 boolean allowDelegate(int op)
           
 boolean allowed(int ops)
           
 boolean allowEdit()
           
 boolean allowHistory()
           
 boolean allowRead()
           
static Capability createInit()
          Create a capability that can be used to initialize content.
static Capability createOwner(User u)
           
static Capability createReadOnly()
           
static Capability createReadWrite(User user, boolean canRead, boolean canWrite)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createOwner

public static Capability createOwner(User u)

createReadOnly

public static Capability createReadOnly()

allowed

public boolean allowed(int ops)
Specified by:
allowed in interface Capability

allowRead

public boolean allowRead()
Specified by:
allowRead in interface Capability

allowEdit

public boolean allowEdit()
Specified by:
allowEdit in interface Capability

allowHistory

public boolean allowHistory()
Specified by:
allowHistory in interface Capability

allowDelegate

public boolean allowDelegate(int op)
Specified by:
allowDelegate in interface Capability

createReadWrite

public static Capability createReadWrite(User user,
                                         boolean canRead,
                                         boolean canWrite)
Parameters:
user -
canRead -
canWrite -
Returns:

createInit

public static Capability createInit()
Create a capability that can be used to initialize content.

Returns:
a Capability that allows read/edit access for initialization.