Interface DispatchProcessorEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface DispatchProcessorEnablerAdminSession extends OsidSession

This session creates, updates, and deletes DispatchProcessorEnablers . The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a DispatchProcessorEnabler , a DispatchProcessorEnablerForm is requested using getDispatchProcessorEnablerFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned DispatchProcessorEnablerForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the DispatchProcessorEnablerForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each DispatchProcessorEnablerForm corresponds to an attempted transaction.

For updates, DispatchProcessorEnablerForms are requested to the DispatchProcessorEnabler Id that is to be updated using getDispatchProcessorEnablerFormForUpdate() . Similarly, the DispatchProcessorEnablerForm has metadata about the data that can be updated and it can perform validation before submitting the update. The DispatchProcessorEnablerForm can only be used once for a successful update and cannot be reused.

The delete operations delete DispatchProcessorEnablers . To unmap a DispatchProcessorEnabler from the current Publisher , the DispatchProcessorEnablerPublisherAssignmentSession should be used. These delete operations attempt to remove the DispatchProcessorEnabler itself thus removing it from all known Publisher catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id .

  • Method Details

    • getPublisherId

      Id getPublisherId()
      Gets the Publisher Id associated with this session.
      Returns:
      the Publisher Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getPublisher

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

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

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

      DispatchProcessorEnablerForm getDispatchProcessorEnablerFormForCreate(Type[] dispatchProcessorEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the dispatch processor enabler form for creating new dispatch processor enablers. A new form should be requested for each create transaction.
      Parameters:
      dispatchProcessorEnablerRecordTypes - array of dispatch processor enabler record types
      Returns:
      the dispatch processor enabler form
      Throws:
      NullArgumentException - dispatchProcessorEnablerRecordTypes 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.
    • createDispatchProcessorEnabler

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

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

      DispatchProcessorEnablerForm getDispatchProcessorEnablerFormForUpdate(Id dispatchProcessorEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the dispatch processor enabler form for updating an existing dispatch processor enabler. A new dispatch processor enabler form should be requested for each update transaction.
      Parameters:
      dispatchProcessorEnablerId - the Id of the DispatchProcessorEnabler
      Returns:
      the dispatch processor enabler form
      Throws:
      NotFoundException - dispatchProcessorEnablerId is not found
      NullArgumentException - dispatchProcessorEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateDispatchProcessorEnabler

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

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

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

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

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