gate.security
Class GroupImpl

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

public class GroupImpl
extends Object
implements Group, ObjectModificationListener


Field Summary
private  AccessControllerImpl ac
          ---
private  Connection conn
          ---
private  int dbType
          ---
private  Long id
          ---
private  String name
          ---
private  Vector omCreationListeners
          ---
private  Vector omDeletionListeners
          ---
private  Vector omModificationListeners
          ---
private  List users
          ---
 
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.
private  void fireObjectModifiedEvent(ObjectModificationEvent e)
           
 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)
          ---
(package private)  void setUsers(Vector userIDs)
           
 void unregisterObjectModificationListener(ObjectModificationListener l, int eventType)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private Long id
---


name

private String name
---


users

private List users
---


conn

private Connection conn
---


dbType

private int dbType
---


ac

private AccessControllerImpl ac
---


omModificationListeners

private Vector omModificationListeners
---


omCreationListeners

private Vector omCreationListeners
---


omDeletionListeners

private Vector omDeletionListeners
---

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


registerObjectModificationListener

public void registerObjectModificationListener(ObjectModificationListener l,
                                               int eventType)

fireObjectModifiedEvent

private void fireObjectModifiedEvent(ObjectModificationEvent e)

unregisterObjectModificationListener

public void unregisterObjectModificationListener(ObjectModificationListener l,
                                                 int eventType)

setUsers

void setUsers(Vector userIDs)