de.bea.domingo.proxy
Class InternationalProxy

java.lang.Object
  extended by de.bea.domingo.proxy.InternationalProxy
All Implemented Interfaces:
java.io.Serializable

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

Proxy to the Notes international settings.

Author:
Kurt Riede
See Also:
Serialized Form

Field Summary
static java.lang.String DATE_FORMAT_DEFAULT
          Default date format.
static java.lang.String DATE_FORMAT_DMY
          Date format ordered as day/month/year.
static java.lang.String DATE_FORMAT_MDY
          Date format ordered as month/day/year.
static java.lang.String DATE_FORMAT_YMD
          Date format ordered as year/month/day.
static char DATE_SEPARATOR_DEFAULT
          Default separator for date components.
static java.lang.String TIME_FORMAT_24
          Time format in 24 hour display.
static java.lang.String TIME_FORMAT_DEFAULT
          Default time format.
static char TIME_SEPARATOR_DEFAULT
          Default separator for time components.
static java.lang.String TIMEZONE_FORMAT
          Format string for time zones in format of RFC 822 , e.g.
 
Constructor Summary
InternationalProxy(lotus.domino.Session theSession, DNotesMonitor theMonitor)
          Constructor.
 
Method Summary
protected  java.util.Calendar createCalendar(lotus.domino.DateTime dateTime)
          Converts a Notes DateTime object into a Calendar.
protected  lotus.domino.DateRange createDateRange(java.util.Calendar calendar1, java.util.Calendar calendar2)
          Creates a Notes DateRange instance from two java.util.Calendars.
protected  lotus.domino.DateTime createDateTime(java.util.Calendar calendar)
          Creates a Notes DateTime instance from a java.util.Calendar.
protected  void error(java.lang.String message, lotus.domino.NotesException e)
          Sends an error to the current monitor.
protected  DNotesMonitor getMonitor()
          Get the current monitor.
(package private) static int getNotesTimeZoneValue(java.util.TimeZone zone, long date)
          Computes the Notes time zone value for a given time zone.
(package private)  int getOffset(lotus.domino.DateTime dateTime)
          Returns the raw offset of the time zone in milli seconds for a given Notes time zone value.
protected static int getRawOffset(int zoneValue)
          Returns the offset in milli seconds for a given Notes time zone value.
protected  void info(java.lang.String message, lotus.domino.NotesException e)
          Sends a warning to the current monitor.
protected  boolean isDateSet(java.util.Calendar calendar)
          Checks if a Calendar object defines a date.
protected  boolean isDateSet(lotus.domino.DateTime dateTime)
          Checks if a DateTime object defines a date.
protected  boolean isTimeSet(java.util.Calendar calendar)
          Checks if a Calendar object defines a time.
protected  boolean isTimeSet(lotus.domino.DateTime dateTime)
          Checks if a DateTime object defines a time.
protected  void warn(java.lang.String message, lotus.domino.NotesException e)
          Sends an info to the current monitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE_SEPARATOR_DEFAULT

public static final char DATE_SEPARATOR_DEFAULT
Default separator for date components.

See Also:
Constant Field Values

TIME_SEPARATOR_DEFAULT

public static final char TIME_SEPARATOR_DEFAULT
Default separator for time components.

See Also:
Constant Field Values

DATE_FORMAT_DMY

public static final java.lang.String DATE_FORMAT_DMY
Date format ordered as day/month/year. The slashes will be replaced with the concrete date separator.

See Also:
Constant Field Values

DATE_FORMAT_MDY

public static final java.lang.String DATE_FORMAT_MDY
Date format ordered as month/day/year. The slashes will be replaced with the concrete date separator.

See Also:
Constant Field Values

DATE_FORMAT_YMD

public static final java.lang.String DATE_FORMAT_YMD
Date format ordered as year/month/day. The slashes will be replaced with the concrete date separator.

See Also:
Constant Field Values

DATE_FORMAT_DEFAULT

public static final java.lang.String DATE_FORMAT_DEFAULT
Default date format. The slashes will be replaced with the concrete date separator.

See Also:
Constant Field Values

TIME_FORMAT_24

public static final java.lang.String TIME_FORMAT_24
Time format in 24 hour display. The colons will be replaced with the concrete date separator.

