public interface RecurringEventAdminSession extends OsidSession
This session creates, updates, and deletes RecurringEvents.
The data for create and update is provided by the consumer via the
form object. OsidForms are requested for each create or
update and may not be reused.
Create and update operations differ in their usage. To create a
RecurringEvent, a RecurringEventForm is requested
using getRecurringEventFormForCreate() specifying the
desired relationship peers and record Types or none if no
record Types are needed. The returned
RecurringEventForm will indicate that it is to be used with a
create operation and can be used to examine metdata or validate data prior
to creation. Once the RecurringEventForm is submiited to a
create operation, it cannot be reused with another create operation unless
the first operation was unsuccessful. Each RecurringEventForm
corresponds to an attempted transaction.
For updates, RecurringEventForms are requested to the
RecurringEvent Id that is to be updated
using getRecurringEventFormForUpdate(). Similarly, the
RecurringEventForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
RecurringEventForm can only be used once for a successful
update and cannot be reused.
The delete operations delete Recurring Events. To unmap
a RecurringEvent from the current Calendar,
the RecurringEventCalendarAssignmentSession should be used.
These delete operations attempt to remove the Event itself
thus removing it from all known Calendar catalogs.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
addBlackout(Id recurringEventId,
DateTime from,
DateTime to)
Adds a blackout to the given recurring event that blocks events in the
series.
|
void |
addEvent(Id recurringEventId,
Id eventId)
Adds another event as part of this recurring event.
|
Id |
addSchedule(Id recurringEventId,
Id scheduleId)
Adds a schedule to the given recurring event.
|
void |
addSpecificDate(Id recurringEventId,
DateTime date,
DisplayText locationDescription)
Adds a specific date to the given recurring event.
|
void |
addSpecificDateWithLocation(Id recurringEventId,
DateTime date,
Id locationId)
Adds a specific date to the given recurring event.
|
void |
aliasRecurringEvent(Id recurringEventId,
Id aliasId)
Adds an
Id to a RecurringEvent for the
purpose of creating compatibility. |
boolean |
canCreateRecurringEvents()
Tests if this user can create
RecurringEvents. |
boolean |
canCreateRecurringEventWithRecordTypes(Type[] recurringEventRecordTypes)
Tests if this user can create a single
RecurringEvent
using the desired record types. |
boolean |
canDeleteRecurringEvents()
Tests if this user can delete
RecurringEvents. |
boolean |
canManageRecurringEventAliases()
Tests if this user can manage
Id aliases for
RecurringEvents. |
boolean |
canScheduleRecurringEvents()
Tests if this user can schedule recurring events.
|
boolean |
canUpdateRecurringEvents()
Tests if this user can update
RecurringEvents. |
void |
clearBlackout(Id recurringEventId,
DateTime from,
DateTime to)
Clears any blackouts between the given dates inclusive.
|
void |
clearSpecificDates(Id recurringEventId,
DateTime from,
DateTime to)
Clears any specific dates between the given dates inclusive.
|
RecurringEvent |
createRecurringEvent(RecurringEventForm recurringEventForm)
Creates a new
RecurringEvent. |
void |
deleteRecurringEvent(Id recurringEventId)
Deletes the
RecurringEvent identified by the given
Id. |
Calendar |
getCalendar()
Gets the
Calendar associated with this session. |
Id |
getCalendarId()
Gets the
Calendar Id associated with
this session. |
RecurringEventForm |
getRecurringEventFormForCreate(Type[] recurringEventRecordTypes)
Gets the recurring event form for creating new recurring events.
|
RecurringEventForm |
getRecurringEventFormForUpdate(Id recurringEventId)
Gets the recurring event form for updating an existing recurring
event.
|
void |
removeEvent(Id recurringEventId,
Id eventId)
Removes an event as part of this recurring event.
|
void |
removeSchedule(Id recurringEventId,
Id scheduleId)
Removes a schedule from a given recurring event.
|
void |
updateRecurringEvent(RecurringEventForm recurringEventForm)
Updates an existing recurring event.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getCalendarId()
Calendar Id associated with
this session. Calendar Id associated with this sessionmandatory - This method must be implemented. Calendar getCalendar() throws OperationFailedException, PermissionDeniedException
Calendar associated with this session. Calendar associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateRecurringEvents()
RecurringEvents. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known creating a RecurringEvent
will result in a PERMISSION_DENIED. This is intended as
a hint to an application that may opt not to offer create operations
to an unauthorized user. false if RecurringEvent creation
is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateRecurringEventWithRecordTypes(Type[] recurringEventRecordTypes)
RecurringEvent
using the desired record types. While
CalendaringManager.getRecurringEventRecordTypes() can be used
to examine which records are supported, this method tests which
record(s) are required for creating a specific RecurringEvent.
Providing an empty array tests if a RecurringEvent
can be created with no records.recurringEventRecordTypes - array of recurring event types true if RecurringEvent creation
using the specified record Types is supported,
false otherwiseNullArgumentException -
recurringEventRecordTypes is null mandatory - This method must be implemented. RecurringEventForm getRecurringEventFormForCreate(Type[] recurringEventRecordTypes) throws OperationFailedException, PermissionDeniedException
recurringEventRecordTypes - array of recurring event typesNullArgumentException -
recurringEventRecordTypes is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. RecurringEvent createRecurringEvent(RecurringEventForm recurringEventForm) throws OperationFailedException, PermissionDeniedException
RecurringEvent. recurringEventForm - the form for this RecurringEvent
RecurringEvent IllegalStateException - recurringEventForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - recurringEventForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - recurringEventForm
did not originate in a create transactionmandatory - This method must be implemented. boolean canUpdateRecurringEvents()
RecurringEvents. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known updating a RecurringEvent
will result in a PERMISSION_DENIED. This is intended as
a hint to an application that may opt not to offer update operations
to an unauthorized user. false if recurring event modification is not
authorized, true otherwisemandatory - This method must be implemented. RecurringEventForm getRecurringEventFormForUpdate(Id recurringEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException
recurringEventId - the Id of the
RecurringEvent NotFoundException - recurringEventId is
not foundNullArgumentException - recurringEventId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateRecurringEvent(RecurringEventForm recurringEventForm) throws OperationFailedException, PermissionDeniedException
recurringEventForm - the form containing the elements to be
updatedIllegalStateException - recurringEventForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - recurringEventForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - recurringEventForm
did not originate in an update transactionmandatory - This method must be implemented. boolean canDeleteRecurringEvents()
RecurringEvents. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known deleting a RecurringEvent
will result in a PERMISSION_DENIED. This is intended as
a hint to an application that may opt not to offer delete operations
to an unauthorized user. false if RecurringEvent deletion
is not authorized, true otherwisemandatory - This method must be implemented. void deleteRecurringEvent(Id recurringEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException
RecurringEvent identified by the given
Id. recurringEventId - the Id of the
RecurringEvent to deleteNotFoundException - a RecurringEvent was
not found identified by the given Id NullArgumentException - recurringEventId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageRecurringEventAliases()
Id aliases for
RecurringEvents. A return of true does not guarantee
successful authorization. A return of false indicates that it is known
changing an alias will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not to offer
alias operations to an unauthorized user. false if RecurringEvent aliasing
is not authorized, true otherwisemandatory - This method must be implemented. void aliasRecurringEvent(Id recurringEventId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a RecurringEvent for the
purpose of creating compatibility. The primary Id of
the RecurringEvent is determined by the provider. The
new Id performs as an alias to the primary Id.
If the alias is a pointer to another recurring event, it is
reassigned to the given recurring event Id. recurringEventId - the Id of a
RecurringEvent aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - recurringEventId not
foundNullArgumentException - recurringEventId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canScheduleRecurringEvents()
PERMISSION_DENIED. This is intended as
a hint to an application that may opt not to offer create operations
to an unauthorized user. false if recurring event scheduling is not
authorized, true otherwisemandatory - This method must be implemented. Id addSchedule(Id recurringEventId, Id scheduleId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
recurringEventId - a recurring event Id scheduleId - a schedule Id Id of the scheduleAlreadyExistsException - schedule is already part of
recurring eventNotFoundException - recurringEventId or
scheduleId is not foundNullArgumentException - recurringEventId
or scheduleId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void removeSchedule(Id recurringEventId, Id scheduleId) throws NotFoundException, OperationFailedException, PermissionDeniedException
recurringEventId - a recurring event Id scheduleId - the schedule Id NotFoundException - schedule not part of recurring
eventNullArgumentException - recurringEventId
or scheduleId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void addSpecificDate(Id recurringEventId, DateTime date, DisplayText locationDescription) throws NotFoundException, OperationFailedException, PermissionDeniedException
recurringEventId - a recurring event Id date - a datelocationDescription - location descriptionNotFoundException - recurringEventId is
not foundNullArgumentException - recurringEventId, date
, or locationDescription is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void addSpecificDateWithLocation(Id recurringEventId, DateTime date, Id locationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
recurringEventId - a recurring event Id date - a datelocationId - a locationNotFoundException - recurringEventId or
locationId is not foundNullArgumentException - recurringEventId, date
, or locationId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void clearSpecificDates(Id recurringEventId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
recurringEventId - a recurring event Id from - start date inclusiveto - end date inclusiveInvalidArgumentException - from is
greater than to NotFoundException - recurringEventId is
not foundNullArgumentException - recurringEventId, from
or to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void addEvent(Id recurringEventId, Id eventId) throws NotFoundException, OperationFailedException, PermissionDeniedException
recurringEventId - a recurring event Id eventId - an event Id NotFoundException - recurringEventId or
eventId is not foundNullArgumentException - recurringEventId
or eventId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void removeEvent(Id recurringEventId, Id eventId) throws NotFoundException, OperationFailedException, PermissionDeniedException
recurringEventId - a recurring event Id eventId - an event Id NotFoundException - recurringEventId or
eventId is not found or eventId
not part of recurringEventId NullArgumentException - recurringEventId
or eventId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void addBlackout(Id recurringEventId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
recurringEventId - a recurring event Id from - start date inclusiveto - end date inclusiveInvalidArgumentException - from is
greater than to NotFoundException - recurringEventId is
not foundNullArgumentException - recurringEventId, from
or to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void clearBlackout(Id recurringEventId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
recurringEventId - a recurring event Id from - start date inclusiveto - end date inclusiveInvalidArgumentException - from is
greater than to NotFoundException - recurringEventId is
not foundNullArgumentException - recurringEventId, from
or to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.