Interface SupersedingEventAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface SupersedingEventAdminSession extends OsidSession

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

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

The delete operations delete Superseding Events . To unmap a SupersedingEvent from the current Calendar , the SupersedingEventCalendarAssignmentSession should be used. These delete operations attempt to remove the SupersedingEvent itself thus removing it from all known Calendar catalogs.

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

  • 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 associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canCreateSupersedingEvents

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

      boolean canCreateSupersedingEventWithRecordTypes(Type[] supersdeingEventRecordTypes)
      Tests if this user can create a single SupersedingEvent using the desired record types. While CalendaringManager.getSupersedingEventRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific SupersedingEvent . Providing an empty array tests if a RecurringEvent can be created with no records.
      Parameters:
      supersdeingEventRecordTypes - array of superseding evnt record types
      Returns:
      true if SupersedingEvent creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - supersedingEventRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getSupersedingEventFormForCreate

      SupersedingEventForm getSupersedingEventFormForCreate(Id supersededEventId, Id supersedingEventId, Type[] supersdeingEventRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the superseding event form for creating new events. A new form should be requested for each create transaction.
      Parameters:
      supersededEventId - the Id of the superseded event
      supersedingEventId - the Id of the superseding event
      supersdeingEventRecordTypes - array of superseding evnt record types
      Returns:
      the superseding event form
      Throws:
      NotFoundException - supersededEventId or supersedingEventId not found
      NullArgumentException - supersededEventId, supersedingEventId , or supersdeingEventRecordTypes 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.
    • createSupersedingEvent

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

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

      SupersedingEventForm getSupersedingEventFormForUpdate(Id supersedingEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the superseding event form for updating an existing superseding event. A new superseding event form should be requested for each update transaction.
      Parameters:
      supersedingEventId - the Id of the SupersedingEvent
      Returns:
      the superseding event form
      Throws:
      NotFoundException - supersedingEventId is not found
      NullArgumentException - supersedingEventId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateSupersedingEvent

      void updateSupersedingEvent(SupersedingEventForm supersedingEventForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing superseding event.
      Parameters:
      supersedingEventForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - supersdeingEventForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - supersedingEventForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - supersedingEventForm did not originate from getSupersedingEventFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteSupersedingEvents

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

      void deleteSupersedingEvent(Id supersedingEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes the SupersedingEvent identified by the given Id .
      Parameters:
      supersedingEventId - the Id of the SupersedingEvent to delete
      Throws:
      NotFoundException - a SupersedingEvent was not found identified by the given Id
      NullArgumentException - supersedingEventId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageSupersedingEventAliases

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

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