wt.calendar
Class CalendarServiceFwd

java.lang.Object
  extended bywt.calendar.CalendarServiceFwd
All Implemented Interfaces:
CalendarService, RemoteAccess, Serializable

public class CalendarServiceFwd
extends Object
implements RemoteAccess, CalendarService, Serializable

This is the remote interface for the lightweight standard calendar service. A magdog forwarder will be automagically generated for it.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String FC_RESOURCE
           
(package private) static boolean SERVER
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
CalendarServiceFwd()
           
 
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.
 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).
 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.
 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.
private static Manager getManager()
           
 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, toString, wait, wait, wait
 

Field Detail

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

CalendarServiceFwd

public CalendarServiceFwd()
Method Detail

getManager

private static Manager getManager()
                           throws WTException
Returns:
Manager
Throws:
WTException

setWorkDays

public CalendarMonth setWorkDays(WTPrincipalReference user,
                                 long start_date,
                                 long end_date,
                                 int zone_offset)
                          throws WTException
Sets the user's days specified between start and end as Working Days. It returns a new copy of the user's CalendarMonth for the client to display. We use long values here so that Java doesn't attempt to translate time zones during deserialization. This is similar to what is done in other portions of Windchill for the same purpose.

Supported API: false

Specified by:
setWorkDays in interface CalendarService
Parameters:
user -
start_date -
end_date -
zone_offset -
Returns:
CalendarMonth
Throws:
WTException

setNonWorkDays

public CalendarMonth setNonWorkDays(WTPrincipalReference user,
                                    long start_date,
                                    long end_date,
                                    int zone_offset)
                             throws WTException
Sets the user's days specified between start and end as Non-Working Days. It returns a new copy of the user's CalendarMonth for the client to display. We use long values here so that Java doesn't attempt to translate time zones during deserialization. This is similar to what is done in other portions of Windchill for the same purpose.

Supported API: false

Specified by:
setNonWorkDays in interface CalendarService
Parameters:
user -
start_date -
end_date -
zone_offset -
Returns:
CalendarMonth
Throws:
WTException

setDelegatedDays

public CalendarMonth setDelegatedDays(WTPrincipalReference user,
                                      WTPrincipalReference delegate,
                                      long start_date,
                                      long end_date,
                                      int zone_offset)
                               throws WTException
Sets the user's days specified between start and end as delegated to the "delegate" passed in. It returns a new copy of the user's CalendarMonth for the client to display. If a NULL is passed in the delegate parm, it is interpreted to mean clear the date range of delegation. We use long values here so that Java doesn't attempt to translate time zones during deserialization. This is similar to what is done in other portions of Windchill for the same purpose.

Supported API: false

Specified by:
setDelegatedDays in interface CalendarService
Parameters:
user -
delegate -
start_date -
end_date -
zone_offset -
Returns:
CalendarMonth
Throws:
WTException

setDelegateIndefinitely

public CalendarMonth setDelegateIndefinitely(WTPrincipalReference user,
                                             WTPrincipalReference delegate,
                                             long start_date,
                                             int zone_offset)
                                      throws WTException
Sets the delegation for this user to "delegate" and begin on "start". The delegation will continue indefinitely, or until the delegation is removed. It returns a new copy of the user's CalendarMonth for the client to display. If a NULL is passed in the delegate parm, it is interpreted to mean clear the delegation. We use long values here so that Java doesn't attempt to translate time zones during deserialization. This is similar to what is done in other portions of Windchill for the same purpose.

Supported API: false

Specified by:
setDelegateIndefinitely in interface CalendarService
Parameters:
user -
delegate -
start_date -
zone_offset -
Returns:
CalendarMonth
Throws:
WTException

clearDays

public CalendarMonth clearDays(WTPrincipalReference user,
                               long start_date,
                               long end_date,
                               boolean undelegate,
                               int zone_offset)
                        throws WTException
Resets the user's days specified between start and end back to that of the Windchill system calendar (note that delegation is also cleared). It returns a new copy of the user's CalendarMonth for the client to display. We use long values here so that Java doesn't attempt to translate time zones during deserialization. This is similar to what is done in other portions of Windchill for the same purpose.

Supported API: false

Specified by:
clearDays in interface CalendarService
Parameters:
user -
start_date -
end_date -
undelegate -
zone_offset -
Returns:
CalendarMonth
Throws:
WTException

getCalendarMonth

public CalendarMonth getCalendarMonth(WTPrincipalReference user,
                                      int month,
                                      int year,
                                      int zone_offset)
                               throws WTException
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.

