Interface RelevancyEnablerOntologyAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RelevancyEnablerOntologyAssignmentSession extends OsidSession

This session provides methods to re-assign RelevancyEnabler to Ontology mappings. A RelevancyEnabler may appear in multiple Ontology objects and removing the last reference to a RelevancyEnabler is the equivalent of deleting it. Each Ontology may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a RelevancyEnabler to another Ontology is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignRelevancyEnablers

      boolean canAssignRelevancyEnablers()
      Tests if this user can alter relevancy enabler/ontology 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.
    • canAssignRelevancyEnablersToOntology

      boolean canAssignRelevancyEnablersToOntology(Id ontologyId)
      Tests if this user can alter relevancy enabler/ontology 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:
      ontologyId - the Id of the Ontology
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - ontologyId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableOntologyIds

      IdList getAssignableOntologyIds(Id ontologyId) throws OperationFailedException
      Gets a list of ontologies including and under the given ontology node in which any relevancy enabler can be assigned.
      Parameters:
      ontologyId - the Id of the Ontology
      Returns:
      list of assignable ontology Ids
      Throws:
      NullArgumentException - ontologyId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableOntologyIdsForRelevancyEnabler

      IdList getAssignableOntologyIdsForRelevancyEnabler(Id ontologyId, Id relevancyEnablerId) throws OperationFailedException
      Gets a list of ontologies including and under the given ontology node in which a specific relevancy enabler can be assigned.
      Parameters:
      ontologyId - the Id of the Ontology
      relevancyEnablerId - the Id of the RelevancyEnabler
      Returns:
      list of assignable ontology Ids
      Throws:
      NullArgumentException - ontologyId or relevancyEnablerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignRelevancyEnablerToOntology

      void assignRelevancyEnablerToOntology(Id relevancyEnablerId, Id ontologyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing RelevancyEnabler to an Ontology .
      Parameters:
      relevancyEnablerId - the Id of the RelevancyEnabler
      ontologyId - the Id of the Ontology
      Throws:
      AlreadyExistsException - relevancyEnablerId is already assigned to ontologyId
      NotFoundException - relevancyEnablerId or ontologyId not found
      NullArgumentException - relevancyEnablerId or ontologyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignRelevancyEnablerFromOntology

      void unassignRelevancyEnablerFromOntology(Id relevancyEnablerId, Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a RelevancyEnabler from an Ontology .
      Parameters:
      relevancyEnablerId - the Id of the RelevancyEnabler
      ontologyId - the Id of the Ontology
      Throws:
      NotFoundException - relevancyEnablerId or ontologyId not found or relevancyEnablerId not assigned to ontologyId
      NullArgumentException - relevancyEnablerId or ontologyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignRelevancyEnablerToOntology

      void reassignRelevancyEnablerToOntology(Id relevancyEnablerId, Id fromOntologyId, Id toOntologyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a RelevancyEnabler from one Ontology to another. Mappings to other Ontologies are unaffected.
      Parameters:
      relevancyEnablerId - the Id of the RelevancyEnabler
      fromOntologyId - the Id of the current Ontology
      toOntologyId - the Id of the destination Ontology
      Throws:
      AlreadyExistsException - relevancyEnablerId already assigned to toOntologyId
      NotFoundException - relevancyEnablerId, fromOntologyId , or toOntologyId not found or relevancyEnablerId not mapped to fromOntologyId
      NullArgumentException - relevancyEnablerId, fromOntologyId , or toOntologyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.