org.apache.avalon.excalibur.i18n
Interface Bundle

All Known Implementing Classes:
AbstractBundle

public interface Bundle

This is the interface of the ResourceBundle, for used for i18n support.

Version:
CVS $Revision: 1.6 $ $Date: 2002/01/02 19:04:56 $ $Author: neeme $
Author:
Neeme Praks

Field Summary
static java.lang.String ROLE
           
 
Method Summary
 java.lang.String convertKey(java.lang.String userKey)
          Convert the "user view" of the lookup key to the "system view".
 BundleInfo getBundleInfo()
          Get the bundle info.
 long getLastModified()
          Returns the last modification time of this bundle, in milliseconds.
 Bundle getParent()
          Get the parent bundle of the current bundle.
 java.lang.String getString(java.lang.String key)
          Get value by key.
 java.lang.String getString(java.lang.String key, java.util.Map values)
          Get value by key and substitute variables.
 void setBundleInfo(BundleInfo bundleInfo)
          Set the bundle info.
 void setLastModified(long lastModified)
          Sets the last modification time of this bundle, in milliseconds.
 void setMapper(BundleInfoMapper mapper)
          Set the bundle info mapper.
 void setParent(Bundle parent)
          Set the parent bundle of the current bundle.
 

Field Detail

ROLE

public static final java.lang.String ROLE
Method Detail

getBundleInfo

public BundleInfo getBundleInfo()
Get the bundle info.

setBundleInfo

public void setBundleInfo(BundleInfo bundleInfo)
Set the bundle info.

setMapper

public void setMapper(BundleInfoMapper mapper)
Set the bundle info mapper.

getParent

public Bundle getParent()
Get the parent bundle of the current bundle.
Returns:
the parent bundle

setParent

public void setParent(Bundle parent)
Set the parent bundle of the current bundle.
Parameters:
parent - the parent bundle

getString

public java.lang.String getString(java.lang.String key)
Get value by key.
Parameters:
key - key
Returns:
value
Throws:
MissingResourceException - if value was not found

getString

public java.lang.String getString(java.lang.String key,
                                  java.util.Map values)
Get value by key and substitute variables.
Parameters:
key - key
values - map with variable values
Returns:
value with variable values substituted
Throws:
MissingResourceException - if value was not found

convertKey

public java.lang.String convertKey(java.lang.String userKey)
Convert the "user view" of the lookup key to the "system view". Used to hide the implemented storage mechanism and/or XML file schema.
Parameters:
key - user key
Returns:
system key

getLastModified

public long getLastModified()
Returns the last modification time of this bundle, in milliseconds.
Returns:
last modification time, -1 if N/A

setLastModified

public void setLastModified(long lastModified)
Sets the last modification time of this bundle, in milliseconds.
Parameters:
lastModified - last modification time


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.