Interface OffsetEventBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OffsetEventAdminSession, OsidSession, OsidSession
This session creates, updates, and deletes OffsetEvents 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 an
OffsetEvent , an OffsetEventForm is requested using
getOffsetEventFormsForCreate() specifying the desired record
Types or none if no record Types are needed. Each of the returned
OffsetEventForms 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 an OffsetEventForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each OffsetEventForm corresponds
to an attempted transaction.
The OffsetEventForms returned from
getOffsetEventFormsForCreate() may be linked to the originating request
through the peer Ids of the OffsetEventForm . In the case
where there may be duplicates, any OffsetEventForm of the same
peer Ids may be used for a create operation.
Once a batch of OffsetEventForms are submitted for create, a
CreateResponse is returned for each OffsetEventForm ,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createOffsetEvents() ,
errors specific to an individual OffsetEventForm are indicated in
the corresponding CreateResponse . CreateResponses may be
linked to the originating OffsetEventForm through the
OffsetEventForm Id .
For updates, OffsetEventForms are requested to the
OffsetEvent Id that is to be updated using
getOffsetEventFormsForUpdate() where the reference Id in the
OffsetEventForm may be used to link the request. Similarly, the
OffsetEventForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
OffsetEventForm can only be used once for a successful update and cannot
be reused.
Once a batch of OffsetEventForms are submitted for update, an
UpdateResponse is returned for each OffsetEventForm ,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateOffsetEvents() ,
errors specific to an individual OffsetEventForm are indicated in
the corresponding UpdateResponse . UpdateResponses may be
linked to the originating OffsetEventForm through the
OffsetEventForm Id .
The delete operations delete OffsetEvents in bulk. To unmap an
OffsetEvent from the current Calendar , the
OffsetEventCalendarAssignmentSession should be used. These delete
operations attempt to remove the OffsetEvent itself thus removing
it from all known Calendar catalogs. Bulk delete operations return
the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasOffsetEvents(AliasRequestList aliasRequests) Adds anIdto anOffsetEventfor the purpose of creating compatibility.createOffsetEvents(OffsetEventBatchFormList offsetEventForms) Creates a new set ofOffsetEvents.Deletes allOffsetEventsin thisCalendar.deleteOffsetEvents(IdList offsetEventIds) Deletes offset events for the givenIds.getOffsetEventFormsForCreate(long number, Type[] offsetEventRecordTypes) Gets the offset event forms for creating a bunch of new offset events.getOffsetEventFormsForUpdate(IdList offsetEventIds) Gets the offset event forms for updating an existing set of offset events.updateOffsetEvents(OffsetEventBatchFormList offsetEventForms) Updates existing offset events.Methods inherited from interface OffsetEventAdminSession
aliasOffsetEvent, canCreateOffsetEvents, canCreateOffsetEventWithRecordTypes, canDeleteOffsetEvents, canManageOffsetEventAliases, canUpdateOffsetEvents, createOffsetEvent, deleteOffsetEvent, getCalendar, getCalendarId, getOffsetEventFormForCreate, getOffsetEventFormForUpdate, updateOffsetEventModifier and TypeMethodDescriptionvoidaliasOffsetEvent(Id offsetEventId, Id aliasId) Adds anIdto anOffsetEventfor the purpose of creating compatibility.booleanTests if this user can createOffsetEvents.booleancanCreateOffsetEventWithRecordTypes(Type[] offsetEventRecordTypes) Tests if this user can create a singleOffsetEventusing the desired record types.booleanTests if this user can deleteOffsetEvents.booleanTests if this user can manageIdaliases forOffsetEvents.booleanTests if this user can updateOffsetEvents.createOffsetEvent(OffsetEventForm offsetEventForm) Creates a newOffsetEvent.voiddeleteOffsetEvent(Id offsetEventId) Deletes theOffsetEventidentified by the givenId.Gets theCalendarassociated with this session.Gets theCalendarIdassociated with this session.getOffsetEventFormForCreate(Type[] offsetEventRecordTypes) Gets the offset event form for creating new offset events.getOffsetEventFormForUpdate(Id offsetEventId) Gets the offset event form for updating an existing offset event.voidupdateOffsetEvent(OffsetEventForm offsetEventForm) Updates an existing offset event.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.
-
Method Details
-
getOffsetEventFormsForCreate
OffsetEventBatchFormList getOffsetEventFormsForCreate(long number, Type[] offsetEventRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the offset event forms for creating a bunch of new offset events.- Parameters:
number- the number of forms to retrieveoffsetEventRecordTypes- array of offset event record types to be included in each create operation or an empty list if none- Returns:
- the offset event forms
- Throws:
NullArgumentException-offsetEventRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createOffsetEvents
CreateResponseList createOffsetEvents(OffsetEventBatchFormList offsetEventForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofOffsetEvents. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
offsetEventForms- the offset event forms- Returns:
- the create responses
- Throws:
NullArgumentException-offsetEventFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getOffsetEventFormsForUpdate
OffsetEventBatchFormList getOffsetEventFormsForUpdate(IdList offsetEventIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the offset event forms for updating an existing set of offset events. A new offset event form should be requested for each update transaction.- Parameters:
offsetEventIds- theIdsof theOffsetEvent- Returns:
- the offset event form
- Throws:
NotFoundException- anoffsetEventIdis not foundNullArgumentException-offsetEventIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateOffsetEvents
UpdateResponseList updateOffsetEvents(OffsetEventBatchFormList offsetEventForms) throws OperationFailedException, PermissionDeniedException Updates existing offset events. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
offsetEventForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-offsetEventFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllOffsetEvents
DeleteResponseList deleteAllOffsetEvents() throws OperationFailedException, PermissionDeniedExceptionDeletes allOffsetEventsin thisCalendar.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteOffsetEvents
DeleteResponseList deleteOffsetEvents(IdList offsetEventIds) throws OperationFailedException, PermissionDeniedException Deletes offset events for the givenIds.- Parameters:
offsetEventIds- theIdsof the offset events to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-offsetEventIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasOffsetEvents
AliasResponseList aliasOffsetEvents(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto anOffsetEventfor the purpose of creating compatibility. The primaryIdof theOffsetEventis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another offset event, it is reassigned to the given offset 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.
-