|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.lyo.client.oslc.OslcClient
public class OslcClient
An OSLC Client. Provides an Apache HttpClient, an Apache Wink REST ClientConfig and defines a getResource method which returns an Apache Wink ClientResponse. This class is not currently thread safe.
Nested Class Summary | |
---|---|
protected class |
OslcClient.OAuthHttpPool
|
Field Summary | |
---|---|
protected org.apache.http.impl.client.DefaultHttpClient |
httpClient
|
Constructor Summary | |
---|---|
OslcClient()
Initialize a new OslcClient using an Apache Http Components 4 Http client and configuration. |
|
OslcClient(TrustManager[] trustManagers,
org.apache.http.conn.ssl.X509HostnameVerifier hostnameVerifier)
Initialize a new OslcClient using an Apache Http Components 4 Http client and configuration. |
Method Summary | |
---|---|
org.apache.wink.client.ClientResponse |
createResource(String url,
Object artifact,
String mediaType)
Create (POST) an artifact to a URL - usually an OSLC Creation Factory |
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 |
deleteResource(String url)
Delete an OSLC resource and return a Wink ClientResponse |
protected org.apache.wink.client.ClientConfig |
getClientConfig()
|
protected net.oauth.client.httpclient4.HttpClientPool |
getClientPool()
|
org.apache.http.client.HttpClient |
getHttpClient()
Returns the HTTP client associated with this OSLC Client |
org.apache.wink.client.Resource |
getQueryResource(OslcQuery query)
Create a Wink Resource for the given OslcQuery object |
org.apache.wink.client.ClientResponse |
getResource(String url,
String mediaType)
Abstract method get an OSLC resource and return a Wink ClientResponse |
String |
lookupCreationFactory(String serviceProviderUrl,
String oslcDomain,
String oslcResourceType)
Find the OSLC Creation Factory URL for a given OSLC resource type. |
String |
lookupQueryCapability(String serviceProviderUrl,
String oslcDomain,
String oslcResourceType)
Find the OSLC Query Capability URL for a given OSLC resource type. |
String |
lookupServiceProviderUrl(String catalogUrl,
String serviceProviderTitle)
Lookup the URL of a specific OSLC Service Provider in an OSLC Catalog using the service provider's title |
org.apache.wink.client.ClientResponse |
updateResource(String url,
Object artifact,
String mediaType)
Update (PUT) an artifact to a URL - usually the URL for an existing OSLC artifact |
org.apache.wink.client.ClientResponse |
updateResource(String url,
Object artifact,
String mediaType,
String acceptType)
Update (PUT) an artifact to a URL - usually the URL for an existing OSLC artifact |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.http.impl.client.DefaultHttpClient httpClient
Constructor Detail |
---|
public OslcClient()
public OslcClient(TrustManager[] trustManagers, org.apache.http.conn.ssl.X509HostnameVerifier hostnameVerifier)
Method Detail |
---|
public org.apache.http.client.HttpClient getHttpClient()
protected net.oauth.client.httpclient4.HttpClientPool getClientPool()
protected org.apache.wink.client.ClientConfig getClientConfig()
public org.apache.wink.client.ClientResponse getResource(String url, String mediaType) throws IOException, net.oauth.OAuthException, URISyntaxException
url
- method
- mediaType
-
IOException
net.oauth.OAuthException
URISyntaxException
public org.apache.wink.client.ClientResponse deleteResource(String url) throws IOException, net.oauth.OAuthException, URISyntaxException
url
-
IOException
net.oauth.OAuthException
URISyntaxException
public org.apache.wink.client.ClientResponse createResource(String url, Object artifact, String mediaType) throws IOException, net.oauth.OAuthException, URISyntaxException
url
- artifact
- mediaType
-
URISyntaxException
net.oauth.OAuthException
IOException
public org.apache.wink.client.ClientResponse createResource(String url, Object artifact, String mediaType, String acceptType) throws IOException, net.oauth.OAuthException, URISyntaxException
url
- artifact
- mediaType
- acceptType
-
URISyntaxException
net.oauth.OAuthException
IOException
public org.apache.wink.client.ClientResponse updateResource(String url, Object artifact, String mediaType)
url
- artifact
- mediaType
-
public org.apache.wink.client.ClientResponse updateResource(String url, Object artifact, String mediaType, String acceptType)
url
- artifact
- mediaType
- acceptType
-
public org.apache.wink.client.ClientResponse updateResource(String url, Object artifact, String mediaType, String acceptType, String ifMatch) throws IOException, net.oauth.OAuthException, URISyntaxException
url
- artifact
- mediaType
- acceptType
-
URISyntaxException
net.oauth.OAuthException
IOException
public org.apache.wink.client.Resource getQueryResource(OslcQuery query)
query
-
public String lookupServiceProviderUrl(String catalogUrl, String serviceProviderTitle) throws IOException, net.oauth.OAuthException, URISyntaxException, ResourceNotFoundException
catalogUrl
- serviceProviderTitle
-
IOException
net.oauth.OAuthException
URISyntaxException
ResourceNotFoundException
public String lookupQueryCapability(String serviceProviderUrl, String oslcDomain, String oslcResourceType) throws IOException, net.oauth.OAuthException, URISyntaxException, ResourceNotFoundException
serviceProviderUrl
- oslcDomain
- oslcResourceType
- - the resource type of the desired query capability. This may differ from the OSLC artifact type.
IOException
net.oauth.OAuthException
URISyntaxException
ResourceNotFoundException
public String lookupCreationFactory(String serviceProviderUrl, String oslcDomain, String oslcResourceType) throws IOException, net.oauth.OAuthException, URISyntaxException, ResourceNotFoundException
serviceProviderUrl
- oslcDomain
- oslcResourceType
- - the resource type of the desired query capability. This may differ from the OSLC artifact type.
IOException
net.oauth.OAuthException
URISyntaxException
ResourceNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |