Package io.xlate.jsonapi.rvp.internal
Class DefaultJsonApiHandler
java.lang.Object
io.xlate.jsonapi.rvp.internal.DefaultJsonApiHandler
- All Implemented Interfaces:
JsonApiHandler<java.lang.Object>
public class DefaultJsonApiHandler extends java.lang.Object implements JsonApiHandler<java.lang.Object>
-
Constructor Summary
Constructors Constructor Description DefaultJsonApiHandler()
-
Method Summary
Modifier and Type Method Description void
afterDelete(JsonApiContext context, java.lang.Object entity)
Called after an existing entity has been removed from the persistence context/database.void
afterFind(JsonApiContext context, java.lang.Object entity)
Called after the database has been searched for the requested entity/entities.void
afterMerge(JsonApiContext context, java.lang.Object entity)
Called after an existing entity has been merged into the persistence context.void
afterPersist(JsonApiContext context, java.lang.Object entity)
Called after a new entity has been added to the persistence context/database.void
afterUpdate(JsonApiContext context, java.lang.Object entity)
Called after an entity has been updated with values submitted by the client.void
afterValidation(JsonApiContext context, java.util.Set<javax.validation.ConstraintViolation<?>> violations)
Called following a validation operation.void
beforeDelete(JsonApiContext context, java.lang.Object entity)
Called prior to an attempt to remove an existing entity from the persistence context/database.void
beforeMerge(JsonApiContext context, java.lang.Object entity)
Called prior to an existing entity being merged into the persistence context.void
beforePersist(JsonApiContext context, java.lang.Object entity)
Called prior to a new entity being added to the persistence context/database.void
beforeResponse(JsonApiContext context)
Called at the end of each request.void
beforeUpdate(JsonApiContext context, java.lang.Object entity)
Called prior to an existing entity being updated with new values submitted by the client.boolean
isHandler(java.lang.String resourceType, java.lang.String httpMethod)
void
onRequest(JsonApiContext context)
Called at the beginning of each request prior to validation or any database operations.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DefaultJsonApiHandler
public DefaultJsonApiHandler()
-
-
Method Details
-
isHandler
public boolean isHandler(java.lang.String resourceType, java.lang.String httpMethod)- Specified by:
isHandler
in interfaceJsonApiHandler<java.lang.Object>
-
onRequest
Description copied from interface:JsonApiHandler
Called at the beginning of each request prior to validation or any database operations.- Specified by:
onRequest
in interfaceJsonApiHandler<java.lang.Object>
-
afterValidation
public void afterValidation(JsonApiContext context, java.util.Set<javax.validation.ConstraintViolation<?>> violations)Description copied from interface:JsonApiHandler
Called following a validation operation.- Specified by:
afterValidation
in interfaceJsonApiHandler<java.lang.Object>
-
afterFind
Description copied from interface:JsonApiHandler
Called after the database has been searched for the requested entity/entities.- Specified by:
afterFind
in interfaceJsonApiHandler<java.lang.Object>
-
beforePersist
Description copied from interface:JsonApiHandler
Called prior to a new entity being added to the persistence context/database.- Specified by:
beforePersist
in interfaceJsonApiHandler<java.lang.Object>
-
afterPersist
Description copied from interface:JsonApiHandler
Called after a new entity has been added to the persistence context/database.- Specified by:
afterPersist
in interfaceJsonApiHandler<java.lang.Object>
-
beforeUpdate
Description copied from interface:JsonApiHandler
Called prior to an existing entity being updated with new values submitted by the client.- Specified by:
beforeUpdate
in interfaceJsonApiHandler<java.lang.Object>
-
afterUpdate
Description copied from interface:JsonApiHandler
Called after an entity has been updated with values submitted by the client.- Specified by:
afterUpdate
in interfaceJsonApiHandler<java.lang.Object>
-
beforeMerge
Description copied from interface:JsonApiHandler
Called prior to an existing entity being merged into the persistence context. When this method is called, the entity has already been updated with any changes submitted by the client.- Specified by:
beforeMerge
in interfaceJsonApiHandler<java.lang.Object>
-
afterMerge
Description copied from interface:JsonApiHandler
Called after an existing entity has been merged into the persistence context. When this method is called, the entity has already been updated with any changes submitted by the client.- Specified by:
afterMerge
in interfaceJsonApiHandler<java.lang.Object>
-
beforeDelete
Description copied from interface:JsonApiHandler
Called prior to an attempt to remove an existing entity from the persistence context/database.- Specified by:
beforeDelete
in interfaceJsonApiHandler<java.lang.Object>
-
afterDelete
Description copied from interface:JsonApiHandler
Called after an existing entity has been removed from the persistence context/database.- Specified by:
afterDelete
in interfaceJsonApiHandler<java.lang.Object>
-
beforeResponse
Description copied from interface:JsonApiHandler
Called at the end of each request.- Specified by:
beforeResponse
in interfaceJsonApiHandler<java.lang.Object>
-