org.apache.turbine.services.resources
Class TurbineResources

java.lang.Object
  |
  +--org.apache.turbine.services.resources.TurbineResources

public abstract class TurbineResources
extends java.lang.Object

This is a static class for defining the default Turbine configuration keys used by core Turbine components.

It also extends the basic static accessor class to the ResourcesService so that you directly access the properties through this class

Version:
$Id$
Author:
Jon S. Stevens, Greg Ritter, Raphaël Luta, Jason van Zyl

Field Summary
static java.lang.String ACTION_CACHE_SIZE_KEY
           
static java.lang.String DB_DRIVER_KEY
           
static java.lang.String DB_EXPIRYTIME_KEY
           
static java.lang.String DB_IDBROKER_CLEVERQUANTITY
           
static java.lang.String DB_MAXCONNECTIONS_KEY
           
static java.lang.String DB_PASSWORD_KEY
           
static java.lang.String DB_URL_KEY
           
static java.lang.String DB_USERNAME_KEY
           
static java.lang.String FILE_SERVER
           
static java.lang.String LAYOUT_CACHE_SIZE_KEY
           
static java.lang.String LOGIN_ERROR
           
static java.lang.String LOGIN_MESSAGE
           
static java.lang.String LOGIN_MESSAGE_NOSCREEN
           
static java.lang.String LOGOUT_MESSAGE
           
static java.lang.String MAIL_SERVER_KEY
           
static java.lang.String MAX_FILE_SIZE_KEY
           
static java.lang.String MODULE_CACHE_KEY
           
static java.lang.String MODULE_PACKAGES_KEY
           
static java.lang.String NAVIGATION_CACHE_SIZE_KEY
           
static java.lang.String PAGE_CACHE_SIZE_KEY
           
static java.lang.String SCREEN_CACHE_SIZE_KEY
           
static java.lang.String USER_CLASS_KEY
           
 
Constructor Summary
TurbineResources()
           
 
Method Summary
static boolean getBoolean(java.lang.String name)
          The purpose of this method is to get the configuration resource with the given name as a boolean value.
static boolean getBoolean(java.lang.String name, boolean def)
          The purppose of this method is to get the configuration resource with the given name as a boolean value, or a default value.
static org.apache.velocity.runtime.configuration.Configuration getConfiguration(java.lang.String prefix)
          The purpose of this method is to extract a subset configuraton sharing a common name prefix.
static double getDouble(java.lang.String name)
          The purpose of this method is to get the configuration resource with the given name as a double.
static double getDouble(java.lang.String name, double def)
          The purpose of this method is to get the configuration resource with the given name as a double, or a default value.
static float getFloat(java.lang.String name)
          The purpose of this method is to get the configuration resource with the given name as a float.
static float getFloat(java.lang.String name, float def)
          The purpose of this method is to get the configuration resource with the given name as a float, or a default value.
static int getInt(java.lang.String name)
          The purpose of this method is to get the configuration resource with the given name as an integer.
static int getInt(java.lang.String name, int def)
          The purpose of this method is to get the configuration resource with the given name as an integer, or a default value.
static java.util.Iterator getKeys()
          Get the list of the keys contained in the configuration repository.
static java.util.Iterator getKeys(java.lang.String prefix)
          Get the list of the keys contained in the configuration repository that match the specified prefix.
static long getLong(java.lang.String name)
          The purpose of this method is to get the configuration resource with the given name as a long.
static long getLong(java.lang.String name, long def)
          The purpose of this method is to get the configuration resource with the given name as a long, or a default value.
static ResourceService getResources(java.lang.String prefix)
          The purpose of this method is to extract a subset of configuraton resources sharing a common name prefix.
protected static ResourceService getService()
          Utility method for accessing the service implementation
static java.lang.String getString(java.lang.String name)
          The purpose of this method is to get the configuration resource with the given name as a string.
static java.lang.String getString(java.lang.String name, java.lang.String def)
          The purpose of this method is to get the configuration resource with the given name as a string, or a default value.
static java.lang.String[] getStringArray(java.lang.String name)
          The purpose of this method is to get the configuration resource with the given name as a string array.
static java.util.Vector getVector(java.lang.String name)
          The purpose of this method is to get the configuration resource with the given name as a vector.
static java.util.Vector getVector(java.lang.String name, java.util.Vector def)
          The purpose of this method is to get the configuration resource with the given name as a vector, or a default value.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

MAIL_SERVER_KEY

public static final java.lang.String MAIL_SERVER_KEY

MODULE_CACHE_KEY

public static final java.lang.String MODULE_CACHE_KEY

MODULE_PACKAGES_KEY

public static final java.lang.String MODULE_PACKAGES_KEY

ACTION_CACHE_SIZE_KEY

public static final java.lang.String ACTION_CACHE_SIZE_KEY

LAYOUT_CACHE_SIZE_KEY

public static final java.lang.String LAYOUT_CACHE_SIZE_KEY

NAVIGATION_CACHE_SIZE_KEY

public static final java.lang.String NAVIGATION_CACHE_SIZE_KEY

PAGE_CACHE_SIZE_KEY

public static final java.lang.String PAGE_CACHE_SIZE_KEY

SCREEN_CACHE_SIZE_KEY

public static final java.lang.String SCREEN_CACHE_SIZE_KEY

