Class BaseResource


  • public class BaseResource
    extends Object
    • Constructor Detail

      • BaseResource

        public BaseResource()
    • Method Detail

      • 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​(Object obj)
      • throwInternalServerException

        public static void throwInternalServerException​(String msg)
      • throwInternalServerException

        public static void throwInternalServerException​(Throwable throwable)
      • getMissingAttributeError

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

        protected static jakarta.ws.rs.core.Response getNotFoundError​(String objectName)
      • 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​(Object obj)
      • getInternalServerException

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