GATE
Version 3.1-2270

gate.security
Class GroupImpl

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

public class GroupImpl
extends Object
implements Group, ObjectModificationListener


Field Summary
 
Fields inherited from interface gate.security.Group
OBJECT_CHANGE_ADDUSER, OBJECT_CHANGE_NAME, OBJECT_CHANGE_REMOVEUSER
 
Constructor Summary
GroupImpl(Long id, String name, List users, AccessControllerImpl ac, Connection conn)
           
 
Method Summary
 void addUser(Long userID, Session s)
          ---
 void addUser(User usr, Session s)
          ---
 boolean equals(Object obj)
          this one is necessary for the contains() operations in Lists It is possible that two users have two different GroupImpl that refer to the very same GATE group in the DB, because they got it from the security factory at different times.
 Long getID()
          ---
 String getName()
          ---
 List getUsers()
          ---
 void objectCreated(ObjectModificationEvent e)
           
 void objectDeleted(ObjectModificationEvent e)
           
 void objectModified(ObjectModificationEvent e)
           
 void processGateEvent(GateEvent e)
          Called when a Gate event has occured
 void registerObjectModificationListener(ObjectModificationListener l, int eventType)
           
 void removeUser(Long userID, Session s)
          ---
 void removeUser(User usr, Session s)
          ---
 void setName(String newName, Session s)
          ---
 void unregisterObjectModificationListener(ObjectModificationListener l, int eventType)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupImpl

public GroupImpl(Long id,
                 String name,
                 List users,
                 AccessControllerImpl ac,
                 Connection conn)
Method Detail

getID

public Long getID()
---

Specified by:
getID in interface Group

getName

public String getName()
---

Specified by:
getName in interface Group

getUsers

public List getUsers()
---

Specified by:
getUsers in interface Group

setName

public void setName(String newName,
                    Session s)
             throws PersistenceException,
                    SecurityException
---

Specified by:
setName in interface Group
Throws:
PersistenceException
SecurityException

addUser

public void addUser(Long userID,
                    Session s)
             throws PersistenceException,
                    SecurityException
---

Specified by:
addUser in interface Group
Throws:
PersistenceException
SecurityException

addUser

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

Specified by:
addUser in interface Group
Throws:
PersistenceException
SecurityException

removeUser

public void removeUser(Long userID,
                       Session s)
                throws PersistenceException,
                       SecurityException
---

Specified by:
removeUser in interface Group
Throws:
PersistenceException
SecurityException

removeUser

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

Specified by:
removeUser in interface Group
Throws:
PersistenceException
SecurityException

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

equals

public boolean equals(Object obj)
this one is necessary for the contains() operations in Lists It is possible that two users have two different GroupImpl that refer to the very same GATE group in the DB, because they got it from the security factory at different times. So we assume that two instances refer the same GATE group if NAME1==NAME2

Overrides:
equals in class Object

registerObjectModificationListener

public void registerObjectModificationListener(ObjectModificationListener l,
                                               int eventType)

unregisterObjectModificationListener

public void unregisterObjectModificationListener(ObjectModificationListener l,
                                                 int eventType)

GATE
Version 3.1-2270