org.silverpeas.admin.web
Class UsersAndGroupsRoleEntity

java.lang.Object
  extended by org.silverpeas.admin.web.AbstractTypeEntity
      extended by org.silverpeas.admin.web.UsersAndGroupsRoleEntity
All Implemented Interfaces:
Exposable, Serializable

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

Field Summary
static String TYPE
           
 
Constructor Summary
protected UsersAndGroupsRoleEntity()
           
 
Method Summary
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 resource 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.admin.web.AbstractTypeEntity
getType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final String TYPE
See Also:
Constant Field Values
Constructor Detail

UsersAndGroupsRoleEntity

protected UsersAndGroupsRoleEntity()
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: Exposable
Gets the URI at which this resource is published and can be accessed.

Returns:
the web resource 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)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2016 Silverpeas. All Rights Reserved.