Interface CommitmentEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CommitmentEnablerAdminSession extends OsidSession

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

  • Method Details

    • getCalendarId

      Id getCalendarId()
      Gets the Calendar Id associated with this session.
      Returns:
      the Calendar Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCalendar

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

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

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

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

      CommitmentEnabler createCommitmentEnabler(CommitmentEnablerForm commitmentEnablerForm) throws OperationFailedException, PermissionDeniedException
      Creates a new CommitmentEnabler.
      Parameters:
      commitmentEnablerForm - the form for this CommitmentEnabler
      Returns:
      the new CommitmentEnabler
      Throws:
      IllegalStateException - commitmentEnablerForm already used in a create trsnaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - commitmentEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - commitmentEnablerForm did not originate from getCommitmentEnablerFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateCommitmentEnablers

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

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

      void updateCommitmentEnabler(CommitmentEnablerForm commitmentEnablerForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing commitment enabler.
      Parameters:
      commitmentEnablerForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - commitmentEnablerForm already used in an update trsnaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - commitmentEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - commitmentEnablerForm did not originate from getCommitmentEnablerFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteCommitmentEnablers

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

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

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

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