GATE
Version 3.1-2270

gate.security
Class AccessControllerImpl

java.lang.Object
  extended by gate.security.AccessControllerImpl
All Implemented Interfaces:
GateListener, ObjectModificationListener, AccessController, EventListener

public class AccessControllerImpl
extends Object
implements AccessController, ObjectModificationListener


Field Summary
protected  int dbType
           
static int DEFAULT_SESSION_TIMEOUT_MIN
           
static int LOGIN_FAILED
           
static int LOGIN_OK
           
 
Constructor Summary
AccessControllerImpl(String jdbcURL)
          ---
 
Method Summary
 void close()
          ---
 Group createGroup(String name, Session s)
          ---
 User createUser(String name, String passwd, Session s)
          ---
 void deleteGroup(Group grp, Session s)
          ---
 void deleteGroup(Long id, Session s)
          ---
 void deleteUser(Long id, Session s)
          ---
 void deleteUser(User usr, Session s)
          ---
 void finalize()
           
 Group findGroup(Long id)
          ---
 Group findGroup(String name)
          ---
 Session findSession(Long id)
          ---
 User findUser(Long id)
          ---
 User findUser(String name)
          ---
 boolean isValidSecurityInfo(SecurityInfo si)
          --
 boolean isValidSession(Session s)
          ---
 List listGroups()
          --
 List listUsers()
          --
 Session login(String usr_name, String passwd, Long prefGroupID)
          ---
 void logout(Session s)
          ---
 void objectCreated(ObjectModificationEvent e)
           
 void objectDeleted(ObjectModificationEvent e)
           
 void objectModified(ObjectModificationEvent e)
           
 void open()
          ---
 void processGateEvent(GateEvent e)
          Called when a Gate event has occured
 void registerObjectModificationListener(ObjectModificationListener l, int eventType)
           
 void setSessionTimeout(Session s, int timeoutMins)
          ---
 void unregisterObjectModificationListener(ObjectModificationListener l, int eventType)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SESSION_TIMEOUT_MIN

public static final int DEFAULT_SESSION_TIMEOUT_MIN
See Also:
Constant Field Values

LOGIN_OK

public static final int LOGIN_OK
See Also:
Constant Field Values

LOGIN_FAILED

public static final int LOGIN_FAILED
See Also:
Constant Field Values

dbType

protected int dbType
Constructor Detail

AccessControllerImpl

public AccessControllerImpl(String jdbcURL)
---

Method Detail

open

public void open()
          throws PersistenceException
---

Specified by:
open in interface AccessController
Throws:
PersistenceException

close

public void close()
           throws PersistenceException
---

Specified by:
close in interface AccessController
Throws:
PersistenceException

findGroup

public Group findGroup(String name)
                throws PersistenceException,
                       SecurityException
---

Specified by:
findGroup in interface AccessController
Throws:
PersistenceException
SecurityException

findGroup

public Group findGroup(Long id)
                throws PersistenceException,
                       SecurityException
---

Specified by:
findGroup in interface AccessController
Throws:
PersistenceException
SecurityException

findUser

public User findUser(String name)
              throws PersistenceException,
                     SecurityException
---

Specified by:
findUser in interface AccessController
Throws:
PersistenceException
SecurityException

findUser

public User findUser(Long id)
              throws PersistenceException,
                     SecurityException
---

Specified by:
findUser in interface AccessController
Throws:
PersistenceException
SecurityException

findSession

public Session findSession(Long id)
                    throws SecurityException
---

Specified by:
findSession in interface AccessController
Throws:
SecurityException

createGroup

public Group createGroup(String name,
                         Session s)
                  throws PersistenceException,
                         SecurityException
---

Specified by:
createGroup in interface AccessController
Throws:
PersistenceException
SecurityException

deleteGroup

public void deleteGroup(Long id,
                        Session s)
                 throws PersistenceException,
                        SecurityException
---

Specified by:
deleteGroup in interface AccessController
Throws:
PersistenceException
SecurityException

deleteGroup

public void deleteGroup(Group grp,
                        Session s)
                 throws PersistenceException,
                        SecurityException
---

Specified by:
deleteGroup in interface AccessController
Throws:
PersistenceException
SecurityException

createUser

public User createUser(String name,
                       String passwd,
                       Session s)
                throws PersistenceException,
                       SecurityException
---

Specified by:
createUser in interface AccessController
Throws:
PersistenceException
SecurityException

deleteUser

public void deleteUser(User usr,
                       Session s)
                throws PersistenceException,
                       SecurityException
---

Specified by:
deleteUser in interface AccessController
Throws:
PersistenceException
SecurityException

deleteUser

public void deleteUser(Long id,
                       Session s)
                throws PersistenceException,
                       SecurityException
---

Specified by:
deleteUser in interface AccessController
Throws:
PersistenceException
SecurityException

login

public Session login(String usr_name,
                     String passwd,
                     Long prefGroupID)
              throws PersistenceException,
                     SecurityException
---

Specified by:
login in interface AccessController
Throws:
PersistenceException
SecurityException

logout

public void logout(Session s)
            throws SecurityException
---

Specified by:
logout in interface AccessController
Throws:
SecurityException

setSessionTimeout

public void setSessionTimeout(Session s,
                              int timeoutMins)
                       throws SecurityException
---

Specified by:
setSessionTimeout in interface AccessController
Throws:
SecurityException

isValidSession

public boolean isValidSession(Session s)
---

Specified by:
isValidSession in interface AccessController

listGroups

public List listGroups()
                throws PersistenceException
--

Specified by:
listGroups in interface AccessController
Throws:
PersistenceException

listUsers

public List listUsers()
               throws PersistenceException
--

Specified by:
listUsers in interface AccessController
Throws:
PersistenceException

registerObjectModificationListener

public void registerObjectModificationListener(ObjectModificationListener l,
                                               int eventType)

unregisterObjectModificationListener

public void unregisterObjectModificationListener(ObjectModificationListener l,
                                                 int eventType)

objectCreated

public void objectCreated(ObjectModificationEvent e)
Specified by:
objectCreated in interface ObjectModificationListener

objectModified

public void objectModified(ObjectModificationEvent e)
Specified by:
objectModified in interface ObjectModificationListener

objectDeleted

public void objectDeleted(ObjectModificationEvent e)
Specified by:
objectDeleted in interface ObjectModificationListener

processGateEvent

public void processGateEvent(GateEvent e)
Description copied from interface: GateListener
Called when a Gate event has occured

Specified by:
processGateEvent in interface GateListener

isValidSecurityInfo

public boolean isValidSecurityInfo(SecurityInfo si)
--

Specified by:
isValidSecurityInfo in interface AccessController

finalize

public void finalize()
Overrides:
finalize in class Object

GATE
Version 3.1-2270