com.ibm.tivoli.maximo.oslc.consumer

Class OslcDocumentAccessor

  • java.lang.Object
    • com.ibm.tivoli.maximo.oslc.consumer.OslcDocumentAccessor


  • public class OslcDocumentAccessor
    extends java.lang.Object
    Utility class for interacting with a oslc provider.
    • Field Detail

      • OSLCLOGGER

        public static final MXLogger OSLCLOGGER
    • Constructor Detail

      • OslcDocumentAccessor

        public OslcDocumentAccessor()
    • Method Detail

      • postPrefilledResource

        public static java.lang.String postPrefilledResource(OslcEndPointData oslcEndPointData,
                                                             java.lang.String cdURI,
                                                             byte[] postData)
                                                      throws MXException
        Parameters:
        oslcEndPointData - the endpoint encapsulation
        cdURI - the creation dialog uri to which the prefilled resource is POSTed to get a new [creation dialog] link to the partially created resource.
        postData - the prefilled resource
        Returns:
        the link of the partially created resource - which is the modified creation dialog uri
        Throws:
        MXException
      • fetchOslcResource

        public static OslcResource fetchOslcResource(OslcEndPointData oslcEndPointData,
                                                     java.lang.String resourceURI)
                                              throws MXException
        Parameters:
        oslcEndPointData - the endpoint encapsulation
        resourceURI - the resource uri to GET the resource.
        Returns:
        the oslc resource with the Etag as well as the resource document.
        Throws:
        MXException
      • postUpdatedResource

        public static byte[] postUpdatedResource(OslcEndPointData oslcEndPointData,
                                                 java.lang.String resourceURI,
                                                 byte[] postData,
                                                 java.lang.String etag)
                                          throws MXException
        Parameters:
        oslcEndPointData - the endpoint details
        resourceURI - the uri to which to PUT the updated resource
        postData - the updated resource data
        etag - the Etag value which will make the update conditional [check if the resource have been modified by another user]
        Throws:
        MXException