Package org.silverpeas.core.webapi.admin
Class UsersAndGroupsRoleEntity
- java.lang.Object
-
- org.silverpeas.core.webapi.admin.AbstractTypeEntity
-
- org.silverpeas.core.webapi.admin.UsersAndGroupsRoleEntity
-
- All Implemented Interfaces:
Serializable
,WebEntity
public class UsersAndGroupsRoleEntity extends AbstractTypeEntity
This entity provides the users and groups that are in the role for the parent URI that represents, for example, a space or a component. Users and groups are represented by their URI, user and group information are retrieved by user profile and group profile Web-Services.- Author:
- Yohann Chastagnier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UsersAndGroupsRoleEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UsersAndGroupsRoleEntity
addGroup(URI groupProfileURI)
protected UsersAndGroupsRoleEntity
addUser(URI userProfileURI)
static UsersAndGroupsRoleEntity
createFrom(SilverpeasRole role, String label)
Creates a new entity.boolean
equals(Object obj)
Collection<URI>
getGroups()
String
getLabel()
protected URI
getParentURI()
SilverpeasRole
getRole()
URI
getURI()
Gets the URI at which this web entity is published and can be accessed.Collection<URI>
getUsers()
int
hashCode()
UsersAndGroupsRoleEntity
withParentURI(URI parentURI)
Sets a parent URI to this entity.UsersAndGroupsRoleEntity
withURI(URI uri)
Sets a URI to this entity.-
Methods inherited from class org.silverpeas.core.webapi.admin.AbstractTypeEntity
getType
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
createFrom
public static UsersAndGroupsRoleEntity createFrom(SilverpeasRole role, String label)
Creates a new entity.- Parameters:
role
-label
-- Returns:
-
withURI
public UsersAndGroupsRoleEntity withURI(URI uri)
Sets a URI to this entity. With this URI, it can then be accessed through the Web.- Parameters:
uri
- the web entity URI.- Returns:
- itself.
-
withParentURI
public UsersAndGroupsRoleEntity withParentURI(URI parentURI)
Sets a parent URI to this entity. It could be a space URI or a component URI for example.- Parameters:
parentURI
- the parent web entity URI.- Returns:
- itself.
-
getURI
public URI getURI()
Description copied from interface:WebEntity
Gets the URI at which this web entity is published and can be accessed.- Returns:
- the web entity URI.
-
getParentURI
protected final URI getParentURI()
-
getRole
public SilverpeasRole getRole()
-
getLabel
public String getLabel()
-
getUsers
public Collection<URI> getUsers()
-
addUser
protected UsersAndGroupsRoleEntity addUser(URI userProfileURI)
-
getGroups
public Collection<URI> getGroups()
-
addGroup
protected UsersAndGroupsRoleEntity addGroup(URI groupProfileURI)
-
-