-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds API for direct binary access #59
base: trunk
Are you sure you want to change the base?
Conversation
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1776421 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1776533 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1776535 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1776576 13f79535-47bb-0310-9956-ffa450edef68
…ated custom tags - @test git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1776907 13f79535-47bb-0310-9956-ffa450edef68
…ated custom tags - @executeClass git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1776911 13f79535-47bb-0310-9956-ffa450edef68
…ated custom tags - @Keywords git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1776912 13f79535-47bb-0310-9956-ffa450edef68
…ated custom tags - @sources git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1776914 13f79535-47bb-0310-9956-ffa450edef68
…ated custom tags - @tck.config git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1776918 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1777156 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1777759 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1777949 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1777951 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1778270 13f79535-47bb-0310-9956-ffa450edef68
…de() git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1779166 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1779460 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1779614 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1779632 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1780208 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1780220 13f79535-47bb-0310-9956-ffa450edef68
…and minin type based inheritance. Currently it appears that only primaryType based inheritance is working git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1780335 13f79535-47bb-0310-9956-ffa450edef68
…and minin type based inheritance. Currently it appears that only primaryType based inheritance is working git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1780336 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1780384 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1780406 13f79535-47bb-0310-9956-ffa450edef68
…ts initializing git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1782145 13f79535-47bb-0310-9956-ffa450edef68
…ts initializing git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1782173 13f79535-47bb-0310-9956-ffa450edef68
- Using SHA-256 instead of SHA-1 to create blob record ids git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1785225 13f79535-47bb-0310-9956-ffa450edef68
Candidate Release Notes git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1785264 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1785460 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1785462 13f79535-47bb-0310-9956-ffa450edef68
- contentType=>mimeType - contentTypeEncoding=>encoding - Adds javadoc for BinaryDownloadOptions and BinaryDownloadOptionsBuilder - Makes BinaryDownloadOptions and BinaryDownloadOptionsBuilder final classes.
* then the client cannot proceed and will have to request a new set of URIs | ||
* with the right fileSize as maxSize | ||
* <li>If fileSize is smaller than minPartSize, then take the first provided | ||
* upload URI to upload the entire binary, with partSize = fileSize</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be maxPartSize?
* next URI from uploadURIs (strictly in order), proceed with a standard | ||
* HTTP PUT for each, and for the last part use whatever segment size is | ||
* left | ||
* <li>If a segment fails during upload, retry (up to a certain time out) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTTP PUT if a HTTP(s) URI, otherwise to-be-determined...
* @return A {@link BinaryUpload} that can be used by the client to complete | ||
* the upload via a call to {@link #completeBinaryUpload(String)}, | ||
* or {@code null} if the implementation does not support the direct | ||
* upload feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should throw an exception instead of returning null.
(should we also define a repository descriptor maybe?)
* <p> | ||
* The implementation will attempt to apply the specified {@code | ||
* downloadOptions} to the subsequent download. For example, if the caller | ||
* knows that the URL refers to a specific type of content, the caller can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URL -> URI
* if the caller wishes to accept the service provider's default | ||
* behavior. | ||
* @return A URI for downloading the binary directly, or {@code null} if the | ||
* binary cannot be downloaded directly or if the underlying |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should throw instead of returning null.
|
||
/** | ||
* Returns the MIME type that should be assumed for the binary that is to be | ||
* downloaded. This value should be a valid {@code jcr:mimeType}. This |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"MIME" -> "Internet Media Type"
FWIW, maybe we should also not copy JCR's splitting of type and charset, and just provide the complete value for the Content-Type header field.
|
||
/** | ||
* Returns the encoding that should be assumed for the binary that is to be | ||
* downloaded. This value should be a valid {@code jcr:encoding}. This |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"encoding" -> "character encoding"
* instance of this class. | ||
* | ||
* @return A String representation of the encoding, or {@code null} if no | ||
* encoding has been specified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The encoding is a name, so I think that "String representation" is confusing here.
* BinaryDownloadOptionsBuilder#withDispositionTypeInline()} or {@link | ||
* BinaryDownloadOptionsBuilder#withDispositionTypeAttachment()} when | ||
* building an instance of this class. The default value of this setting is | ||
* "attachment". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be IMHO "inline".
* Note that if the MIME type is text-based, the caller may also wish to | ||
* set the encoding which is done separately. See {@link | ||
* #withEncoding(String)}. | ||
* <p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Note that if the internet media type defines a charset parameter, ...."
* Calling this method has the effect of instructing the service | ||
* provider to set {@code encoding} as the encoding of the content type | ||
* in the {@code Content-Type} header of the response to a request | ||
* issued with a URI obtained by calling {@link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"header" -> "header field"
* call to {@link #build()}. | ||
* <p> | ||
* If no filename is provided, no {@code Content-Disposition} header | ||
* will be specified to the service provider. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll need to define the case of no filename but non-default disposition type.
- terminology (mime type -> internet media type, encoding -> character encoding) - add links to RFC 6266 - make disposition type "inline" default - break the connection between disposition type and filename
Default value is "inline" as was documented before. This change makes sure that a value is always set, that inline is the default, and that the getter is declared as always returning a value.
This supports an optional feature to do direct binary upload and download as described in https://wiki.apache.org/jackrabbit/Direct%20Binary%20Access. This change includes new interfaces and exceptions that comprise the API for this feature.