java.lang.Object
de.captaingoldfish.scim.sdk.server.endpoints.Context

public class Context extends Object
a context object that may be optionally added to the request. If a null instance is used on the {@link ResourceEndpoint#handleRequest(...)} methods the API will instantiate an instance by itself which will then be used
Since:
19.06.2021
Author:
Pascal Knueppel
  • Constructor Details

  • Method Details

    • getResourceReferenceUrl

      public String getResourceReferenceUrl(String id)
      creates a direct reference url to the current resource.

      e.g. if called on the ResourceHandler implementation for Users
           getResourceReferenceUrl("123456")
           => http://localhost:8080/scim/v2/Users/123456
       
      Parameters:
      id - the id of the resource. The id is not checked if a resource with this id does exist or not
      Returns:
      the fully qualified url to the specific resource with the given id
    • getCrossResourceReferenceUrl

      public Optional<String> getCrossResourceReferenceUrl(String id, String resourceName)
      creates a cross-reference url to another resource.

      e.g. if called on the ResourceHandler implementation for Groups to create a reference to a user member of the group
           getExternalResourceReferenceUrl("123456", "User")
           => http://localhost:8080/scim/v2/Users/123456
       
      Parameters:
      id - the id of the resource. The id is not checked if a resource with this id does exist or not
      Returns:
      the fully qualified url to the specific resource with the given id or an empty if no resource with the given name was registered
    • getRequestBody

      public String getRequestBody()
      will retrieve the original request body before it was parsed and modified
    • getAuthorization

      public Authorization getAuthorization()
      the authorization information of the current request