ca.bc.gov.webade
Class AppPreferences

java.lang.Object
  extended byca.bc.gov.webade.AppPreferences
All Implemented Interfaces:
java.io.Serializable

public final class AppPreferences
extends java.lang.Object
implements java.io.Serializable

Author:
jross
See Also:
Serialized Form

Field Summary
static java.lang.String ALWAYS_LOAD_USER_GROUPS_FLAG
          The flag preference name indicating whether or not to always load the user's group memberships, regardless of if the application has groups or not.
static java.lang.String ANONYMOUS_USER_PREF_NAME
          The anonymous user preference name.
static java.lang.String APPLICATION_CONFIG_SUBTYPE
          The application config sub-type.
static java.lang.String BCEID_WEB_SERVICES_CONNECT_PASSWORD
          The BCeID web services connect password preference name.
static java.lang.String BCEID_WEB_SERVICES_CONNECT_USERNAME
          The BCeID web services connect username preference name.
static java.lang.String BCEID_WEB_SERVICES_PROVIDER_URL
          The BCeID web services provider url preference name.
static java.lang.String BCEID_WEB_SERVICES_SECONDS_TIMEOUT
          The BCeID web services timeout value (in seconds) preference name.
static java.lang.String ENABLE_LEGACY_ANONYMOUS_USER_PREF_NAME
          The enable legacy anonymous user API calls preference name.
static java.lang.String ENABLE_LEGACY_USER_PREF_NAME
          The enable legacy user API calls preference name.
static java.lang.String EXTENSION_CLASS_PREF_NAME
          The extension class name preference name.
static java.lang.String EXTENSION_PREF_NAME
          The extension preference name.
static java.lang.String EXTENSIONS_PREF_SET_NAME
          The extensions preference set name.
static java.lang.String GROUP_MAX_CACHE_TIME_PREF_NAME
          The max group cache time preference name.
static java.lang.String LDAP_ATTR_EMAIL_ADDRESS
          The email address attribute preference name.
static java.lang.String LDAP_ATTR_EMPLOYEE_INDICATOR
          The employee indicator attribute preference name.
static java.lang.String LDAP_ATTR_EMPLOYEE_INDICATOR_DEFAULT
          The employee indicator attribute preference default value.
static java.lang.String LDAP_ATTR_FIRST_NAME
          The first name attribute preference name.
static java.lang.String LDAP_ATTR_LAST_NAME
          The last name attribute preference name.
static java.lang.String LDAP_ATTR_MIDDLE_INITIAL
          The middle initial attribute preference name.
static java.lang.String LDAP_ATTR_PHONE_NUMBER
          The telephone number attribute preference name.
static java.lang.String LDAP_ENABLED_PREF
          The LDAP config optional enabled preference.
static java.lang.String LDAP_PASSWORD
          The LDAP password preference name.
static java.lang.String LDAP_PROVIDER_URL
          The LDAP provider url preference name.
static java.lang.String LDAP_SEARCH_BASE
          The LDAP search base preference name.
static java.lang.String LDAP_USERNAME
          The LDAP username preference name.
static java.lang.String PROVIDER_CLASS_NAME
          The user-provider class name preference name.
static java.lang.String PROVIDER_ENABLED
          The user-provider enabled preference name.
static java.lang.String PROVIDER_SUPPORTED_TYPES
          The user-provider supported user types preference name.
static java.lang.String PROVIDER_USER_TYPE_DOMAINS_SUFFIX
          Deprecated. Only used by the version 1 CAP web services user provider (No longer used).
static java.lang.String SYSTEM_USER_ACCOUNT_PREF_NAME
          The system user account name preference name.
static java.lang.String SYSTEM_USER_GUID_PREF_NAME
          The system user GUID preference name.
static java.lang.String SYSTEM_USER_PREF_SET_NAME
          The system user preference set name.
static java.lang.String SYSTEM_USER_TYPE_CODE_PREF_NAME
          The system user type code preference name.
static java.lang.String TYPE_APPLICATION
          Preference Type Code indicating an application preference.
static java.lang.String TYPE_EXTENSION
          Preference Type Code indicating an extension preference.
static java.lang.String TYPE_GLOBAL
          Preference Type Code indicating a global preference.
static java.lang.String TYPE_USER
          Preference Type Code indicating a user preference.
static java.lang.String TYPE_WEBADE
          Preference Type Code indicating an internal WebADE preference.
