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, updateResource
public 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
OslcClient
OslcClient.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 OslcClient
url
- the resource URLmediaType
- the requested media type to use in the HTTP Accept request
headerIOException
net.oauth.OAuthException
URISyntaxException
public org.apache.wink.client.ClientResponse updateResource(String url, Object artifact, String mediaType, String acceptType, String ifMatch) throws IOException, net.oauth.OAuthException, URISyntaxException
OslcClient
updateResource
in class OslcClient
IOException
net.oauth.OAuthException
URISyntaxException
public org.apache.wink.client.ClientResponse createResource(String url, Object artifact, String mediaType, String acceptType) throws IOException, net.oauth.OAuthException, URISyntaxException
createResource
in class OslcClient
url
- artifact
- mediaType
- acceptType
- URISyntaxException
net.oauth.OAuthException
IOException
protected net.oauth.OAuthMessage getResourceInternal(String url, String httpMethod, boolean restart) throws IOException, net.oauth.OAuthException, URISyntaxException
url
- httpMethod
- restart
- IOException
net.oauth.OAuthException
URISyntaxException
protected boolean isTwoLegged()
Copyright © 2016. All Rights Reserved.