Package org.ametys.plugins.core.group
Class GroupHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.group.GroupHelper
- All Implemented Interfaces:
 LogEnabled,Component,Serviceable
Helper class for groups, for common operations on 
Group- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiongroup2JSON(GroupIdentity groupIdentity, boolean users) Get group as JSON objectgroup2JSON(Group group, boolean users) Get group as JSON objectgroups2JSON(List<Group> groups, boolean users) Get groups as JSON objectvoidsaxGroup(Group group, ContentHandler handler) Sax a GroupvoidsaxGroup(Group group, ContentHandler handler, String tagName) Sax a GroupvoidsaxGroup(Group group, ContentHandler handler, String tagName, boolean withUsers) Sax a GroupvoidsaxGroupIdentity(GroupIdentity groupIdentity, ContentHandler handler) Sax a Group identityvoidsaxGroupIdentity(GroupIdentity groupIdentity, ContentHandler handler, String tagName) Sax a Group identityvoidsaxGroupIdentity(GroupIdentity groupIdentity, ContentHandler handler, String tagName, boolean withUsers) Sax a Group identityvoidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger 
- 
Field Details
- 
ROLE
The Avalon role 
 - 
 - 
Constructor Details
- 
GroupHelper
public GroupHelper() 
 - 
 - 
Method Details
- 
service
- Specified by:
 servicein interfaceServiceable- Throws:
 ServiceException
 - 
saxGroupIdentity
public void saxGroupIdentity(GroupIdentity groupIdentity, ContentHandler handler) throws SAXException Sax a Group identity- Parameters:
 groupIdentity- the group identity to saxhandler- the content handler- Throws:
 SAXException- If a SAX error occurs
 - 
saxGroupIdentity
public void saxGroupIdentity(GroupIdentity groupIdentity, ContentHandler handler, String tagName) throws SAXException Sax a Group identity- Parameters:
 groupIdentity- the group identity to saxhandler- the content handlertagName- the XML tag for saxed group- Throws:
 SAXException- If a SAX error occurs
 - 
saxGroupIdentity
public void saxGroupIdentity(GroupIdentity groupIdentity, ContentHandler handler, String tagName, boolean withUsers) throws SAXException Sax a Group identity- Parameters:
 groupIdentity- the group identity to saxhandler- the content handlertagName- the XML tag for saxed groupwithUsers- if true, users of the group will be saxed with the group- Throws:
 SAXException- If a SAX error occurs
 - 
saxGroup
Sax a Group- Parameters:
 group- the group to saxhandler- the content handler- Throws:
 SAXException- If a SAX error occurs
 - 
saxGroup
Sax a Group- Parameters:
 group- the group to saxhandler- the content handlertagName- the XML tag for saxed group- Throws:
 SAXException- If a SAX error occurs
 - 
saxGroup
public void saxGroup(Group group, ContentHandler handler, String tagName, boolean withUsers) throws SAXException Sax a Group- Parameters:
 group- the group to saxhandler- the content handlertagName- the XML tag for saxed groupwithUsers- if true, users of the group will be saxed with the group- Throws:
 SAXException- If a SAX error occurs
 - 
group2JSON
Get group as JSON object- Parameters:
 groupIdentity- the group identityusers- true to get users' group- Returns:
 - the group as JSON object
 
 - 
group2JSON
Get group as JSON object- Parameters:
 group- the groupusers- true to get users' group- Returns:
 - the group as JSON object
 
 - 
groups2JSON
Get groups as JSON object- Parameters:
 groups- the groupsusers- true to get users' group- Returns:
 - the group as JSON object
 
 
 -