com.unboundid.scim.sdk
Class BulkOperation

java.lang.Object
  extended by com.unboundid.scim.sdk.BulkOperation

public class BulkOperation
extends Object

This class represents an individual operation within a bulk operation request or response. The fields are defined as follows, in the order that they must be encoded when XML is the content type:

 Each operation corresponds to a single HTTP request against a Resource
 endpoint. REQUIRED.

    method
        The HTTP method of the current operation. Possible values are POST,
        PUT, PATCH or DELETE. REQUIRED.
    bulkId
        The transient identifier of a newly created Resource, unique within
        a bulk request and created by the Consumer. The bulkId serves as a
        surrogate Resource id enabling Consumers to uniquely identify newly
        created Resources in the Response and cross reference new Resources
        in and across operations within a bulk request. REQUIRED when method
        is POST.
    version
        The current Resource version. Version is REQUIRED if the Service
        Provider supports ETags and the method is PUT, DELETE, or PATCH.
    path
        The Resource's relative path. If the method is POST the value must
        specify a Resource type endpoint; e.g., /Users or /Groups whereas
        all other method values must specify the path to a specific Resource;
        e.g., /Users/2819c223-7f76-453a-919d-413861904646.
        REQUIRED in a request.
    location
        The Resource endpoint URL. REQUIRED in a response, except in the
        event of a POST failure.
    data
        The Resource data as it would appear for a single POST, PUT or PATCH
        Resource operation. REQUIRED in a request when method is POST, PUT
        and PATCH.
    status
        A complex type that contains information about the success or failure
        of one operation within the bulk job. REQUIRED in a response.

        code
            The HTTP response code that would have been returned if a single
            HTTP request would have been used. REQUIRED.
        description
            A human readable error message. REQUIRED when an error occurred.

 


Nested Class Summary
static class BulkOperation.Method
          The different methods that are supported within bulk operations.
 
Constructor Summary
BulkOperation(BulkOperation.Method method, String bulkId, String version, String path, String location, BaseResource data, Status status)
          Construct a new BulkOperation object.
 
Method Summary
static BulkOperation createRequest(BulkOperation.Method method, String bulkId, String version, String path, BaseResource data)
          Create a new operation for a bulk request.
 String getBulkId()
          Retrieve the bulk operation identifier, required when the method is POST.
 BaseResource getData()
          Retrieve the resource data as it would appear for a single POST, PUT or PATCH operation.
 String getLocation()
          Retrieve the resource endpoint URL, or null if this is a request, or if this is the response to a failed POST operation.
 BulkOperation.Method getMethod()
          Retrieve HTTP method of the operation.
 String getPath()
          Retrieve the The relative path of the resource, or null if this is a response.
 Status getStatus()
          Retrieve information about the success or failure of the operation, or null if this is a request.
 String getVersion()
          Retrieve the The current resource version, or null if not provided.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BulkOperation

public BulkOperation(BulkOperation.Method method,
                     String bulkId,
                     String version,
                     String path,
                     String location,
                     BaseResource data,
                     Status status)
Construct a new BulkOperation object.

Parameters:
method - The HTTP method of the operation. Possible values are POST, PUT, PATCH or DELETE.
bulkId - The bulk operation identifier, required when the method is POST.
version - The current resource version, or null if not provided.
path - The relative path of the resource, or null if this is a response.
location - The resource endpoint URL, or {code null} if this is a request, or if this is the response to a failed POST operation.
data - The resource data as it would appear for a single POST, PUT or PATCH operation.
status - Information about the success or failure of the operation, or null if this is a request.
Method Detail

createRequest

public static BulkOperation createRequest(BulkOperation.Method method,
                                          String bulkId,
                                          String version,
                                          String path,
                                          BaseResource data)
Create a new operation for a bulk request.

Parameters:
method - The HTTP method of the operation. Possible values are POST, PUT, PATCH or DELETE.
bulkId - The bulk operation identifier, required when the method is POST.
version - The current resource version, or null if not provided.
path - The relative path of the resource, or null if this is a response.
data - The resource data as it would appear for a single POST, PUT or PATCH operation.
Returns:
The new bulk request operation.

getMethod

public BulkOperation.Method getMethod()
Retrieve HTTP method of the operation. Possible values are POST, PUT, PATCH or DELETE.

Returns:
The HTTP method of the operation. Possible values are POST, PUT, PATCH or DELETE.

getBulkId

public String getBulkId()
Retrieve the bulk operation identifier, required when the method is POST.

Returns:
The bulk operation identifier, required when the method is POST.

getVersion

public String getVersion()
Retrieve the The current resource version, or null if not provided.

Returns:
The The current resource version, or null if not provided.

getPath

public String getPath()
Retrieve the The relative path of the resource, or null if this is a response.

Returns:
The The relative path of the resource, or null if this is a response.

getLocation

public String getLocation()
Retrieve the resource endpoint URL, or null if this is a request, or if this is the response to a failed POST operation.

Returns:
The resource endpoint URL, or null if this is a request, or if this is the response to a failed POST operation.

getData

public BaseResource getData()
Retrieve the resource data as it would appear for a single POST, PUT or PATCH operation.

Returns:
The resource data as it would appear for a single POST, PUT or PATCH operation.

getStatus

public Status getStatus()
Retrieve information about the success or failure of the operation, or null if this is a request.

Returns:
Information about the success or failure of the operation, or null if this is a request.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2011-2012 UnboundID. All Rights Reserved.