|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.engine.Helper
org.restlet.engine.RestletHelper<T>
org.restlet.engine.ConnectorHelper<Client>
org.restlet.engine.ClientHelper
org.restlet.engine.local.LocalClientHelper
org.restlet.engine.local.EntityClientHelper
org.restlet.engine.local.FileClientHelper
public class FileClientHelper
Connector to the file resources accessible. Here is the list of parameters that are supported. They should be set in the Client's context before it is started:
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 Summary | |
---|---|
FileClientHelper(Client client)
Constructor. |
Method Summary | |
---|---|
protected boolean |
checkExtensionsConsistency(File file)
Check that all extensions of the file correspond to a known metadata. |
Entity |
getEntity(String decodedPath)
Returns a local entity for the given path. |
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,
String decodedPath)
|
protected void |
handleFileDelete(Response response,
File file)
Handles a DELETE call for the FILE protocol. |
protected void |
handleFilePut(Request request,
Response response,
String path,
File file)
Handles a PUT call for the FILE protocol. |
protected void |
handleLocal(Request request,
Response response,
String decodedPath)
Handles a local call. |
boolean |
isResumeUpload()
Indicates if a failed upload can be resumed. |
Methods inherited from class org.restlet.engine.local.EntityClientHelper |
---|
createReference, getReencodedVariantEntityName, handleEntityGet |
Methods inherited from class org.restlet.engine.local.LocalClientHelper |
---|
getDefaultLanguage, getTimeToLive, handle |
Methods inherited from class org.restlet.engine.ClientHelper |
---|
getSocketConnectTimeoutMs |
Methods inherited from class org.restlet.engine.ConnectorHelper |
---|
getConnectorService, getContext, getProtocols, start, stop, update |
Methods inherited from class org.restlet.engine.RestletHelper |
---|
getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileClientHelper(Client client)
client
- The client to help.Method Detail |
---|
protected boolean checkExtensionsConsistency(File file)
file
- The file whose extensions are checked.
public Entity getEntity(String decodedPath)
EntityClientHelper
getEntity
in class EntityClientHelper
decodedPath
- The path of the entity.
public String getTemporaryExtension()
protected void handleLocal(Request request, Response response, String decodedPath)
LocalClientHelper
handleLocal
in class EntityClientHelper
request
- The request to handle.response
- The response to update.decodedPath
- The decoded local path.protected void handleFile(Request request, Response response, String decodedPath)
protected void handleFileDelete(Response response, File file)
response
- The response to update.file
- The file or directory to delete.protected void handleFilePut(Request request, Response response, String path, 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |