public class OslcOAuthClient extends OslcClient
OslcClient.OAuthHttpPool| Modifier and Type | Field and Description |
|---|---|
protected net.oauth.OAuthAccessor |
accessor |
httpClient| Constructor and Description |
|---|
OslcOAuthClient(String consumerKey,
String consumerSecret)
Creates a two-legged OAuth client.
|
OslcOAuthClient(String requestTokenURL,
String authorizationTokenURL,
String accessTokenURL,
String consumerKey,
String consumerSecret)
Initialize an OAuthClient with the required OAuth URLs
|
OslcOAuthClient(String requestTokenURL,
String authorizationTokenURL,
String accessTokenURL,
String consumerKey,
String consumerSecret,
String oauthRealmName) |
OslcOAuthClient(String requestTokenURL,
String authorizationTokenURL,
String accessTokenURL,
String consumerKey,
String consumerSecret,
String oauthRealmName,
String callback) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.wink.client.ClientResponse |
createResource(String url,
Object artifact,
String mediaType,
String acceptType)
Create (POST) an artifact to a URL - usually an OSLC Creation Factory
|
org.apache.wink.client.ClientResponse |
getResource(String url,
String mediaType)
Gets an OSLC resource.
|
protected net.oauth.OAuthMessage |
getResourceInternal(String url,
String httpMethod,
boolean restart)
Performs necessary OAuth negotiation.
|
protected boolean |
isTwoLegged()
Are we using two-legged OAuth?
|
org.apache.wink.client.ClientResponse |
updateResource(String url,
Object artifact,
String mediaType,
String acceptType,
String ifMatch)
Update (PUT) an artifact to a URL - usually the URL for an existing OSLC artifact
|
createResource, deleteResource, getClientConfig, getClientPool, getConfiguredSecureSocketProtocol, getHttpClient, getQueryResource, getResource, getResource, getResource, lookupCreationFactory, lookupCreationFactory, lookupCreationFactoryResource, lookupCreationFactoryResource, lookupQueryCapability, lookupServiceProviderUrl, setConfiguredSecureSocketProtocol, updateResource, updateResourcepublic OslcOAuthClient(String requestTokenURL, String authorizationTokenURL, String accessTokenURL, String consumerKey, String consumerSecret)
requestTokenURL - authorizationTokenURL - accessTokenURL - consumerKey - consumerSecret - public OslcOAuthClient(String requestTokenURL, String authorizationTokenURL, String accessTokenURL, String consumerKey, String consumerSecret, String oauthRealmName)
public OslcOAuthClient(String requestTokenURL, String authorizationTokenURL, String accessTokenURL, String consumerKey, String consumerSecret, String oauthRealmName, String callback)
public OslcOAuthClient(String consumerKey, String consumerSecret)
consumerKey - the OAuth consumer keyconsumerSecret - the OAuth consumer secretpublic org.apache.wink.client.ClientResponse getResource(String url, String mediaType) throws IOException, net.oauth.OAuthException, URISyntaxException
OslcClientOslcClient.getResource(String, Map) instead to
add other request headers. Call ClientResponse.getEntity(Class)
on the response to get the OSLC4J-annotated Java object.getResource in class OslcClienturl - the resource URLmediaType - the requested media type to use in the HTTP Accept request
headerIOExceptionnet.oauth.OAuthExceptionURISyntaxExceptionpublic org.apache.wink.client.ClientResponse updateResource(String url, Object artifact, String mediaType, String acceptType, String ifMatch) throws IOException, net.oauth.OAuthException, URISyntaxException
OslcClientupdateResource in class OslcClientIOExceptionnet.oauth.OAuthExceptionURISyntaxExceptionpublic org.apache.wink.client.ClientResponse createResource(String url, Object artifact, String mediaType, String acceptType) throws IOException, net.oauth.OAuthException, URISyntaxException
createResource in class OslcClienturl - artifact - mediaType - acceptType - URISyntaxExceptionnet.oauth.OAuthExceptionIOExceptionprotected net.oauth.OAuthMessage getResourceInternal(String url, String httpMethod, boolean restart) throws IOException, net.oauth.OAuthException, URISyntaxException
url - httpMethod - restart - IOExceptionnet.oauth.OAuthExceptionURISyntaxExceptionprotected boolean isTwoLegged()
Copyright © 2016. All Rights Reserved.