Supported API: false

Specified by:
getCalendarMonth in interface CalendarService
Parameters:
user -
month -
year -
zone_offset -
Returns:
CalendarMonth
Throws:
WTException

calculateDeadline

public Timestamp calculateDeadline(WTPrincipal user,
                                   long start_date,
                                   long duration)
                            throws WTException
Calculate and return the due date, as a Timestamp, for the "user" based upon the "start" date and expected "duration".

Supported API: false

Specified by:
calculateDeadline in interface CalendarService
Parameters:
user -
start_date -
duration -
Returns:
Timestamp
Throws:
WTException

calculateDeadline

public Timestamp calculateDeadline(WTPrincipalReference user,
                                   long start_date,
                                   long duration)
                            throws WTException
Calculate and return the due date, as a Timestamp, for the "user" based upon the "start" date and expected "duration".

Supported API: false

Specified by:
calculateDeadline in interface CalendarService
Parameters:
user -
start_date -
duration -
Returns:
Timestamp
Throws:
WTException

calculateDeadline

public Timestamp calculateDeadline(WTPrincipal user,
                                   long start_date,
                                   int nbrWorkDays)
                            throws WTException
Calculates the deadline from "start" that is "nbrWorkDays" hence for "user". Returns the date as a Timestamp.

Supported API: false

Specified by:
calculateDeadline in interface CalendarService
Parameters:
user -
start_date -
nbrWorkDays -
Returns:
Timestamp
Throws:
WTException

calculateDeadline

public Timestamp calculateDeadline(WTPrincipalReference user,
                                   long start_date,
                                   int nbrWorkDays)
                            throws WTException
Calculates the deadline from "start" that is "nbrWorkDays" hence for "user". Returns the date as a Timestamp.

Supported API: false

Specified by:
calculateDeadline in interface CalendarService
Parameters:
user -
start_date -
nbrWorkDays -
Returns:
Timestamp
Throws:
WTException

calculateWorkingDays

public int calculateWorkingDays(WTPrincipal user,
                                long start_date,
                                long end_date)
                         throws WTException
Calculate the number of working days for the user between start and end. Return number of days as integer. If the administrators group is passed in, calculation is based on system calendar.

Supported API: false

Specified by:
calculateWorkingDays in interface CalendarService
Parameters:
user -
start_date -
end_date -
Returns:
int
Throws:
WTException

calculateWorkingDays

public int calculateWorkingDays(WTPrincipalReference user,
                                long start_date,
                                long end_date)
                         throws WTException
Calculate the number of working days for the user between start and end. Return number of days as integer. If the administrators group is passed in, calculation is based on system calendar.

Supported API: false

Specified by:
calculateWorkingDays in interface CalendarService
Parameters:
user -
start_date -
end_date -
Returns:
int
Throws:
WTException

getDelegate

public WTUser getDelegate(WTUser user,
                          long start_date,
                          long end_date)
                   throws WTException
Passed the reference to a WTUser to check if delegation exists for the period of time from start-end. Returns the WTPrincipalReference of the delegate, or NULL of none is present.

Supported API: false

Specified by:
getDelegate in interface CalendarService
Parameters:
user -
start_date -
end_date -
Returns:
WTUser
Throws:
WTException

getDelegate

public WTPrincipalReference getDelegate(WTPrincipalReference user,
                                        long start_date,
                                        long end_date)
                                 throws WTException
Passed the reference to a WTPrincipal to check if delegation exists for the period of time from start-end. Returns the WTPrincipalReference of the delegate, or NULL of none is present.

Supported API: false

Specified by:
getDelegate in interface CalendarService
Parameters:
user -
start_date -
end_date -
Returns:
WTPrincipalReference
Throws:
WTException

calculateWorkingPeriods

public int calculateWorkingPeriods(WTPrincipal user,
                                   long start_date,
                                   long end_date)
                            throws WTException
Calculate the number of workable 24-hour periods for the user between start and end dates, inclusive. Return number of periods as integer. If the administrators group is passed in, the calculation is based on system calendar. The start and end dates will be truncated to full seconds - fractional seconds will be dropped.

Supported API: false

Specified by:
calculateWorkingPeriods in interface CalendarService
Parameters:
user -
start_date -
end_date -
Returns:
int
Throws:
WTException

calculateWorkingPeriods

public int calculateWorkingPeriods(WTPrincipalReference user,
                                   long start_date,
                                   long end_date)
                            throws WTException
