com.acsinet_solutions.cetia4.controller
Interface Configuration

All Known Implementing Classes:
ServletConfigurationImpl

public interface Configuration

This interface abstract communication with a configuration mechanism for initialization parameters.

Author:
Santiago Arriaga

Field Summary
static java.lang.String CONFIGURATION_FILE_PARAM
          This entry specifies an optional configuration file where all other configuration constants in this file may be externalized if desired.
static java.lang.String CONTROLLER_PATH_PARAM
          Indicates the java package that will hold controllers for the DynamicRestServlet to find them.
static java.lang.String DEFAULT_LOGIN_PARAM
          Indicates the default login for ALWAYS login type.
static java.lang.String DISPLAY_SYSTEM_EXCEPTIONS_PARAM
          Display system exceptions as part of the JSP file.
static java.lang.String ICON_DIR_PARAM
          Display tag may use GIF icons for some character sequences ( such as =) that may be transated into a happy face icon ).
static java.lang.String LOGIN_TYPE_PARAM
          Login type of the application.
static java.lang.String METHODS_DELETE_PARAM
          The default method for deletion.
static java.lang.String METHODS_INSERT_FORM_PARAM
          The default method for an insert form.
static java.lang.String METHODS_INSERT_PARAM
          The default method for insertion.
static java.lang.String METHODS_UPDATE_FORM_PARAM
          The default method for an update form.
static java.lang.String METHODS_UPDATE_PARAM
          The default method for update.
static java.lang.String PORTAL_PATH_PARAM
          Path to a basic portal application context path.
static java.lang.String PREFIX
          All configuration parameters start with this prefix.
static java.lang.String SERVICES_FILE_PARAM
          Spring services file for the current application.
static java.lang.String VALIDATION_BUNDLE_PARAM
          Validation bundle that will be used to interpret validation messages on the application.
static java.lang.String WEB_DEFAULT_EXTENSION_PARAM
          This parameter may be used to override the web default extension on web.xml
static java.lang.String WEB_SERVICE_DEFAULT_EXTENSION_PARAM
          This parameter may be used to override the web service default extension on web.xml
static java.lang.String WEB_SERVICE_VIEWS_PATH_PARAM
          This parameter may be used to override the web service views path on web.xml
static java.lang.String WEB_VIEWS_PATH_PARAM
          This parameter may be used to override the web views path on web.xml
 
Method Summary
 java.lang.String get(java.lang.String key)
          Get a parameter by key.
 boolean getBoolean(java.lang.String key)
          Return the given attribute as a boolean value.
 java.lang.String getDefaultDeleteMethod()
          Get the default method that will be called for a DELETE HTTP request.
 java.lang.String getDefaultPostMethod()
          Get the default method that will be called for a POST HTTP request.
 java.lang.String getDefaultPutMethod()
          Get the default method that will be called for a PUT HTTP request.
 java.util.Map<java.lang.String,java.lang.String> getParams()
          Get a read-only view of the parameters of this configuration.
 java.lang.String getWebDefaultExtension()
          Return the default extension for web requests
 java.lang.String getWebServiceDefaultExtension()
          Return the default extension used for web service views.
 java.lang.String getWebServiceViewsPath()
          Get the web service view path used for web service views.
 java.lang.String getWebViewsPath()
          Get the web view path used for traditional web views.
 

Field Detail

PREFIX

static final java.lang.String PREFIX
All configuration parameters start with this prefix.

See Also:
Constant Field Values

CONFIGURATION_FILE_PARAM

static final java.lang.String CONFIGURATION_FILE_PARAM
This entry specifies an optional configuration file where all other configuration constants in this file may be externalized if desired. This way, a separation between test and production environments is made even easier. The external file that is referenced from this instance is placed in a implementation dependent location, but typical implementations will find it relative to the context root of the application.

Parameters configured on the external file have precedence over those defined directly on the web deployment descriptor. This behavior will allow provide better parameter overriding facilities at component level in future implementations of the framework.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml.

The value of this param is "com.acsinet_solutions.cetia4.configuration.file".

See Also:
Constant Field Values

CONTROLLER_PATH_PARAM

static final java.lang.String CONTROLLER_PATH_PARAM
Indicates the java package that will hold controllers for the DynamicRestServlet to find them. In this version, a single path is supported; future versions of the framework will allow easy configuration of multiple paths that will combine a base path with servlet-level suffix paths.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM. It may make sense to override this parameter at servlet level also if needed.

The value of this param is "com.acsinet_solutions.cetia4.controller.path"

See Also:
DynamicRestServlet, CONFIGURATION_FILE_PARAM, Constant Field Values

DEFAULT_LOGIN_PARAM

