public interface CalendarConversionSession extends OsidSession
This session defines methods to convert dates across calendar systems.
Modifier and Type | Method and Description |
---|---|
boolean |
canConvertCalendars()
Tests if this user can perform calendar conversions.
|
DateTime |
convertCalendar(DateTime sourceDate)
Converts a date.
|
DateTimeList |
convertCalendars(DateTimeList sourceDateList)
Converts dates.
|
Type |
getSourceCalendarType()
Gets the source calendar type used in this session.
|
Type |
getSourceTimeType()
Gets the source time type used in this session.
|
Type |
getTargetCalendarType()
Gets the target calendar type used in this session.
|
Type |
getTargetTimeType()
Gets the target time type used in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Type getSourceCalendarType()
mandatory
- This method must be implemented. Type getSourceTimeType()
mandatory
- This method must be implemented. Type getTargetCalendarType()
mandatory
- This method must be implemented. Type getTargetTimeType()
mandatory
- This method must be implemented. boolean canConvertCalendars()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer lookup operations. false
if conversion methods are not authorized,
true
otherwisemandatory
- This method must be implemented. DateTime convertCalendar(DateTime sourceDate) throws OperationFailedException, PermissionDeniedException
sourceDate
- the date to convertInvalidArgumentException
-
sourceDate.getCalendarType() != getSourceCalendarType()
or sourceDate.getTimeType() !=
getSourceTimeType()
NullArgumentException
- sourceDate
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DateTimeList convertCalendars(DateTimeList sourceDateList) throws OperationFailedException, PermissionDeniedException
sourceDateList
- the dates to convertInvalidArgumentException
-
sourceDate.getCalendarType() != getSourceCalendarType()
or sourceDate.getTimeType() !=
getSourceTimeType()
NullArgumentException
- sourceDateList
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.