See Also:
Constant Field Values

TIME_FORMAT_DEFAULT

public static final java.lang.String TIME_FORMAT_DEFAULT
Default time format. The colons will be replaced with the concrete date separator.

See Also:
Constant Field Values

TIMEZONE_FORMAT

public static final java.lang.String TIMEZONE_FORMAT
Format string for time zones in format of RFC 822 , e.g. "-0800".

See Also:
Constant Field Values
Constructor Detail

InternationalProxy

public InternationalProxy(lotus.domino.Session theSession,
                          DNotesMonitor theMonitor)
Constructor.

Parameters:
theSession - the Notes Session
theMonitor - the monitor
Method Detail

getMonitor

protected DNotesMonitor getMonitor()
Get the current monitor.

Returns:
current monitor
See Also:
DNotesFactory.getMonitor()

createDateTime

protected lotus.domino.DateTime createDateTime(java.util.Calendar calendar)
Creates a Notes DateTime instance from a java.util.Calendar.

Parameters:
calendar - the calendar to convert
Returns:
DateTime a Notes DateTime object

createCalendar

protected java.util.Calendar createCalendar(lotus.domino.DateTime dateTime)
Converts a Notes DateTime object into a Calendar.

Milli seconds are cleared in all cases.

Parameters:
dateTime - a Notes DateTime object
Returns:
a Calendar

createDateRange

protected lotus.domino.DateRange createDateRange(java.util.Calendar calendar1,
                                                 java.util.Calendar calendar2)
Creates a Notes DateRange instance from two java.util.Calendars.

Parameters:
calendar1 - the start calendar to convert
calendar2 - the end calendar to convert
Returns:
DateRange a Notes DateTime object

getNotesTimeZoneValue

static int getNotesTimeZoneValue(java.util.TimeZone zone,
                                 long date)
Computes the Notes time zone value for a given time zone.

For time zones that are not a full hour increment from GMT, the return value is an integer in the format mmhh where mm is the minutes component of the time relative to GMT and hh is the hours component of the time relative to GMT.

The offset might have changed in history. For this case, a reference date is given to find the correct offset at the given date.

Parameters:
zone - a Java time zone
date - a reference date for computing the zone
Returns:
the Notes time zone value
See Also:
getOffset(DateTime)

getOffset

int getOffset(lotus.domino.DateTime dateTime)
Returns the raw offset of the time zone in milli seconds for a given Notes time zone value.

Parameters:
dateTime - a Notes date/time value
Returns:
war offset in milli seconds as used in Java time zones
See Also:
getNotesTimeZoneValue(TimeZone, long)

getRawOffset

protected static int getRawOffset(int zoneValue)
Returns the offset in milli seconds for a given Notes time zone value.

Parameters:
zoneValue - Notes time zone value
Returns:
offset in milli seconds as used in Java time zones
See Also:
getOffset(DateTime)

isDateSet

protected boolean isDateSet(lotus.domino.DateTime dateTime)
Checks if a DateTime object defines a date.

Parameters:
dateTime - a Notes DateTime object
Returns:
true if a date is defined, else false

isTimeSet

protected boolean isTimeSet(lotus.domino.DateTime dateTime)
Checks if a DateTime object defines a time.

Parameters:
dateTime - a Notes DateTime object
Returns:
true if a time is defined, else false

isTimeSet

protected boolean isTimeSet(java.util.Calendar calendar)
Checks if a Calendar object defines a time.

Parameters:
calendar - a Calendar object
Returns:
true if a time is defined, else false

isDateSet

protected boolean isDateSet(java.util.Calendar calendar)
Checks if a Calendar object defines a date.

Parameters:
calendar - a Calendar object
Returns:
true if a date is defined, else false

error

protected void error(java.lang.String message,
                     lotus.domino.NotesException e)
Sends an error to the current monitor.

Parameters:
message - the message
e - the NotesException, can be null

info

protected void info(java.lang.String message,
                    lotus.domino.NotesException e)
Sends a warning to the current monitor.

Parameters:
message - the message
e - the NotesException, can be null

warn

protected void warn(java.lang.String message,
                    lotus.domino.NotesException e)
Sends an info to the current monitor.

Parameters:
message - the message
e - the NotesException, can be null


Domingo Java-API