public interface CalendarFormattingSession extends OsidSession
This session defines methods to format and parse date times of the calendar and time type defined.
Modifier and Type | Method and Description |
---|---|
boolean |
canDisplayPrimitives()
Tests if this user can format and parse date times.
|
java.lang.String[] |
datetimesToStrings(DateTimeList datetimes)
Gets a string representation of a list of datetimes.
|
java.lang.String |
datetimeToString(DateTime datetime)
Gets a string representation of a datetime.
|
java.lang.String[] |
durationsToStrings(DurationList durations)
Gets a string representation of a list of durations.
|
java.lang.String |
durationToString(Duration duration)
Gets a string representation of a duration.
|
Type |
getCalendarType()
Gets the calendar type for the datetimes used in this session.
|
Type |
getDateFormatType()
Gets the date format type used in this session.
|
Type |
getTimeFormatType()
Gets the time format type used in this session.
|
Type |
getTimeType()
Gets the time type for the times used in this session.
|
DateTime |
stringToDateTime(java.lang.String s)
Parses a date time string.
|
Duration |
stringToDuration(java.lang.String s)
Parses a duration string.
|
Time |
stringToTime(java.lang.String s)
Parses a time string.
|
java.lang.String[] |
timesToStrings(TimeList times)
Gets a string representation of a list of times.
|
java.lang.String |
timeToString(Time time)
Gets a string representation of a time.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Type getCalendarType()
mandatory
- This method must be implemented. Type getTimeType()
mandatory
- This method must be implemented. Type getDateFormatType()
mandatory
- This method must be implemented. Type getTimeFormatType()
mandatory
- This method must be implemented. boolean canDisplayPrimitives()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer lookup operations. false
if translation methods are not
authorized, true
otherwisemandatory
- This method must be implemented. java.lang.String datetimeToString(DateTime datetime) throws OperationFailedException, PermissionDeniedException
datetime
- a datetime valueInvalidArgumentException
-
datetime.getCalendarType() != getCalendarType()
or
datetime.getTimeType() != getTimeType()
NullArgumentException
- datetime
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. java.lang.String[] datetimesToStrings(DateTimeList datetimes) throws OperationFailedException, PermissionDeniedException
datetimes
- a datetime value listInvalidArgumentException
-
datetime.getCalendarType() != getCalendarType()
or
datetime.getTimeType() != getTimeType()
NullArgumentException
- datetimes
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DateTime stringToDateTime(java.lang.String s) throws OperationFailedException, PermissionDeniedException
s
- a datetime stringInvalidArgumentException
- s
is not of
getDateFormatType()
or s
is not
of getTimeFormatType()
NullArgumentException
- s
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. java.lang.String timeToString(Time time) throws OperationFailedException, PermissionDeniedException
time
- a time valueInvalidArgumentException
- time.getTimeType() !=
getTimeType()
NullArgumentException
- time
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. java.lang.String[] timesToStrings(TimeList times) throws OperationFailedException, PermissionDeniedException
times
- a time value listInvalidArgumentException
- time.getTimeType()
!= getTimeType()
NullArgumentException
- times
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. Time stringToTime(java.lang.String s) throws OperationFailedException, PermissionDeniedException
s
- a time stringInvalidArgumentException
- s
is not of
getTimeFormatType()
NullArgumentException
- s
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. java.lang.String durationToString(Duration duration) throws OperationFailedException, PermissionDeniedException
duration
- a duration valueInvalidArgumentException
-
duration.getCalendarType() !=
getCalendarType()
or duration.getTimeType() != getTimeType()
NullArgumentException
- duration
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. java.lang.String[] durationsToStrings(DurationList durations) throws OperationFailedException, PermissionDeniedException
durations
- a duration value listInvalidArgumentException
-
duration.getCalendarType() !=
getCalendarType()
or duration.getTimeType() != getTimeType()
NullArgumentException
- durations
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. Duration stringToDuration(java.lang.String s) throws OperationFailedException, PermissionDeniedException
s
- a duration stringInvalidArgumentException
- s
is not of
getDateFormatType()
or s
is not
of getTimeFormatType()
NullArgumentException
- s
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.