Class AccountRole
- java.lang.Object
-
- com.broadleafcommerce.customer.domain.AccountRole
-
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,Serializable
public class AccountRole extends Object implements com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable
Represents a group ofAccountPermissionsthat are given to anAccountMember.- Author:
- Chris Kittrell (ckittrell)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AccountRole()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStategetContextState()A subset ofTrackinginformation to expose the context state for this object.StringgetId()The unique identifier for this role.StringgetName()The name for this role.StringgetParentRoleId()The id of the parent of this role (if any).Set<AccountPermissionRef>getPermissions()The permissions directly assigned to this role.inthashCode()voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)A subset ofTrackinginformation to expose the context state for this object.voidsetId(String id)The unique identifier for this role.voidsetName(String name)The name for this role.voidsetParentRoleId(String parentRoleId)The id of the parent of this role (if any).voidsetPermissions(Set<AccountPermissionRef> permissions)The permissions directly assigned to this role.StringtoString()
-
-
-
Method Detail
-
getId
public String getId()
The unique identifier for this role.
-
getName
public String getName()
The name for this role. This has no purpose other than labeling.This value should not be relied on as a unique identifier, but we do validate against duplicate names within the role's context.
- See Also:
DefaultAccountRoleContextValidator
-
getPermissions
public Set<AccountPermissionRef> getPermissions()
The permissions directly assigned to this role. This is in addition to any permissions inherited from this role'sancestors.- See Also:
DefaultAccountRoleContextValidator
-
getParentRoleId
@Nullable public String getParentRoleId()
The id of the parent of this role (if any).This role will effectively inherit all of the
permissionsof its parent and any ancestors further up in the hierarchy.Furthermore, there is validation in place to prevent cycles from being created in a role's ancestry (role cannot become a parent of itself).
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
setId
public void setId(String id)
The unique identifier for this role.
-
setName
public void setName(String name)
The name for this role. This has no purpose other than labeling.This value should not be relied on as a unique identifier, but we do validate against duplicate names within the role's context.
- See Also:
DefaultAccountRoleContextValidator
-
setPermissions
public void setPermissions(Set<AccountPermissionRef> permissions)
The permissions directly assigned to this role. This is in addition to any permissions inherited from this role'sancestors.- See Also:
DefaultAccountRoleContextValidator
-
setParentRoleId
public void setParentRoleId(@Nullable String parentRoleId)The id of the parent of this role (if any).This role will effectively inherit all of the
permissionsof its parent and any ancestors further up in the hierarchy.Furthermore, there is validation in place to prevent cycles from being created in a role's ancestry (role cannot become a parent of itself).
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
canEqual
protected boolean canEqual(Object other)
-
-