org.davesag.generica
Class Constants

java.lang.Object
  extended byorg.davesag.generica.Constants

public final class Constants
extends Object

The Constants class defines the static global constants.

Since:
Generica 1.0
Version:
CVS Revision $Id: Constants.java,v 1.19 2004/04/03 09:40:37 davesag Exp $
Author:
Dave Sag http://www.davesag.com

Field Summary
static String ACTION_ERRORS
          Struts by itself does not provide a way to distinguish between validation errors and deeper action errors.
static String COUNTRY_CODE_LIST_KEY
          On startup a context-param (specified in web.xml) called countries is examined and a list of available country codes is loaded into the application context under this key.
static String COUNTRY_LIST
          Whenever we need to display a list of countries, localised correctly for the user, we will look under this key.
static String CURRENCY_CODE_LIST_KEY
          On startup a context-param (specified in web.xml) called currencies is examined and a list of available currency codes is loaded into the application context under this key.
static String CURRENCY_LIST
          Whenever we need to display a list of currencies, localised correctly for the user, we will look under this key.
static String DUNNO
          How we say we don't know.
static String FEMALE
          People can be female
static String GENDERS_KEY
          on startup a context-param (specified in web.xml) called genders is examined and a list of available gender keys is loaded into the application context under this key.
static String HSF_KEY
          The key used to store the Hibernate SessionFactory in the session.
static String LANGUAGE_CODE_LIST_KEY
          On startup a context-param (specified in web.xml) called languages is examined and a list of available languge codes is loaded into the application context under this key.
static String LANGUAGE_LIST
          When the user's session starts their local is determined automatically and the appropriatly localised resources are loaded.
static String MALE
          People can be male
static String NEXT_FORWARD
          the next safe forward for the action to use.
static String NO
          How we say no.
static String OOCARES
          How we say we don't care.
static String ORIGINAL_LOGIN_REQUEST
          The path that the user originally wanted before they were diverted to the login page.
static String PARAM_TARGET
          The name of the parameter used to choose a target object.
static String PRAPS
          How we say perhaps.
static Properties PROPERTIES
          System wide properties loaded from /generica_runtime.properties.
static String SITE_COPY_KEY
          the key under which any site copy for the current page is held.
static String SITE_SECTION_LIST
          when the user's session starts their local is determined automatically and the appropriatly localised resources are loaded.
static String SITE_SECTION_LIST_KEY
          on startup a context-param (specified in web.xml) called site-sections is examined and a list of available site sections is loaded into the application context under this key.
static String TARGET_KEY
          The key used universally to store and retrieve the object the current form is acting on from either the request, or Pipe.
static String TARGET_SUMMARY_KEY
          The key used universally to store the summarised object that accompanies a form target object.
static String USER_KEY
          The key used universally to store and retrieve the current web application user from the session.
static String VERSION
          The version ID for the generica package as stamped by the build process.
static String YES
          How we say yes.
static String YES_NO_LIST
          Whenever we need to display a list of yes/no options, localised correctly for the user, we will look under this key.
 
Constructor Summary
Constants()
           
 
Method Summary
static Properties getProperties()
          loads the genrica_runtime properties file and traps any exceptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTIES

public static final Properties PROPERTIES
System wide properties loaded from /generica_runtime.properties.


YES

public static final String YES
How we say yes. This is localised for user consumption.

See Also:
Constant Field Values

NO

public static final String NO
How we say no. This is localised for user consumption.

See Also:
Constant Field Values

PRAPS

public static final String PRAPS
How we say perhaps. This is localised for user consumption.

See Also:
Constant Field Values

DUNNO

public static final String DUNNO
How we say we don't know. This is localised for user consumption.

See Also:
Constant Field Values

OOCARES

public static final String OOCARES
How we say we don't care. This is localised for user consumption.

See Also:
Constant Field Values

MALE

public static final String MALE
People can be male

See Also:
Constant Field Values

FEMALE

public static final String FEMALE
People can be female

See Also:
Constant Field Values

NEXT_FORWARD

public static final String NEXT_FORWARD
the next safe forward for the action to use.

See Also:
Constant Field Values

VERSION

public static final String VERSION
The version ID for the generica package as stamped by the build process.


USER_KEY

public static final String USER_KEY
The key used universally to store and retrieve the current web application user from the session.

See Also:
Constant Field Values