USER_CLASS_KEY

public static final java.lang.String USER_CLASS_KEY

MAX_FILE_SIZE_KEY

public static final java.lang.String MAX_FILE_SIZE_KEY

DB_DRIVER_KEY

public static final java.lang.String DB_DRIVER_KEY

DB_URL_KEY

public static final java.lang.String DB_URL_KEY

DB_USERNAME_KEY

public static final java.lang.String DB_USERNAME_KEY

DB_PASSWORD_KEY

public static final java.lang.String DB_PASSWORD_KEY

DB_MAXCONNECTIONS_KEY

public static final java.lang.String DB_MAXCONNECTIONS_KEY

DB_EXPIRYTIME_KEY

public static final java.lang.String DB_EXPIRYTIME_KEY

FILE_SERVER

public static final java.lang.String FILE_SERVER

LOGIN_MESSAGE

public static final java.lang.String LOGIN_MESSAGE

LOGIN_ERROR

public static final java.lang.String LOGIN_ERROR

LOGIN_MESSAGE_NOSCREEN

public static final java.lang.String LOGIN_MESSAGE_NOSCREEN

LOGOUT_MESSAGE

public static final java.lang.String LOGOUT_MESSAGE

DB_IDBROKER_CLEVERQUANTITY

public static final java.lang.String DB_IDBROKER_CLEVERQUANTITY
Constructor Detail

TurbineResources

public TurbineResources()
Method Detail

getService

protected static ResourceService getService()
Utility method for accessing the service implementation
Returns:
a ResourcesService implementation instance

getBoolean

public static boolean getBoolean(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a boolean value.
Parameters:
name - The resource name.
Returns:
The value of the named resource as a boolean.

getBoolean

public static boolean getBoolean(java.lang.String name,
                                 boolean def)
The purppose of this method is to get the configuration resource with the given name as a boolean value, or a default value.
Parameters:
name - The resource name.
def - The default value of the resource.
Returns:
The value of the named resource as a boolean.

getDouble

public static double getDouble(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a double.
Parameters:
name - The resoource name.
Returns:
The value of the named resource as double.

getDouble

public static double getDouble(java.lang.String name,
                               double def)
The purpose of this method is to get the configuration resource with the given name as a double, or a default value.
Parameters:
name - The resource name.
def - The default value of the resource.
Returns:
The value of the named resource as a double.

getFloat

public static float getFloat(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a float.
Parameters:
name - The resource name.
Returns:
The value of the resource as a float.

getFloat

public static float getFloat(java.lang.String name,
                             float def)
The purpose of this method is to get the configuration resource with the given name as a float, or a default value.
Parameters:
name - The resource name.
def - The default value of the resource.
Returns:
The value of the resource as a float.

getInt

public static int getInt(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as an integer.
Parameters:
name - The resource name.
Returns:
The value of the resource as an integer.

getInt

public static int getInt(java.lang.String name,
                         int def)
The purpose of this method is to get the configuration resource with the given name as an integer, or a default value.
Parameters:
name - The resource name.
def - The default value of the resource.
Returns:
The value of the resource as an integer.

getKeys

public static java.util.Iterator getKeys()
Get the list of the keys contained in the configuration repository.
Returns:
An Enumeration with all the keys.

getKeys

public static java.util.Iterator getKeys(java.lang.String prefix)
Get the list of the keys contained in the configuration repository that match the specified prefix.
Parameters:
prefix - A String prefix to test against.
Returns:
An Enumeration of keys that match the prefix.

getLong

public static long getLong(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a long.
Parameters:
name - The resource name.
Returns:
The value of the resource as a long.

getLong

public static long getLong(java.lang.String name,
                           long def)
The purpose of this method is to get the configuration resource with the given name as a long, or a default value.
Parameters:
name - The resource name.
def - The default value of the resource.
Returns:
The value of the resource as a long.

getString

public static java.lang.String getString(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a string.
Parameters:
name - The resource name.
Returns:
The value of the resource as a string.

getString

public static java.lang.String getString(java.lang.String name,
                                         java.lang.String def)
The purpose of this method is to get the configuration resource with the given name as a string, or a default value.
Parameters:
name - The resource name.
def - The default value of the resource.
Returns:
The value of the resource as a string.

getStringArray

public static java.lang.String[] getStringArray(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a string array.
Parameters:
name - The resource name.
Returns:
The value of the resource as a string array.

getVector

public static java.util.Vector getVector(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a vector.
Parameters:
name - The resource name.
Returns:
The value of the resource as a vector.

getVector

public static java.util.Vector getVector(java.lang.String name,
                                         java.util.Vector def)
The purpose of this method is to get the configuration resource with the given name as a vector, or a default value.
Parameters:
name - The resource name.
def - The default value of the resource.
Returns:
The value of the resource as a vector.

getResources

public static ResourceService getResources(java.lang.String prefix)
The purpose of this method is to extract a subset of configuraton resources sharing a common name prefix.
Parameters:
prefix - the common name prefix
Returns:
A ResourceService providing the subset of configuration.

getConfiguration

public static org.apache.velocity.runtime.configuration.Configuration getConfiguration(java.lang.String prefix)
The purpose of this method is to extract a subset configuraton sharing a common name prefix.
Parameters:
prefix - the common name prefix
Returns:
A Configuration providing the subset of configuration.


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