com.bea.wli.worklist.api.taskplan
Interface BusinessDateTime

All Superinterfaces:
EventSource, Serializable

public interface BusinessDateTime
extends EventSource, Serializable

Represents a business date as an interval of time past a reference time with respect to a business calendar. The calendar is specified by name or by giving the name of the user whose associated calendar should be used.

Note this interface does not define any methods to actually calculate the absolute time it represents. This calculation, as well as what time will be taken as the 'reference time' to which the interval is added, are delegated to the context in which this BusinessDate instance is used/evaluated.

If neither calendar name nor user name is specified the system calendar will be used. If a calendar name is specified, this calendar will be used. If a user is specified, this user's calendar will be used except if the user has no calendar, in this case the system calendar will be used.

You should not specify a user name and a calendar name at the same time.


Nested Class Summary
static interface BusinessDateTime.Event
          Property names for the PropertyChangeEvents that can be produced by edits on a object of this type.
 
Method Summary
 Interval createInterval()
          Create and set the interval that (along with the indicated calendar) defines this business date.
 void destroyInterval()
          Destroy and unset the interval for this business date.
 String getCalendarName()
          Get the name of the calendar that will be used to add the indicated interval to a reference time to arrive at the absolute date for this business date.
 Interval getInterval()
          The interval of time to add to a reference time (using the indicated calendar) to arrive at the desired business date.
 String getUserName()
          Get the name of the user whose associated calendar will be used to add the indicated interval to a reference time to arrive at the absolute date for this business date.
 void setCalendarName(String calendarName)
          Set the name of the calendar that will be used to add the indicated interval to a reference time to arrive at the absolute date for this business date.
 void setInterval(Interval interval)
          Set the interval that (along with the indicated calendar) defines this business date.
 void setUserName(String userName)
          Set the name of the user whose associated calendar will be used to add the indicated interval to a reference time to arrive at the absolute date for this business date.
 
Methods inherited from interface com.bea.wli.worklist.api.taskplan.EventSource
addPropertyChangeListener, addPropertyChangeListener, clearDirty, dispose, getParent, isComplete, isDirty, isInitializing, isStarted, markDirty, removePropertyChangeListener, removePropertyChangeListener, startProducing
 

Method Detail

getInterval

Interval getInterval()
The interval of time to add to a reference time (using the indicated calendar) to arrive at the desired business date.

Returns:
The Interval created and set on this business date, or null if none has been set.
See Also:
createInterval(), destroyInterval()

setInterval

void setInterval(Interval interval)
Set the interval that (along with the indicated calendar) defines this business date. Instances of BusinessDateTime may be created via TaskPlanFactory. For most users, you should use createInterval to create and set the instance in one step.

See Also:
createInterval(), TaskPlanFactory.createInterval(String)

createInterval

Interval createInterval()
Create and set the interval that (along with the indicated calendar) defines this business date. The returned Interval instance is 'live' and can be modified via its setters to configure the interval for this business date.

See Also:
destroyInterval()

destroyInterval

void destroyInterval()
Destroy and unset the interval for this business date.


setUserName

void setUserName(String userName)
Set the name of the user whose associated calendar will be used to add the indicated interval to a reference time to arrive at the absolute date for this business date.

Parameters:
userName - A valid user name in the current security realm.

getUserName

String getUserName()
Get the name of the user whose associated calendar will be used to add the indicated interval to a reference time to arrive at the absolute date for this business date.

Returns:
The user name or null if no user name has been set.

setCalendarName

void setCalendarName(String calendarName)
Set the name of the calendar that will be used to add the indicated interval to a reference time to arrive at the absolute date for this business date.

Parameters:
calendarName - The name of a calendar that exists in the WLI calendar store.

getCalendarName

String getCalendarName()
Get the name of the calendar that will be used to add the indicated interval to a reference time to arrive at the absolute date for this business date.

Returns:
The name of a calendar to use or null if no calendar name has been set.