gate.security
Class AccessControllerImpl

java.lang.Object
  |
  +--gate.security.AccessControllerImpl
All Implemented Interfaces:
AccessController, EventListener, GateListener, ObjectModificationListener

public class AccessControllerImpl
extends Object
implements AccessController, ObjectModificationListener


Field Summary
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SESSION_TIMEOUT_MIN

public static final int DEFAULT_SESSION_TIMEOUT_MIN

LOGIN_OK

public static final int LOGIN_OK

LOGIN_FAILED

public static final int LOGIN_FAILED
Constructor Detail

AccessControllerImpl

public AccessControllerImpl(String jdbcURL)
---
Method Detail

open

public void open()
          throws PersistenceException
---
Specified by:
open in interface AccessController

close

public void close()
           throws PersistenceException
---
Specified by:
close in interface AccessController

findGroup

public Group findGroup(String name)
                throws PersistenceException,
                       SecurityException
---
Specified by:
findGroup in interface AccessController

findGroup

public Group findGroup(Long id)
                throws PersistenceException,
                       SecurityException
---
Specified by:
findGroup in interface AccessController

findUser

public User findUser(String name)
              throws PersistenceException,
                     SecurityException
---
Specified by:
findUser in interface AccessController

findUser

public User findUser(Long id)
              throws PersistenceException,
                     SecurityException
---
Specified by:
findUser in interface AccessController

findSession

public Session findSession(Long id)
                    throws SecurityException
---
Specified by:
findSession in interface AccessController

createGroup

public Group createGroup(String name,
                         Session s)
                  throws PersistenceException,
                         SecurityException
---
Specified by:
createGroup in interface AccessController

deleteGroup

public void deleteGroup(Long id,
                        Session s)
                 throws PersistenceException,
                        SecurityException
---
Specified by:
deleteGroup in interface AccessController

deleteGroup

public void deleteGroup(Group grp,
                        Session s)
                 throws PersistenceException,
                        SecurityException
---
Specified by:
deleteGroup in interface AccessController

createUser

public User createUser(String name,
                       String passwd,
                       Session s)
                throws PersistenceException,
                       SecurityException
---
Specified by:
createUser in interface AccessController

deleteUser

public void deleteUser(User usr,
                       Session s)
                throws PersistenceException,
                       SecurityException
---
Specified by:
deleteUser in interface AccessController

deleteUser

public void deleteUser(Long id,
                       Session s)
                throws PersistenceException,
                       SecurityException
---
Specified by:
deleteUser in interface AccessController

login

public Session login(String usr_name,
                     String passwd,
                     Long prefGroupID)
              throws PersistenceException,
                     SecurityException
---
Specified by:
login in interface AccessController

logout

public void logout(Session s)
            throws SecurityException
---
Specified by:
logout in interface AccessController

setSessionTimeout

public void setSessionTimeout(Session s,
                              int timeoutMins)
                       throws SecurityException
---
Specified by:
setSessionTimeout in interface AccessController

isValidSession

public boolean isValidSession(Session s)
---
Specified by:
isValidSession in interface AccessController

listGroups

public List listGroups()
                throws PersistenceException
--
Specified by:
listGroups in interface AccessController

listUsers

public List listUsers()
               throws PersistenceException
--
Specified by:
listUsers in interface AccessController

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()