public interface EdgeGraphAssignmentSession extends OsidSession
This session provides methods to re-assign Edges
to
Graph
objects An Edge
may appear in multiple
Graph
objects and removing the last reference to an
Edge
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 an Edge
to another Graph
is not a copy operation (eg: does not change its Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignEdgeToGraph(Id edgeId,
Id graphId)
Adds an existing
Edge to a Graph. |
boolean |
canAssignEdges()
Tests if this user can alter edge/graph mappings.
|
boolean |
canAssignEdgesToGraph(Id graphId)
Tests if this user can alter edge/graph mappings.
|
IdList |
getAssignableGraphIds(Id graphId)
Gets a list of graphs including and under the given graph node in
which any edge can be assigned.
|
IdList |
getAssignableGraphIdsForEdge(Id graphId,
Id edgeId)
Gets a list of graphs including and under the given graph node in
which a specific edge can be assigned.
|
void |
reassignEdgeToGraph(Id edgeId,
Id fromGraphId,
Id toGraphId)
Moves an
Edge from one Graph to another. |
void |
unassignEdgeFromGraph(Id edgeId,
Id graphId)
Removes an
Edge from a Graph. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignEdges()
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 canAssignEdgesToGraph(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 getAssignableGraphIdsForEdge(Id graphId, Id edgeId) throws OperationFailedException
graphId
- the Id
of the Graph
edgeId
- the Id
of the Edge
Ids
NullArgumentException
- graphId
or
edgeId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignEdgeToGraph(Id edgeId, Id graphId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Edge
to a Graph.
edgeId
- the Id
of the Edge
graphId
- the Id
of the Graph
AlreadyExistsException
- edgeId
is
already assigned to graphId
NotFoundException
- edgeId
or
graphId
not foundNullArgumentException
- edgeId
or
graphId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignEdgeFromGraph(Id edgeId, Id graphId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Edge
from a Graph.
edgeId
- the Id
of the Edge
graphId
- the Id
of the Graph
NotFoundException
- edgeId
or
graphId
not found or edgeId
not
assigned to graphId
NullArgumentException
- edgeId
or
graphId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignEdgeToGraph(Id edgeId, Id fromGraphId, Id toGraphId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Edge
from one Graph
to another.
Mappings to other Graphs
are unaffected.edgeId
- the Id
of the Edge
fromGraphId
- the Id
of the current Graph
toGraphId
- the Id
of the destination
Graph
NotFoundException
- edgeId, fromGraphId,
or toGraphId
not found or edgeId
not mapped to fromGraphId
NullArgumentException
- edgeId, fromGraphId,
or toGraphId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.