com.silverpeas.profile.web
Class UserGroupProfileEntity

java.lang.Object
  extended by com.stratelia.webactiv.beans.admin.Group
      extended by com.silverpeas.profile.web.UserGroupProfileEntity
All Implemented Interfaces:
Exposable, Serializable, Comparable<Group>

public class UserGroupProfileEntity
extends Group
implements Exposable

The profile of the user group exposable in the WEB. It is a web entity representing a group of users that can be serialized into a given media type (JSON, XML). It is a decorator that decorates a Group object with additional properties concerning its exposition in the WEB.

See Also:
Serialized Form

Constructor Summary
protected UserGroupProfileEntity()
           
 
Method Summary
 int compareTo(Group o)
           
 boolean equals(Object obj)
           
static UserGroupProfileEntity fromGroup(Group group)
          Decorates the specified user group with the required WEB exposition features.
static UserGroupProfileEntity[] fromGroups(List<? extends Group> groups, URI groupsURI)
          Decorates the specified user groups with required WEB exposition features.
 URI getChildrenUri()
          Gets the URI at which its direct children groups can be retrieved.
 String getDescription()
           
 String getDomainId()
           
 String getDomainName()
           
 String getId()
           
 String getName()
           
 int getNbUsers()
           
 URI getParentUri()
          Gets the URI of its parent group.
 String getRule()
           
 String getSpecificId()
           
 List<? extends Group> getSubGroups()
           
 String getSuperGroupId()
           
 int getTotalNbUsers()
           
 URI getURI()
          Gets the URI at which this resource is published and can be accessed.
 String[] getUserIds()
           
 URI getUsersUri()
           
 int hashCode()
           
 boolean isRoot()
           
 boolean isSynchronized()
           
 void setDescription(String newDescription)
           
 void setDomainId(String newDomainId)
           
 void setId(String newId)
           
 void setName(String newName)
           
 void setRule(String rule)
           
 void setSpecificId(String newSpecificId)
           
 void setSuperGroupId(String newSuperGroupId)
           
 void setUserIds(String[] sUserIds)
           
 void traceGroup()
           
 UserGroupProfileEntity withAsUri(URI groupUri)
           
 
Methods inherited from class com.stratelia.webactiv.beans.admin.Group
getAllRoots, getAllRootsInDomain, getAllUsers, getById, getOrganisationController, setTotalNbUsers
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserGroupProfileEntity

protected UserGroupProfileEntity()
Method Detail

fromGroup

public static UserGroupProfileEntity fromGroup(Group group)
Decorates the specified user group with the required WEB exposition features.

Parameters:
group - the user group to decorate.
Returns:
a web entity representing the specified group profile.

fromGroups

public static UserGroupProfileEntity[] fromGroups(List<? extends Group> groups,
                                                  URI groupsURI)
Decorates the specified user groups with required WEB exposition features.

Parameters:
groups - a list of user groups to decorate.
groupsURI - the URI at which the specified groups are defined.
Returns:
a list of web entities representing the specified group profiles.

withAsUri

public UserGroupProfileEntity withAsUri(URI groupUri)

getParentUri

public URI getParentUri()
Gets the URI of its parent group.

Returns:
the URI of its parent group or null if this group is a root one.

getChildrenUri

public URI getChildrenUri()
Gets the URI at which its direct children groups can be retrieved.

Returns:
the URI at which its subgroups can be get.

getUsersUri

public URI getUsersUri()

getDescription

public String getDescription()
Overrides:
getDescription in class Group

getId

public String getId()
Overrides:
getId in class Group

getName

public String getName()
Overrides:
getName in class Group

getNbUsers

public int getNbUsers()
Overrides:
getNbUsers in class Group

getTotalNbUsers

public int getTotalNbUsers()
Overrides:
getTotalNbUsers in class Group

getSpecificId

public String getSpecificId()
Overrides:
getSpecificId in class Group

setDescription

public void setDescription(String newDescription)
Overrides:
setDescription in class Group

setId

public void setId(String newId)
Overrides:
setId in class Group

setName

public void setName(String newName)
Overrides:
setName in class Group

getDomainId

public String getDomainId()
Overrides:
getDomainId in class Group

getSuperGroupId

public String getSuperGroupId()
Overrides:
getSuperGroupId in class Group

setDomainId

public void setDomainId(String newDomainId)
Overrides:
setDomainId in class Group

setSpecificId

public void setSpecificId(String newSpecificId)
Overrides:
setSpecificId in class Group

setSuperGroupId

public void setSuperGroupId(String newSuperGroupId)
Overrides:
setSuperGroupId in class Group

getDomainName

public String getDomainName()

getSubGroups

public List<? extends Group> getSubGroups()
Overrides:
getSubGroups in class Group

traceGroup

public void traceGroup()
Overrides:
traceGroup in class Group

setUserIds

public void setUserIds(String[] sUserIds)
Overrides:
setUserIds in class Group

setRule

public void setRule(String rule)
Overrides:
setRule in class Group

isSynchronized

public boolean isSynchronized()
Overrides:
isSynchronized in class Group

isRoot

public boolean isRoot()
Overrides:
isRoot in class Group

getUserIds

public String[] getUserIds()
Overrides:
getUserIds in class Group

getRule

public String getRule()
Overrides:
getRule in class Group

compareTo

public int compareTo(Group o)
Specified by:
compareTo in interface Comparable<Group>
Overrides:
compareTo in class Group

equals

public boolean equals(Object obj)
Overrides:
equals in class Group

hashCode

public int hashCode()
Overrides:
hashCode in class Group

getURI

public URI getURI()
Description copied from interface: Exposable
Gets the URI at which this resource is published and can be accessed.

Specified by:
getURI in interface Exposable
Returns:
the web resource URI.


Copyright © 2016 Silverpeas. All Rights Reserved.