com.objectwave.appArch.security
Class SecurityType

java.lang.Object
  |
  +--com.objectwave.appArch.security.SecurityType
All Implemented Interfaces:
Prototypes
Direct Known Subclasses:
UserType

public class SecurityType
extends java.lang.Object
implements Prototypes

Similar to Unix's o g w model. Example WORLD.has(READ)and.(GROUP.has(EXECUTE)).and(OWNER.has(EXECUTE));

Version:
$Id: SecurityType.java,v 2.0 2001/06/11 15:54:24 dave_hoag Exp $

Field Summary
 
Fields inherited from interface com.objectwave.appArch.security.Prototypes
ALL, EXECUTE, GROUP, NONE, OWNER, READ, WORLD, WRITE
 
Constructor Summary
protected SecurityType(int value, java.lang.String name)
           
 
Method Summary
 SecurityType and(SecurityType otherType)
          Used to create access privledges Example: WORLD.has(WRITE).and(OWNER.has(EXECUTE));
 boolean hasExecuteAccess()
           
 boolean hasReadAccess()
           
 boolean hasWriteAccess()
           
static void main(java.lang.String[] args)
           
 void setUser(UserType userType)
          The user will be set by SecurityListeners.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SecurityType

protected SecurityType(int value,
                       java.lang.String name)
Method Detail

and

public SecurityType and(SecurityType otherType)
Used to create access privledges Example: WORLD.has(WRITE).and(OWNER.has(EXECUTE));


hasExecuteAccess

public boolean hasExecuteAccess()

hasReadAccess

public boolean hasReadAccess()

hasWriteAccess

public boolean hasWriteAccess()

main

public static void main(java.lang.String[] args)

setUser

public void setUser(UserType userType)
The user will be set by SecurityListeners. An object may have different users levels for each security type. By default a user is WORLD, but it may be set to owner.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object