Package org.eclipse.lyo.client
Interface IOslcClient
- All Known Implementing Classes:
OslcClient
,OslcOAuthClient
public interface IOslcClient
An OSLC Client that extends the JAX-RS 2.0 REST client with OSLC specific CRUD and
discovery capabilities. Client applications would typically provide a ClientBuilder
to the constructor to configure the REST client too meet their needs.
-
Method Summary
Modifier and TypeMethodDescriptioncreateResource
(String url, Object artifact, String mediaType) Create (POST) an artifact to a URL - usually an OSLC Creation FactorycreateResource
(String url, Object artifact, String mediaType, String acceptType) Create (POST) an artifact to a URL - usually an OSLC Creation FactorycreateResource
(String url, Object artifact, String mediaType, String acceptType, String configurationContext) deleteResource
(String url) Delete an OSLC resource and return a Wink ClientResponsedeleteResource
(String url, String configurationContext) Returns the JAX-RS client for this OslcClient.getResource
(String url) Gets an OSLC resource usingapplication/rdf+xml
.getResource
(String url, String mediaType) Gets an OSLC resource.getResource
(String url, Map<String, String> requestHeaders) Gets an OSLC resource.getResource
(String url, Map<String, String> requestHeaders, String mediaType, boolean handleRedirects) getResource
(String url, Map<String, String> requestHeaders, String mediaType, String configurationContext) getResource
(String url, Map<String, String> requestHeaders, String mediaType, String configurationContext, boolean handleRedirects) updateResource
(String url, Object artifact, String mediaType) Update (PUT) an artifact to a URL - usually the URL for an existing OSLC artifactupdateResource
(String url, Object artifact, String mediaType, String acceptType) Update (PUT) an artifact to a URL - usually the URL for an existing OSLC artifactUpdate (PUT) an artifact to a URL - usually the URL for an existing OSLC artifactupdateResource
(String url, Object artifact, String mediaType, String acceptType, String ifMatch, String configurationContext)
-
Method Details
-
getClient
Client getClient()Returns the JAX-RS client for this OslcClient. Do not touch unless needed.- Returns:
- the JAX-RS client
-
getResource
Gets an OSLC resource usingapplication/rdf+xml
. UsegetResource(String, String)
to specify the media type orgetResource(String, Map)
to add other request headers. -
getResource
Gets an OSLC resource. UsegetResource(String, Map)
instead to add other request headers.- Parameters:
url
- the resource URLmediaType
- the requested media type to use in the HTTP Accept request header
-
getResource
Gets an OSLC resource.- Parameters:
url
- the resource URLrequestHeaders
- the HTTP request headers to use. If theAccept
header is not in the map, it defaults toapplication/rdf+xml
. IfOSLC-Core-Version
is not in the map, it defaults to2.0
.
-
getResource
-
getResource
-
getResource
-
getResource
-
deleteResource
Delete an OSLC resource and return a Wink ClientResponse- Parameters:
url
-
-
deleteResource
-
createResource
Create (POST) an artifact to a URL - usually an OSLC Creation Factory -
createResource
Create (POST) an artifact to a URL - usually an OSLC Creation Factory -
createResource
-
updateResource
Update (PUT) an artifact to a URL - usually the URL for an existing OSLC artifact -
updateResource
Update (PUT) an artifact to a URL - usually the URL for an existing OSLC artifact -
updateResource
Response 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 -
updateResource
-