public abstract class IdentityTypeHandler<T extends org.picketlink.idm.model.IdentityType> extends Object
Base class that provides some common functionality for IdentityType types.
| Constructor and Description |
|---|
IdentityTypeHandler() |
| Modifier and Type | Method and Description |
|---|---|
Object |
createEntity(org.picketlink.idm.spi.SecurityContext context,
T fromIdentityType,
JPAIdentityStore store)
Creates a Identity Class instance using the information from the given
IdentityType. |
T |
createIdentityType(org.picketlink.idm.spi.SecurityContext context,
Object identity,
JPAIdentityStore store)
Creates a
IdentityType instance using the information from the given Identity Class instance. |
protected abstract T |
doCreateIdentityType(org.picketlink.idm.spi.SecurityContext context,
Object identity,
JPAIdentityStore store)
Subclasses should override this method to create a specific
IdentityType given the provided Identity Class
instance. |
protected abstract void |
doPopulateIdentityInstance(org.picketlink.idm.spi.SecurityContext context,
Object toIdentity,
T fromIdentityType,
JPAIdentityStore store)
Subclasses should override this method to populate the given Identity Class instance with the specific information for a
given
IdentityType. |
List<javax.persistence.criteria.Order> |
getOrders(JPACriteriaQueryBuilder criteria,
JPAIdentityStore store)
Return list of
Order instances to be used for sorting during the query execution. |
List<javax.persistence.criteria.Predicate> |
getPredicate(org.picketlink.idm.spi.SecurityContext context,
JPACriteriaQueryBuilder criteria,
JPAIdentityStore store)
Returns a
List of Predicate to be used during the query execution. |
protected Map<org.picketlink.idm.query.QueryParameter,org.picketlink.idm.config.JPAIdentityStoreConfiguration.PropertyType> |
getSortParametersMapping() |
protected void |
populateEntity(org.picketlink.idm.spi.SecurityContext context,
Object toIdentity,
T fromIdentityType,
JPAIdentityStore store)
Populates the given
Object argument representing a Identity Class (from the config) with the information from the
specified IdentityType. |
protected abstract org.picketlink.idm.event.AbstractBaseEvent |
raiseCreatedEvent(T fromIdentityType) |
protected abstract org.picketlink.idm.event.AbstractBaseEvent |
raiseDeletedEvent(T fromIdentityType) |
protected abstract org.picketlink.idm.event.AbstractBaseEvent |
raiseUpdatedEvent(T fromIdentityType) |
public T createIdentityType(org.picketlink.idm.spi.SecurityContext context, Object identity, JPAIdentityStore store)
Creates a IdentityType instance using the information from the given Identity Class instance. This method already
provides the mapping for the common properties for all IdentityType types.
identity - public Object createEntity(org.picketlink.idm.spi.SecurityContext context, T fromIdentityType, JPAIdentityStore store)
Creates a Identity Class instance using the information from the given IdentityType.
fromIdentityType - protected void populateEntity(org.picketlink.idm.spi.SecurityContext context,
Object toIdentity,
T fromIdentityType,
JPAIdentityStore store)
Populates the given Object argument representing a Identity Class (from the config) with the information from the
specified IdentityType.
toIdentity - fromIdentityType - public List<javax.persistence.criteria.Predicate> getPredicate(org.picketlink.idm.spi.SecurityContext context, JPACriteriaQueryBuilder criteria, JPAIdentityStore store)
Returns a List of Predicate to be used during the query execution. This method already provides the
mapping for the common properties for all IdentityType types.
criteria - public List<javax.persistence.criteria.Order> getOrders(JPACriteriaQueryBuilder criteria, JPAIdentityStore store)
Order instances to be used for sorting during the query execution.criteria - criteria which encapsulate all the parameters and JPA builderprotected abstract T doCreateIdentityType(org.picketlink.idm.spi.SecurityContext context, Object identity, JPAIdentityStore store)
Subclasses should override this method to create a specific IdentityType given the provided Identity Class
instance.
identity - protected abstract void doPopulateIdentityInstance(org.picketlink.idm.spi.SecurityContext context,
Object toIdentity,
T fromIdentityType,
JPAIdentityStore store)
Subclasses should override this method to populate the given Identity Class instance with the specific information for a
given IdentityType.
toIdentity - fromIdentityType - protected abstract org.picketlink.idm.event.AbstractBaseEvent raiseCreatedEvent(T fromIdentityType)
protected abstract org.picketlink.idm.event.AbstractBaseEvent raiseUpdatedEvent(T fromIdentityType)
protected abstract org.picketlink.idm.event.AbstractBaseEvent raiseDeletedEvent(T fromIdentityType)
protected Map<org.picketlink.idm.query.QueryParameter,org.picketlink.idm.config.JPAIdentityStoreConfiguration.PropertyType> getSortParametersMapping()
Copyright © 2013. All Rights Reserved.