Interface RecurringEventBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, RecurringEventAdminSession
This session creates, updates, and deletes RecurringEvents in
bulk. 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
getRecurringEventFormsForCreate() specifying the desired record
Types or none if no record Types are needed. Each of the returned
RecurringEventForms 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 a 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.
The RecurringEventForms returned from
getRecurringEventFormsForCreate() may be linked to the originating
request through the peer Ids of the RecurringEventForm .
In the case where there may be duplicates, any RecurringEventForm
of the same peer Ids may be used for a create operation.
Once a batch of RecurringEventForms are submitted for create,
a CreateResponse is returned for each RecurringEventForm ,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createRecurringEvents()
, errors specific to an individual RecurringEventForm are
indicated in the corresponding CreateResponse .
CreateResponses may be linked to the originating
RecurringEventForm through the RecurringEventForm Id .
For updates, RecurringEventForms are requested to the
RecurringEvent Id that is to be updated using
getRecurringEventFormsForUpdate() where the reference Id in the
RecurringEventForm may be used to link the request. 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.
Once a batch of RecurringEventForms are submitted for update,
an UpdateResponse is returned for each RecurringEventForm
, although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateRecurringEvents()
, errors specific to an individual RecurringEventForm are
indicated in the corresponding UpdateResponse .
UpdateResponses may be linked to the originating
RecurringEventForm through the RecurringEventForm Id .
The delete operations delete RecurringEvents in bulk. To unmap
a RecurringEvent from the current Calendar , the
RecurringEventCalendarAssignmentSession should be used. These delete
operations attempt to remove the RecurringEvent itself thus
removing it from all known Calendar catalogs. Bulk delete
operations return the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasRecurringEvents(AliasRequestList aliasRequests) Adds anIdto aRecurringEventfor the purpose of creating compatibility.createRecurringEvents(RecurringEventBatchFormList recurringEventForms) Creates a new set ofRecurringEvents.Deletes allRecurringEventsin thisCalendar.deleteRecurringEvents(IdList recurringEventIds) Deletes recurring events for the givenIds.getRecurringEventFormsForCreate(long number, Type[] recurringEventRecordTypes) Gets the recurring eventforms for creating a bunch of new recurring events.getRecurringEventFormsForUpdate(IdList recurringEventIds) Gets the recurring event forms for updating an existing set of recurring events.updateRecurringEvents(RecurringEventBatchFormList recurringEventForms) Updates existing recurring events.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.Methods inherited from interface RecurringEventAdminSession
addBlackout, addEvent, addSchedule, addSpecificDate, addSpecificDateWithLocation, aliasRecurringEvent, canCreateRecurringEvents, canCreateRecurringEventWithRecordTypes, canDeleteRecurringEvents, canManageRecurringEventAliases, canScheduleRecurringEvents, canUpdateRecurringEvents, clearBlackout, clearSpecificDates, createRecurringEvent, deleteRecurringEvent, getCalendar, getCalendarId, getRecurringEventFormForCreate, getRecurringEventFormForUpdate, removeEvent, removeSchedule, updateRecurringEventModifier and TypeMethodDescriptionvoidaddBlackout(Id recurringEventId, DateTime from, DateTime to) Adds a blackout to the given recurring event that blocks events in the series.voidAdds another event as part of this recurring event.addSchedule(Id recurringEventId, Id scheduleId) Adds a schedule to the given recurring event.voidaddSpecificDate(Id recurringEventId, DateTime date, DisplayText locationDescription) Adds a specific date to the given recurring event.voidaddSpecificDateWithLocation(Id recurringEventId, DateTime date, Id locationId) Adds a specific date to the given recurring event.voidaliasRecurringEvent(Id recurringEventId, Id aliasId) Adds anIdto aRecurringEventfor the purpose of creating compatibility.booleanTests if this user can createRecurringEvents.booleancanCreateRecurringEventWithRecordTypes(Type[] recurringEventRecordTypes) Tests if this user can create a singleRecurringEventusing the desired record types.booleanTests if this user can deleteRecurringEvents.booleanTests if this user can manageIdaliases forRecurringEvents.booleanTests if this user can schedule recurring events.booleanTests if this user can updateRecurringEvents.voidclearBlackout(Id recurringEventId, DateTime from, DateTime to) Clears any blackouts between the given dates inclusive.voidclearSpecificDates(Id recurringEventId, DateTime from, DateTime to) Clears any specific dates between the given dates inclusive.createRecurringEvent(RecurringEventForm recurringEventForm) Creates a newRecurringEvent.voiddeleteRecurringEvent(Id recurringEventId) Deletes theRecurringEventidentified by the givenId.Gets theCalendarassociated with this session.Gets theCalendarIdassociated with this session.getRecurringEventFormForCreate(Type[] recurringEventRecordTypes) Gets the recurring event form for creating new recurring events.getRecurringEventFormForUpdate(Id recurringEventId) Gets the recurring event form for updating an existing recurring event.voidremoveEvent(Id recurringEventId, Id eventId) Removes an event as part of this recurring event.voidremoveSchedule(Id recurringEventId, Id scheduleId) Removes a schedule from a given recurring event.voidupdateRecurringEvent(RecurringEventForm recurringEventForm) Updates an existing recurring event.
-
Method Details
-
getRecurringEventFormsForCreate
RecurringEventBatchFormList getRecurringEventFormsForCreate(long number, Type[] recurringEventRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the recurring eventforms for creating a bunch of new recurring events.- Parameters:
number- the number of forms to retrieverecurringEventRecordTypes- array of recurring event record types to be included in each create operation or an empty list if none- Returns:
- the recurring eventforms
- Throws:
NullArgumentException-recurringEventRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createRecurringEvents
CreateResponseList createRecurringEvents(RecurringEventBatchFormList recurringEventForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofRecurringEvents. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
recurringEventForms- the recurring event forms- Returns:
- the create responses
- Throws:
NullArgumentException-recurringEventFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRecurringEventFormsForUpdate
RecurringEventBatchFormList getRecurringEventFormsForUpdate(IdList recurringEventIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the recurring event forms for updating an existing set of recurring events. A new recurring eventform should be requested for each update transaction.- Parameters:
recurringEventIds- theIdsof theRecurringEvent- Returns:
- the recurring event form
- Throws:
NotFoundException- arecurringEventIdis not foundNullArgumentException-recurringEventIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateRecurringEvents
UpdateResponseList updateRecurringEvents(RecurringEventBatchFormList recurringEventForms) throws OperationFailedException, PermissionDeniedException Updates existing recurring events. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
recurringEventForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-recurringEventFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllRecurringEvents
DeleteResponseList deleteAllRecurringEvents() throws OperationFailedException, PermissionDeniedExceptionDeletes allRecurringEventsin thisCalendar.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteRecurringEvents
DeleteResponseList deleteRecurringEvents(IdList recurringEventIds) throws OperationFailedException, PermissionDeniedException Deletes recurring events for the givenIds.- Parameters:
recurringEventIds- theIdsof the recurring events to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-recurringEventIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasRecurringEvents
AliasResponseList aliasRecurringEvents(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aRecurringEventfor the purpose of creating compatibility. The primaryIdof theRecurringEventis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another recurring event, it is reassigned to the given recurring eventId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-