|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.util.Helper<T>
com.noelios.restlet.ConnectorHelper<Client>
com.noelios.restlet.ClientHelper
com.noelios.restlet.local.LocalClientHelper
com.noelios.restlet.local.EntityClientHelper
com.noelios.restlet.local.FileClientHelper
public class FileClientHelper
Connector to the file resources accessible. Here is the list of parameters that are supported:
| 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,
MetadataService metadataService)
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. |
void |
handle(Request request,
Response response)
Handles a call. |
protected void |
handleEntity(Request request,
Response response,
String path,
String decodedPath,
MetadataService metadataService)
Handles a call for a local entity. |
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,
MetadataService metadataService)
Handles a PUT call for the FILE protocol. |
boolean |
isResumeUpload()
Indicates if a failed upload can be resumed. |
| Methods inherited from class com.noelios.restlet.local.EntityClientHelper |
|---|
createReference, getReencodedVariantEntityName, handleEntityGet |
| Methods inherited from class com.noelios.restlet.local.LocalClientHelper |
|---|
getDefaultLanguage, getMetadataService, getTimeToLive, updateMetadata |
| Methods inherited from class com.noelios.restlet.ClientHelper |
|---|
getConnectTimeout, setConnectTimeout |
| Methods inherited from class com.noelios.restlet.ConnectorHelper |
|---|
getProtocols, start, stop, update |
| Methods inherited from class org.restlet.util.Helper |
|---|
getAttributes, getContext, getHelped, getHelpedParameters, getLogger, 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,
MetadataService metadataService)
file - The file whose extensions are checked.metadataService - The metadata service.
public Entity getEntity(String decodedPath)
EntityClientHelper
getEntity in class EntityClientHelperdecodedPath - The path of the entity.
public String getTemporaryExtension()
public void handle(Request request,
Response response)
handle in class EntityClientHelperrequest - The request to handle.response - The response to update.
protected void handleEntity(Request request,
Response response,
String path,
String decodedPath,
MetadataService metadataService)
EntityClientHelper
handleEntity in class EntityClientHelperrequest - The request to handle.response - The response to update.path - The entity path.decodedPath - The URL decoded entity path.metadataService - The metadataService.
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,
MetadataService metadataService)
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.metadataService - The metadata service.public boolean isResumeUpload()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||