Package org.apache.tiles.request.locale
Class PostfixedApplicationResource
java.lang.Object
org.apache.tiles.request.locale.PostfixedApplicationResource
- All Implemented Interfaces:
- ApplicationResource
- Direct Known Subclasses:
- StrutsApplicationResource,- URLApplicationResource
An ApplicationResource whose localization is managed by postfixing the file name.
 The various localizations are file sitting next to each other, with the locale identified in the postfix.
 
For instance:
/WEB-INF/tiles.xml /WEB-INF/tiles_fr.xml /WEB-INF/tiles_it.xml /WEB-INF/tiles_it_IT.xmlTwo PostfixedApplicationResources are equals if they share the same localized path and the same class.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedPostfixedApplicationResource(String localePath) Create a new PostfixedApplicationResource for the specified path.protectedPostfixedApplicationResource(String path, Locale locale) Create a new PostfixedApplicationResource for the specified path.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanfinal LocaleGet the Locale for this resource.final StringGet the path name for this resource.final StringgetLocalePath(Locale newLocale) Get the path name of another version of the resource.final StringgetPath()Get the path name for this resource.inthashCode()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tiles.request.ApplicationResourcegetInputStream, getLastModified
- 
Constructor Details- 
PostfixedApplicationResourceCreate a new PostfixedApplicationResource for the specified path.- Parameters:
- localePath- the path including localization.
 
- 
PostfixedApplicationResourceCreate a new PostfixedApplicationResource for the specified path.- Parameters:
- path- the path excluding localization.
- locale- the Locale.
 
 
- 
- 
Method Details- 
getLocalePathGet the path name for this resource. You can access this resource by passing the path togetResource.- Specified by:
- getLocalePathin interface- ApplicationResource
- Returns:
- the path including localization.
 
- 
getPathGet the path name for this resource. Multiple versions of a resource can share the same path if the locale part is different.- Specified by:
- getPathin interface- ApplicationResource
- Returns:
- the path excluding localization.
 
- 
getLocalePathGet the path name of another version of the resource.- Specified by:
- getLocalePathin interface- ApplicationResource
- Parameters:
- newLocale- the Locale for the new version.
- Returns:
- the path including localization.
 
- 
getLocaleGet the Locale for this resource.- Specified by:
- getLocalein interface- ApplicationResource
- Returns:
- the Locale.
 
- 
hashCodepublic int hashCode()
- 
equals
 
-