public interface NodeGraphAssignmentSession extends OsidSession
This session provides methods to re-assign Nodes to
Graph objects A Node may appear in multiple
Graph objects and removing the last reference to a
Node is the equivalent of deleting it. Each Graph
may have its own authorizations governing who is allowed to operate on it.
Adding a reference of a Node to another Graph
is not a copy operation (eg: does not change its Id
).
| Modifier and Type | Method and Description |
|---|---|
void |
assignNodeToGraph(Id nodeId,
Id graphId)
Adds an existing
Node to a Graph. |
boolean |
canAssignNodes()
Tests if this user can alter node/graph mappings.
|
boolean |
canAssignNodesToGraph(Id graphId)
Tests if this user can alter node/graph mappings.
|
IdList |
getAssignableGraphIds(Id graphId)
Gets a list of graphs including and under the given graph node in
which any node can be assigned.
|
IdList |
getAssignableGraphIdsForNode(Id graphId,
Id nodeId)
Gets a list of graphs including and under the given graph node in
which a specific node can be assigned.
|
void |
reassignNodeToGraph(Id nodeId,
Id fromGraphId,
Id toGraphId)
Moves a
Node from one Graph to another. |
void |
unassignNodeFromGraph(Id nodeId,
Id graphId)
Removes a
Node from a Graph. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignNodes()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false if mapping is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignNodesToGraph(Id graphId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.graphId - the Id of the Graph false if mapping is not authorized, true
otherwiseNullArgumentException - graphId is
null mandatory - This method must be implemented. IdList getAssignableGraphIds(Id graphId) throws OperationFailedException
graphId - the Id of the Graph Ids NullArgumentException - graphId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableGraphIdsForNode(Id graphId, Id nodeId) throws OperationFailedException
graphId - the Id of the Graph nodeId - the Id of the Node Ids NullArgumentException - graphId or
nodeId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignNodeToGraph(Id nodeId, Id graphId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Node to a Graph. nodeId - the Id of the Node graphId - the Id of the Graph AlreadyExistsException - nodeId is
already assigned to graphId NotFoundException - nodeId or
graphId not foundNullArgumentException - nodeId or
graphId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignNodeFromGraph(Id nodeId, Id graphId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Node from a Graph. nodeId - the Id of the Node graphId - the Id of the Graph NotFoundException - nodeId or
graphId not found or nodeId not
assigned to graphId NullArgumentException - nodeId or
graphId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void reassignNodeToGraph(Id nodeId, Id fromGraphId, Id toGraphId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Node from one Graph to another.
Mappings to other Graphs are unaffected.nodeId - the Id of the Node fromGraphId - the Id of the current Graph
toGraphId - the Id of the destination
Graph NotFoundException - nodeId, fromGraphId,
or toGraphId not found or nodeId
not mapped to fromGraphId NullArgumentException - nodeId, fromGraphId,
or toGraphId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.