com.objectwave.appArch.security
Class SecurityController

java.lang.Object
  |
  +--com.objectwave.appArch.security.SecurityController
All Implemented Interfaces:
Prototypes, SecurityListener

public class SecurityController
extends java.lang.Object
implements SecurityListener

Essentially, this is just a centralized class for registering security listeners.


Field Summary
static int EXECUTEBIT
           
static int READBIT
           
static int WRITEBIT
           
 
Fields inherited from interface com.objectwave.appArch.security.Prototypes
ALL, EXECUTE, GROUP, NONE, OWNER, READ, WORLD, WRITE
 
Constructor Summary
SecurityController()
           
 
Method Summary
 void addSecurityListener(SecurityListener item)
           
 boolean checkExecuteAccess(java.lang.Object action, java.lang.Object user)
           
 boolean checkReadAccess(java.lang.Object action, java.lang.Object user)
           
 int checkReadWriteExecute(java.lang.Object action, java.lang.Object user)
          -1 = no rights.
 boolean checkWriteAccess(java.lang.Object target, java.lang.Object user)
           
 SecurityType getAccessRights(java.lang.Object action, java.lang.Object user)
          Thread safe dispatching of an event.
static SecurityController getDefaultManager()
           
 void removeSecurityListener(SecurityListener item)
           
static void setDefaultManager(SecurityController mgr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READBIT

public static final int READBIT
See Also:
Constant Field Values

WRITEBIT

public static final int WRITEBIT
See Also:
Constant Field Values

EXECUTEBIT

public static final int EXECUTEBIT
See Also:
Constant Field Values
Constructor Detail

SecurityController

public SecurityController()
Method Detail

addSecurityListener

public void addSecurityListener(SecurityListener item)

checkExecuteAccess

public boolean checkExecuteAccess(java.lang.Object action,
                                  java.lang.Object user)

checkReadAccess

public boolean checkReadAccess(java.lang.Object action,
                               java.lang.Object user)

checkReadWriteExecute

public int checkReadWriteExecute(java.lang.Object action,
                                 java.lang.Object user)
-1 = no rights. 1 = Read - Bit indicated read value. 2 = Write - 4 = Execute -


checkWriteAccess

public boolean checkWriteAccess(java.lang.Object target,
                                java.lang.Object user)

getAccessRights

public SecurityType getAccessRights(java.lang.Object action,
                                    java.lang.Object user)
Thread safe dispatching of an event.

Specified by:
getAccessRights in interface SecurityListener

getDefaultManager

public static SecurityController getDefaultManager()

removeSecurityListener

public void removeSecurityListener(SecurityListener item)

setDefaultManager

public static void setDefaultManager(SecurityController mgr)