Interface OffsetEventEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface OffsetEventEnablerAdminSession extends OsidSession

This session creates and removes offset event enablers. The data for create and update is provided via the OffsetEventEnablerForm .

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

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

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

      OffsetEventEnablerForm getOffsetEventEnablerFormForCreate(Type[] offsetEventEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the offset event enabler form for creating new offset event enablers. A new form should be requested for each create transaction.
      Parameters:
      offsetEventEnablerRecordTypes - array of offset event enabler record types
      Returns:
      the offset event enabler form
      Throws:
      NullArgumentException - offsetEventEnablerRecordTypes 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.
    • createOffsetEventEnabler

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

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

      OffsetEventEnablerForm getOffsetEventEnablerFormForUpdate(Id offsetEventEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the offset event enabler form for updating an existing offset event enabler. A new offset event enabler form should be requested for each update transaction.
      Parameters:
      offsetEventEnablerId - the Id of the OffsetEventEnabler
      Returns:
      the offset event enabler form
      Throws:
      NotFoundException - offsetEventEnablerId is not found
      NullArgumentException - offsetEventEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateOffsetEventEnabler

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

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

      void deleteOffsetEventEnabler(Id offsetEventEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes an OffsetEventEnabler .
      Parameters:
      offsetEventEnablerId - the Id of the OffsetEventEnabler to remove
      Throws:
      NotFoundException - offsetEventEnablerId not found
      NullArgumentException - offsetEventEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageOffsetEventEnablerAliases

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

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