com.elasticpath.domain.cmuser
Interface UserPermission

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

public interface UserPermission
extends ValueObject, org.acegisecurity.GrantedAuthority, java.io.Serializable

UserPermission represents an granted authority for a certain operation.


Method Summary
 java.lang.String getAuthority()
          Gets the authority for this UserPermission.
 java.lang.String getDisplayText()
          Gets the default displayText for this UserPermission.
 java.lang.String getDisplayText(java.util.Locale locale)
          Gets the displayText for this UserPermission of the given locale.
 java.lang.String getPermissionGroup()
          Gets the group that this UserPermission is in.
 void init()
          Initializes the UserPermission object given its authority.
 void setAuthority(java.lang.String authority)
          Sets the authority for this UserPermission.
 void setDisplayText(java.lang.String displayText)
          Sets the default displayText for this UserPermission.
 void setPermissionGroup(java.lang.String permissionGroup)
          Sets the group that this Permission is in.
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Method Detail

getAuthority

java.lang.String getAuthority()
Gets the authority for this UserPermission.

Specified by:
getAuthority in interface org.acegisecurity.GrantedAuthority
Returns:
the authority as an identifier of the UserPermission.

getDisplayText

java.lang.String getDisplayText()
Gets the default displayText for this UserPermission.

Returns:
the default displayText of the UserPermission.

getDisplayText

java.lang.String getDisplayText(java.util.Locale locale)
Gets the displayText for this UserPermission of the given locale. Looked into the message resources and look for displayText keyed by name of this UserPermission. Return the default displayText if not found.

Parameters:
locale - the locale of the displayText tp return.
Returns:
the displayText of the UserPermission of the given locale; return the default displayText if not found.

getPermissionGroup

java.lang.String getPermissionGroup()
Gets the group that this UserPermission is in.

Returns:
the PermissionGroup identifier.

init

void init()
Initializes the UserPermission object given its authority. Call setElasticPath before initializing.


setAuthority

void setAuthority(java.lang.String authority)
Sets the authority for this UserPermission.

Parameters:
authority - the identifier of the UserPermission.

setDisplayText

void setDisplayText(java.lang.String displayText)
Sets the default displayText for this UserPermission.

Parameters:
displayText - - the default displayText of the UserPermission.

setPermissionGroup

void setPermissionGroup(java.lang.String permissionGroup)
Sets the group that this Permission is in.

Parameters:
permissionGroup - the identifier of the permissionGroup.