Package org.openmetadata.service.util
Class RestUtil
- java.lang.Object
-
- org.openmetadata.service.util.RestUtil
-
public final class RestUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRestUtil.DeleteResponse<T>static classRestUtil.PatchResponse<T>static classRestUtil.PutResponse<T>
-
Field Summary
Fields Modifier and Type Field Description static StringCHANGE_CUSTOM_HEADERstatic DateFormatDATE_FORMATstatic DateFormatDATE_TIME_FORMATstatic StringDELETED_TEAM_DISPLAYstatic StringDELETED_TEAM_NAMEstatic StringDELETED_USER_DISPLAYstatic StringDELETED_USER_NAMEstatic StringENTITY_CREATEDstatic StringENTITY_DELETEDstatic StringENTITY_FIELDS_CHANGEDstatic StringENTITY_NO_CHANGEstatic StringENTITY_RESTOREDstatic StringENTITY_SOFT_DELETEDstatic StringENTITY_UPDATEDstatic StringLOGICAL_TEST_CASES_ADDEDstatic StringSIGNATURE_HEADERstatic StringTEST_CASE_REMOVED_FROM_LOGICAL_TEST_SUITE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcompareDates(String date1, String date2)static StringdecodeCursor(String cursor)static StringencodeCursor(String cursor)static URIgetHref(URI parent, String child)static URIgetHref(javax.ws.rs.core.UriInfo uriInfo, String collectionPath)static URIgetHref(javax.ws.rs.core.UriInfo uriInfo, String collectionPath, String resourcePath)static URIgetHref(javax.ws.rs.core.UriInfo uriInfo, String collectionPath, UUID id)static StringremoveSlashes(String s)Remove leading and trailing slashesstatic StringreplaceSpaces(String s)static Stringtoday(int offsetDays)static voidvalidateCursors(String before, String after)
-
-
-
Field Detail
-
CHANGE_CUSTOM_HEADER
public static final String CHANGE_CUSTOM_HEADER
- See Also:
- Constant Field Values
-
ENTITY_CREATED
public static final String ENTITY_CREATED
- See Also:
- Constant Field Values
-
ENTITY_UPDATED
public static final String ENTITY_UPDATED
- See Also:
- Constant Field Values
-
ENTITY_FIELDS_CHANGED
public static final String ENTITY_FIELDS_CHANGED
- See Also:
- Constant Field Values
-
ENTITY_NO_CHANGE
public static final String ENTITY_NO_CHANGE
- See Also:
- Constant Field Values
-
ENTITY_SOFT_DELETED
public static final String ENTITY_SOFT_DELETED
- See Also:
- Constant Field Values
-
ENTITY_RESTORED
public static final String ENTITY_RESTORED
- See Also:
- Constant Field Values
-
ENTITY_DELETED
public static final String ENTITY_DELETED
- See Also:
- Constant Field Values
-
DELETED_USER_NAME
public static final String DELETED_USER_NAME
- See Also:
- Constant Field Values
-
DELETED_USER_DISPLAY
public static final String DELETED_USER_DISPLAY
- See Also:
- Constant Field Values
-
DELETED_TEAM_NAME
public static final String DELETED_TEAM_NAME
- See Also:
- Constant Field Values
-
DELETED_TEAM_DISPLAY
public static final String DELETED_TEAM_DISPLAY
- See Also:
- Constant Field Values
-
SIGNATURE_HEADER
public static final String SIGNATURE_HEADER
- See Also:
- Constant Field Values
-
LOGICAL_TEST_CASES_ADDED
public static final String LOGICAL_TEST_CASES_ADDED
- See Also:
- Constant Field Values
-
TEST_CASE_REMOVED_FROM_LOGICAL_TEST_SUITE
public static final String TEST_CASE_REMOVED_FROM_LOGICAL_TEST_SUITE
- See Also:
- Constant Field Values
-
DATE_TIME_FORMAT
public static final DateFormat DATE_TIME_FORMAT
-
DATE_FORMAT
public static final DateFormat DATE_FORMAT
-
-
Method Detail
-
getHref
public static URI getHref(javax.ws.rs.core.UriInfo uriInfo, String collectionPath, String resourcePath)
-
getHref
public static URI getHref(javax.ws.rs.core.UriInfo uriInfo, String collectionPath, UUID id)
-
compareDates
public static int compareDates(String date1, String date2) throws ParseException
- Throws:
ParseException
-
today
public static String today(int offsetDays)
-
-