Interface DispatchConstrainerEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface DispatchConstrainerEnablerAdminSession extends OsidSession

This session creates, updates, and deletes DispatchConstrainerEnablers . 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 DispatchConstrainerEnabler , a DispatchConstrainerEnablerForm is requested using getDispatchConstrainerEnablerFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned DispatchConstrainerEnablerForm 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 DispatchConstrainerEnablerForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each DispatchConstrainerEnablerForm corresponds to an attempted transaction.

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

The delete operations delete DispatchConstrainerEnablers . To unmap a DispatchConstrainerEnabler from the current Publisher , the DispatchConstrainerEnablerPublisherAssignmentSession should be used. These delete operations attempt to remove the DispatchConstrainerEnabler 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.
    • canCreateDispatchConstrainerEnablers

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

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

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

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

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

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

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

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

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

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

      void aliasDispatchConstrainerEnabler(Id dispatchConstrainerEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to a DispatchConstrainerEnabler for the purpose of creating compatibility. The primary Id of the DispatchConstrainerEnabler 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 constrainer enabler, it is reassigned to the given dispatch constrainer enabler Id .
      Parameters:
      dispatchConstrainerEnablerId - the Id of a DispatchConstrainerEnabler
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - dispatchConstrainerEnablerId not found
      NullArgumentException - dispatchConstrainerEnablerId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.