Calculate the number of workable 24-hour periods for the user between start and end dates, inclusive. Return number of periods as integer. If the administrators group is passed in, the calculation is based on system calendar. The start and end dates will be truncated to full seconds - fractional seconds will be dropped.

Supported API: false

Specified by:
calculateWorkingPeriods in interface CalendarService
Parameters:
user -
start_date -
end_date -
Returns:
int
Throws:
WTException

calculateWorkingDays

public int calculateWorkingDays(WTPrincipal user,
                                long start_date,
                                long end_date,
                                int zone_offset)
                         throws WTException
Calculate the number of working days for the user between start and end. Return number of days as integer. If the administrators group is passed in, calculation is based on system calendar.

Supported API: false

Specified by:
calculateWorkingDays in interface CalendarService
Parameters:
user -
start_date -
end_date -
zone_offset -
Returns:
int
Throws:
WTException

calculateWorkingDays

public int calculateWorkingDays(WTPrincipalReference user,
                                long start_date,
                                long end_date,
                                int zone_offset)
                         throws WTException
Calculate the number of working days for the user between start and end. Return number of days as integer. If the administrators group is passed in, calculation is based on system calendar.

Supported API: false

Specified by:
calculateWorkingDays in interface CalendarService
Parameters:
user -
start_date -
end_date -
zone_offset -
Returns:
int
Throws:
WTException

calculateWorkingPeriods

public int calculateWorkingPeriods(WTPrincipal user,
                                   long start_date,
                                   long end_date,
                                   int zone_offset)
                            throws WTException
Calculate the number of workable 24-hour periods for the user between start and end dates, inclusive. Return number of periods as integer. If the administrators group is passed in, the calculation is based on system calendar. The start and end dates will be truncated to full seconds - fractional seconds will be dropped.

Supported API: false

Specified by:
calculateWorkingPeriods in interface CalendarService
Parameters:
user -
start_date -
end_date -
zone_offset -
Returns:
int
Throws:
WTException

calculateWorkingPeriods

public int calculateWorkingPeriods(WTPrincipalReference user,
                                   long start_date,
                                   long end_date,
                                   int zone_offset)
                            throws WTException
Calculate the number of workable 24-hour periods for the user between start and end dates, inclusive. Return number of periods as integer. If the administrators group is passed in, the calculation is based on system calendar. The start and end dates will be truncated to full seconds - fractional seconds will be dropped.

Supported API: false

Specified by:
calculateWorkingPeriods in interface CalendarService
Parameters:
user -
start_date -
end_date -
zone_offset -
Returns:
int
Throws:
WTException

calculateDeadline

public Timestamp calculateDeadline(WTPrincipal user,
                                   long start_date,
                                   long duration,
                                   int zone_offset)
                            throws WTException
Calculate and return the due date, as a Timestamp, for the "user" based upon the "start" date and expected "duration".

Supported API: false

Specified by:
calculateDeadline in interface CalendarService
Parameters:
user -
start_date -
duration -
zone_offset -
Returns:
Timestamp
Throws:
WTException

calculateDeadline

public Timestamp calculateDeadline(WTPrincipalReference user,
                                   long start_date,
                                   long duration,
                                   int zone_offset)
                            throws WTException
Calculate and return the due date, as a Timestamp, for the "user" based upon the "start" date and expected "duration".

Supported API: false

Specified by:
calculateDeadline in interface CalendarService
Parameters:
user -
start_date -
duration -
zone_offset -
Returns:
Timestamp
Throws:
WTException

calculateDeadline

public Timestamp calculateDeadline(WTPrincipal user,
                                   long start_date,
                                   int nbrWorkDays,
                                   int zone_offset)
                            throws WTException
Calculates the deadline from "start" that is "nbrWorkDays" hence for "user". Returns the date as a Timestamp.

Supported API: false

Specified by:
calculateDeadline in interface CalendarService
Parameters:
user -
start_date -
nbrWorkDays -
zone_offset -
Returns:
Timestamp
Throws:
WTException

calculateDeadline

public Timestamp calculateDeadline(WTPrincipalReference user,
                                   long start_date,
                                   int nbrWorkDays,
                                   int zone_offset)
                            throws WTException
Calculates the deadline from "start" that is "nbrWorkDays" hence for "user". Returns the date as a Timestamp.

Supported API: false

Specified by:
calculateDeadline in interface CalendarService
Parameters:
user -
start_date -
nbrWorkDays -
zone_offset -
Returns:
Timestamp
Throws:
WTException