Class ServerResponse<T extends ScimObjectNode>

    • Method Detail

      • getResource

        public T getResource()
        tries to resolve the returned resource as scim object
        Returns:
        the parsed resource that should be returned
        Throws:
        IOException - if the response body is not a valid json document
      • getResource

        public <R extends ScimObjectNode> R getResource​(Class<R> responseType)
        tries to resolve the returned resource as scim object
        Parameters:
        responseType - the type of the node which might be of type User, Group, BulkResponse or any other type that extends ScimObjectNode
        Returns:
        the parsed resource that should be returned
        Throws:
        IOException - if the response body is not a valid json document
      • isValidScimResponse

        public boolean isValidScimResponse()
        if this response is a valid scim response
      • getErrorResponse

        public ErrorResponse getErrorResponse()
        will be instantiated if the response contains a scim json structure with a schemas-element that contains the value SchemaUris.ERROR_URI
      • getHttpHeaders

        public Map<String,​String> getHttpHeaders()
        the headers of the response
      • getResponseBody

        public String getResponseBody()
        the body of the response
      • getHttpStatus

        public int getHttpStatus()
        the status code of the response
      • isSuccess

        public boolean isSuccess()
        if the response was succesful
      • getType

        protected Class<T> getType()
        the expected response type