Class BaseResource

java.lang.Object
io.jans.configapi.core.rest.BaseResource

public class BaseResource extends Object
  • Field Details

  • Constructor Details

    • BaseResource

      public BaseResource()
  • Method Details

    • getUriInfo

      public jakarta.ws.rs.core.UriInfo getUriInfo()
    • getHttpRequest

      public jakarta.servlet.http.HttpServletRequest getHttpRequest()
    • getHttpHeaders

      public jakarta.ws.rs.core.HttpHeaders getHttpHeaders()
    • checkResourceNotNull

      public static <T> void checkResourceNotNull(T resource, String objectName)
    • checkNotNull

      public static void checkNotNull(String attribute, String attributeName)
    • checkNotNull

      public static void checkNotNull(String[] attributes, String attributeName)
    • checkNotNull

      public static void checkNotNull(Map<String,String> attributeMap)
    • throwMissingAttributeError

      public static void throwMissingAttributeError(String attributeName)
    • checkNotEmpty

      public static <T> void checkNotEmpty(List<T> list, String attributeName)
    • checkNotEmpty

      public static void checkNotEmpty(String attribute, String attributeName)
    • throwBadRequestException

      public static void throwBadRequestException(String msg)
    • throwBadRequestException

      public static void throwBadRequestException(String msg, String description)
    • throwBadRequestException

      public static void throwBadRequestException(Object obj)
    • throwInternalServerException

      public static void throwInternalServerException(String msg)
    • throwInternalServerException

      public static void throwInternalServerException(String msg, String description)
    • throwInternalServerException

      public static void throwInternalServerException(String msg, Throwable throwable)
    • throwInternalServerException

      public static void throwInternalServerException(Throwable throwable)
    • throwNotFoundException

      public static void throwNotFoundException(String msg)
    • throwNotFoundException

      public static void throwNotFoundException(String msg, String description)
    • getMissingAttributeError

      protected static jakarta.ws.rs.core.Response getMissingAttributeError(String attributeName)
      Parameters:
      attributeName -
      Returns:
      Response
    • getNotFoundError

      protected static jakarta.ws.rs.core.Response getNotFoundError(String objectName)
    • getNotFoundError

      protected static jakarta.ws.rs.core.Response getNotFoundError(String msg, String description)
    • getNotAcceptableException

      protected static jakarta.ws.rs.core.Response getNotAcceptableException(String msg)
    • getBadRequestException

      protected static jakarta.ws.rs.core.Response getBadRequestException(String msg)
    • getBadRequestException

      protected static jakarta.ws.rs.core.Response getBadRequestException(String msg, String description)
    • getBadRequestException

      protected static jakarta.ws.rs.core.Response getBadRequestException(Object obj)
    • getInternalServerException

      protected static jakarta.ws.rs.core.Response getInternalServerException(String msg)
    • getInternalServerException

      protected static jakarta.ws.rs.core.Response getInternalServerException(String msg, String description)
    • createSearchRequest

      protected io.jans.model.SearchRequest createSearchRequest(String schemas, String filter, String sortBy, String sortOrder, Integer startIndex, Integer count, String attrsList, String excludedAttrsList, int maximumRecCount, String fieldValuePair, Class<?> entityClass)
    • findRootError

      public static Throwable findRootError(Throwable throwable)
    • getRegexPattern

      public String getRegexPattern(String pattern)