public class ContextualRelationshipManager extends AbstractIdentityContext implements RelationshipManager
AUTHENTICATED_ACCOUNT, CREDENTIALS
Constructor and Description |
---|
ContextualRelationshipManager(EventBridge eventBridge,
IdGenerator idGenerator,
StoreSelector storeSelector,
PrivilegeChainQuery privilegeChainQuery) |
Modifier and Type | Method and Description |
---|---|
void |
add(Relationship relationship)
Adds the given
Relationship instance to the configured identity store. |
<T extends Relationship> |
createRelationshipQuery(Class<T> relationshipClass)
Creates an
RelationshipQuery that can be used to query for Relationship instances. |
boolean |
inheritsPrivileges(IdentityType identity,
IdentityType assignee)
Returns true if the specified identity is the same or inherits privileges assigned to the specified assignee,
either via a relationship or a direct reference from the identity (or a combination of these)
|
void |
remove(Relationship relationship)
Removes the given
Relationship instance. |
void |
update(Relationship relationship)
Updates the given
Relationship instance. |
getEventBridge, getIdGenerator, getParameter, getPartition, getPermissionHandlerPolicy, isParameterSet, setParameter
public ContextualRelationshipManager(EventBridge eventBridge, IdGenerator idGenerator, StoreSelector storeSelector, PrivilegeChainQuery privilegeChainQuery)
public void add(Relationship relationship)
RelationshipManager
Adds the given Relationship
instance to the configured identity store.
add
in interface RelationshipManager
public void update(Relationship relationship)
RelationshipManager
Updates the given Relationship
instance. The instance must have an identifier that references a
previously stored instance, otherwise a exception will be thrown.
update
in interface RelationshipManager
public void remove(Relationship relationship)
RelationshipManager
Removes the given Relationship
instance. The instance must have an identifier that references a
previously stored instance, otherwise a exception will be thrown.
remove
in interface RelationshipManager
public <T extends Relationship> RelationshipQuery<T> createRelationshipQuery(Class<T> relationshipClass)
RelationshipManager
Creates an RelationshipQuery
that can be used to query for Relationship
instances.
The first argument tells which Relationship
type should be returned. If you provide the Relationship
base
interface any Relationship
instance that matches the provided query parameters will be returned.
createRelationshipQuery
in interface RelationshipManager
public boolean inheritsPrivileges(IdentityType identity, IdentityType assignee)
RelationshipManager
inheritsPrivileges
in interface RelationshipManager
Copyright © 2018 JBoss by Red Hat. All rights reserved.