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 ofAccountPermissions
that 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 boolean
canEqual(Object other)
boolean
equals(Object o)
com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
getContextState()
A subset ofTracking
information to expose the context state for this object.String
getId()
The unique identifier for this role.String
getName()
The name for this role.String
getParentRoleId()
The id of the parent of this role (if any).Set<AccountPermissionRef>
getPermissions()
The permissions directly assigned to this role.int
hashCode()
void
setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
A subset ofTracking
information to expose the context state for this object.void
setId(String id)
The unique identifier for this role.void
setName(String name)
The name for this role.void
setParentRoleId(String parentRoleId)
The id of the parent of this role (if any).void
setPermissions(Set<AccountPermissionRef> permissions)
The permissions directly assigned to this role.String
toString()
-
-
-
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
permissions
of 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 ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of
Tracking
information 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
permissions
of 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 ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
canEqual
protected boolean canEqual(Object other)
-
-