|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BusinessCalendar
Method Summary | |
---|---|
Date |
addBusinessTime(String interval,
CalendarDocument cDoc)
|
Date |
addBusinessTime(String interval,
CalendarDocument cDoc,
Date startTime)
|
Date |
addBusinessTime(String interval,
CalendarDocument cDoc,
Date startTime,
String clientTz)
|
Date |
addBusinessTime(String interval,
String userOrGroupId)
Use startTime as current time. |
Date |
addBusinessTime(String interval,
String userOrGroupId,
Date startTime)
Determines if userOrGroupId is a user id or group id. |
Date |
addBusinessTime(String interval,
String userOrGroupId,
Date startTime,
String clientTz)
Looks up the calendar using the appropriate "walk hierarchy" method. |
Date |
addBusinessTimeCalendarName(String interval,
String calendarName)
|
Date |
addBusinessTimeCalendarName(String interval,
String calendarName,
Date startTime)
|
Date |
addBusinessTimeCalendarName(String interval,
String calendarName,
Date startTime,
String clientTz)
|
Date |
addBusinessTimeSystemCalendar(String interval,
Date startTime)
|
Date |
addBusinessTimeSystemCalendar(String interval,
Date startTime,
String clientTz)
|
Date |
addExactTimeCalendarName(String interval,
String calendarName,
Date startTime)
|
Date |
addExactTimeCalendarName(String interval,
String calendarName,
Date startTime,
String clientTz)
|
boolean |
calendarNameExists(String name)
Checks if a calendar with the given name exists. |
void |
createCalendar(CalendarDocument cDoc)
Creates a new calendar from the information passed in the CalendarDocument. |
void |
deleteCalendar(String calendarName)
Delete the named calendar. |
void |
deleteCalendars(String[] names)
Delete the named calendars. |
Date |
findFutureFreeInterval(String interval,
String calendarName,
Date startTime)
This method finds the next effective time which is free after the start time passed in and according to the associated calendar. |
Date |
findFutureFreeInterval(String interval,
String calendarName,
Date startTime,
String clientTz)
This method finds the next effective time which is free after the start time passed in and according to the associated Calendar in the TimeZone passed in as an argument. |
String[] |
getAllCalendarNames()
Get the names of all known calendars in the system. |
CalendarDocument[] |
getAllCalendars()
Gets all calendars, including rules info and mapped groups and users. |
AvailabilityInfo[] |
getAvailability(CalendarDocument cDoc,
Date startTime,
Date endTime)
Determine the availability (as blocks of free time) for the given user over the period defined by the given start and end times. |
AvailabilityInfo[] |
getAvailabilityForUser(String userId,
Date startTime,
Date endTime)
Determine the availability (as blocks of free time) for the given user over the period defined by the given start and end times. |
AvailabilityInfo[] |
getAvailabilityForUserInGroups(String userId,
String[] groups,
Date startTime,
Date endTime)
Determine the availability (as blocks of free time) for the given user over the period defined by the given start and end times. |
CalendarDocument |
getCalendar(String calendarName)
|
CalendarDocument |
getGroupCalendar(String groupId)
|
CalendarDocument |
getGroupCalendarWalkHierarchy(String groupId)
If a calendar is mapped to the group then that calendar is returned, otherwise returns the system calendar. |
Date |
getNextFreeMinute(CalendarDocument cDoc,
Date time)
Returns the next free minute given the rules in the calendar passed from the time passed. |
Date |
getNextFreeMinute(CalendarDocument cDoc,
Date time,
String clientTz)
Returns the next free minute according to the associated calendar in the TimeZone passed in as an argument. |
CalendarDocument |
getSystemCalendar()
Get the system calendar. |
CalendarDocument |
getUserCalendar(String userId)
|
CalendarDocument |
getUserCalendarWalkHierarchy(String userId)
If a calendar is mapped to the user then that calendar is returned, otherwise returns the system calendar. |
void |
insertUserCalendarMapping(String userid,
String calendarId)
Same as updateUserCalendar. |
boolean |
isTimeFree(CalendarDocument cDoc,
Date time)
|
boolean |
isTimeFree(CalendarDocument cDoc,
Date time,
String clientTz)
|
boolean |
isUserTimeFree(String userId,
Date time)
Looks up the user's calendar using getUserCalendarWalkHierarchy and checks if the time passed is free based on the rules in the calendar. |
boolean |
isUserTimeFree(String userId,
Date time,
String clientTz)
Looks up the user's calendar using the getUserCalendarWalkHierarchy and checks if the time passed in in the TimeZone passed in is free based on the rules in the calendar. |
void |
setGroupCalendar(String groupId,
String calendarName)
|
void |
setUserCalendar(String userId,
String calendarName)
Set the user's calendar. |
Date |
subtractBusinessTime(String interval,
CalendarDocument cDoc)
|
Date |
subtractBusinessTime(String interval,
CalendarDocument cDoc,
Date startTime)
|
Date |
subtractBusinessTime(String interval,
CalendarDocument cDoc,
Date startTime,
String clientTz)
|
Date |
subtractBusinessTime(String interval,
String userOrGroupId)
|
Date |
subtractBusinessTime(String interval,
String userOrGroupId,
Date startTime)
Go back in time by the given interval. |
Date |
subtractBusinessTime(String interval,
String userOrGroupId,
Date startTime,
String clientTz)
|
Date |
subtractBusinessTimeCalendarName(String interval,
String calendarName)
|
Date |
subtractBusinessTimeCalendarName(String interval,
String calendarName,
Date startTime)
|
Date |
subtractBusinessTimeCalendarName(String interval,
String calendarName,
Date startTime,
String clientTz)
|
Date |
subtractBusinessTimeSystemCalendar(String interval,
Date startTime)
|
Date |
subtractBusinessTimeSystemCalendar(String interval,
Date startTime,
String clientTz)
|
boolean |
systemCalendarExists()
Does the (single) system calendar exist yet? The system calendar can be lazily instantiated, so it is not guaranteed to exist until needed. |
void |
unsetGroupCalendar(String groupId)
|
void |
unsetUserCalendar(String userId)
Unset the user's calendar. |
void |
updateCalendar(String oldCalendarName,
CalendarDocument cDoc)
Update the calendar - oldCalendarName, using the passed CalendarDocument. |
void |
updateSystemCalendar(CalendarDocument cDoc)
Update the system calendar using the passed CalendarDocument. |
Methods inherited from interface javax.ejb.EJBObject |
---|
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove |
Method Detail |
---|
boolean calendarNameExists(String name) throws BusinessCalendarException, RemoteException
name
-
BusinessCalendarException
RemoteException
void createCalendar(CalendarDocument cDoc) throws BusinessCalendarException, RemoteException
cDoc
-
BusinessCalendarException
- if a calendar with the given name exists or of the document is not valid.
RemoteException
NullPointerException
- if cDoc is null.CalendarDocument getCalendar(String calendarName) throws BusinessCalendarException, RemoteException
calendarName
-
BusinessCalendarException
RemoteException
NullPointerException
- if calendarName is null.void updateCalendar(String oldCalendarName, CalendarDocument cDoc) throws BusinessCalendarException, RemoteException
oldCalendarName
- cDoc
-
BusinessCalendarException
- if the CalendarDocument indicates that this is a system calendar or if the
system calendar has the same name as this calendar or if the name is being updated and a calendar already exists
with that name.
RemoteException
NullPointerException
- if oldCalendarName or cDoc is null.void updateSystemCalendar(CalendarDocument cDoc) throws BusinessCalendarException, RemoteException
cDoc
-
BusinessCalendarException
RemoteException
NullPointerException
- if cDoc is null.void deleteCalendar(String calendarName) throws BusinessCalendarException, RemoteException
calendarName
-
BusinessCalendarException
RemoteException
NullPointerException
- if calendarName is null.void deleteCalendars(String[] names) throws BusinessCalendarException, RemoteException
names
- Names of the calendars to be deleted.
BusinessCalendarException
RemoteException
NullPointerException
- if names is null.boolean systemCalendarExists() throws BusinessCalendarException, RemoteException
BusinessCalendarException
RemoteException
CalendarDocument getSystemCalendar() throws BusinessCalendarException, RemoteException
BusinessCalendarException
RemoteException
String[] getAllCalendarNames() throws BusinessCalendarException, RemoteException
BusinessCalendarException
RemoteException
CalendarDocument[] getAllCalendars() throws BusinessCalendarException, RemoteException
BusinessCalendarException
RemoteException
void setUserCalendar(String userId, String calendarName) throws BusinessCalendarException, RemoteException
userId
- calendarName
-
BusinessCalendarException
RemoteException
NullPointerException
- if the userId passed is null.void unsetUserCalendar(String userId) throws BusinessCalendarException, RemoteException
userId
-
BusinessCalendarException
RemoteException
NullPointerException
- if the userId passed is null.CalendarDocument getUserCalendar(String userId) throws BusinessCalendarException, RemoteException
userId
-
BusinessCalendarException
RemoteException
NullPointerException
- if the userId passed is null.CalendarDocument getUserCalendarWalkHierarchy(String userId) throws BusinessCalendarException, RemoteException
userId
-
BusinessCalendarException
RemoteException
NullPointerException
- if the userId passed is null.void insertUserCalendarMapping(String userid, String calendarId) throws BusinessCalendarException, RemoteException
userid
- calendarId
-
BusinessCalendarException
RemoteException
NullPointerException
- if the userId passed is null.void setGroupCalendar(String groupId, String calendarName) throws BusinessCalendarException, RemoteException
groupId
- calendarName
-
BusinessCalendarException
RemoteException
NullPointerException
- if the groupId passed is null.void unsetGroupCalendar(String groupId) throws BusinessCalendarException, RemoteException
groupId
-
BusinessCalendarException
RemoteException
NullPointerException
- if the groupId passed is null.CalendarDocument getGroupCalendar(String groupId) throws BusinessCalendarException, RemoteException
groupId
-
BusinessCalendarException
RemoteException
NullPointerException
- if the groupId passed is null.CalendarDocument getGroupCalendarWalkHierarchy(String groupId) throws BusinessCalendarException, RemoteException
groupId
-
BusinessCalendarException
RemoteException
NullPointerException
- if the groupId passed is null.Date getNextFreeMinute(CalendarDocument cDoc, Date time) throws BusinessCalendarException, RemoteException
cDoc
- time
-
BusinessCalendarException
RemoteException
NullPointerException
- if cDoc is null.boolean isUserTimeFree(String userId, Date time) throws BusinessCalendarException, RemoteException
userId
- time
-
BusinessCalendarException
RemoteException
NullPointerException
- if userId is null.boolean isTimeFree(CalendarDocument cDoc, Date time) throws BusinessCalendarException, RemoteException
cDoc
- time
-
BusinessCalendarException
RemoteException
NullPointerException
- if the userId passed is null.AvailabilityInfo[] getAvailabilityForUser(String userId, Date startTime, Date endTime) throws BusinessCalendarException, RemoteException
userId
- The user whose calendar will be scanned for free time.startTime
- The earliest time that should be scanned for in the
calendar.endTime
- The latest time that should be scanned for in the
calendar.
BusinessCalendarException
RemoteException
AvailabilityInfo[] getAvailabilityForUserInGroups(String userId, String[] groups, Date startTime, Date endTime) throws BusinessCalendarException, RemoteException
userId
- The user whose calendar will be scanned for free time.startTime
- The earliest time that should be scanned for in the
calendar.endTime
- The latest time that should be scanned for in the
calendar.
BusinessCalendarException
RemoteException
AvailabilityInfo[] getAvailability(CalendarDocument cDoc, Date startTime, Date endTime) throws BusinessCalendarException, RemoteException
cDoc
- The calendar instance to scan for free time.startTime
- The earliest time that should be scanned for in the
calendar.endTime
- The latest time that should be scanned for in the
calendar.
BusinessCalendarException
RemoteException
Date addBusinessTime(String interval, String userOrGroupId, Date startTime) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.userOrGroupId
- startTime
-
RemoteException
NullPointerException
- if the userId passed is null.
BusinessCalendarException
- if the interval is improper.Date addBusinessTime(String interval, String userOrGroupId) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.userOrGroupId
-
RemoteException
NullPointerException
- if the userId passed is null.
BusinessCalendarException
- if the interval is improper.Date addBusinessTimeCalendarName(String interval, String calendarName) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.calendarName
-
RemoteException
BusinessCalendarException
- if the interval is improper.Date addBusinessTimeCalendarName(String interval, String calendarName, Date startTime) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.calendarName
- startTime
- If null defaults to current time.
RemoteException
BusinessCalendarException
- if the interval is improper.Date addExactTimeCalendarName(String interval, String calendarName, Date startTime) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.calendarName
- startTime
- If null defaults to current time.
RemoteException
BusinessCalendarException
- if the interval is improper.Date addBusinessTimeSystemCalendar(String interval, Date startTime) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.startTime
- If null defaults to current time.
RemoteException
BusinessCalendarException
- if the interval is improper.Date addBusinessTime(String interval, CalendarDocument cDoc) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.cDoc
- Must not be null
RemoteException
BusinessCalendarException
- if the cDoc passed is null, or the
interval is improper.Date addBusinessTime(String interval, CalendarDocument cDoc, Date startTime) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.cDoc
- Must not be nullstartTime
- If null defaults to current time
RemoteException
BusinessCalendarException
- if the cDoc passed is null, or the
interval is improper.Date subtractBusinessTime(String interval, String userOrGroupId, Date startTime) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.userOrGroupId
- startTime
- If null defaults to current time.
RemoteException
BusinessCalendarException
- if the interval is improper.Date subtractBusinessTime(String interval, String userOrGroupId) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.userOrGroupId
-
RemoteException
BusinessCalendarException
- if the interval is improper.Date subtractBusinessTimeCalendarName(String interval, String calendarName) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.calendarName
-
RemoteException
BusinessCalendarException
- if the interval is improper.Date subtractBusinessTimeCalendarName(String interval, String calendarName, Date startTime) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.calendarName
- startTime
- If null defaults to current time.
RemoteException
BusinessCalendarException
- if the interval is improper.Date subtractBusinessTimeSystemCalendar(String interval, Date startTime) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.startTime
- If null defaults to current time.
RemoteException
BusinessCalendarException
- if the interval is improper.Date subtractBusinessTime(String interval, CalendarDocument cDoc) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.cDoc
- Must not be null
RemoteException
BusinessCalendarException
- if the cDoc passed is null, or the
interval is improper.Date subtractBusinessTime(String interval, CalendarDocument cDoc, Date startTime) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported, in case string containts years, months or seconds
one might get an exception. If null, defaults to 0 minutes.cDoc
- Must not be nullstartTime
- If null defaults to current time
RemoteException
BusinessCalendarException
- if the cDoc passed is null, or the
interval is improper.Date getNextFreeMinute(CalendarDocument cDoc, Date time, String clientTz) throws BusinessCalendarException, RemoteException
cDoc
- time
- clientTz
-
BusinessCalendarException
RemoteException
boolean isUserTimeFree(String userId, Date time, String clientTz) throws BusinessCalendarException, RemoteException
userId
- time
- clientTz
-
BusinessCalendarException
RemoteException
boolean isTimeFree(CalendarDocument cDoc, Date time, String clientTz) throws BusinessCalendarException, RemoteException
cDoc
- time
- clientTz
-
BusinessCalendarException
RemoteException
Date addBusinessTime(String interval, String userOrGroupId, Date startTime, String clientTz) throws BusinessCalendarException, RemoteException
interval
- - a string in the format "d days, h hours, m minutes". e.g. "5 days", "5 days 2 minutes"
Note that only days, hours, and minutes are supported.interval
- userOrGroupId
- startTime
- clientTz
-
BusinessCalendarException
RemoteException
Date addBusinessTimeCalendarName(String interval, String calendarName, Date startTime, String clientTz) throws BusinessCalendarException, RemoteException
clientTz
-
BusinessCalendarException
RemoteException
Date findFutureFreeInterval(String interval, String calendarName, Date startTime) throws BusinessCalendarException, RemoteException
interval
- calendarName
- startTime
-
BusinessCalendarException
RemoteException
Date findFutureFreeInterval(String interval, String calendarName, Date startTime, String clientTz) throws BusinessCalendarException, RemoteException
interval
- calendarName
- startTime
- clientTz
-
BusinessCalendarException
RemoteException
Date addExactTimeCalendarName(String interval, String calendarName, Date startTime, String clientTz) throws BusinessCalendarException, RemoteException
interval
- calendarName
- startTime
- calendarName
- clientTz
-
BusinessCalendarException
RemoteException
Date addBusinessTimeSystemCalendar(String interval, Date startTime, String clientTz) throws BusinessCalendarException, RemoteException
interval
- startTime
- interval
- startTime
- clientTz
-
BusinessCalendarException
RemoteException
- /**
BusinessCalendarException
RemoteException
Date addBusinessTime(String interval, CalendarDocument cDoc, Date startTime, String clientTz) throws BusinessCalendarException, RemoteException
interval
- cDoc
- startTime
- clientTz
-
BusinessCalendarException
RemoteException
Date subtractBusinessTime(String interval, String userOrGroupId, Date startTime, String clientTz) throws BusinessCalendarException, RemoteException
interval
- userOrGroupId
- startTime
- clientTz
-
BusinessCalendarException
RemoteException
Date subtractBusinessTimeCalendarName(String interval, String calendarName, Date startTime, String clientTz) throws BusinessCalendarException, RemoteException
interval
- calendarName
- startTime
- clientTz
-
BusinessCalendarException
RemoteException
Date subtractBusinessTimeSystemCalendar(String interval, Date startTime, String clientTz) throws BusinessCalendarException, RemoteException
interval
- startTime
- clientTz
-
BusinessCalendarException
RemoteException
Date subtractBusinessTime(String interval, CalendarDocument cDoc, Date startTime, String clientTz) throws BusinessCalendarException, RemoteException
interval
- cDoc
- startTime
- clientTz
-
BusinessCalendarException
RemoteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |