org.eclipse.lyo.client.oslc.jazz

## Class JazzRootServicesHelper

- java.lang.Object
- - org.eclipse.lyo.client.oslc.jazz.JazzRootServicesHelper

-     public class JazzRootServicesHelper
      extends Object

  Helper class to assist in retrieval of attributes from the IBM Rational Jazz rootservices document This class is not currently thread safe.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `JD_NAMESPACE`
    `static String` | `JFS_NAMESPACE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JazzRootServicesHelper(String url, String catalogDomain)` Initialize Jazz rootservices-related URLs such as the catalog location and OAuth URLs rootservices is unprotected and access does not require authentication

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getCatalogUrl()` Get the OSLC Catalog URL
    `String` | `getConsumerApprovalUrl()` Gets the URL for approving an OAuth consumer
    `com.hp.hpl.jena.rdf.model.Model` | `getRdfModel()` Returns the underlying RDF model for the rootservices document.
    `String` | `getRequestConsumerKeyUrl()` Gets the URL for requesting an OAuth consumer key.
    `JazzFormAuthClient` | `initFormClient(String userid, String password)`
    `JazzFormAuthClient` | `initFormClient(String userid, String password, String authUrl)` Creates a form auth client for authenticating with the Jazz server.
    `OslcOAuthClient` | `initOAuthClient(String consumerKey, String secret)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### JFS_NAMESPACE

          public static final String JFS_NAMESPACE

      See Also:
        Constant Field Values

    - #### JD_NAMESPACE

          public static final String JD_NAMESPACE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JazzRootServicesHelper

          public JazzRootServicesHelper(String url,
                                String catalogDomain)
                                 throws RootServicesException

      Initialize Jazz rootservices-related URLs such as the catalog location and OAuth URLs rootservices is unprotected and access does not require authentication
      Parameters:
        `url` - - base URL of the Jazz server, no including /rootservices. Example: https://example.com:9443/ccm
        `catalogDomain` - - Namespace of the OSLC domain to find the catalog for. Example: OSLCConstants.OSLC_CM
      Throws:
        `RootServicesException`

  - ### Method Detail

    - #### getCatalogUrl

          public String getCatalogUrl()

      Get the OSLC Catalog URL
      Returns:
        the catalog URL

    - #### initOAuthClient

          public OslcOAuthClient initOAuthClient(String consumerKey,
                                        String secret)

    - #### initFormClient

          public JazzFormAuthClient initFormClient(String userid,
                                          String password)

    - #### initFormClient

          public JazzFormAuthClient initFormClient(String userid,
                                          String password,
                                          String authUrl)

      Creates a form auth client for authenticating with the Jazz server.
      Parameters:
        `userid` - the Jazz user ID
        `password` - the Jazz user password or form-based authentication
        `authUrl` - - the base URL to use for authentication. This is normally the application base URL for RQM and RTC and is the JTS application URL for fronting applications like RRC and DM.
      Returns:
        the form auth client

    - #### getRdfModel

          public com.hp.hpl.jena.rdf.model.Model getRdfModel()

      Returns the underlying RDF model for the rootservices document. This allows clients to read other service URLs not directly supported by this class.
      Returns:
        the RDF model

    - #### getRequestConsumerKeyUrl

          public String getRequestConsumerKeyUrl()

      Gets the URL for requesting an OAuth consumer key.
      Returns:
        the request consumer key URL
      See Also:
        RootServicesSpecAddendum2

    - #### getConsumerApprovalUrl

          public String getConsumerApprovalUrl()

      Gets the URL for approving an OAuth consumer
      Returns:
        the approval URL
      See Also:
        RootServicesSpecAddendum2

Copyright © 2016. All Rights Reserved.