static java.lang.String USER_MAX_CACHE_TIME_PREF_NAME
          The max user cache time preference name.
static java.lang.String USER_PROVIDER_SUBTYPE
          The application config sub-type.
static java.lang.String WEBADE_AGREEMENT_NAME
          The attribute name for the application preference defining agreements that users must have agreed to before being given access to the WebADE application.
static java.lang.String WEBADE_AGREEMENT_PAGE
          The attribute name for the web page used to display agreements that a user must accept to continue using the application.
static java.lang.String WEBADE_APPLICATION_CHECK_FOR_DISABLED_FLAG
          The attribute name for the preference indicating whether the application should check for the application enabled flag.
static java.lang.String WEBADE_APPLICATION_DISABLED_MESSAGE
          The attribute name for the preference containing the application disabled message.
static java.lang.String WEBADE_APPLICATION_DISABLED_PAGE
          The attribute name for the web page used when an application is marked as disabled.
static java.lang.String WEBADE_DEFAULT_ORGANIZATION_ENABLED_FLAG
          The attribute name for the flag used to allow a user with multiple organizations for an application to select one as his default when logging in to the application.
static java.lang.String WEBADE_DEFAULT_ORGANIZATION_SELECT_BY_ORGANIZATION_TYPE
          The attribute name for the indicator that defines which organizations the user can select from when selecting a default organization.
static java.lang.String WEBADE_DEFAULT_ORGANIZATION_SWITCH_PAGE
          The attribute name for the web page used to allow a user with multiple organizations to select one as his default when logging in to the application.
static java.lang.String WEBADE_ORGANIZATION_CHOOSER_PAGE
          The attribute name for the web page used to display the list of organizations that a user must choose an organization from to use for this session.
static java.lang.String WEBADE_USE_DEFAULT_ORGANIZATION_ENABLED_FLAG
          The attribute name for the flag used to indicate whether to forego the organization selection screen when a default organization is selected.
 
Constructor Summary
AppPreferences()
           
 
Method Summary
static void validateApplicationPreferences(Preferences prefs)
          Validates a WebADE application's configuration preferences.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_GLOBAL

public static final java.lang.String TYPE_GLOBAL
Preference Type Code indicating a global preference.

See Also:
Constant Field Values

TYPE_WEBADE

public static final java.lang.String TYPE_WEBADE
Preference Type Code indicating an internal WebADE preference.

See Also:
Constant Field Values

TYPE_APPLICATION

public static final java.lang.String TYPE_APPLICATION
Preference Type Code indicating an application preference.

See Also:
Constant Field Values

TYPE_EXTENSION

public static final java.lang.String TYPE_EXTENSION
Preference Type Code indicating an extension preference.

See Also:
Constant Field Values

TYPE_USER

public static final java.lang.String TYPE_USER
Preference Type Code indicating a user preference.

See Also:
Constant Field Values

APPLICATION_CONFIG_SUBTYPE

public static final java.lang.String APPLICATION_CONFIG_SUBTYPE
The application config sub-type.

See Also:
Constant Field Values

ANONYMOUS_USER_PREF_NAME

public static final java.lang.String ANONYMOUS_USER_PREF_NAME
The anonymous user preference name.

See Also:
Constant Field Values

SYSTEM_USER_PREF_SET_NAME

public static final java.lang.String SYSTEM_USER_PREF_SET_NAME
The system user preference set name.

See Also:
Constant Field Values

SYSTEM_USER_TYPE_CODE_PREF_NAME

public static final java.lang.String SYSTEM_USER_TYPE_CODE_PREF_NAME
The system user type code preference name.

See Also:
Constant Field Values

SYSTEM_USER_GUID_PREF_NAME

public static final java.lang.String SYSTEM_USER_GUID_PREF_NAME
The system user GUID preference name.

See Also:
Constant Field Values

SYSTEM_USER_ACCOUNT_PREF_NAME

public static final java.lang.String SYSTEM_USER_ACCOUNT_PREF_NAME
The system user account name preference name.

See Also:
Constant Field Values

ENABLE_LEGACY_USER_PREF_NAME

public static final java.lang.String ENABLE_LEGACY_USER_PREF_NAME
The enable legacy user API calls preference name.

See Also:
Constant Field Values

ENABLE_LEGACY_ANONYMOUS_USER_PREF_NAME

