|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.calendar.StandardCalendarService
This is a Lightweight service. It will implement the methods as specified in its interface to expose, or not as the case may be, portions of the underlaying WTCalendar. It will implement the Calendar Access Protocol (CAP) interface to talk to our local calendar store. The calculateDeadline methods are called by the Workflow package; and will use the base corporate calendar for activities with multiple participants. The user's calendar, if present, will be used for single participant activities - the corp. calendar will be used otherwise. Note that the user calendars are based upon the corp. calendar.
Use the newStandardCalendarService
static factory method(s),
not the StandardCalendarService
constructor, to construct
instances of this class. Instances must be constructed using the static
factory(s), in order to ensure proper initialization of the instance.
Supported API: false
Extendable: false
Nested Class Summary | |
(package private) class |
StandardCalendarService.AllManagersStartedEventListener
|
(package private) static class |
StandardCalendarService.CacheModFlusher
Top level inner class which signals cache modifications - creates and deletes |
Field Summary | |
private StandardCalendarService.AllManagersStartedEventListener |
allManagersStartedListener
|
private static boolean |
CALC_DEFAULTS
|
private CalendarAccessProtocol |
cap
|
private static String |
CLASSNAME
|
private static int[] |
days_in_month
|
private static int |
DEBUG
|
protected static TimeZone |
MSTZ
|
protected static int |
MSTZ_OFFSET
|
private static String |
NON_WORK_DAYS_OF_THE_WEEK
|
private ResourceBundle |
rb
|
private static String |
RESOURCE
|
static WTCalendar |
system_calendar
|
static WTPrincipalReference |
systemCalendarOwner
|
private static boolean |
VERBOSE
|
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardCalendarService()
|
Method Summary | |
Timestamp |
calculateDeadline(WTPrincipal user,
long start_date,
int nbrWorkDays)
Calculates the deadline from "start" that is "nbrWorkDays" hence for "user". |
Timestamp |
calculateDeadline(WTPrincipal user,
long start_date,
int nbrWorkDays,
int zone_offset)
Calculates the deadline from "start" that is "nbrWorkDays" hence for "user". |
Timestamp |
calculateDeadline(WTPrincipal user,
long start_date,
long duration)
Calculate and return the due date, as a Timestamp, for the "user" based upon the "start" date and expected "duration". |
Timestamp |
calculateDeadline(WTPrincipal user,
long start_date,
long duration,
int zone_offset)
Calculate and return the due date, as a Timestamp, for the "user" based upon the "start" date and expected "duration". |
Timestamp |
calculateDeadline(WTPrincipalReference user,
long start_date,
int nbrWorkDays)
Calculates the deadline from "start" that is "nbrWorkDays" hence for "user". |
Timestamp |
calculateDeadline(WTPrincipalReference user,
long start_date,
int nbrWorkDays,
int zone_offset)
Calculates the deadline from "start" that is "nbrWorkDays" hence for "user". |
Timestamp |
calculateDeadline(WTPrincipalReference user,
long start_date,
long duration)
Calculate and return the due date, as a Timestamp, for the "user" based upon the "start" date and expected "duration". |
Timestamp |
calculateDeadline(WTPrincipalReference user,
long start_date,
long duration,
int zone_offset)
Calculate and return the due date, as a Timestamp, for the "user" based upon the "start" date and expected "duration". |
int |
calculateWorkingDays(WTPrincipal user,
long start_date,
long end_date)
Calculate the number of working days for the user between start and end. |
int |
calculateWorkingDays(WTPrincipal user,
long start_date,
long end_date,
int zone_offset)
Calculate the number of working days for the user between start and end. |
int |
calculateWorkingDays(WTPrincipalReference user,
long start_date,
long end_date)
Calculate the number of working days for the user between start and end. |
int |
calculateWorkingDays(WTPrincipalReference user,
long start_date,
long end_date,
int zone_offset)
Calculate the number of working days for the user between start and end. |
int |
calculateWorkingPeriods(WTPrincipal user,
long start_date,
long end_date)
Calculate the number of workable 24-hour periods for the user between start and end dates, inclusive. |
int |
calculateWorkingPeriods(WTPrincipal user,
long start_date,
long end_date,
int zone_offset)
Calculate the number of workable 24-hour periods for the user between start and end dates, inclusive. |
int |
calculateWorkingPeriods(WTPrincipalReference user,
long start_date,
long end_date)
Calculate the number of workable 24-hour periods for the user between start and end dates, inclusive. |
int |
calculateWorkingPeriods(WTPrincipalReference user,
long start_date,
long end_date,
int zone_offset)
Calculate the number of workable 24-hour periods for the user between start and end dates, inclusive. |
boolean |
checkCyclicDelegate(WTPrincipalReference user,
WTPrincipalReference delegate,
long start_date,
long end_date)
|
CalendarMonth |
clearDays(WTPrincipalReference user,
long start_date,
long end_date,
boolean undelegate,
int zone_offset)
Resets the user's days specified between start and end back to that of the Windchill system calendar (note that delegation is also cleared). |
GregorianCalendar |
convert_long_ToCalendar(long l)
|
Timestamp |
convert_longToTimestamp(long l)
|
long |
convertCalendarTo_long(Calendar tmpCal)
|
Timestamp |
convertCalendarToTimestamp(Calendar tmpCal)
|
long |
convertTimestampTo_long(Timestamp t)
|
GregorianCalendar |
convertTimestampToCalendar(Timestamp t)
|
CalendarMonth |
getCalendarMonth(WTPrincipalReference user,
int month,
int year,
int zone_offset)
Note that to access the system calendar, the user parm would need to be the WTPrincipalReference for the WTGroup assigned in the wt.properties file to the property wt.admin.adminGroup. |
String |
getConceptualClassname()
Deprecated. |
WTPrincipalReference |
getDelegate(WTPrincipalReference user,
long start_date,
long end_date)
Passed the reference to a WTPrincipal to check if delegation exists for the period of time from start-end. |
WTUser |
getDelegate(WTUser user,
long start_date,
long end_date)
Passed the reference to a WTUser to check if delegation exists for the period of time from start-end. |
static StandardCalendarService |
newStandardCalendarService()
Default factory for the class. |
protected void |
performStartupProcess()
Dummy method to be overridden by subclasses. |
private void |
removeFromCache(WTCalendar userCalendar)
|
private void |
removeFromCache(WTPrincipalReference prinRef)
|
CalendarMonth |
setDelegatedDays(WTPrincipalReference user,
WTPrincipalReference delegate,
long start_date,
long end_date,
int zone_offset)
Sets the user's days specified between start and end as delegated to the "delegate" passed in. |
CalendarMonth |
setDelegateIndefinitely(WTPrincipalReference user,
WTPrincipalReference delegate,
long start_date,
int zone_offset)
Sets the delegation for this user to "delegate" and begin on "start". |
CalendarMonth |
setNonWorkDays(WTPrincipalReference user,
long start_date,
long end_date,
int zone_offset)
Sets the user's days specified between start and end as Non-Working Days. |
CalendarMonth |
setWorkDays(WTPrincipalReference user,
long start_date,
long end_date,
int zone_offset)
Sets the user's days specified between start and end as Working Days. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static WTCalendar system_calendar
public static WTPrincipalReference systemCalendarOwner
protected static TimeZone MSTZ
protected static int MSTZ_OFFSET
private CalendarAccessProtocol cap
private static boolean VERBOSE
private static boolean CALC_DEFAULTS
private static int DEBUG
private static String NON_WORK_DAYS_OF_THE_WEEK
private static int[] days_in_month
private ResourceBundle rb
private StandardCalendarService.AllManagersStartedEventListener allManagersStartedListener
Constructor Detail |
public StandardCalendarService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
public static StandardCalendarService newStandardCalendarService() throws WTException
WTException
public CalendarMonth setWorkDays(WTPrincipalReference user, long start_date, long end_date, int zone_offset) throws WTException
setWorkDays
in interface CalendarService
user
- start_date
- end_date
- zone_offset
-
WTException
public CalendarMonth setNonWorkDays(WTPrincipalReference user, long start_date, long end_date, int zone_offset) throws WTException
setNonWorkDays
in interface CalendarService
user
- start_date
- end_date
- zone_offset
-
WTException
public CalendarMonth setDelegatedDays(WTPrincipalReference user, WTPrincipalReference delegate, long start_date, long end_date, int zone_offset) throws WTException
setDelegatedDays
in interface CalendarService
user
- delegate
- start_date
- end_date
- zone_offset
-
WTException
public CalendarMonth setDelegateIndefinitely(WTPrincipalReference user, WTPrincipalReference delegate, long start_date, int zone_offset) throws WTException
setDelegateIndefinitely
in interface CalendarService
user
- delegate
- start_date
- zone_offset
-
WTException
public CalendarMonth clearDays(WTPrincipalReference user, long start_date, long end_date, boolean undelegate, int zone_offset) throws WTException
clearDays
in interface CalendarService
user
- start_date
- end_date
- undelegate
- zone_offset
-
WTException
public CalendarMonth getCalendarMonth(WTPrincipalReference user, int month, int year, int zone_offset) throws WTException
getCalendarMonth
in interface CalendarService
user
- month
- year
- zone_offset
-
WTException
public Timestamp calculateDeadline(WTPrincipal user, long start_date, long duration) throws WTException
calculateDeadline
in interface CalendarService
user
- start_date
- duration
-
WTException
public Timestamp calculateDeadline(WTPrincipalReference user, long start_date, long duration) throws WTException
calculateDeadline
in interface CalendarService
user
- start_date
- duration
-
WTException
public Timestamp calculateDeadline(WTPrincipal user, long start_date, int nbrWorkDays) throws WTException
calculateDeadline
in interface CalendarService
user
- start_date
- nbrWorkDays
-
WTException
public Timestamp calculateDeadline(WTPrincipalReference user, long start_date, int nbrWorkDays) throws WTException
calculateDeadline
in interface CalendarService
user
- start_date
- nbrWorkDays
-
WTException
public int calculateWorkingDays(WTPrincipal user, long start_date, long end_date) throws WTException
calculateWorkingDays
in interface CalendarService
user
- start_date
- end_date
-
WTException
public int calculateWorkingDays(WTPrincipalReference user, long start_date, long end_date) throws WTException
calculateWorkingDays
in interface CalendarService
user
- start_date
- end_date
-
WTException
public WTUser getDelegate(WTUser user, long start_date, long end_date) throws WTException
getDelegate
in interface CalendarService
user
- start_date
- end_date
-
WTException
public WTPrincipalReference getDelegate(WTPrincipalReference user, long start_date, long end_date) throws WTException
getDelegate
in interface CalendarService
user
- start_date
- end_date
-
WTException
public int calculateWorkingPeriods(WTPrincipal user, long start_date, long end_date) throws WTException
calculateWorkingPeriods
in interface CalendarService
user
- start_date
- end_date
-
WTException
public int calculateWorkingPeriods(WTPrincipalReference user, long start_date, long end_date) throws WTException
calculateWorkingPeriods
in interface CalendarService
user
- start_date
- end_date
-
WTException
public int calculateWorkingDays(WTPrincipal user, long start_date, long end_date, int zone_offset) throws WTException
calculateWorkingDays
in interface CalendarService
user
- start_date
- end_date
- zone_offset
-
WTException
public int calculateWorkingDays(WTPrincipalReference user, long start_date, long end_date, int zone_offset) throws WTException
calculateWorkingDays
in interface CalendarService
user
- start_date
- end_date
- zone_offset
-
WTException
public int calculateWorkingPeriods(WTPrincipal user, long start_date, long end_date, int zone_offset) throws WTException
calculateWorkingPeriods
in interface CalendarService
user
- start_date
- end_date
- zone_offset
-
WTException
public int calculateWorkingPeriods(WTPrincipalReference user, long start_date, long end_date, int zone_offset) throws WTException
calculateWorkingPeriods
in interface CalendarService
user
- start_date
- end_date
- zone_offset
-
WTException
public Timestamp calculateDeadline(WTPrincipal user, long start_date, long duration, int zone_offset) throws WTException
calculateDeadline
in interface CalendarService
user
- start_date
- duration
- zone_offset
-
WTException
public Timestamp calculateDeadline(WTPrincipalReference user, long start_date, long duration, int zone_offset) throws WTException
calculateDeadline
in interface CalendarService
user
- start_date
- duration
- zone_offset
-
WTException
public Timestamp calculateDeadline(WTPrincipal user, long start_date, int nbrWorkDays, int zone_offset) throws WTException
calculateDeadline
in interface CalendarService
user
- start_date
- nbrWorkDays
- zone_offset
-
WTException
public Timestamp calculateDeadline(WTPrincipalReference user, long start_date, int nbrWorkDays, int zone_offset) throws WTException
calculateDeadline
in interface CalendarService
user
- start_date
- nbrWorkDays
- zone_offset
-
WTException
protected void performStartupProcess() throws ManagerException
StandardManager
performStartupProcess
in class StandardManager
ManagerException
public GregorianCalendar convertTimestampToCalendar(Timestamp t)
public Timestamp convertCalendarToTimestamp(Calendar tmpCal)
public long convertTimestampTo_long(Timestamp t)
public Timestamp convert_longToTimestamp(long l)
public long convertCalendarTo_long(Calendar tmpCal)
public GregorianCalendar convert_long_ToCalendar(long l)
public boolean checkCyclicDelegate(WTPrincipalReference user, WTPrincipalReference delegate, long start_date, long end_date)
private void removeFromCache(WTPrincipalReference prinRef) throws WTException
WTException
private void removeFromCache(WTCalendar userCalendar) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |