public abstract class EntityClientHelper extends LocalClientHelper
Constructor and Description |
---|
EntityClientHelper(Client client)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Reference |
createReference(java.lang.String scheme,
java.lang.String encodedParentDirPath,
java.lang.String encodedEntityName,
java.lang.String decodedVariantName)
Generate a Reference for a variant name (which is URL decoded) and handle
the translation between the incoming requested path (which is URL
encoded).
|
abstract Entity |
getEntity(java.lang.String path)
Returns a local entity for the given path.
|
protected java.lang.String |
getReencodedVariantEntityName(java.lang.String encodedEntityName,
java.lang.String decodedVariantEntityName)
Percent-encodes the given percent-decoded variant name of a resource
whose percent-encoded name is given.
|
protected void |
handleEntityGet(Request request,
Response response,
Entity entity)
Handles a GET call.
|
protected void |
handleLocal(Request request,
Response response,
java.lang.String decodedPath)
Handles a local call.
|
getDefaultLanguage, getTimeToLive, handle
getConnectorService, getContext, getProtocols, start, stop, update
getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped
public EntityClientHelper(Client client)
client
- The client to help.public Reference createReference(java.lang.String scheme, java.lang.String encodedParentDirPath, java.lang.String encodedEntityName, java.lang.String decodedVariantName)
scheme
- The scheme of the requested resource.encodedParentDirPath
- The encoded path of the parent directory of the requested
resource.encodedEntityName
- The encoded name of the requested resource.decodedVariantName
- The decoded name of a returned resource.public abstract Entity getEntity(java.lang.String path)
path
- The path of the entity.protected java.lang.String getReencodedVariantEntityName(java.lang.String encodedEntityName, java.lang.String decodedVariantEntityName)
encodedEntityName
- the percent-encoded name of the initial resourcedecodedVariantEntityName
- the percent-decoded entity name of a variant of the initial
resource.protected void handleEntityGet(Request request, Response response, Entity entity)
request
- The request to answer.response
- The response to update.entity
- The requested entity (normal or directory).protected void handleLocal(Request request, Response response, java.lang.String decodedPath)
LocalClientHelper
handleLocal
in class LocalClientHelper
request
- The request to handle.response
- The response to update.decodedPath
- The decoded local path.Copyright © 2005-2024 Restlet.