Interface PathGraphAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

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 ).

  • Method Details

    • canAssignPaths

      boolean canAssignPaths()
      Tests if this user can alter path/graph mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known location methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignPathsToGraph

      boolean canAssignPathsToGraph(Id graphId)
      Tests if this user can alter path/graph mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      graphId - the Id of the Graph
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - graphId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableGraphIds

      IdList getAssignableGraphIds(Id graphId) throws OperationFailedException
      Gets a list of graphs including and under the given graph node in which any path can be assigned.
      Parameters:
      graphId - the Id of the Graph
      Returns:
      list of assignable graph Ids
      Throws:
      NullArgumentException - graphId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableGraphIdsForPath

      IdList getAssignableGraphIdsForPath(Id graphId, Id pathId) throws OperationFailedException
      Gets a list of graphs including and under the given graph node in which a specific path can be assigned.
      Parameters:
      graphId - the Id of the Graph
      pathId - the Id of the Path
      Returns:
      list of assignable graph Ids
      Throws:
      NullArgumentException - graphId or pathId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignPathToGraph

      Adds an existing Path to a Graph .
      Parameters:
      pathId - the Id of the Path
      graphId - the Id of the Graph
      Throws:
      AlreadyExistsException - pathId is already assigned to graphId
      NotFoundException - pathId or graphId not found
      NullArgumentException - pathId or graphId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignPathFromGraph

      void unassignPathFromGraph(Id pathId, Id graphId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Path from a Graph .
      Parameters:
      pathId - the Id of the Path
      graphId - the Id of the Graph
      Throws:
      NotFoundException - pathId or graphId not found or pathId not assigned to graphId
      NullArgumentException - pathId or graphId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignPathToGraph

      void reassignPathToGraph(Id pathId, Id fromGraphId, Id toGraphId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Path from one Graph to another. Mappings to other Graphs are unaffected.
      Parameters:
      pathId - the Id of the Credit
      fromGraphId - the Id of the current Graph
      toGraphId - the Id of the destination Graph
      Throws:
      AlreadyExistsException - pathId already assigned to toGraphId
      NotFoundException - pathId, fromGraphId , or toGraphId not found or pathId not mapped to fromGraphId
      NullArgumentException - pathId, fromGraphId , or toGraphId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.