com.elasticpath.domain.cmuser
Interface UserRole

All Superinterfaces:
Entity, EpDomain, org.acegisecurity.GrantedAuthority, Persistence, java.io.Serializable
All Known Implementing Classes:
UserRoleImpl

public interface UserRole
extends Entity, org.acegisecurity.GrantedAuthority

UserRole represents a user's role.


Field Summary
static java.lang.String DEFAULT_USERROLE
          The SUPER userRole name.
static java.lang.String ROLE_PROFIX
          The default role authority prefix (to integrate with acegi security framework.
static java.lang.String SUPERUSER
          The default userRole name.
 
Method Summary
 java.lang.String getDescription()
          Gets the description of this UserRole.
 java.lang.String getName()
          Gets the name of this UserRole.
 java.util.Set getUserPermissions()
          Gets the Permissions associated with this Role.
 boolean isDefaultUserRole()
          Return true if this is the default USER role.
 boolean isSuperUserRole()
          Return true if this is the SUPERUSER role.
 void setDescription(java.lang.String description)
          Sets the description of this UserRole.
 void setName(java.lang.String name)
          Sets the name of this UserRole.
 void setUserPermissions(java.util.Set userPermissions)
          Sets the Permissions associated with this UserRole.
 
Methods inherited from interface com.elasticpath.domain.Entity
getGuid, setGuid
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 
Methods inherited from interface org.acegisecurity.GrantedAuthority
getAuthority
 

Field Detail

DEFAULT_USERROLE

static final java.lang.String DEFAULT_USERROLE
The SUPER userRole name. cmUser with SUPERUSER role has unlimted access :).

See Also:
Constant Field Values

ROLE_PROFIX

static final java.lang.String ROLE_PROFIX
The default role authority prefix (to integrate with acegi security framework.

See Also:
Constant Field Values

SUPERUSER

static final java.lang.String SUPERUSER
The default userRole name. Every cmUser by default has this userRole.

See Also:
Constant Field Values
Method Detail

getDescription

java.lang.String getDescription()
Gets the description of this UserRole.

Returns:
the userRole description.

getName

java.lang.String getName()
Gets the name of this UserRole.

Returns:
the userRole name.

getUserPermissions

java.util.Set getUserPermissions()
Gets the Permissions associated with this Role.

Returns:
the set of userPermissions.

isDefaultUserRole

boolean isDefaultUserRole()
Return true if this is the default USER role.

Returns:
true if this is the default USER role; otherwise, false.

isSuperUserRole

boolean isSuperUserRole()
Return true if this is the SUPERUSER role.

Returns:
true if this is the SUPERUSER role; otherwise, false.

setDescription

void setDescription(java.lang.String description)
Sets the description of this UserRole.

Parameters:
description - the userRole description.

setName

void setName(java.lang.String name)
Sets the name of this UserRole.

Parameters:
name - the userRole name.

setUserPermissions

void setUserPermissions(java.util.Set userPermissions)
Sets the Permissions associated with this UserRole.

Parameters:
userPermissions - the new set of userPermissions.