|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.jwarp.service.groups.FileGroupManager
| Field Summary | |
(package private) java.util.Hashtable |
items
The currently defined users. |
(package private) java.util.Hashtable |
members
The group members table. |
(package private) java.util.Hashtable |
names
The currently defined groups. |
(package private) java.io.File |
storeFile
The file's the group are stored in. |
(package private) int[] |
supportedTypes
|
(package private) java.util.Hashtable |
typeDescriptions
|
| Constructor Summary | |
FileGroupManager(java.io.File storeFile)
|
|
FileGroupManager(java.lang.String storeFile)
|
|
| Method Summary | |
void |
addGroup(IGroup group,
java.lang.String name)
Create a new group with the setings given. |
void |
addItem(IItem item,
java.lang.String name)
Create a new user with the setings given. |
void |
addMember(int newMember,
int g)
Add a user to a group |
void |
clear()
|
void |
dump()
|
IItem |
getItem(int ref)
Returns the user with the given id. |
IItem |
getItemByName(java.lang.String name)
Returns all defined items. |
java.util.Iterator |
getItems()
Returns all defined items. |
java.util.Iterator |
getMembers(int ref)
Returns all members of a group. |
boolean |
isMember(int item,
int group)
Is an item member of a group or one of its subgroups. |
void |
load()
|
IItem |
removeItem(int item)
Removes the item. |
void |
removeMember(int member,
int target)
Remove a user from a group |
void |
store()
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
transient java.io.File storeFile
int[] supportedTypes
java.util.Hashtable typeDescriptions
java.util.Hashtable items
java.util.Hashtable names
java.util.Hashtable members
| Constructor Detail |
public FileGroupManager(java.io.File storeFile)
throws java.io.IOException,
java.lang.ClassNotFoundException
public FileGroupManager(java.lang.String storeFile)
throws java.io.IOException,
java.lang.ClassNotFoundException
| Method Detail |
public void store()
public void clear()
public void load()
throws java.io.IOException,
java.lang.ClassNotFoundException
public void addItem(IItem item,
java.lang.String name)
addItem in interface IGroupManageruid - The user's identificationpwd - The user's passwordname - The user's namedescription - An optional descriptionrelationID - An optional relation IDadmin - The user who tries to create the new userjava.lang.SecurityException - If the creation failed.public IItem removeItem(int item)
removeItem in interface IGroupManageritem - The item to be removed
public void addGroup(IGroup group,
java.lang.String name)
addGroup in interface IGroupManagername - The user's namedescription - An optional descriptionrelationID - An optional relation IDadmin - The user who tries to create the new userjava.lang.SecurityException - If the creation failed.
public void addMember(int newMember,
int g)
addMember in interface IGroupManageruser - The usergroup - The groupadmin - The admin userjava.lang.SecurityException - If the setting failed.
public void removeMember(int member,
int target)
removeMember in interface IGroupManageruser - The usergroup - The groupadmin - The admin userjava.lang.SecurityException - If the setting failed.public IItem getItem(int ref)
getItem in interface IGroupManagerpublic java.util.Iterator getItems()
getItems in interface IGroupManagerpublic java.util.Iterator getMembers(int ref)
getMembers in interface IGroupManagerref - The group referencepublic IItem getItemByName(java.lang.String name)
getItemByName in interface IGroupManager
public boolean isMember(int item,
int group)
isMember in interface IGroupManageritem - The item to be lookedupgroup - The grouppublic void dump()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||