Interface EdgeEnablerGraphAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface EdgeEnablerGraphAssignmentSession extends OsidSession

This session provides methods to re-assign EdgeEnabler to Graph mappings. An EdgeEnabler may appear in multiple Graph objects and removing the last reference to an EdgeEnabler 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 EdgeEnabler to another Graph is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignEdgeEnablers

      boolean canAssignEdgeEnablers()
      Tests if this user can alter edge enabler/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 lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignEdgeEnablersToGraph

      boolean canAssignEdgeEnablersToGraph(Id graphId)
      Tests if this user can alter edge enabler/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 lookup 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 ontologies including and under the given graph node in which any edge enabler 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.
    • getAssignableGraphIdsForEdgeEnabler

      IdList getAssignableGraphIdsForEdgeEnabler(Id graphId, Id edgeEnablerId) throws OperationFailedException
      Gets a list of ontologies including and under the given graph node in which a specific edge enabler can be assigned.
      Parameters:
      graphId - the Id of the Graph
      edgeEnablerId - the Id of the EdgeEnabler
      Returns:
      list of assignable graph Ids
      Throws:
      NullArgumentException - graphId or edgeEnablerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignEdgeEnablerToGraph

      void assignEdgeEnablerToGraph(Id edgeEnablerId, Id graphId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing EdgeEnabler to a Graph .
      Parameters:
      edgeEnablerId - the Id of the EdgeEnabler
      graphId - the Id of the Graph
      Throws:
      AlreadyExistsException - edgeEnablerId is already assigned to graphId
      NotFoundException - edgeEnablerId or graphId not found
      NullArgumentException - edgeEnablerId or graphId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignEdgeEnablerFromGraph

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

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