Package org.eclipse.lyo.client
Class RootServicesHelper
- java.lang.Object
-
- org.eclipse.lyo.client.RootServicesHelper
-
public class RootServicesHelper 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 Description static StringJD_NAMESPACEstatic StringJFS_NAMESPACE
-
Constructor Summary
Constructors Constructor Description RootServicesHelper(String url, String catalogDomain, OslcClient client)Initialize Jazz rootservices-related URLs such as the catalog location and OAuth URLs rootservices is unprotected and access does not require authentication
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAccessTokenUrl()StringgetAuthorizationRealm()StringgetAuthorizationTokenUrl()StringgetCatalogUrl()Get the OSLC Catalog URLStringgetConsumerApprovalUrl()Gets the URL for approving an OAuth consumerStringgetConsumerApprovalUrl(String consumerKey)org.apache.jena.rdf.model.ModelgetRdfModel()Returns the underlying RDF model for the rootservices document.StringgetRequestConsumerKeyUrl()Gets the URL for requesting an OAuth consumer key.StringgetRequestTokenUrl()StringrequestConsumerKey(String consumerName, String consumerSecret)
-
-
-
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
-
RootServicesHelper
public RootServicesHelper(String url, String catalogDomain, OslcClient client) 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/ccmcatalogDomain- - 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
-
getRdfModel
public org.apache.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
-
getAuthorizationRealm
public String getAuthorizationRealm()
-
getRequestTokenUrl
public String getRequestTokenUrl()
-
getAuthorizationTokenUrl
public String getAuthorizationTokenUrl()
-
getAccessTokenUrl
public String getAccessTokenUrl()
-
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
-
requestConsumerKey
public String requestConsumerKey(String consumerName, String consumerSecret) throws org.apache.http.client.ClientProtocolException, IOException
- Throws:
org.apache.http.client.ClientProtocolExceptionIOException
-
-