Interface RelevancyEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RelevancyEnablerAdminSession extends OsidSession

This session creates and removes relevancy enablers. The data for create and update is provided via the RelevancyEnablerForm.

  • Method Details

    • getOntologyId

      Id getOntologyId()
      Gets the Ontology Id associated with this session.
      Returns:
      the Ontology Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getOntology

      Gets the Ontology associated with this session.
      Returns:
      the ontology
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canCreateRelevancyEnabler

      boolean canCreateRelevancyEnabler()
      Tests if this user can create relevancy enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a RelevancyEnabler will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
      Returns:
      false if RelevancyEnabler creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateRelevancyEnablerWithRecordTypes

      boolean canCreateRelevancyEnablerWithRecordTypes(Type[] relevancyEnablerRecordTypes)
      Tests if this user can create a single RelevancyEnabler using the desired record types. While OntologyRulesManager.getRelevancyEnablerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific RelevancyEnabler. Providing an empty array tests if a RelevancyEnabler can be created with no records.
      Parameters:
      relevancyEnablerRecordTypes - array of relevancy enabler record types
      Returns:
      true if RelevancyEnabler creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - relevancyEnablerRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getRelevancyEnablerFormForCreate

      RelevancyEnablerForm getRelevancyEnablerFormForCreate(Type[] relevancyEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the relevancy enabler form for creating new relevancy enablers. A new form should be requested for each create transaction.
      Parameters:
      relevancyEnablerRecordTypes - array of relevancy enabler record types
      Returns:
      the relevancy enabler form
      Throws:
      NullArgumentException - relevancyEnablerRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form for requested record types
      Compliance:
      mandatory - This method must be implemented.
    • createRelevancyEnabler

      RelevancyEnabler createRelevancyEnabler(RelevancyEnablerForm relevancyEnablerForm) throws OperationFailedException, PermissionDeniedException
      Creates a new RelevancyEnabler.
      Parameters:
      relevancyEnablerForm - the form for this RelevancyEnabler
      Returns:
      the new RelevancyEnabler
      Throws:
      IllegalStateException - relevancyEnablerForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - relevancyEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - relevancyEnablerForm did not originate from getRelevancyEnablerFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateRelevancyEnablers

      boolean canUpdateRelevancyEnablers()
      Tests if this user can update relevancy enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a RelevancyEnabler will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
      Returns:
      false if RelevancyEnabler modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getRelevancyEnablerFormForUpdate

      RelevancyEnablerForm getRelevancyEnablerFormForUpdate(Id relevancyEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the relevancy enabler form for updating an existing relevancy enabler. A new relevancy enabler form should be requested for each update transaction.
      Parameters:
      relevancyEnablerId - the Id of the RelevancyEnabler
      Returns:
      the relevancy enabler form
      Throws:
      NotFoundException - relevancyEnablerId is not found
      NullArgumentException - relevancyEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateRelevancyEnabler

      void updateRelevancyEnabler(RelevancyEnablerForm relevancyEnablerForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing relevancy enabler.
      Parameters:
      relevancyEnablerForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - relevancyEnablerForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - relevancyEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - relevancyEnablerForm did not originate from getRelevancyEnablerFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteRelevancyEnablers

      boolean canDeleteRelevancyEnablers()
      Tests if this user can delete relevancy enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a RelevancyEnabler will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
      Returns:
      false if RelevancyEnabler deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteRelevancyEnabler

      void deleteRelevancyEnabler(Id relevancyEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes a RelevancyEnabler.
      Parameters:
      relevancyEnablerId - the Id of the RelevancyEnabler to remove
      Throws:
      NotFoundException - relevancyEnablerId not found
      NullArgumentException - relevancyEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageRelevancyEnablerAliases

      boolean canManageRelevancyEnablerAliases()
      Tests if this user can manage Id aliases for relevancy enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
      Returns:
      false if RelevancyEnabler aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasRelevancyEnabler

      void aliasRelevancyEnabler(Id relevancyEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to a RelevancyEnabler for the purpose of creating compatibility. The primary Id of the RelevancyEnabler is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another relevancy enabler. it is reassigned to the given relevancy enabler Id.
      Parameters:
      relevancyEnablerId - the Id of a RelevancyEnabler
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - relevancyEnablerId not found
      NullArgumentException - relevancyEnablerId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.