Package io.jans.configapi.core.rest
Class BaseResource
- java.lang.Object
-
- io.jans.configapi.core.rest.BaseResource
-
public class BaseResource extends Object
-
-
Constructor Summary
Constructors Constructor Description BaseResource()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
checkNotEmpty(String attribute, String attributeName)
static <T> void
checkNotEmpty(List<T> list, String attributeName)
static void
checkNotNull(String[] attributes, String attributeName)
static void
checkNotNull(String attribute, String attributeName)
static void
checkNotNull(Map<String,String> attributeMap)
static <T> void
checkResourceNotNull(T resource, String objectName)
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)
static Throwable
findRootError(Throwable throwable)
protected static jakarta.ws.rs.core.Response
getBadRequestException(Object obj)
protected static jakarta.ws.rs.core.Response
getBadRequestException(String msg)
protected static jakarta.ws.rs.core.Response
getBadRequestException(String msg, String description)
jakarta.ws.rs.core.HttpHeaders
getHttpHeaders()
jakarta.servlet.http.HttpServletRequest
getHttpRequest()
protected static jakarta.ws.rs.core.Response
getInternalServerException(String msg)
protected static jakarta.ws.rs.core.Response
getInternalServerException(String msg, String description)
protected static jakarta.ws.rs.core.Response
getMissingAttributeError(String attributeName)
protected static jakarta.ws.rs.core.Response
getNotAcceptableException(String msg)
protected static jakarta.ws.rs.core.Response
getNotFoundError(String objectName)
protected static jakarta.ws.rs.core.Response
getNotFoundError(String msg, String description)
jakarta.ws.rs.core.UriInfo
getUriInfo()
static void
throwBadRequestException(Object obj)
static void
throwBadRequestException(String msg)
static void
throwBadRequestException(String msg, String description)
static void
throwInternalServerException(String msg)
static void
throwInternalServerException(String msg, String description)
static void
throwInternalServerException(String msg, Throwable throwable)
static void
throwInternalServerException(Throwable throwable)
static void
throwMissingAttributeError(String attributeName)
static void
throwNotFoundException(String msg)
static void
throwNotFoundException(String msg, String description)
-
-
-
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)
-
throwMissingAttributeError
public static void throwMissingAttributeError(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)
-
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)
-
-