static final java.lang.String DEFAULT_LOGIN_PARAM
Indicates the default login for ALWAYS login type. This property specifies the user under which the automatic login will be performed. It must be a valid user, because UserSessionManager will be called using this login to obtain the session information.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM.

The value of this param is "com.acsinet_solutions.cetia4.default_login"

See Also:
LOGIN_TYPE_PARAM, UserSessionManager.createSessionFor(String), CONFIGURATION_FILE_PARAM, Constant Field Values

DISPLAY_SYSTEM_EXCEPTIONS_PARAM

static final java.lang.String DISPLAY_SYSTEM_EXCEPTIONS_PARAM
Display system exceptions as part of the JSP file. This parameter is considered in the WriteExceptionTag class. This setting may be useful in debugging applications; stack traces should not be sent to the browser output in production environments.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM.

The value of this param is "com.acsinet_solutions.cetia4.display_system_exceptions"

See Also:
WriteExceptionTag, CONFIGURATION_FILE_PARAM, Constant Field Values

ICON_DIR_PARAM

static final java.lang.String ICON_DIR_PARAM
Display tag may use GIF icons for some character sequences ( such as =) that may be transated into a happy face icon ). This setting indicates the place where the icons are stored.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM.

The value of this param is "com.acsinet_solutions.cetia4.icon_dir"

See Also:
DisplayTag, CONFIGURATION_FILE_PARAM, Constant Field Values

LOGIN_TYPE_PARAM

static final java.lang.String LOGIN_TYPE_PARAM
Login type of the application. Value may be "always", "container", "basic", "form" or "none", and corresponds to values of LoginType enumeration. All authentication work is performed in each front controller RestServlet.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM.

The value of this param is "com.acsinet_solutions.cetia4.login_type"

See Also:
LoginType, RestServlet, CONFIGURATION_FILE_PARAM, Constant Field Values

METHODS_DELETE_PARAM

static final java.lang.String METHODS_DELETE_PARAM
The default method for deletion. This specifies the method that will be called by default on a servlet on an HTTP DELETE request. This also specifies the method that will be bound to delete requests on automatic catalog servlets.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM. It may make sense to override this parameter at servlet level also if needed.

The value of this param is "com.acsinet_solutions.cetia4.methods.delete".

See Also:
CONFIGURATION_FILE_PARAM, Constant Field Values

METHODS_INSERT_PARAM

static final java.lang.String METHODS_INSERT_PARAM
The default method for insertion. This specifies the method that will be called by default on a servlet on an HTTP PUT request. This also specifies the method that will be bound to insert requests on automatic catalog servlets.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM. It may make sense to override this parameter at servlet level also if needed.

The value of this param is "com.acsinet_solutions.cetia4.methods.insert".

See Also:
CONFIGURATION_FILE_PARAM, Constant Field Values

METHODS_INSERT_FORM_PARAM

static final java.lang.String METHODS_INSERT_FORM_PARAM
The default method for an insert form. This specifies the method that will be bound to insert forms on automatic catalog servlets.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM. It may make sense to override this parameter at servlet level also if needed.

The value of this param is "com.acsinet_solutions.cetia4.methods.insert_form".

See Also:
CONFIGURATION_FILE_PARAM, Constant Field Values

METHODS_UPDATE_PARAM

static final java.lang.String METHODS_UPDATE_PARAM
The default method for update. This specifies the method that will be called by default on a servlet on an HTTP POST request. This also specifies the method that will be bound to update requests on automatic catalog servlets.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM. It may make sense to override this parameter at servlet level also if needed.

The value of this param is "com.acsinet_solutions.cetia4.methods.update".

See Also:
CONFIGURATION_FILE_PARAM, Constant Field Values

METHODS_UPDATE_FORM_PARAM

static final java.lang.String METHODS_UPDATE_FORM_PARAM
The default method for an update form. This specifies the method that will be bound to update forms on automatic catalog servlets.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM. It may make sense to override this parameter at servlet level also if needed.

The value of this param is "com.acsinet_solutions.cetia4.methods.update_form".

See Also:
CONFIGURATION_FILE_PARAM, Constant Field Values

PORTAL_PATH_PARAM

static final java.lang.String PORTAL_PATH_PARAM
Path to a basic portal application context path. Loaded in _PORTAL_PATH_KEY if existent.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM.

The value of this param is "com.acsinet_solutions.cetia4.portal_path"

See Also:
AttributeKeys._PORTAL_PATH_KEY, ControllerTools.getPortalPath(ServletContext,HttpServletRequest), CONFIGURATION_FILE_PARAM, Constant Field Values

SERVICES_FILE_PARAM

static final java.lang.String SERVICES_FILE_PARAM
Spring services file for the current application. allows easy switching between production, testing and demo environments.

