/** * Provide the URI to an ACL for this request * * @param aclUri URI to the ACL * @return this builder */ protected BodyRequestBuilder linkAcl(final String aclUri) { if (aclUri != null) { final FcrepoLink link = FcrepoLink.fromUri(aclUri) .rel(ACL_REL) .build(); request.addHeader(LINK, link.toString()); } return this; }
/** * Add an interaction model to the request * * @param interactionModelUri URI of the interaction model * @return this builder */ protected BodyRequestBuilder addInteractionModel(final String interactionModelUri) { if (interactionModelUri != null) { final FcrepoLink link = FcrepoLink.fromUri(interactionModelUri) .rel(TYPE_REL) .build(); request.addHeader(LINK, link.toString()); } return this; }
/** * Add the given URI to the request as the location a Non-RDF Source binary should use for external content. The * handling parameter must be supplied, and informs the server of how to process the request. * * @param contentURI URI of the external content. * @param contentType Mimetype to supply for the external content. * @param 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 {@link ExternalContentHandling}. * @return this builder */ protected BodyRequestBuilder externalContent(final URI contentURI, final String contentType, final String handling) { final Builder linkBuilder = FcrepoLink.fromUri(contentURI) .rel(EXTERNAL_CONTENT_REL) .param(EXTERNAL_CONTENT_HANDLING, handling); if (StringUtils.isNotBlank(contentType)) { linkBuilder.type(contentType); } request.addHeader(LINK, linkBuilder.build().toString()); return this; }