Interface TodoProducerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface TodoProducerAdminSession extends OsidSession

This session creates and removes todo producers. The data for create and update is provided via the TodoProducerForm.

  • Method Details

    • getChecklistId

      Id getChecklistId()
      Gets the Checklist Id associated with this session.
      Returns:
      the Checklist Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getChecklist

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

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

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

      TodoProducerForm getTodoProducerFormForCreate(Type[] todoProducerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the todo producer form for creating new todo producers. A new form should be requested for each create transaction.
      Parameters:
      todoProducerRecordTypes - array of todo producer record types
      Returns:
      the todo producer form
      Throws:
      NullArgumentException - todoProducerRecordTypes 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.
    • createTodoProducer

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

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

      TodoProducerForm getTodoProducerFormForUpdate(Id todoProducerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the todo producer form for updating an existing todo producer. A new todo producer form should be requested for each update transaction.
      Parameters:
      todoProducerId - the Id of the TodoProducer
      Returns:
      the todo producer form
      Throws:
      NotFoundException - todoProducerId is not found
      NullArgumentException - todoProducerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateTodoProducer

      void updateTodoProducer(TodoProducerForm todoProducerForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing todo producer.
      Parameters:
      todoProducerForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - todoProducerForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - todoProducerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - todoProducerForm did not originate from getTodoProducerFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteTodoProducers

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

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

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

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