Interface StepConstrainerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface StepConstrainerAdminSession extends OsidSession

This session creates and removes step constrainers. The data for create and update is provided via the StepConstrainerForm .

  • 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.
    • canCreateStepConstrainer

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

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

      StepConstrainerForm getStepConstrainerFormForCreate(Type[] stepConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the step constrainer form for creating new step constrainers. A new form should be requested for each create transaction.
      Parameters:
      stepConstrainerRecordTypes - array of step constrainer record types
      Returns:
      the step constrainer form
      Throws:
      NullArgumentException - stepConstrainerRecordTypes 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.
    • createStepConstrainer

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

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

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

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

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

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

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

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