org.moremotion.resource
Class ResourceBundle

java.lang.Object
  extended by org.moremotion.resource.ResourceBundle

public class ResourceBundle
extends java.lang.Object

Represents a Resource Bundle that contains resources in one single language. The resource bundles are loaded by the resource manager from resource files that have ".res" extension under the "/WEB-INF/MM-INF/resources" folder.

Version:
$Id: ResourceBundle.java 51 2008-03-10 11:46:54Z erkan $

Constructor Summary
ResourceBundle(java.util.Properties source, long lastModified)
          Creates a ResourceBundle
ResourceBundle(java.lang.String dsname, javax.servlet.ServletContext context, java.lang.String language)
          Creates a ResourceBundle
 
Method Summary
 java.lang.String getName()
          Returns the name of this resource bundle.
 java.lang.String getResourceText(java.lang.String resourceId)
          Returns the text of the specified resource.
 boolean isModified(long lastModified)
          Returns whether or not the resource file is modified.
static void main(java.lang.String[] args)
           
 void setName(java.lang.String name)
          Sets the name of this resource bundle.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBundle

public ResourceBundle(java.util.Properties source,
                      long lastModified)
Creates a ResourceBundle

Parameters:
source - Properties object that contains the resource ids and resource messages.
lastModified - Last time the resource files is modified.

ResourceBundle

public ResourceBundle(java.lang.String dsname,
                      javax.servlet.ServletContext context,
                      java.lang.String language)
Creates a ResourceBundle

Parameters:
dsname - the name of the datasource that keeps the resources
Method Detail

setName

public void setName(java.lang.String name)
Sets the name of this resource bundle.


getName

public java.lang.String getName()
Returns the name of this resource bundle.


getResourceText

public java.lang.String getResourceText(java.lang.String resourceId)
Returns the text of the specified resource.


isModified

public boolean isModified(long lastModified)
Returns whether or not the resource file is modified.

Parameters:
lastModified - The last modified date of the resource file.
Returns:
true if modified, false otherwise.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2002-2008 MOR YAZILIM. All Rights Reserved.