public class PutBuilder extends BodyRequestBuilder
client, request, targetUri| Constructor and Description |
|---|
PutBuilder(URI uri,
FcrepoClient client)
Instantiate builder
|
| Modifier and Type | Method and Description |
|---|---|
PutBuilder |
addHeader(String name,
String value)
Add a header with the given name and value to the request.
|
PutBuilder |
addInteractionModel(String interactionModelUri)
Add an interaction model to the request
|
PutBuilder |
addLinkHeader(FcrepoLink linkHeader)
Add a link header to the request
|
PutBuilder |
body(File file,
String contentType)
Add the given file as the body for this request with the provided content type
|
PutBuilder |
body(InputStream stream)
Add a body to this request from a stream, with application/octet-stream as its content type
|
PutBuilder |
body(InputStream stream,
String contentType)
Add a body to this request as a stream with the given content type
|
protected org.apache.http.client.methods.HttpRequestBase |
createRequest()
Creates the HTTP request object for this builder
|
PutBuilder |
digest(String digest)
Deprecated.
|
PutBuilder |
digest(String digest,
String alg)
Provide a checksum for the body of this request
|
PutBuilder |
digestMd5(String digest)
Provide a MD5 checksum for the body of this request
|
PutBuilder |
digestSha1(String digest)
Provide a SHA-1 checksum for the body of this request.
|
PutBuilder |
digestSha256(String digest)
Provide a SHA-256 checksum for the body of this request
|
PutBuilder |
externalContent(URI contentURI,
String contentType,
String handling)
Add the given URI to the request as the location a Non-RDF Source binary should use for external content.
|
PutBuilder |
filename(String filename)
Provide a content disposition header which will be used as the filename
|
PutBuilder |
ifMatch(String etag)
Provide an etag for the if-match header for this request
|
PutBuilder |
ifStateToken(String token)
Provide a value for the if-state-token header for this request.
|
PutBuilder |
ifUnmodifiedSince(String modified)
Provide a if-unmodified-since header for this request
|
PutBuilder |
linkAcl(String aclUri)
Provide the URI to an ACL for this request
|
PutBuilder |
preferLenient()
Set the prefer header for this request to lenient handling, to indicate that server-managed triples will not
be included in the request body.
|
performpublic PutBuilder(URI uri, FcrepoClient client)
uri - uri of the resource this request is being made toclient - the clientprotected org.apache.http.client.methods.HttpRequestBase createRequest()
RequestBuildercreateRequest in class RequestBuilderpublic PutBuilder body(InputStream stream, String contentType)
BodyRequestBuilderbody in class BodyRequestBuilderstream - InputStream of the content to be sent to the servercontentType - the Content-Type of the bodypublic PutBuilder body(File file, String contentType) throws IOException
BodyRequestBuilderbody in class BodyRequestBuilderfile - File containing the content to be sent to the servercontentType - the Content-Type of the bodyIOException - when unable to stream the body filepublic PutBuilder externalContent(URI contentURI, String contentType, String handling)
BodyRequestBuilderexternalContent in class BodyRequestBuildercontentURI - URI of the external content.contentType - Mimetype to supply for the external content.handling - Name of the handling method, used by the server to determine how to process the external
content URI. Standard values can be found in ExternalContentHandling.public PutBuilder body(InputStream stream)
BodyRequestBuilderbody in class BodyRequestBuilderstream - InputStream of the content to be sent to the serverpublic PutBuilder ifMatch(String etag)
BodyRequestBuilderifMatch in class BodyRequestBuilderetag - etag to provide as the if-match headerpublic PutBuilder ifUnmodifiedSince(String modified)
BodyRequestBuilderifUnmodifiedSince in class BodyRequestBuildermodified - date to provide as the if-unmodified-since headerpublic PutBuilder ifStateToken(String token)
BodyRequestBuilderifStateToken in class BodyRequestBuildertoken - state token value@Deprecated public PutBuilder digest(String digest)
BodyRequestBuilderdigest in class BodyRequestBuilderdigest - sha-1 checksum to provide as the digest for the request bodypublic PutBuilder digest(String digest, String alg)
BodyRequestBuilderdigest in class BodyRequestBuilderdigest - checksum to provide as the digest for the request bodyalg - abbreviated algorithm identifier for the type of checksum being
added (for example, sha, md5, etc)public PutBuilder digestMd5(String digest)
BodyRequestBuilderdigestMd5 in class BodyRequestBuilderdigest - MD5 checksum to provide as the digest for the request bodypublic PutBuilder digestSha1(String digest)
BodyRequestBuilderdigestSha1 in class BodyRequestBuilderdigest - sha-1 checksum to provide as the digest for the request bodypublic PutBuilder digestSha256(String digest)
BodyRequestBuilderdigestSha256 in class BodyRequestBuilderdigest - sha-256 checksum to provide as the digest for the request bodypublic PutBuilder addInteractionModel(String interactionModelUri)
BodyRequestBuilderaddInteractionModel in class BodyRequestBuilderinteractionModelUri - URI of the interaction modelpublic PutBuilder linkAcl(String aclUri)
BodyRequestBuilderlinkAcl in class BodyRequestBuilderaclUri - URI to the ACLpublic PutBuilder addHeader(String name, String value)
RequestBuilderaddHeader in class RequestBuildername - name of the headervalue - value of the headerpublic PutBuilder addLinkHeader(FcrepoLink linkHeader)
RequestBuilderaddLinkHeader in class RequestBuilderlinkHeader - link header value represented as a FcrepoLinkpublic PutBuilder filename(String filename) throws FcrepoOperationFailedException
filename - the name of the file being provided in the body of the requestFcrepoOperationFailedException - if unable to encode filenamepublic PutBuilder preferLenient()
Copyright © 2013–2019 DuraSpace, Inc.. All rights reserved.