org.apache.tiles.request
Interface ApplicationResource

Package class diagram package ApplicationResource
All Known Implementing Classes:
PostfixedApplicationResource, URLApplicationResource

public interface ApplicationResource

A (localized) resource accessible through the ApplicationContext. Typically this is a file inside the web application's war.

Version:
$Rev$ $Date$

Method Summary
 InputStream getInputStream()
          Get a java.io.InputStream to read the contents of this resource.
 long getLastModified()
          Get the last modification date for this resource.
 Locale getLocale()
          Get the Locale for this resource.
 String getLocalePath()
          Get the path name for this resource.
 String getLocalePath(Locale locale)
          Get the path name of another version of the resource.
 String getPath()
          Get the path name for this resource.
 

Method Detail

getLocalePath

String getLocalePath()
Get the path name for this resource. You can access this ressource by passing the path to getResource.

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

String getLocalePath(Locale locale)
Get the path name of another version of the resource.

Parameters:
locale - the Locale for the new version.
Returns:
the path including localization.

getInputStream

InputStream getInputStream()
                           throws IOException
Get a java.io.InputStream to read the contents of this resource.

Returns:
the InputStream.
Throws:
IOException - if the contents cannot be read.

getLastModified

long getLastModified()
                     throws IOException
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.


Copyright © 2001-2012 Apache Software Foundation. All Rights Reserved.