Class GetPublisher

All Implemented Interfaces:
ResourceRequest<ResourceResponse<Publisher>>, Callable<ResourceResponse<Publisher>>

public class GetPublisher extends GetResource<Publisher>
Executes a GET request to read a Publisher instance.

The publisher URI is usually given by a ServiceProvider or RootServices.

Since:
1.4.0
See Also:
  • Constructor Details

    • GetPublisher

      public GetPublisher(URI uri)
      Creates a new instance to execute a GET on the specified publisher location.
      Parameters:
      uri - the publisher location
    • GetPublisher

      public GetPublisher(OslcClient client, URI uri)
      Creates a new instance to execute a GET on the specified publisher location, using the given client.

      The client must be unauthenticated, as publisher is an authorization-free resource, and some servers may reject requests providing an Authorization header. The client may be customized using OslcClientFactory for specific parameters, like a proxy configuration.

      Parameters:
      client - the client to use
      uri - the publisher location
      Since:
      3.5.1
  • Method Details

    • createResponse

      protected ResourceResponse<Publisher> createResponse(OslcResource resource, ClientResponse response)
      Description copied from class: GetResource
      Extracts a ResourceResponse instance from the obtained HTTP response. The response contains the response headers, from which the ETag header can be extracted in case this request is to follow by a PUT.
      Overrides:
      createResponse in class GetResource<Publisher>
      Parameters:
      resource - the resource on which a request is executed.
      response - the response obtained.
      Returns:
      the extraction of the response content into the expected format.