ORIGINAL_LOGIN_REQUEST

public static final String ORIGINAL_LOGIN_REQUEST
The path that the user originally wanted before they were diverted to the login page. This is always held in the session. It is loaded by the AccessControlFilter and cleared by the LoginAction.

See Also:
Constant Field Values

LANGUAGE_CODE_LIST_KEY

public static final String LANGUAGE_CODE_LIST_KEY
On startup a context-param (specified in web.xml) called languages is examined and a list of available languge codes is loaded into the application context under this key.

See Also:
Constant Field Values

LANGUAGE_LIST

public static final String LANGUAGE_LIST
When the user's session starts their local is determined automatically and the appropriatly localised resources are loaded. In the User Interface we need to display lists of languages. The key held by LANGUAGE_CODE_LIST_KEY is matched with a list holding the localised names for the available languages.

See Also:
Constant Field Values

YES_NO_LIST

public static final String YES_NO_LIST
Whenever we need to display a list of yes/no options, localised correctly for the user, we will look under this key. Usually this is built at user login, or in a Presenter and matches against YES and NO for the available languages.

See Also:
Constant Field Values

COUNTRY_CODE_LIST_KEY

public static final String COUNTRY_CODE_LIST_KEY
On startup a context-param (specified in web.xml) called countries is examined and a list of available country codes is loaded into the application context under this key.

See Also:
Constant Field Values

COUNTRY_LIST

public static final String COUNTRY_LIST
Whenever we need to display a list of countries, localised correctly for the user, we will look under this key. Usually this is built at user login, or in a Presenter and matches against COUNTRY_CODE_LIST_KEY for the available country codes.

See Also:
Constant Field Values

CURRENCY_CODE_LIST_KEY

public static final String CURRENCY_CODE_LIST_KEY
On startup a context-param (specified in web.xml) called currencies is examined and a list of available currency codes is loaded into the application context under this key.

See Also:
Constant Field Values

CURRENCY_LIST

public static final String CURRENCY_LIST
Whenever we need to display a list of currencies, localised correctly for the user, we will look under this key. Usually this is built at user login, or in a Presenter and matches against CURRENCY_CODE_LIST_KEY for the available currency codes.

See Also:
Constant Field Values

TARGET_KEY

public static final String TARGET_KEY
The key used universally to store and retrieve the object the current form is acting on from either the request, or Pipe.

See Also:
Constant Field Values

TARGET_SUMMARY_KEY

public static final String TARGET_SUMMARY_KEY
The key used universally to store the summarised object that accompanies a form target object.

See Also:
Constant Field Values

ACTION_ERRORS

public static final String ACTION_ERRORS
Struts by itself does not provide a way to distinguish between validation errors and deeper action errors. You can test for the presence of the ACTION_ERRORS flag in the request to report errors that are specifically action errors.

See Also:
Constant Field Values

HSF_KEY

public static final String HSF_KEY
The key used to store the Hibernate SessionFactory in the session.

See Also:
Constant Field Values

PARAM_TARGET

public static final String PARAM_TARGET
The name of the parameter used to choose a target object. Eg http://localhost/myapp/in/edituser.do?target=12345.

See Also:
Constant Field Values

SITE_COPY_KEY

public static final String SITE_COPY_KEY
the key under which any site copy for the current page is held.

See Also:
Constant Field Values

SITE_SECTION_LIST_KEY

public static final String SITE_SECTION_LIST_KEY
on startup a context-param (specified in web.xml) called site-sections is examined and a list of available site sections is loaded into the application context under this key.

See Also:
Constant Field Values

SITE_SECTION_LIST

public static final String SITE_SECTION_LIST
when the user's session starts their local is determined automatically and the appropriatly localised resources are loaded. In the User Interface we need to display lists of site sections. The key held by SITE_SECTION_LIST_KEY is matched with a list holding the localised names for the available site sections.

See Also:
Constant Field Values

GENDERS_KEY

public static final String GENDERS_KEY
on startup a context-param (specified in web.xml) called genders is examined and a list of available gender keys is loaded into the application context under this key.

See Also:
Constant Field Values
Constructor Detail

Constants

public Constants()
Method Detail

getProperties

public static Properties getProperties()
loads the genrica_runtime properties file and traps any exceptions

Returns:
Generica Properties.
Throws:
RuntimeException - if anything goes wrong.


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.