WebResourceSet implementation that is not backed by a file system and behaves as if it has no resources
available. This is primarily used in embedded mode when the web application is configured entirely programmatically
and does not use any static resources from the file system.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private static final String[] | |
| private WebResourceRoot | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | destroyInternal()
Implements abstract org. Sub-classes implement this method to perform any instance destruction required. |
| public void | gc()
Implements org. Implementations may cache some information to improve performance. |
| public URL | getBaseUrl()
Implements org. Obtain the base URL for this set of resources. |
| public boolean | getClassLoaderOnly()
Implements org. Should resources returned by this resource set only be included in any results when the lookup is explicitly looking for class loader resources. |
| public WebResource | getResource(String
The path for the resource of interest relative to the root
of the web application. It must start with '/'. path)Implements org. Obtain the object that represents the resource at the given path. |
| public boolean | getStaticOnly()
Implements org. Should resources returned by this resource set only be included in any results when the lookup is explicitly looking for static (non-class loader) resources. |
| protected void | initInternal()
Implements abstract org. Sub-classes implement this method to perform any instance initialisation required. |
| public boolean | isReadOnly()
Implements org. Obtains the current value of the read-only setting for this set of resources. |
| public String[] | list(String
The path for the resource of interest relative to the root
of the web application. It must start with '/'. path)Implements org. Obtain the list of the names of all of the files and directories located in the specified directory. |
| public Set | listWebAppPaths(String
The path for the resource of interest relative to the root
of the web application. It must start with '/'. path)Implements org. Obtain the Set of the web applications pathnames of all of the files and directories located in the specified directory. |
| public boolean | mkdir(String
The path for the new resource to create relative to the root
of the web application. It must start with '/'. path)Implements org. Create a new directory at the given path. |
| public void | setClassLoaderOnly(boolean classLoaderOnly)
Implements org.
|
| public void | setReadOnly(boolean
true if this set of resources should be
configured to be read-onlyImplements org. Configures whether or not this set of resources is read-only. |
| public void | |
| public void | |
| protected void | startInternal()
Implements abstract org. Sub-classes must ensure that the state is changed to
|
| protected void | stopInternal()
Implements abstract org. Sub-classes must ensure that the state is changed to
|
| public boolean | write(String
The path to be used for the new Resource. It is relative
to the root of the web application and must start with
'/'. path, InputStream The InputStream that will provide the content for the
new Resource. is, boolean If overwrite)true and the resource already exists it
will be overwritten. If false and the
resource already exists the write will fail.Implements org. Create a new resource at the requested path using the provided InputStream. |
| classLoaderOnly | back to summary |
|---|---|
| private boolean classLoaderOnly | |
| EMPTY_STRING_ARRAY | back to summary |
|---|---|
| private static final String[] EMPTY_STRING_ARRAY | |
| root | back to summary |
|---|---|
| private WebResourceRoot root | |
| staticOnly | back to summary |
|---|---|
| private boolean staticOnly | |
| EmptyResourceSet | back to summary |
|---|---|
| public EmptyResourceSet(WebResourceRoot root) | |
| destroyInternal | back to summary |
|---|---|
| protected void destroyInternal() throws LifecycleException Implements abstract org. Doc from org. Sub-classes implement this method to perform any instance destruction required.
| |
| gc | back to summary |
|---|---|
| public void gc() Implements org. Doc from org. Implementations may cache some information to improve performance. This method triggers the clean-up of those resources.
| |
| getBaseUrl | back to summary |
|---|---|
| public URL getBaseUrl() Implements org. Doc from org. Obtain the base URL for this set of resources. One of the uses of this is to grant read permissions to the resources when running under a security manager. This implementation always returns null. | |
| getClassLoaderOnly | back to summary |
|---|---|
| public boolean getClassLoaderOnly() Implements org. Doc from org. Should resources returned by this resource set only be included in any results when the lookup is explicitly looking for class loader resources. i.e. should these resources be excluded from look ups that are explicitly looking for static (non-class loader) resources.
| |
| getResource | back to summary |
|---|---|
| public WebResource getResource(String path) Implements org. Doc from org. Obtain the object that represents the resource at the given path. Note the resource at that path may not exist.
This implementation always returns an
| |
| getStaticOnly | back to summary |
|---|---|
| public boolean getStaticOnly() Implements org. Doc from org. Should resources returned by this resource set only be included in any results when the lookup is explicitly looking for static (non-class loader) resources. i.e. should these resources be excluded from look ups that are explicitly looking for class loader resources.
| |
| initInternal | back to summary |
|---|---|
| protected void initInternal() throws LifecycleException Implements abstract org. Doc from org. Sub-classes implement this method to perform any instance initialisation required.
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Implements org. Doc from org. Obtains the current value of the read-only setting for this set of resources. This implementation always returns true.
| |
| list | back to summary |
|---|---|
| public String[] list(String path) Implements org. Doc from org. Obtain the list of the names of all of the files and directories located in the specified directory. This implementation always returns an empty array. | |
| listWebAppPaths | back to summary |
|---|---|
| public Set Implements org. Doc from org. Obtain the Set of the web applications pathnames of all of the files and directories located in the specified directory. Paths representing directories will end with a "/" character. This implementation always returns an empty set. | |
| mkdir | back to summary |
|---|---|
| public boolean mkdir(String path) Implements org. Doc from org. Create a new directory at the given path. This implementation always returns false. | |
| setClassLoaderOnly | back to summary |
|---|---|
| public void setClassLoaderOnly(boolean classLoaderOnly) Implements org.
| |
| setReadOnly | back to summary |
|---|---|
| public void setReadOnly(boolean readOnly) Implements org. Doc from org. Configures whether or not this set of resources is read-only. Calls to this method will be ignored as this implementation always read only.
| |
| setRoot | back to summary |
|---|---|
| public void setRoot(WebResourceRoot root) Implements org.
| |
| setStaticOnly | back to summary |
|---|---|
| public void setStaticOnly(boolean staticOnly) Implements org.
| |
| startInternal | back to summary |
|---|---|
| protected void startInternal() throws LifecycleException Implements abstract org. Doc from org. Sub-classes must ensure that the state is changed to
| |
| stopInternal | back to summary |
|---|---|
| protected void stopInternal() throws LifecycleException Implements abstract org. Doc from org. Sub-classes must ensure that the state is changed to
| |
| write | back to summary |
|---|---|
| public boolean write(String path, InputStream is, boolean overwrite) Implements org. Doc from org. Create a new resource at the requested path using the provided InputStream. This implementation always returns false.
| |