de.bea.domingo.http
Class DominoPreferences

java.lang.Object
  extended by de.bea.domingo.http.DominoPreferences

public final class DominoPreferences
extends java.lang.Object

Domino regional preferences.

Author:
Kurt Riede

Field Summary
static DominoLocale DEFAULT_LOCALE
          The locale settings.
static java.lang.String DEFAULT_TIME_ZONE
          Default time zone search string.
static java.lang.String ENCODING_UTF_8
          Default encoding (UTF-8) for cookie values.
static int EXPIRY_YEARS
          Number of years that a preferences cookie is valid.
 
Constructor Summary
DominoPreferences(java.lang.String domain)
          Constructor.
DominoPreferences(java.lang.String domain, java.lang.String path)
          Constructor.
 
Method Summary
(package private) static java.lang.String encode(boolean booleanValue)
          Encodes a boolean value to "1" for true and "0" for false.
(package private) static java.lang.String encode(java.lang.String text)
          URL-encodes a string.
 org.apache.commons.httpclient.Cookie getRegionalCookie()
          Returns a new Lotus Domino regional cookie.
 java.util.List getRegionalCookies()
          Returns a list of cookies for the current regional settings.
 org.apache.commons.httpclient.Cookie getTimeZoneCookie()
          Returns a new Lotus Domino time zone cookie.
static java.lang.String implode(java.util.List stringList, java.lang.String delimiter)
          Combines the elements of a string array to a single string using a given seperator.
 void setAmPmSuffix(boolean amPmSuffix)
           
 void setAmString(java.lang.String amString)
           
 void setCookies(java.util.List cookies)
           
 void setCurrencySpace(boolean currencySpace)
           
 void setCurrencySymbol(java.lang.String currencySymbol)
           
 void setDateSeperator(java.lang.String dateSeperator)
           
 void setDecimalSeperator(java.lang.String decimalSeperator)
           
 void setDst(boolean dst)
           
 void setHourFormat(boolean hour24Format)
           
 void setLeadingDecimalZeros(boolean leadingDecimalZeros)
           
 void setLocale(java.lang.String locale)
           
 void setLocale(java.lang.String localeString, boolean loadDefault)
           
 void setObserverDST(boolean dst)
          Sets whether to observe daylight saving time or not.
 void setPmString(java.lang.String pmString)
           
 void setPositionCurrencySymbol(boolean currencySuffix)
           
 void setThousandsSeperator(java.lang.String thousandsSeperator)
           
 void setTimeSeperator(java.lang.String timeSeperator)
           
 void setTimeZone(DominoTimeZone timeZone)
          Sets the time zone.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXPIRY_YEARS

public static final int EXPIRY_YEARS
Number of years that a preferences cookie is valid.

See Also:
Constant Field Values

ENCODING_UTF_8

public static final java.lang.String ENCODING_UTF_8
Default encoding (UTF-8) for cookie values.

See Also:
Constant Field Values

DEFAULT_TIME_ZONE

public static final java.lang.String DEFAULT_TIME_ZONE
Default time zone search string.

See Also:
Constant Field Values

DEFAULT_LOCALE

public static final DominoLocale DEFAULT_LOCALE
The locale settings.

Constructor Detail

DominoPreferences

public DominoPreferences(java.lang.String domain)
Constructor.

Parameters:
domain - the domain to that this preferences belong to

DominoPreferences

public DominoPreferences(java.lang.String domain,
                         java.lang.String path)
Constructor.

Parameters:
domain - the domain to that this preferences belong to
path - the path defining the subset of URLs in a domain for which the cookie is valid
Method Detail

setTimeZone

public void setTimeZone(DominoTimeZone timeZone)
Sets the time zone.

Parameters:
timeZone - Domino time zone

setObserverDST

public void setObserverDST(boolean dst)
Sets whether to observe daylight saving time or not.

Parameters:
dst - observe daylight saving time or not

setLocale

public void setLocale(java.lang.String locale)
Parameters:
locale - The locale to set.

setLocale

public void setLocale(java.lang.String localeString,
                      boolean loadDefault)
Parameters:
localeString - The locale to set as a string.
loadDefault - if true, load all default values for this locale

setAmString

public void setAmString(java.lang.String amString)
Parameters:
amString - The amString to set.

setCurrencySpace

public void setCurrencySpace(boolean currencySpace)
Parameters:
currencySpace - The currencySpace to set.

setCurrencySymbol

public void setCurrencySymbol(java.lang.String currencySymbol)
Parameters:
currencySymbol - The currencySymbol to set.

setDateSeperator

public void setDateSeperator(java.lang.String dateSeperator)
Parameters:
dateSeperator - The dateSeperator to set.

setDecimalSeperator

public void setDecimalSeperator(java.lang.String decimalSeperator)
Parameters:
decimalSeperator - The decimalSeperator to set.

setCookies

public void setCookies(java.util.List cookies)
Parameters:
cookies - The cookies to set.

setDst

public void setDst(boolean dst)
Parameters:
dst - The dst to set.

setHourFormat

public void setHourFormat(boolean hour24Format)
Parameters:
hour24Format - The hourFormat to set.

setLeadingDecimalZeros

public void setLeadingDecimalZeros(boolean leadingDecimalZeros)
Parameters:
leadingDecimalZeros - The leadingDecimalZeros to set.

setPmString

public void setPmString(java.lang.String pmString)
Parameters:
pmString - The pmString to set.

setAmPmSuffix

public void setAmPmSuffix(boolean amPmSuffix)
Parameters:
amPmSuffix - The amPmSuffix to set.

setPositionCurrencySymbol

public void setPositionCurrencySymbol(boolean currencySuffix)
Parameters:
currencySuffix - The currencySuffix to set.

setThousandsSeperator

public void setThousandsSeperator(java.lang.String thousandsSeperator)
Parameters:
thousandsSeperator - The thousandsSeperator to set.

setTimeSeperator

public void setTimeSeperator(java.lang.String timeSeperator)
Parameters:
timeSeperator - The timeSeperator to set.

getRegionalCookies

public java.util.List getRegionalCookies()
Returns a list of cookies for the current regional settings.

Returns:
cookies for regional settings

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.
See Also:
Object.toString()

implode

public static java.lang.String implode(java.util.List stringList,
                                       java.lang.String delimiter)
Combines the elements of a string array to a single string using a given seperator.

Parameters:
stringList - a list of strings
delimiter - the delimiting string
Returns:
combined string

getTimeZoneCookie

public org.apache.commons.httpclient.Cookie getTimeZoneCookie()
Returns a new Lotus Domino time zone cookie.

Returns:
Lotus Domino time zone cookie

getRegionalCookie

public org.apache.commons.httpclient.Cookie getRegionalCookie()
Returns a new Lotus Domino regional cookie.

Returns:
Lotus Domino regional cookie

encode

static java.lang.String encode(boolean booleanValue)
Encodes a boolean value to "1" for true and "0" for false.

Parameters:
booleanValue - the boolean value to encode
Returns:
encoded boolean value

encode

static java.lang.String encode(java.lang.String text)
URL-encodes a string.

Parameters:
text - the test to encode
Returns:
URL-encoded text


Domingo Java-API