Class AbstractService

    • Field Detail

      • LOG

        protected static final Logger LOG
      • uriInfo

        protected uriInfo
    • Constructor Detail

      • AbstractService

        public AbstractService()
    • Method Detail

      • findActualKey

        protected String findActualKey​(AnyDAO<?> dao,
                                       String pretendingKey)
      • isNullPriorityAsync

        protected boolean isNullPriorityAsync()
      • getPreference

        protected Preference getPreference()
        Reads Prefer header from request and parses into a Preference instance.
        a Preference instance matching the passed Prefer header, or Preference.NONE if missing.
      • applyPreference

        protected applyPreference​(ProvisioningResult<?> provisioningResult,
      • createResponse

        protected createResponse​(ProvisioningResult<?> provisioningResult)
        Builds response to successful create request, taking into account any Prefer header.
        provisioningResult - the entity just created
        response to successful create request
      • modificationResponse

        protected modificationResponse​(Object entity)
        Builds response to successful modification request, taking into account any Prefer header.
        entity - the entity just modified
        response to successful modification request
      • checkETag

        protected void checkETag​(String etag)
      • buildPagedResult

        protected <T extends BaseBeanPagedResult<T> buildPagedResult​(List<T> list,
                                                                       int page,
                                                                       int size,
                                                                       int totalCount)
        Builds a paged result out of a list of items and additional information.
        Type Parameters:
        T - result type
        list - bare list of items to be returned
        page - current page
        size - requested size
        totalCount - total result size (not considering pagination)
        paged result