Class BaseResource


  • public class BaseResource
    extends Object
    • Constructor Detail

      • BaseResource

        public BaseResource()
    • Method Detail

      • 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)
      • thorwBadRequestException

        public static void thorwBadRequestException​(String msg)
      • thorwBadRequestException

        public static void thorwBadRequestException​(Object obj)
      • thorwInternalServerException

        public static void thorwInternalServerException​(String msg)
      • thorwInternalServerException

        public static void thorwInternalServerException​(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)