java.lang.Object
com.eireneh.bible.control.State
com.eireneh.bible.view.servlet.CookieState
- public class CookieState
- extends com.eireneh.bible.control.State
The State class takes a Cookie and maintains some state on the current
user and their preferences.
Distribution Licence:
Project B is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License,
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
The License is available on the internet
here, by writing to
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA, Or locally at the Licence link below.
The copyright to this program is held by it's authors.
|
| Nested classes inherited from class com.eireneh.bible.control.State |
com.eireneh.bible.control.State.BibleChoice, com.eireneh.bible.control.State.BooleanChoice, com.eireneh.bible.control.State.PageStyleChoice, com.eireneh.bible.control.State.PasswordChoice, com.eireneh.bible.control.State.PlainStyleChoice, com.eireneh.bible.control.State.PropertyChoice, com.eireneh.bible.control.State.WebStyleChoice |
| Fields inherited from class com.eireneh.bible.control.State |
config, CONFIRM, DEBUG, EMAIL, factory, FIRSTNAME, id, PAGE_HIST, page_style, PAGE_STYLE, PAGE_SUBJECT, PASSWORD, plain_style, PLAIN_STYLE, PLAIN_SUBJECT, prop, SURNAME, USERNAME, VERSION, web_style, WEB_STYLE, WEB_SUBJECT |
|
Method Summary |
void |
loadConfig()
Load an the config with settings. |
void |
saveConfig()
Save any changes to the Config back to disk |
| Methods inherited from class com.eireneh.bible.control.State |
getBible, getConfig, getDebugString, getID, getMaxVerses, getPageStyle, getPageStyleName, getPlainStyle, getPlainStyleName, getTaskFactory, getWebStyle, getWebStyleName, initConfig, isDebugging, setBible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_AGE
public static final int MAX_AGE
- Cookie Max Age
- See Also:
- Constant Field Values
request
private javax.servlet.http.HttpServletRequest request
- The http request data
response
private javax.servlet.http.HttpServletResponse response
- The http response data
log
protected static com.eireneh.util.Logger log
- The log stream
CookieState
public CookieState(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Create a State object from the data about the incomming request
saveConfig
public void saveConfig()
throws java.io.IOException
- Save any changes to the Config back to disk
loadConfig
public void loadConfig()
- Load an the config with settings. This method should not fail so
if for some reason there is an error we should just use some
defaults and carry on (posibly with a note to the Log)