|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.security.UserImpl
Field Summary | |
private AccessControllerImpl |
ac
reference to the security factory |
private Connection |
conn
Connection to the data store used for updates |
private int |
dbType
--- |
private List |
groups
list of groups the user belongs to |
private Long |
id
user ID (must be unique) |
private String |
name
user name (must be unique) |
private Vector |
omCreationListeners
list of objects that should be modified when this object is created |
private Vector |
omDeletionListeners
list of objects that should be modified when this object is deleted |
private Vector |
omModificationListeners
list of objects that should be modified when the state of this object is changed |
Fields inherited from interface gate.security.User |
OBJECT_CHANGE_NAME |
Constructor Summary | |
UserImpl(Long id,
String name,
List groups,
AccessControllerImpl ac,
Connection conn)
--- |
Method Summary | |
boolean |
equals(Object obj)
this one is necessary for the contains() operations in Lists It is possible that two users have two different UserImpl that refer to the very same user in the DB, because they got it fromt he security factory at different times. |
private void |
fireObjectModifiedEvent(ObjectModificationEvent e)
sends ObjectModificationEvent of type OBJECT_MODIFIED to all who have already registered |
List |
getGroups()
returns a list with the groups that the user is member of |
Long |
getID()
returns the ID of the user user IDs are uniques in the same data store |
String |
getName()
returns the name of the user user names are unique in the same data store |
void |
objectCreated(ObjectModificationEvent e)
callback that is invoked from objects that were created and this user object is interested in NOTE that this events are just ignored |
void |
objectDeleted(ObjectModificationEvent e)
callback that is invoked from objects that were deleted and this user object is interested in Useful when a group is deleted from the security factory and this user should be notified so that it will remove the reference to the group from its internal collections (the user is no longer member of the group) |
void |
objectModified(ObjectModificationEvent e)
callback that is invoked from objects that were modified and this user object is interested in Useful when a group drops the user as member and this user should be notified so that it will remove the reference to the group from its internal collections (the user is no longer member of the group) |
void |
processGateEvent(GateEvent e)
huh? |
void |
registerObjectModificationListener(ObjectModificationListener l,
int eventType)
registers an object fore receiving ObjectModificationEvent-s send by this object the only types of events sent by a user object are OBJECT_DELETED and OBJECT_MODIFIED, so any attempt for registering for other events is invalid |
(package private) void |
setGroups(Vector groupIDs)
|
void |
setName(String newName,
Session s)
changes user name Only members of the ADMIN group have sufficient privileges. |
void |
setPassword(String newPass,
Session s)
changes user password Only members of the ADMIN group and the user himself have sufficient privileges |
void |
unregisterObjectModificationListener(ObjectModificationListener l,
int eventType)
unregisters an object fore receiving ObjectModificationEvent-s send by this object the only types of events sent by a user object are OBJECT_DELETED and OBJECT_MODIFIED, so any attempt for unregistering for other events is invalid |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Long id
private String name
private List groups
private Connection conn
private int dbType
private AccessControllerImpl ac
private Vector omModificationListeners
private Vector omCreationListeners
private Vector omDeletionListeners
Constructor Detail |
public UserImpl(Long id, String name, List groups, AccessControllerImpl ac, Connection conn)
Method Detail |
public Long getID()
getID
in interface User
public String getName()
getName
in interface User
public List getGroups()
getGroups
in interface User
public void setName(String newName, Session s) throws PersistenceException, SecurityException
setName
in interface User
PersistenceException
SecurityException
gate.events.ObjectModificationEvent
public void setPassword(String newPass, Session s) throws PersistenceException, SecurityException
setPassword
in interface User
PersistenceException
SecurityException
public boolean equals(Object obj)
public void registerObjectModificationListener(ObjectModificationListener l, int eventType)
public void unregisterObjectModificationListener(ObjectModificationListener l, int eventType)
private void fireObjectModifiedEvent(ObjectModificationEvent e)
public void objectCreated(ObjectModificationEvent e)
objectCreated
in interface ObjectModificationListener
public void objectModified(ObjectModificationEvent e)
objectModified
in interface ObjectModificationListener
public void objectDeleted(ObjectModificationEvent e)
objectDeleted
in interface ObjectModificationListener
public void processGateEvent(GateEvent e)
processGateEvent
in interface GateListener
void setGroups(Vector groupIDs)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |