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​(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)