org.picketlink.idm.jpa.internal
@CredentialHandlers(value={org.picketlink.idm.credential.handler.PasswordCredentialHandler.class,org.picketlink.idm.credential.handler.X509CertificateCredentialHandler.class,org.picketlink.idm.credential.handler.DigestCredentialHandler.class,org.picketlink.idm.credential.handler.TOTPCredentialHandler.class}) public class JPAIdentityStore extends AbstractIdentityStore<JPAIdentityStoreConfiguration> implements CredentialStore<JPAIdentityStoreConfiguration>, PartitionStore<JPAIdentityStoreConfiguration>, AttributeStore<JPAIdentityStoreConfiguration>, PermissionStore
Modifier and Type | Class and Description |
---|---|
protected class |
JPAIdentityStore.PermissionOperationSet |
Modifier and Type | Field and Description |
---|---|
static String |
EVENT_CONTEXT_IDENTITY |
static String |
INVOCATION_CTX_ENTITY_MANAGER |
Constructor and Description |
---|
JPAIdentityStore() |
add, countQueryResults, countQueryResults, getConfig, remove, update, updateCredential, validateCredentials
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, countQueryResults, countQueryResults, getConfig, remove, update, updateCredential, validateCredentials
public static final String INVOCATION_CTX_ENTITY_MANAGER
public static final String EVENT_CONTEXT_IDENTITY
public void setup(JPAIdentityStoreConfiguration config)
setup
in interface IdentityStore<JPAIdentityStoreConfiguration>
setup
in class AbstractIdentityStore<JPAIdentityStoreConfiguration>
public void addAttributedType(IdentityContext context, AttributedType attributedType)
addAttributedType
in class AbstractIdentityStore<JPAIdentityStoreConfiguration>
public void updateAttributedType(IdentityContext context, AttributedType attributedType)
updateAttributedType
in class AbstractIdentityStore<JPAIdentityStoreConfiguration>
public void removeAttributedType(IdentityContext context, AttributedType attributedType)
removeAttributedType
in class AbstractIdentityStore<JPAIdentityStoreConfiguration>
protected void removeFromRelationships(IdentityContext context, IdentityType identityType)
removeFromRelationships
in class AbstractIdentityStore<JPAIdentityStoreConfiguration>
protected void removeCredentials(IdentityContext context, Account account)
removeCredentials
in class AbstractIdentityStore<JPAIdentityStoreConfiguration>
public void add(IdentityContext identityContext, Partition partition, String configurationName)
add
in interface PartitionStore<JPAIdentityStoreConfiguration>
public String getConfigurationName(IdentityContext identityContext, Partition partition)
getConfigurationName
in interface PartitionStore<JPAIdentityStoreConfiguration>
public <P extends Partition> P get(IdentityContext identityContext, Class<P> partitionClass, String name)
get
in interface PartitionStore<JPAIdentityStoreConfiguration>
public <P extends Partition> List<P> get(IdentityContext identityContext, Class<P> partitionClass)
get
in interface PartitionStore<JPAIdentityStoreConfiguration>
public <P extends Partition> List<P> getPartitions(IdentityContext identityContext, Class<P> partitionClass, String name)
public <P extends Partition> P lookupById(IdentityContext context, Class<P> partitionClass, String id)
lookupById
in interface PartitionStore<JPAIdentityStoreConfiguration>
public void update(IdentityContext identityContext, Partition partition)
update
in interface PartitionStore<JPAIdentityStoreConfiguration>
public void remove(IdentityContext identityContext, Partition partition)
remove
in interface PartitionStore<JPAIdentityStoreConfiguration>
public <V extends Serializable> Attribute<V> getAttribute(IdentityContext context, AttributedType attributedType, String attributeName)
getAttribute
in interface AttributeStore<JPAIdentityStoreConfiguration>
public void loadAttributes(IdentityContext context, AttributedType attributedType)
loadAttributes
in interface AttributeStore<JPAIdentityStoreConfiguration>
public void removeAttribute(IdentityContext context, AttributedType attributedType, String attributeName)
removeAttribute
in interface AttributeStore<JPAIdentityStoreConfiguration>
public <V extends IdentityType> List<V> fetchQueryResults(IdentityContext context, IdentityQuery<V> identityQuery)
fetchQueryResults
in interface IdentityStore<JPAIdentityStoreConfiguration>
public <V extends Relationship> List<V> fetchQueryResults(IdentityContext context, RelationshipQuery<V> query)
fetchQueryResults
in interface IdentityStore<JPAIdentityStoreConfiguration>
public void setAttribute(IdentityContext context, AttributedType attributedType, Attribute<? extends Serializable> attribute)
setAttribute
in interface AttributeStore<JPAIdentityStoreConfiguration>
public void storeCredential(IdentityContext context, Account account, CredentialStorage storage)
storeCredential
in interface CredentialStore<JPAIdentityStoreConfiguration>
public <T extends CredentialStorage> T retrieveCurrentCredential(IdentityContext context, Account account, Class<T> storageClass)
retrieveCurrentCredential
in interface CredentialStore<JPAIdentityStoreConfiguration>
public <T extends CredentialStorage> List<T> retrieveCredentials(IdentityContext context, Account account, Class<T> storageClass)
retrieveCredentials
in interface CredentialStore<JPAIdentityStoreConfiguration>
public Object getOwnerEntity(AttributedType attributedType, Property ownerProperty, javax.persistence.EntityManager entityManager)
public List<EntityMapper> getMapperFor(Class<? extends AttributedType> attributedType)
Returns all EntityMapper
instances used to map the given AttributedType
. Only mappers for
IdentityManaged
annotated entity classes are considered, what means that this method can only be
used
when
trying to persist or populate @{link AttributedType} instances.
attributedType
- public EntityMapper getRootMapperForEntity(Class<?> entityClass)
public EntityMapper getMapperForEntity(Class<?> entityClass)
public List<EntityMapper> getEntityMappers()
public boolean isMappedType(Class mappedClass)
public Object getRootEntity(AttributedType attributedType, javax.persistence.EntityManager entityManager)
public List<Permission> listPermissions(IdentityContext ctx, Object resource)
listPermissions
in interface PermissionStore
public List<Permission> listPermissions(IdentityContext ctx, Object resource, String operation)
listPermissions
in interface PermissionStore
public List<Permission> listPermissions(IdentityContext ctx, Set<Object> resources, String operation)
listPermissions
in interface PermissionStore
public List<Permission> listPermissions(IdentityContext ctx, Class<?> resourceClass, Serializable identifier)
listPermissions
in interface PermissionStore
public List<Permission> listPermissions(IdentityContext ctx, Class<?> resourceClass, Serializable identifier, String operation)
listPermissions
in interface PermissionStore
public boolean grantPermission(IdentityContext context, IdentityType assignee, Object resource, String operation)
grantPermission
in interface PermissionStore
public boolean revokePermission(IdentityContext context, IdentityType assignee, Object resource, String operation)
revokePermission
in interface PermissionStore
public void revokeAllPermissions(IdentityContext ctx, Object resource)
revokeAllPermissions
in interface PermissionStore
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.