Interface TriggerEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface TriggerEnablerAdminSession extends OsidSession

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

  • Method Details

    • getSystemId

      Id getSystemId()
      Gets the System Id associated with this session.
      Returns:
      the System Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getSystem

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

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

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

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

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

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

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

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

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

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

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

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