|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.util.entity.AbstractBasicEntity
org.torweg.pulse.util.entity.AbstractNamedEntity
org.torweg.pulse.util.entity.AbstractNamableEntity
org.torweg.pulse.accesscontrol.AbstractAccessControlObject
org.torweg.pulse.accesscontrol.Group
@Entity public class Group
A Group is an entity used to group Permissions and Users.
| Constructor Summary | |
|---|---|
protected |
Group()
Deprecated. |
|
Group(java.lang.String newName)
The Constructor that sets the name of the Group . |
| Method Summary | |
|---|---|
boolean |
addPermission(Permission perm)
Adds a Permission to the Group's Set of Permissions. |
boolean |
containsPermission(Permission perm)
Determines if a Permission is part of the Group 's
Set of Permissions. |
org.jdom.Element |
deserializeToJDOM()
Serializes the state of the Group as a JDOM Element. |
java.lang.String |
getDescription()
returns the description. |
java.util.Set<Permission> |
getPermissions()
Returns a shallow copy of the Group's Collection of
Permissions. |
java.util.List<Role> |
getRoles(org.hibernate.Session s)
Returns the Roles associated with the Group ordered by
name. |
java.util.List<User> |
getUsers(org.hibernate.Session s)
Returns the Users associated with the Group ordered by
name. |
boolean |
removePermission(Permission perm)
Removes a Permission from the Group's Set of
Permissions if it is part of it. |
void |
setDescription(java.lang.String d)
sets the description. |
net.sf.json.JSONObject |
toJSON()
Serializes the state of the Group as a JSONObject. |
net.sf.json.JSONObject |
toJSON(org.hibernate.Session s)
Serializes the state of the Group as a JSONObject. |
| Methods inherited from class org.torweg.pulse.accesscontrol.AbstractAccessControlObject |
|---|
getAssociatedAbstractAccessControlObjects, getLoadCriteriaForClassWithAlias |
| Methods inherited from class org.torweg.pulse.util.entity.AbstractNamableEntity |
|---|
setName |
| Methods inherited from class org.torweg.pulse.util.entity.AbstractNamedEntity |
|---|
getName |
| Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity |
|---|
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.torweg.pulse.util.INameable |
|---|
setName |
| Methods inherited from interface org.torweg.pulse.util.INamed |
|---|
getName |
| Constructor Detail |
|---|
@Deprecated protected Group()
public Group(java.lang.String newName)
Constructor that sets the name of the Group .
newName - the name of the Group| Method Detail |
|---|
public final java.lang.String getDescription()
public final void setDescription(java.lang.String d)
d - the description to setpublic final java.util.Set<Permission> getPermissions()
Group's Collection of
Permissions.
Attention: Since the returned Set is not a reference to the
Group's internal Collection, any modifications to its
state will get lost. However, modifications to the state of the Set's elements will be consistent.
For example: Adding/Deleting a Permission to/from the Set
will not have any effect, when the Group is saved. On the other
hand, modifications to a Permission in the Set will be
made persistent, when the Permission is saved.
Permissions associated with the Grouppublic final boolean addPermission(Permission perm)
Permission to the Group's Set of Permissions. If it already is part of the Set, it will not be
added.
perm - the Permission to be added
Set changed as a result of the callpublic final boolean containsPermission(Permission perm)
Permission is part of the Group 's
Set of Permissions.
perm - the Permission to be sought-after
Permission is part of the Setpublic final boolean removePermission(Permission perm)
Permission from the Group's Set of
Permissions if it is part of it.
perm - the Permission to be removed
Set changed as a result of the callpublic final java.util.List<Role> getRoles(org.hibernate.Session s)
Roles associated with the Group ordered by
name.
s - the hibernateTM-Session
Roles associated with the Grouppublic final java.util.List<User> getUsers(org.hibernate.Session s)
Users associated with the Group ordered by
name.
s - the hibernateTM-Session
Users associated with the Grouppublic final org.jdom.Element deserializeToJDOM()
Group as a JDOM Element.
deserializeToJDOM in interface JDOMableGroup as a JDOM Elementpublic final net.sf.json.JSONObject toJSON()
Group as a JSONObject.
toJSON in class AbstractAccessControlObjectGroup as a JSONObjectpublic final net.sf.json.JSONObject toJSON(org.hibernate.Session s)
Group as a JSONObject.
If a Session is given the number of Users and Roles associated with the Group will be added to the JSON.
s - the hibernateTM-Session
Group as a JSONObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||