Automatic generation produced by ISE Eiffel
indexing
description: "read the website configuration file, initialize handler-mapping, actual session class name and expiration time information."
author: "Peizhu Li, <lip@student.ethz.ch>"
date: "20.12.2008"
revision: "$0.6$"
class interface
CONFIG_READER
create
make
feature -- attribute
config_file_name: STRING_8
-- full path to the config file
application_path: STRING_8
-- path to eiffel application
default_request: STRING_8
default_command: STRING_8
-- default request and command string in case client hasn't specified a request
notfound_request: STRING_8
notfound_command: STRING_8
-- in case of an unknown request, request/command string used to identify a handler
stylesheet: STRING_8
-- stylesheet path
javascript: STRING_8
-- javascript path
image_path: STRING_8
-- path to image files
error_template_page: STRING_8
-- a template page will be used for HTML error pages (4xx errors)
database_server: STRING_8
database_port: INTEGER_32
database_socket_file: STRING_8
database_name: STRING_8
database_username: STRING_8
database_password: STRING_8
session_files_folder: STRING_8
-- folder that all session files will be saved in
session_expiration: INTEGER_32
-- session expirated (in hours)
session_id_length: INTEGER_32
-- length of generated session id
variables: HASH_TABLE [STRING_8, STRING_8]
-- application constants as strings
handler: STRING_8
-- handler class name for given request/action
template: STRING_8
-- html template file for given request/action
feature -- access
read_configuration (request, command: STRING_8)
-- parse config file to get configurations for sepcified request/command
require
config_file_name /= Void
has_constant (name: STRING_8): BOOLEAN
-- check whether a specified constant is defined in config file
require
valid_name_is_given: name /= Void and not name.is_empty
get_constant (name: STRING_8): STRING_8
-- retrieve a constant string defined in configuration file, return "" if not exists
require
valid_name_is_given: name /= Void and not name.is_empty
get_handler_type (request: STRING_8): STRING_8
-- parse config file to get the handler id string for specified request/command
require
config_file_name /= Void
get_template_file (request, command: STRING_8): STRING_8
-- parse config file to get template file for specified request/command
require
config_file_name /= Void
invariant
invariant_clause: True
end -- class CONFIG_READER
-- Generated by ISE Eiffel --
For more details: www.eiffel.com