public interface EdgeBatchAdminSession extends EdgeAdminSession
This session creates, updates, and deletes Edges 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
Edge, an EdgeForm is requested using
getEdgeFormsForCreate() specifying the desired record Types
or none if no record Types are needed. Each of the
returned EdgeForms 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 EdgeForm is submiited to a
create operation, it cannot be reused with another create operation unless
the first operation was unsuccessful. Each EdgeForm
corresponds to an attempted transaction.
The EdgeForms returned from
getEdgeFormsForCreate() may be linked to the originating request
through the peer Ids of the EdgeForm. In the
case where there may be duplicates, any EdgeForm of the
same peer Ids may be used for a create operation.
Once a batch of EdgeForms are submitted for create, a
CreateResponse is returned for each EdgeForm,
although the ordering is not defined. Only errors that pertain to
the entire create operation are returned from createEdges(),
errors specific to an individual EdgeForm are
indicated in the corresponding CreateResponse.
CreateResponses may be linked to the originating EdgeForm
through the EdgeForm Id .
For updates, EdgeForms are requested to the Edge
Id that is to be updated using
getEdgeFormsForUpdate() where the reference Id in
the EdgeForm may be used to link the request. Similarly,
the EdgeForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
EdgeForm can only be used once for a successful update and
cannot be reused.
Once a batch of EdgeForms are submitted for update, an
UpdateResponse is returned for each EdgeForm,
although the ordering is not defined. Only errors that pertain to
the entire update operation are returned from updateEdges(),
errors specific to an individual EdgeForm are
indicated in the corresponding UpdateResponse.
UpdateResponses may be linked to the originating EdgeForm
through the EdgeForm Id.
The delete operations delete Edges in bulk. To unmap an
Edge from the current Graph, the
EdgeGraphAssignmentSession should be used. These delete operations
attempt to remove the Edge itself thus removing it from all
known Graph catalogs. Bulk delete operations return the
results in DeleteResponses.
| Modifier and Type | Method and Description |
|---|---|
AliasResponseList |
aliasEdges(AliasRequestList aliasRequests)
Adds an
Id to an Edge for the purpose of
creating compatibility. |
CreateResponseList |
createEdges(EdgeBatchFormList edgeForms)
Creates a new set of
Edges. |
DeleteResponseList |
deleteAllEdges()
Deletes all
Edges in this Graph . |
DeleteResponseList |
deleteEdges(IdList edgeIds)
Deletes edges for the given
Ids. |
DeleteResponseList |
deleteEdgesForDestinationNode(Id destinationNodeId)
Deletes edges for the given destination node.
|
DeleteResponseList |
deleteEdgesForSourceNode(Id sourceNodeId)
Deletes edges for the given source node.
|
DeleteResponseList |
deleteIneffectiveEdgesByDate(DateTime date)
Deletes edges ineffective before the given date.
|
EdgeBatchFormList |
getEdgeFormsForCreate(EdgePeerList peers,
Type[] edgeRecordTypes)
Gets the edge forms for creating a bunch of new edges.
|
EdgeBatchFormList |
getEdgeFormsForUpdate(IdList edgeIds)
Gets the edge forms for updating an existing set of edges.
|
UpdateResponseList |
updateEdges(EdgeBatchFormList edgeForms)
Updates existing edges.
|
aliasEdge, canCreateEdges, canCreateEdgeWithRecordTypes, canDeleteEdges, canManageEdgeAliases, canUpdateEdges, createEdge, deleteEdge, getEdgeFormForCreate, getEdgeFormForUpdate, getGraph, getGraphId, updateEdgegetAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseEdgeBatchFormList getEdgeFormsForCreate(EdgePeerList peers, Type[] edgeRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers - a list of edge peersedgeRecordTypes - array of edge record types to be included in
each create operation or an empty list if noneNotFoundException - a node is not foundNullArgumentException - peers or
edgeRecordTypes is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to request forms with
given record typesmandatory - This method must be implemented. CreateResponseList createEdges(EdgeBatchFormList edgeForms) throws OperationFailedException, PermissionDeniedException
Edges. This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse .edgeForms - the edge formsNullArgumentException - edgeForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. EdgeBatchFormList getEdgeFormsForUpdate(IdList edgeIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
edgeIds - the Ids of the Edge NotFoundException - an edgeId is not
foundNullArgumentException - edgeIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. UpdateResponseList updateEdges(EdgeBatchFormList edgeForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse .edgeForms - the form containing the elements to be updatedNullArgumentException - edgeForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteAllEdges() throws OperationFailedException, PermissionDeniedException
Edges in this Graph .OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteEdges(IdList edgeIds) throws OperationFailedException, PermissionDeniedException
Ids. edgeIds - the Ids of the edges to deleteNullArgumentException - edgeIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteEdgesForSourceNode(Id sourceNodeId) throws OperationFailedException, PermissionDeniedException
sourceNodeId - the Id of a nodeNullArgumentException - sourceNodeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteEdgesForDestinationNode(Id destinationNodeId) throws OperationFailedException, PermissionDeniedException
destinationNodeId - the Id of a nodeNullArgumentException - destinationNodeId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteIneffectiveEdgesByDate(DateTime date) throws OperationFailedException, PermissionDeniedException
date - a dateNullArgumentException - date is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AliasResponseList aliasEdges(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id to an Edge for the purpose of
creating compatibility. The primary Id of the
Edge is determined by the provider. The new Id
is an alias to the primary Id. If the alias is a
pointer to another edge, it is reassigned to the given edge Id.
aliasRequests - the alias requestsNullArgumentException - aliasRequests is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.