public class FileClientHelper extends EntityClientHelper
| Parameter name | Value type | Default value | Description |
|---|---|---|---|
| temporaryExtension | String | tmp | The name of the extension to use to store the temporary content while uploading content via the PUT method. |
| resumeUpload | boolean | false | Indicates if a failed upload can be resumed. This will prevent the deletion of the temporary file created. |
| Constructor and Description |
|---|
FileClientHelper(Client client)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkExtensionsConsistency(java.io.File file)
Check that all extensions of the file correspond to a known metadata.
|
Entity |
getEntity(java.lang.String decodedPath)
Returns a local entity for the given path.
|
java.lang.String |
getTemporaryExtension()
Returns the name of the extension to use to store the temporary content
while uploading content via the PUT method.
|
protected void |
handleFile(Request request,
Response response,
java.lang.String decodedPath) |
protected void |
handleFileDelete(Response response,
java.io.File file)
Handles a DELETE call for the FILE protocol.
|
protected void |
handleFilePut(Request request,
Response response,
java.lang.String path,
java.io.File file)
Handles a PUT call for the FILE protocol.
|
protected void |
handleLocal(Request request,
Response response,
java.lang.String decodedPath)
Handles a local call.
|
boolean |
isResumeUpload()
Indicates if a failed upload can be resumed.
|
createReference, getReencodedVariantEntityName, handleEntityGetgetDefaultLanguage, getTimeToLive, handlegetConnectorService, getContext, getProtocols, start, stop, updategetAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelpedpublic FileClientHelper(Client client)
client - The client to help.protected boolean checkExtensionsConsistency(java.io.File file)
file - The file whose extensions are checked.public Entity getEntity(java.lang.String decodedPath)
EntityClientHelpergetEntity in class EntityClientHelperdecodedPath - The path of the entity.public java.lang.String getTemporaryExtension()
protected void handleLocal(Request request, Response response, java.lang.String decodedPath)
LocalClientHelperhandleLocal in class EntityClientHelperrequest - The request to handle.response - The response to update.decodedPath - The decoded local path.protected void handleFile(Request request, Response response, java.lang.String decodedPath)
protected void handleFileDelete(Response response, java.io.File file)
response - The response to update.file - The file or directory to delete.protected void handleFilePut(Request request, Response response, java.lang.String path, java.io.File file)
request - The request to update.response - The response to update.path - The encoded path of the requested file or directory.file - The requested file or directory.public boolean isResumeUpload()
Copyright © 2005-2024 Restlet.