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 $
Constructor Summary |
protected |
SecurityType(int value,
java.lang.String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SecurityType
protected SecurityType(int value,
java.lang.String name)
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