Interface CatalogEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CatalogEnablerAdminSession extends OsidSession

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

  • Method Details

    • getCatalogId

      Id getCatalogId()
      Gets the Catalog Id associated with this session.
      Returns:
      the Catalog Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCatalog

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

      boolean canCreateCatalogEnabler()
      Tests if this user can create catalog enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a CatalogEnabler 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 CatalogEnabler creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateCatalogEnablerWithRecordTypes

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

      CatalogEnablerForm getCatalogEnablerFormForCreate(Type[] catalogEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the catalog enabler form for creating new catalog enablers. A new form should be requested for each create transaction.
      Parameters:
      catalogEnablerRecordTypes - array of catalog enabler record types
      Returns:
      the catalog enabler form
      Throws:
      NullArgumentException - catalogEnablerRecordTypes 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.
    • createCatalogEnabler

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

      boolean canUpdateCatalogEnablers()
      Tests if this user can update catalog enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a CatalogEnabler 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 CatalogEnabler modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCatalogEnablerFormForUpdate

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

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

      boolean canDeleteCatalogEnablers()
      Tests if this user can delete catalog enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a CatalogEnabler 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 CatalogEnabler deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteCatalogEnabler

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

      boolean canManageCatalogEnablerAliases()
      Tests if this user can manage Id aliases for catalog 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 CatalogEnabler aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasCatalogEnabler

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