@Portable public class DefaultAuthorizationPolicy extends Object implements AuthorizationPolicy
| Constructor and Description |
|---|
DefaultAuthorizationPolicy() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPermission(org.jboss.errai.security.shared.api.Group group,
Permission permission)
Add a single permission entry for a group.
|
void |
addPermission(Permission permission) |
void |
addPermission(org.jboss.errai.security.shared.api.Role role,
Permission permission) |
protected DefaultAuthorizationEntry |
getAuthzEntry(org.jboss.errai.security.shared.api.Group group) |
protected DefaultAuthorizationEntry |
getAuthzEntry(org.jboss.errai.security.shared.api.Role role) |
String |
getGroupDescription(org.jboss.errai.security.shared.api.Group group)
Get the description of an existing group.
|
Set<org.jboss.errai.security.shared.api.Group> |
getGroups()
Get the collection of groups this policy is related to.
|
String |
getHomePerspective()
Gets the identifier of the default home perspective.
|
String |
getHomePerspective(org.jboss.errai.security.shared.api.Group group)
Get the identifier of the home perspective assigned to the given group.
|
String |
getHomePerspective(org.jboss.errai.security.shared.api.Role role)
Get the identifier of the home perspective assigned to the given group.
|
String |
getHomePerspective(org.jboss.errai.security.shared.api.identity.User user)
Get the identifier of the perspective this user is redirected by default.
|
PermissionCollection |
getPermissions()
Get the default permissions.
|
PermissionCollection |
getPermissions(org.jboss.errai.security.shared.api.Group group)
Get the permissions assigned to a given group.
|
PermissionCollection |
getPermissions(org.jboss.errai.security.shared.api.Role role)
Get the permissions assigned to a given role.
|
int |
getPriority(org.jboss.errai.security.shared.api.Group group)
Get a group's priority.
|
int |
getPriority(org.jboss.errai.security.shared.api.Role role)
Get a role's priority.
|
String |
getRoleDescription(org.jboss.errai.security.shared.api.Role role)
Get the description of an existing role.
|
Set<org.jboss.errai.security.shared.api.Role> |
getRoles()
Get the collection of roles this policy is related to.
|
protected DefaultAuthorizationEntry |
registerAuthzEntry(DefaultAuthorizationEntry entry) |
void |
setGroupDescription(org.jboss.errai.security.shared.api.Group group,
String description)
Sets a description for an existing group.
|
void |
setHomePerspective(org.jboss.errai.security.shared.api.Group group,
String perspective)
Set the identifier of the home perspective assigned to the given group.
|
void |
setHomePerspective(org.jboss.errai.security.shared.api.Role role,
String perspective)
Set the identifier of the home perspective assigned to the given role.
|
void |
setHomePerspective(String perspectiveId)
Sets the identifier of the default home perspective.
|
void |
setPermissions(org.jboss.errai.security.shared.api.Group group,
PermissionCollection collection)
Set the group's permissions
|
void |
setPermissions(org.jboss.errai.security.shared.api.Role role,
PermissionCollection collection)
Set the role's permissions
|
void |
setPriority(org.jboss.errai.security.shared.api.Group group,
int priority)
Set the group's priority
|
void |
setPriority(org.jboss.errai.security.shared.api.Role role,
int priority)
Set the role's priority
|
void |
setRoleDescription(org.jboss.errai.security.shared.api.Role role,
String description)
Sets a description for an existing role.
|
String |
toString() |
protected DefaultAuthorizationEntry registerAuthzEntry(DefaultAuthorizationEntry entry)
protected DefaultAuthorizationEntry getAuthzEntry(org.jboss.errai.security.shared.api.Role role)
protected DefaultAuthorizationEntry getAuthzEntry(org.jboss.errai.security.shared.api.Group group)
public Set<org.jboss.errai.security.shared.api.Role> getRoles()
AuthorizationPolicygetRoles in interface AuthorizationPolicypublic Set<org.jboss.errai.security.shared.api.Group> getGroups()
AuthorizationPolicygetGroups in interface AuthorizationPolicypublic String getRoleDescription(org.jboss.errai.security.shared.api.Role role)
AuthorizationPolicygetRoleDescription in interface AuthorizationPolicyrole - The rolepublic void setRoleDescription(org.jboss.errai.security.shared.api.Role role,
String description)
AuthorizationPolicysetRoleDescription in interface AuthorizationPolicyrole - The roledescription - A non empty descriptionpublic String getGroupDescription(org.jboss.errai.security.shared.api.Group group)
AuthorizationPolicygetGroupDescription in interface AuthorizationPolicygroup - The grouppublic void setGroupDescription(org.jboss.errai.security.shared.api.Group group,
String description)
AuthorizationPolicysetGroupDescription in interface AuthorizationPolicygroup - The group identifierdescription - A non empty descriptionpublic int getPriority(org.jboss.errai.security.shared.api.Role role)
AuthorizationPolicygetPriority in interface AuthorizationPolicyrole - The role instancepublic int getPriority(org.jboss.errai.security.shared.api.Group group)
AuthorizationPolicygetPriority in interface AuthorizationPolicygroup - The group instancepublic void setPriority(org.jboss.errai.security.shared.api.Role role,
int priority)
AuthorizationPolicysetPriority in interface AuthorizationPolicyrole - The role instancepriority - Any valid integer. The highest, the more priority the role is.public void setPriority(org.jboss.errai.security.shared.api.Group group,
int priority)
AuthorizationPolicysetPriority in interface AuthorizationPolicygroup - The group instancepriority - Any valid integer. The highest, the more priority the role is.public PermissionCollection getPermissions(org.jboss.errai.security.shared.api.Role role)
AuthorizationPolicygetPermissions in interface AuthorizationPolicyrole - The role instancepublic PermissionCollection getPermissions(org.jboss.errai.security.shared.api.Group group)
AuthorizationPolicygetPermissions in interface AuthorizationPolicygroup - The group instancepublic void addPermission(Permission permission)
public void addPermission(org.jboss.errai.security.shared.api.Role role,
Permission permission)
public void addPermission(org.jboss.errai.security.shared.api.Group group,
Permission permission)
AuthorizationPolicyaddPermission in interface AuthorizationPolicygroup - The group instancepermission - A permission instancepublic void setPermissions(org.jboss.errai.security.shared.api.Role role,
PermissionCollection collection)
AuthorizationPolicysetPermissions in interface AuthorizationPolicyrole - The role instancecollection - A permission collectionpublic void setPermissions(org.jboss.errai.security.shared.api.Group group,
PermissionCollection collection)
AuthorizationPolicysetPermissions in interface AuthorizationPolicygroup - The group instancecollection - A permission collectionpublic void setHomePerspective(org.jboss.errai.security.shared.api.Role role,
String perspective)
AuthorizationPolicysetHomePerspective in interface AuthorizationPolicyrole - The target role instanceperspective - An existing perspective identifierpublic void setHomePerspective(org.jboss.errai.security.shared.api.Group group,
String perspective)
AuthorizationPolicysetHomePerspective in interface AuthorizationPolicygroup - The target group instanceperspective - An existing perspective identifierpublic String getHomePerspective(org.jboss.errai.security.shared.api.Role role)
AuthorizationPolicygetHomePerspective in interface AuthorizationPolicypublic String getHomePerspective(org.jboss.errai.security.shared.api.Group group)
AuthorizationPolicygetHomePerspective in interface AuthorizationPolicypublic String getHomePerspective(org.jboss.errai.security.shared.api.identity.User user)
AuthorizationPolicy
If the user is assigned with more than one role or group then the most priority one is taken.
getHomePerspective in interface AuthorizationPolicyAuthorizationPolicy.getPriority(Role),
AuthorizationPolicy.getPriority(Group)public String getHomePerspective()
AuthorizationPolicy
This is the perspective that is returned for those roles/groups with no home perspective set.
getHomePerspective in interface AuthorizationPolicypublic void setHomePerspective(String perspectiveId)
AuthorizationPolicy
This is the perspective that is returned for those roles/groups with no gome perspective set.
setHomePerspective in interface AuthorizationPolicyperspectiveId - An existing perspective identifierpublic PermissionCollection getPermissions()
AuthorizationPolicy
These are he permissions that are returned for those roles/groups with no permissions set.
getPermissions in interface AuthorizationPolicyCopyright © 2012–2020 JBoss by Red Hat. All rights reserved.