public interface PollsBatchAdminSession extends PollsAdminSession
This session creates, updates, and deletes Polls 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
Polls, an PollsForm is requested using
getPollsFormsForCreate() specifying the desired record
Types or none if no record Types are needed.
Each of the returned PollsForms 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 PollsForm is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
PollsForm corresponds to an attempted transaction.
The PollsForms returned from
getPollsFormsForCreate() may be linked to the originating request
through the peer Ids of the PollsForm. In
the case where there may be duplicates, any PollsForm of
the same peer Ids may be used for a create operation.
Once a batch of PollsForms are submitted for create, a
CreateResponse is returned for each PollsForm,
although the ordering is not defined. Only errors that pertain to
the entire create operation are returned from createPolls(),
errors specific to an individual PollsForm are
indicated in the corresponding CreateResponse.
CreateResponses may be linked to the originating PollsForm
through the PollsForm Id .
For updates, PollsForms are requested to the
Polls Id that is to be updated using
getPollsFormsForUpdate() where the reference Id in
the PollsForm may be used to link the request. Similarly,
the PollsForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
PollsForm can only be used once for a successful update and
cannot be reused.
Once a batch of PollsForms are submitted for update, an
UpdateResponse is returned for each PollsForm,
although the ordering is not defined. Only errors that pertain to
the entire update operation are returned from updatePolls(),
errors specific to an individual PollsForm are
indicated in the corresponding UpdateResponse.
UpdateResponses may be linked to the originating PollsForm
through the PollsForm Id.
The delete operations delete Polls in bulk. Bulk delete
operations return the results in DeleteResponses.
| Modifier and Type | Method and Description |
|---|---|
AliasResponseList |
aliasPolls(AliasRequestList aliasRequests)
Adds an
Id to an Polls for the purpose
of creating compatibility. |
CreateResponseList |
createPolls(PollsBatchFormList pollsForms)
Creates a new set of
Polls. |
DeleteResponseList |
deleteAllPolls()
Deletes all
Polls. |
DeleteResponseList |
deletePolls(IdList pollsIds)
Deletes polls for the given
Ids. |
PollsBatchFormList |
getPollsFormsForCreate(long number,
Type[] pollsRecordTypes)
Gets the polls forms for creating a bunch of new polls.
|
PollsBatchFormList |
getPollsFormsForUpdate(IdList pollsIds)
Gets the polls forms for updating an existing set of polls.
|
UpdateResponseList |
updatePolls(PollsBatchFormList pollsForms)
Updates existing polls.
|
aliasPolls, canCreatePolls, canCreatePollsWithRecordTypes, canDeletePolls, canManagePollsAliases, canUpdatePolls, createPolls, deletePolls, getPollsFormForCreate, getPollsFormForUpdate, updatePollsgetAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsclosePollsBatchFormList getPollsFormsForCreate(long number, Type[] pollsRecordTypes) throws OperationFailedException, PermissionDeniedException
number - the number of forms to retrievepollsRecordTypes - array of polls record types to be included in
each create operation or an empty list if noneNullArgumentException - pollsRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to request forms with
given record typesmandatory - This method must be implemented. CreateResponseList createPolls(PollsBatchFormList pollsForms) throws OperationFailedException, PermissionDeniedException
Polls. This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse .pollsForms - the polls formsNullArgumentException - pollsForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PollsBatchFormList getPollsFormsForUpdate(IdList pollsIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
pollsIds - the Ids of the Polls NotFoundException - an pollsId is not
foundNullArgumentException - pollsIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. UpdateResponseList updatePolls(PollsBatchFormList pollsForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse .pollsForms - the form containing the elements to be updatedNullArgumentException - pollsForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteAllPolls() throws OperationFailedException, PermissionDeniedException
Polls. OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deletePolls(IdList pollsIds) throws OperationFailedException, PermissionDeniedException
Ids. pollsIds - the Ids of the polls to deleteNullArgumentException - pollsIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AliasResponseList aliasPolls(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id to an Polls for the purpose
of creating compatibility. The primary Id of the
Polls is determined by the provider. The new Id
is an alias to the primary Id. If the alias is a
pointer to another polls, it is reassigned to the given polls
Id. aliasRequests - the alias requestsNullArgumentException - aliasRequests is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.