Package org.apache.tiles.request
Interface ApplicationResource
- All Known Implementing Classes:
PostfixedApplicationResource
,StrutsApplicationResource
,URLApplicationResource
public interface ApplicationResource
A (localized) resource accessible through the ApplicationContext.
Typically, this is a file inside the web application's war.
-
Method Summary
Modifier and TypeMethodDescriptionGet a java.io.InputStream to read the contents of this resource.long
Get the last modification date for this resource.Get the Locale for this resource.Get the path name for this resource.getLocalePath
(Locale locale) Get the path name of another version of the resource.getPath()
Get the path name for this resource.
-
Method Details
-
getLocalePath
String getLocalePath()Get the path name for this resource. You can access this resource by passing the path togetResource
.- Returns:
- the path including localization.
-
getPath
String getPath()Get the path name for this resource. Multiple versions of a resource can share the same path if the locale part is different.- Returns:
- the path excluding localization.
-
getLocale
Locale getLocale()Get the Locale for this resource.- Returns:
- the Locale.
-
getLocalePath
Get the path name of another version of the resource.- Parameters:
locale
- the Locale for the new version.- Returns:
- the path including localization.
-
getInputStream
Get a java.io.InputStream to read the contents of this resource.- Returns:
- the InputStream.
- Throws:
IOException
- if the contents cannot be read.
-
getLastModified
Get the last modification date for this resource.- Returns:
- the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
- Throws:
IOException
- if the last modification date cannot be found.
-