public static final java.lang.String ENABLE_LEGACY_ANONYMOUS_USER_PREF_NAME
The enable legacy anonymous user API calls preference name.

See Also:
Constant Field Values

ALWAYS_LOAD_USER_GROUPS_FLAG

public static final java.lang.String ALWAYS_LOAD_USER_GROUPS_FLAG
The flag preference name indicating whether or not to always load the user's group memberships, regardless of if the application has groups or not. Default to true.

See Also:
Constant Field Values

USER_MAX_CACHE_TIME_PREF_NAME

public static final java.lang.String USER_MAX_CACHE_TIME_PREF_NAME
The max user cache time preference name.

See Also:
Constant Field Values

GROUP_MAX_CACHE_TIME_PREF_NAME

public static final java.lang.String GROUP_MAX_CACHE_TIME_PREF_NAME
The max group cache time preference name.

See Also:
Constant Field Values

EXTENSIONS_PREF_SET_NAME

public static final java.lang.String EXTENSIONS_PREF_SET_NAME
The extensions preference set name.

See Also:
Constant Field Values

EXTENSION_PREF_NAME

public static final java.lang.String EXTENSION_PREF_NAME
The extension preference name.

See Also:
Constant Field Values

EXTENSION_CLASS_PREF_NAME

public static final java.lang.String EXTENSION_CLASS_PREF_NAME
The extension class name preference name.

See Also:
Constant Field Values

USER_PROVIDER_SUBTYPE

public static final java.lang.String USER_PROVIDER_SUBTYPE
The application config sub-type.

See Also:
Constant Field Values

PROVIDER_CLASS_NAME

public static final java.lang.String PROVIDER_CLASS_NAME
The user-provider class name preference name.

See Also:
Constant Field Values

PROVIDER_SUPPORTED_TYPES

public static final java.lang.String PROVIDER_SUPPORTED_TYPES
The user-provider supported user types preference name.

See Also:
Constant Field Values

PROVIDER_ENABLED

public static final java.lang.String PROVIDER_ENABLED
The user-provider enabled preference name.

See Also:
Constant Field Values

PROVIDER_USER_TYPE_DOMAINS_SUFFIX

public static final java.lang.String PROVIDER_USER_TYPE_DOMAINS_SUFFIX
Deprecated. Only used by the version 1 CAP web services user provider (No longer used).

The user-provider supported user types domains mapping preference name suffix.

See Also:
Constant Field Values

BCEID_WEB_SERVICES_PROVIDER_URL

public static final java.lang.String BCEID_WEB_SERVICES_PROVIDER_URL
The BCeID web services provider url preference name.

See Also:
Constant Field Values

BCEID_WEB_SERVICES_SECONDS_TIMEOUT

public static final java.lang.String BCEID_WEB_SERVICES_SECONDS_TIMEOUT
The BCeID web services timeout value (in seconds) preference name.

See Also:
Constant Field Values

BCEID_WEB_SERVICES_CONNECT_USERNAME

public static final java.lang.String BCEID_WEB_SERVICES_CONNECT_USERNAME
The BCeID web services connect username preference name.

See Also:
Constant Field Values

BCEID_WEB_SERVICES_CONNECT_PASSWORD

public static final java.lang.String BCEID_WEB_SERVICES_CONNECT_PASSWORD
The BCeID web services connect password preference name.

See Also:
Constant Field Values

LDAP_PROVIDER_URL

public static final java.lang.String LDAP_PROVIDER_URL
The LDAP provider url preference name.

See Also:
Constant Field Values

LDAP_SEARCH_BASE

public static final java.lang.String LDAP_SEARCH_BASE
The LDAP search base preference name.

See Also:
Constant Field Values

LDAP_USERNAME

public static final java.lang.String LDAP_USERNAME
The LDAP username preference name.

See Also:
Constant Field Values

LDAP_PASSWORD

public static final java.lang.String LDAP_PASSWORD
The LDAP password preference name.

See Also:
Constant Field Values

LDAP_ATTR_FIRST_NAME

public static final java.lang.String LDAP_ATTR_FIRST_NAME
The first name attribute preference name.

See Also:
Constant Field Values

LDAP_ATTR_LAST_NAME

public static final java.lang.String LDAP_ATTR_LAST_NAME
The last name attribute preference name.

See Also:
Constant Field Values

LDAP_ATTR_MIDDLE_INITIAL

