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

        public static void thorwInternalServerException​(String msg)
      • 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)
      • getInternalServerException

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