Interface StepEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface StepEnablerAdminSession extends OsidSession

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

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

The delete operations delete StepEnablers . To unmap a StepEnabler from the current Office , the StepEnablerOfficeAssignmentSession should be used. These delete operations attempt to remove the StepEnabler itself thus removing it from all known Office catalogs.

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

  • Method Details

    • getOfficeId

      Id getOfficeId()
      Gets the Office Id associated with this session.
      Returns:
      the Office Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getOffice

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

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

      boolean canCreateStepEnablerWithRecordTypes(Type[] stepEnablerRecordTypes)
      Tests if this user can create a single StepEnabler using the desired record types. While WorkflowRulesManager.getStepEnablerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific StepEnabler . Providing an empty array tests if a StepEnabler can be cre ated with no records.
      Parameters:
      stepEnablerRecordTypes - array of step enabler record types
      Returns:
      true if StepEnabler creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - stepEnablerRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getStepEnablerFormForCreate

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

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

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

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

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

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

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

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

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