public static final java.lang.String LDAP_ATTR_MIDDLE_INITIAL
The middle initial attribute preference name.

See Also:
Constant Field Values

LDAP_ATTR_PHONE_NUMBER

public static final java.lang.String LDAP_ATTR_PHONE_NUMBER
The telephone number attribute preference name.

See Also:
Constant Field Values

LDAP_ATTR_EMAIL_ADDRESS

public static final java.lang.String LDAP_ATTR_EMAIL_ADDRESS
The email address attribute preference name.

See Also:
Constant Field Values

LDAP_ATTR_EMPLOYEE_INDICATOR

public static final java.lang.String LDAP_ATTR_EMPLOYEE_INDICATOR
The employee indicator attribute preference name.

See Also:
Constant Field Values

LDAP_ATTR_EMPLOYEE_INDICATOR_DEFAULT

public static final java.lang.String LDAP_ATTR_EMPLOYEE_INDICATOR_DEFAULT
The employee indicator attribute preference default value.

See Also:
Constant Field Values

LDAP_ENABLED_PREF

public static final java.lang.String LDAP_ENABLED_PREF
The LDAP config optional enabled preference.

See Also:
Constant Field Values

WEBADE_DEFAULT_ORGANIZATION_ENABLED_FLAG

public static final java.lang.String WEBADE_DEFAULT_ORGANIZATION_ENABLED_FLAG
The attribute name for the flag used to allow a user with multiple organizations for an application to select one as his default when logging in to the application.

See Also:
Constant Field Values

WEBADE_USE_DEFAULT_ORGANIZATION_ENABLED_FLAG

public static final java.lang.String WEBADE_USE_DEFAULT_ORGANIZATION_ENABLED_FLAG
The attribute name for the flag used to indicate whether to forego the organization selection screen when a default organization is selected.

See Also:
Constant Field Values

WEBADE_DEFAULT_ORGANIZATION_SWITCH_PAGE

public static final java.lang.String WEBADE_DEFAULT_ORGANIZATION_SWITCH_PAGE
The attribute name for the web page used to allow a user with multiple organizations to select one as his default when logging in to the application.

See Also:
Constant Field Values

WEBADE_DEFAULT_ORGANIZATION_SELECT_BY_ORGANIZATION_TYPE

public static final java.lang.String WEBADE_DEFAULT_ORGANIZATION_SELECT_BY_ORGANIZATION_TYPE
The attribute name for the indicator that defines which organizations the user can select from when selecting a default organization.

See Also:
Constant Field Values

WEBADE_APPLICATION_DISABLED_PAGE

public static final java.lang.String WEBADE_APPLICATION_DISABLED_PAGE
The attribute name for the web page used when an application is marked as disabled.

See Also:
Constant Field Values

WEBADE_APPLICATION_CHECK_FOR_DISABLED_FLAG

public static final java.lang.String WEBADE_APPLICATION_CHECK_FOR_DISABLED_FLAG
The attribute name for the preference indicating whether the application should check for the application enabled flag.

See Also:
Constant Field Values

WEBADE_APPLICATION_DISABLED_MESSAGE

public static final java.lang.String WEBADE_APPLICATION_DISABLED_MESSAGE
The attribute name for the preference containing the application disabled message. This preference is optional. A standard disabled message will be used if this preference is not set.

See Also:
Constant Field Values

WEBADE_AGREEMENT_PAGE

public static final java.lang.String WEBADE_AGREEMENT_PAGE
The attribute name for the web page used to display agreements that a user must accept to continue using the application.

See Also:
Constant Field Values

WEBADE_AGREEMENT_NAME

public static final java.lang.String WEBADE_AGREEMENT_NAME
The attribute name for the application preference defining agreements that users must have agreed to before being given access to the WebADE application.

See Also:
Constant Field Values

WEBADE_ORGANIZATION_CHOOSER_PAGE

public static final java.lang.String WEBADE_ORGANIZATION_CHOOSER_PAGE
The attribute name for the web page used to display the list of organizations that a user must choose an organization from to use for this session.

See Also:
Constant Field Values
Constructor Detail

AppPreferences

public AppPreferences()
Method Detail

validateApplicationPreferences

public static void validateApplicationPreferences(Preferences prefs)
                                           throws ConfigurationException
Validates a WebADE application's configuration preferences.

Parameters:
prefs - The loaded application preferences.
Throws:
ConfigurationException - Thrown if the application is incorrectly configured.