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 interface JsonApiHandler<java.lang.Object>
    • onRequest

      public void onRequest​(JsonApiContext context)
      Description copied from interface: JsonApiHandler
      Called at the beginning of each request prior to validation or any database operations.
      Specified by:
      onRequest in interface JsonApiHandler<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 interface JsonApiHandler<java.lang.Object>
    • afterFind

      public void afterFind​(JsonApiContext context, java.lang.Object entity)
      Description copied from interface: JsonApiHandler
      Called after the database has been searched for the requested entity/entities.
      Specified by:
      afterFind in interface JsonApiHandler<java.lang.Object>
    • beforePersist

      public void beforePersist​(JsonApiContext context, java.lang.Object entity)
      Description copied from interface: JsonApiHandler
      Called prior to a new entity being added to the persistence context/database.
      Specified by:
      beforePersist in interface JsonApiHandler<java.lang.Object>
    • afterPersist

      public void afterPersist​(JsonApiContext context, java.lang.Object entity)
      Description copied from interface: JsonApiHandler
      Called after a new entity has been added to the persistence context/database.
      Specified by:
      afterPersist in interface JsonApiHandler<java.lang.Object>
    • beforeUpdate

      public void beforeUpdate​(JsonApiContext context, java.lang.Object entity)
      Description copied from interface: JsonApiHandler
      Called prior to an existing entity being updated with new values submitted by the client.
      Specified by:
      beforeUpdate in interface JsonApiHandler<java.lang.Object>
    • afterUpdate

      public void afterUpdate​(JsonApiContext context, java.lang.Object entity)
      Description copied from interface: JsonApiHandler
      Called after an entity has been updated with values submitted by the client.
      Specified by:
      afterUpdate in interface JsonApiHandler<java.lang.Object>
    • beforeMerge

      public void beforeMerge​(JsonApiContext context, java.lang.Object entity)
      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 interface JsonApiHandler<java.lang.Object>
    • afterMerge

      public void afterMerge​(JsonApiContext context, java.lang.Object entity)
      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 interface JsonApiHandler<java.lang.Object>
    • beforeDelete

      public void beforeDelete​(JsonApiContext context, java.lang.Object entity)
      Description copied from interface: JsonApiHandler
      Called prior to an attempt to remove an existing entity from the persistence context/database.
      Specified by:
      beforeDelete in interface JsonApiHandler<java.lang.Object>
    • afterDelete

      public void afterDelete​(JsonApiContext context, java.lang.Object entity)
      Description copied from interface: JsonApiHandler
      Called after an existing entity has been removed from the persistence context/database.
      Specified by:
      afterDelete in interface JsonApiHandler<java.lang.Object>
    • beforeResponse

      public void beforeResponse​(JsonApiContext context)
      Description copied from interface: JsonApiHandler
      Called at the end of each request.
      Specified by:
      beforeResponse in interface JsonApiHandler<java.lang.Object>