| java.lang.Object org.restlet.resource.Resource com.noelios.restlet.local.DirectoryResource
DirectoryResource | public class DirectoryResource extends Resource (Code) | | Resource supported by a set of context representations (from file system,
class loaders and webapp context). A content negotiation mechanism (similar
to Apache HTTP server) is available. It is based on path extensions to detect
variants (languages, media types or character sets).
See Also: Apache
* mod_negotiation module author: Jerome Louvel (contact@noelios.com) author: Thierry Boileau |
Method Summary | |
public boolean | allowDelete() Indicates if it is allowed to delete the resource. | public boolean | allowPut() Indicates if it is allowed to put to the resource. | public void | delete() Asks the resource to delete itself and all its representations. | public String | getBaseName() Returns the local base name of the file. | public Directory | getDirectory() Returns the parent directory handler. | public String | getDirectoryUri() Returns the context's directory URI (file, clap URI). | public static Set<String> | getExtensions(String entryName) Returns the set of extensions contained in a given directory entry name.
Parameters: entryName - The directory entry name. | public String | getTargetUri() Returns the context's target URI (file, clap URI). | public List<Variant> | getVariants() Returns the representation variants. | public void | handleGet() | public void | put(Representation variant) Puts a variant representation in the resource. | public void | setTargetUri(String targetUri) Sets the context's target URI (file, clap URI). |
allowDelete | public boolean allowDelete()(Code) | | Indicates if it is allowed to delete the resource. The default value is
false.
True if the method is allowed. |
allowPut | public boolean allowPut()(Code) | | Indicates if it is allowed to put to the resource. The default value is
false.
True if the method is allowed. |
delete | public void delete()(Code) | | Asks the resource to delete itself and all its representations.
|
getBaseName | public String getBaseName()(Code) | | Returns the local base name of the file. For example, "foo.en" and
"foo.en-GB.html" return "foo".
The local name of the file. |
getDirectory | public Directory getDirectory()(Code) | | Returns the parent directory handler.
The parent directory handler. |
getDirectoryUri | public String getDirectoryUri()(Code) | | Returns the context's directory URI (file, clap URI).
The context's directory URI (file, clap URI). |
getExtensions | public static Set<String> getExtensions(String entryName)(Code) | | Returns the set of extensions contained in a given directory entry name.
Parameters: entryName - The directory entry name. The set of extensions. |
getTargetUri | public String getTargetUri()(Code) | | Returns the context's target URI (file, clap URI).
The context's target URI (file, clap URI). |
getVariants | public List<Variant> getVariants()(Code) | | Returns the representation variants.
The representation variants. |
handleGet | public void handleGet()(Code) | | |
put | public void put(Representation variant)(Code) | | Puts a variant representation in the resource.
Parameters: variant - A new or updated variant representation. |
setTargetUri | public void setTargetUri(String targetUri)(Code) | | Sets the context's target URI (file, clap URI).
Parameters: targetUri - The context's target URI. |
|
|