public interface OffsetEventBatchAdminSession extends OffsetEventAdminSession
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.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasOffsetEvents(AliasRequestList aliasRequests)
Adds an
Id to an OffsetEvent for the
purpose of creating compatibility. |
CreateResponseList |
createOffsetEvents(OffsetEventBatchFormList offsetEventForms)
Creates a new set of
OffsetEvents. |
DeleteResponseList |
deleteAllOffsetEvents()
Deletes all
OffsetEvents in this Calendar
. |
DeleteResponseList |
deleteOffsetEvents(IdList offsetEventIds)
Deletes offset events for the given
Ids. |
OffsetEventBatchFormList |
getOffsetEventFormsForCreate(long number,
Type[] offsetEventRecordTypes)
Gets the offset event forms for creating a bunch of new offset events.
|
OffsetEventBatchFormList |
getOffsetEventFormsForUpdate(IdList offsetEventIds)
Gets the offset event forms for updating an existing set of offset
events.
|
UpdateResponseList |
updateOffsetEvents(OffsetEventBatchFormList offsetEventForms)
Updates existing offset events.
|
aliasOffsetEvent, canCreateOffsetEvents, canCreateOffsetEventWithRecordTypes, canDeleteOffsetEvents, canManageOffsetEventAliases, canUpdateOffsetEvents, createOffsetEvent, deleteOffsetEvent, getCalendar, getCalendarId, getOffsetEventFormForCreate, getOffsetEventFormForUpdate, updateOffsetEvent
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
OffsetEventBatchFormList getOffsetEventFormsForCreate(long number, Type[] offsetEventRecordTypes) throws OperationFailedException, PermissionDeniedException
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 noneNullArgumentException
- offsetEventRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createOffsetEvents(OffsetEventBatchFormList offsetEventForms) throws OperationFailedException, PermissionDeniedException
OffsetEvents.
This method returns
an error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse
.offsetEventForms
- the offset event formsNullArgumentException
- offsetEventForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OffsetEventBatchFormList getOffsetEventFormsForUpdate(IdList offsetEventIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
offsetEventIds
- the Ids
of the
OffsetEvent
NotFoundException
- an offsetEventId
is
not foundNullArgumentException
- offsetEventIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateOffsetEvents(OffsetEventBatchFormList offsetEventForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.offsetEventForms
- the form containing the elements to be
updatedNullArgumentException
- offsetEventForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllOffsetEvents() throws OperationFailedException, PermissionDeniedException
OffsetEvents
in this Calendar
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteOffsetEvents(IdList offsetEventIds) throws OperationFailedException, PermissionDeniedException
Ids.
offsetEventIds
- the Ids
of the offset events to
deleteNullArgumentException
- offsetEventIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasOffsetEvents(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to an OffsetEvent
for the
purpose of creating compatibility. The primary Id
of
the OffsetEvent
is determined by the provider. The new
Id
is an alias to the primary Id.
If the
alias is a pointer to another offset event, it is reassigned to the
given offset event Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.