public class SampleModel extends Object
| Constructor and Description |
|---|
SampleModel() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addToGroup(RelationshipManager relationshipManager,
Account member,
Group group)
|
static Agent |
getAgent(IdentityManager identityManager,
String loginName)
Returns an
Agent with the given loginName. |
static Group |
getGroup(IdentityManager identityManager,
String groupPath)
Returns the
Group with the specified groupPath. |
static Group |
getGroup(IdentityManager identityManager,
String groupName,
Group parent)
|
static Role |
getRole(IdentityManager identityManager,
String name)
Returns an
Role with the given name. |
static User |
getUser(IdentityManager identityManager,
String loginName)
Returns an
User with the given loginName. |
static void |
grantGroupRole(RelationshipManager relationshipManager,
IdentityType assignee,
Role role,
Group group)
|
static void |
grantRole(RelationshipManager relationshipManager,
IdentityType assignee,
Role role)
Grants the given
Role to the provided IdentityType. |
static boolean |
hasGroupRole(RelationshipManager relationshipManager,
IdentityType assignee,
Role role,
Group group)
|
static boolean |
hasRole(RelationshipManager relationshipManager,
IdentityType assignee,
Role role)
Checks if the given
Role is granted to the provided IdentityType. |
static boolean |
isMember(RelationshipManager relationshipManager,
IdentityType identity,
Group group)
Checks if the given
IdentityType is a member of a specific Group. |
static void |
removeFromGroup(RelationshipManager relationshipManager,
Account member,
Group group)
|
static void |
revokeGroupRole(RelationshipManager relationshipManager,
IdentityType assignee,
Role role,
Group group)
|
static void |
revokeRole(RelationshipManager relationshipManager,
IdentityType assignee,
Role role)
Revokes the given
Role from the provided IdentityType. |
public static Agent getAgent(IdentityManager identityManager, String loginName) throws IdentityManagementException
Returns an Agent with the given loginName. User are also agents, so if the
loginName maps to the an User it will be returned.
loginName - IdentityManagementException - If cannot retrieve the Agent.public static User getUser(IdentityManager identityManager, String loginName)
Returns an User with the given loginName.
loginName - User with the given loginName this method returns null.public static Role getRole(IdentityManager identityManager, String name)
Returns an Role with the given name.
loginName - Role with the given name this method returns null.public static Group getGroup(IdentityManager identityManager, String groupPath)
Returns the Group with the specified groupPath. Eg.: /groupA/groupB/groupC.
You can also provide the name only. In this case, the group returned will be the root group. Eg.: /Administrators.
groupPath - Group with the given groupPath this method returns null.public static Group getGroup(IdentityManager identityManager, String groupName, Group parent)
public static boolean isMember(RelationshipManager relationshipManager, IdentityType identity, Group group)
Checks if the given IdentityType is a member of a specific Group.
identityType - Must be a Agent or Group instance.group - IdentityType is a member of the provided Group.public static void addToGroup(RelationshipManager relationshipManager, Account member, Group group)
agent - group - public static void removeFromGroup(RelationshipManager relationshipManager, Account member, Group group)
member - group - public static boolean hasGroupRole(RelationshipManager relationshipManager, IdentityType assignee, Role role, Group group)
Checks if the given IdentityType, Role and Group instances maps to a GroupRole
relationship.
assignee - role - group - public static void grantGroupRole(RelationshipManager relationshipManager, IdentityType assignee, Role role, Group group)
Creates a GroupRole relationship for the given IdentityType, Role and Group instances.
assignee - role - group - public static void revokeGroupRole(RelationshipManager relationshipManager, IdentityType assignee, Role role, Group group)
Revokes a GroupRole relationship for the given IdentityType, Role and Group instances.
assignee - role - group - public static boolean hasRole(RelationshipManager relationshipManager, IdentityType assignee, Role role)
Checks if the given Role is granted to the provided IdentityType.
identityType - role - public static void grantRole(RelationshipManager relationshipManager, IdentityType assignee, Role role)
Grants the given Role to the provided IdentityType.
identityType - role - public static void revokeRole(RelationshipManager relationshipManager, IdentityType assignee, Role role)
Revokes the given Role from the provided IdentityType.
identityType - role - Copyright © 2013. All Rights Reserved.