Package com.unboundid.scim2.server.utils
Class ServerUtils
- java.lang.Object
-
- com.unboundid.scim2.server.utils.ServerUtils
-
public class ServerUtils extends Object
Utility methods for server side use.
-
-
Field Summary
Fields Modifier and Type Field Description static jakarta.ws.rs.core.MediaTypeMEDIA_TYPE_SCIM_TYPEThe SCIM media type.
-
Constructor Summary
Constructors Constructor Description ServerUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringencodeTemplateNames(String s)Encodes a string with template parameters name present, specifically the characters '{' and '}' will be percent-encoded.static jakarta.ws.rs.core.Response.ResponseBuildersetAcceptableType(jakarta.ws.rs.core.Response.ResponseBuilder response, List<jakarta.ws.rs.core.MediaType> acceptableTypes)Sets the appropriate response content type while taking the accept header into account.
-
-
-
Field Detail
-
MEDIA_TYPE_SCIM_TYPE
@NotNull public static final jakarta.ws.rs.core.MediaType MEDIA_TYPE_SCIM_TYPE
The SCIM media type.
-
-
Constructor Detail
-
ServerUtils
public ServerUtils()
-
-
Method Detail
-
setAcceptableType
@NotNull public static jakarta.ws.rs.core.Response.ResponseBuilder setAcceptableType(@NotNull jakarta.ws.rs.core.Response.ResponseBuilder response, @NotNull List<jakarta.ws.rs.core.MediaType> acceptableTypes)
Sets the appropriate response content type while taking the accept header into account.- Parameters:
response- The response builder.acceptableTypes- The list of acceptable types from Request.getAcceptableMediaTypes.- Returns:
- The response builder.
-
encodeTemplateNames
@NotNull public static String encodeTemplateNames(@NotNull String s)
Encodes a string with template parameters name present, specifically the characters '{' and '}' will be percent-encoded.- Parameters:
s- the string with zero or more template parameter names- Returns:
- the string with encoded template parameter names.
-
-