public class PostBuilder extends BodyRequestBuilder
client, request, targetUri| Constructor and Description |
|---|
PostBuilder(URI uri,
FcrepoClient client)
Instantiate builder
|
| Modifier and Type | Method and Description |
|---|---|
PostBuilder |
addHeader(String name,
String value)
Add a header with the given name and value to the request.
|
PostBuilder |
addInteractionModel(String interactionModelUri)
Add an interaction model to the request
|
PostBuilder |
addLinkHeader(FcrepoLink linkHeader)
Add a link header to the request
|
PostBuilder |
body(File file,
String contentType)
Add the given file as the body for this request with the provided content type
|
PostBuilder |
body(InputStream stream)
Add a body to this request from a stream, with application/octet-stream as its content type
|
PostBuilder |
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
|
PostBuilder |
digest(String digest)
Deprecated.
|
PostBuilder |
digest(String digest,
String alg)
Provide a checksum for the body of this request
|
PostBuilder |
digestMd5(String digest)
Provide a MD5 checksum for the body of this request
|
PostBuilder |
digestSha1(String digest)
Provide a SHA-1 checksum for the body of this request.
|
PostBuilder |
digestSha256(String digest)
Provide a SHA-256 checksum for the body of this request
|
PostBuilder |
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.
|
PostBuilder |
filename(String filename)
Provide a content disposition header which will be used as the filename
|
PostBuilder |
linkAcl(String aclUri)
Provide the URI to an ACL for this request
|
PostBuilder |
slug(String slug)
Provide a suggested name for the new child resource, which the repository may ignore.
|
ifMatch, ifStateToken, ifUnmodifiedSinceperformpublic PostBuilder(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 PostBuilder 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 PostBuilder 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 PostBuilder body(InputStream stream)
BodyRequestBuilderbody in class BodyRequestBuilderstream - InputStream of the content to be sent to the serverpublic PostBuilder 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.@Deprecated public PostBuilder digest(String digest)
BodyRequestBuilderdigest in class BodyRequestBuilderdigest - sha-1 checksum to provide as the digest for the request bodypublic PostBuilder 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, sha1, md5, etc)public PostBuilder digestMd5(String digest)
BodyRequestBuilderdigestMd5 in class BodyRequestBuilderdigest - MD5 checksum to provide as the digest for the request bodypublic PostBuilder digestSha1(String digest)
BodyRequestBuilderdigestSha1 in class BodyRequestBuilderdigest - sha-1 checksum to provide as the digest for the request bodypublic PostBuilder digestSha256(String digest)
BodyRequestBuilderdigestSha256 in class BodyRequestBuilderdigest - sha-256 checksum to provide as the digest for the request bodypublic PostBuilder addInteractionModel(String interactionModelUri)
BodyRequestBuilderaddInteractionModel in class BodyRequestBuilderinteractionModelUri - URI of the interaction modelpublic PostBuilder linkAcl(String aclUri)
BodyRequestBuilderlinkAcl in class BodyRequestBuilderaclUri - URI to the ACLpublic PostBuilder addHeader(String name, String value)
RequestBuilderaddHeader in class RequestBuildername - name of the headervalue - value of the headerpublic PostBuilder addLinkHeader(FcrepoLink linkHeader)
RequestBuilderaddLinkHeader in class RequestBuilderlinkHeader - link header value represented as a FcrepoLinkpublic PostBuilder filename(String filename) throws FcrepoOperationFailedException
filename - the name of the file being provided in the body of the requestFcrepoOperationFailedException - if unable to encode filenamepublic PostBuilder slug(String slug)
slug - value to supply as the slug headerCopyright © 2013–2021 DuraSpace, Inc.. All rights reserved.