This parameter is read by the ServiceInitializerBase for creating a Spring Framework based service locator, only if a service locator class was provided to that class as part of it's constuctor. Spring model support is not required in a cetia4 application, but it's very useful, flexible and convenient.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM.

The value of this param is "com.acsinet_solutions.cetia4.services.file"

See Also:
ServiceInitializerBase, CONFIGURATION_FILE_PARAM, Constant Field Values

VALIDATION_BUNDLE_PARAM

static final java.lang.String VALIDATION_BUNDLE_PARAM
Validation bundle that will be used to interpret validation messages on the application. If not set, just the global generic bundle will be used for this.

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM.

The value of this param is "com.acsinet_solutions.cetia4.validation_bundle"

See Also:
ForEachIssueTag, CONFIGURATION_FILE_PARAM, Constant Field Values

WEB_DEFAULT_EXTENSION_PARAM

static final java.lang.String WEB_DEFAULT_EXTENSION_PARAM
This parameter may be used to override the web default extension on web.xml

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM. It may make sense to override this parameter at servlet level also if needed.

The value of this param is "com.acsinet_solutions.cetia4.web_default_extension"

See Also:
ServletConfigurationImpl#WEB_DEFAULT_EXTENSION, ControllerTools#getWebDefaultExtension(), CONFIGURATION_FILE_PARAM, Constant Field Values

WEB_SERVICE_DEFAULT_EXTENSION_PARAM

static final java.lang.String WEB_SERVICE_DEFAULT_EXTENSION_PARAM
This parameter may be used to override the web service default extension on web.xml

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM. It may make sense to override this parameter at servlet level also if needed.

The value of this param is "com.acsinet_solutions.cetia4.web_service_default_extension"

See Also:
ServletConfigurationImpl#WEB_SERVICE_DEFAULT_EXTENSION, ControllerTools#getWebServiceDefaultExtension(), CONFIGURATION_FILE_PARAM, Constant Field Values

WEB_VIEWS_PATH_PARAM

static final java.lang.String WEB_VIEWS_PATH_PARAM
This parameter may be used to override the web views path on web.xml

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM. It may make sense to override this parameter at servlet level also if needed.

The value of this param is "com.acsinet_solutions.cetia4.web_views_path"

See Also:
ServletConfigurationImpl#WEB_VIEWS_PATH, ControllerTools#getWebViewsPath(), CONFIGURATION_FILE_PARAM, Constant Field Values

WEB_SERVICE_VIEWS_PATH_PARAM

static final java.lang.String WEB_SERVICE_VIEWS_PATH_PARAM
This parameter may be used to override the web service views path on web.xml

This configuration parameter is meant to be set at context level in /WEB-INF/web.xml or in an external configuration file set by CONFIGURATION_FILE_PARAM. It may make sense to override this parameter at servlet level also if needed.

The value of this param is "com.acsinet_solutions.cetia4.web_service_views_path"

See Also:
ServletConfigurationImpl#WEB_SERVICE_VIEWS_PATH, ControllerTools#getWebServiceViewsPath(), CONFIGURATION_FILE_PARAM, Constant Field Values
Method Detail

getParams

java.util.Map<java.lang.String,java.lang.String> getParams()
Get a read-only view of the parameters of this configuration.


get

java.lang.String get(java.lang.String key)
Get a parameter by key.

Parameters:
key - A not-null value.
Returns:
The requested parameter, null if it was not set.

getBoolean

boolean getBoolean(java.lang.String key)
Return the given attribute as a boolean value.


getWebDefaultExtension

java.lang.String getWebDefaultExtension()
Return the default extension for web requests

See Also:
ServletConfigurationImpl#WEB_DEFAULT_EXTENSION

getWebServiceDefaultExtension

java.lang.String getWebServiceDefaultExtension()
Return the default extension used for web service views.

See Also:
ServletConfigurationImpl#WEB_SERVICE_DEFAULT_EXTENSION

getWebServiceViewsPath

java.lang.String getWebServiceViewsPath()
Get the web service view path used for web service views.

See Also:
ServletConfigurationImpl#WEB_SERVICE_VIEWS_PATH

getWebViewsPath

java.lang.String getWebViewsPath()
Get the web view path used for traditional web views.

See Also:
ServletConfigurationImpl#WEB_VIEWS_PATH

getDefaultDeleteMethod

java.lang.String getDefaultDeleteMethod()
Get the default method that will be called for a DELETE HTTP request.


getDefaultPostMethod

java.lang.String getDefaultPostMethod()
Get the default method that will be called for a POST HTTP request.


getDefaultPutMethod

java.lang.String getDefaultPutMethod()
Get the default method that will be called for a PUT HTTP request.