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