Interface SupersedingEventAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 Summary
Modifier and TypeMethodDescriptionvoidaliasSupersedingEvent(Id supersedingEventId, Id aliasId) Adds anIdto aSupersedingEventfor the purpose of creating compatibility.booleanTests if this user can createSupersedingEvents.booleancanCreateSupersedingEventWithRecordTypes(Type[] supersdeingEventRecordTypes) Tests if this user can create a singleSupersedingEventusing the desired record types.booleanTests if this user can deleteSupersedingEvents.booleanTests if this user can manageIdaliases forSupersedingEvents.booleanTests if this user can updateSupersedingEvents.createSupersedingEvent(SupersedingEventForm supersedingEventForm) Creates a newSupersedingEvent.voiddeleteSupersedingEvent(Id supersedingEventId) Deletes theSupersedingEventidentified by the givenId.Gets theCalendarassociated with this session.Gets theCalendarIdassociated with this session.getSupersedingEventFormForCreate(Id supersededEventId, Id supersedingEventId, Type[] supersdeingEventRecordTypes) Gets the superseding event form for creating new events.getSupersedingEventFormForUpdate(Id supersedingEventId) Gets the superseding event form for updating an existing superseding event.voidupdateSupersedingEvent(SupersedingEventForm supersedingEventForm) Updates an existing superseding event.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getCalendarId
Id getCalendarId()Gets theCalendarIdassociated with this session.- Returns:
- the
Calendar Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCalendar
Gets theCalendarassociated with this session.- Returns:
- the
Calendarassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateSupersedingEvents
boolean canCreateSupersedingEvents()Tests if this user can createSupersedingEvents. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Event will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifEventcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateSupersedingEventWithRecordTypes
Tests if this user can create a singleSupersedingEventusing the desired record types. WhileCalendaringManager.getSupersedingEventRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificSupersedingEvent. Providing an empty array tests if aRecurringEventcan be created with no records.- Parameters:
supersdeingEventRecordTypes- array of superseding evnt record types- Returns:
trueifSupersedingEventcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-supersedingEventRecordTypesisnull- 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- theIdof the superseded eventsupersedingEventId- theIdof the superseding eventsupersdeingEventRecordTypes- array of superseding evnt record types- Returns:
- the superseding event form
- Throws:
NotFoundException-supersededEventIdorsupersedingEventIdnot foundNullArgumentException-supersededEventId, supersedingEventId, orsupersdeingEventRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- 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 newSupersedingEvent.- Parameters:
supersedingEventForm- the form for thisSupersedingEvent- Returns:
- the new
SupersedingEvent - Throws:
IllegalStateException-supersdeingEventFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-supersdeingEventFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-supersedingEventFormdid not originate fromgetSupersedingEventFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateSupersedingEvents
boolean canUpdateSupersedingEvents()Tests if this user can updateSupersedingEvents. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aSupersedingEventwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseif superseding event modification is not authorized,trueotherwise- 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- theIdof theSupersedingEvent- Returns:
- the superseding event form
- Throws:
NotFoundException-supersedingEventIdis not foundNullArgumentException-supersedingEventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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-supersdeingEventFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-supersedingEventFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-supersedingEventFormdid not originate fromgetSupersedingEventFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteSupersedingEvents
boolean canDeleteSupersedingEvents()Tests if this user can deleteSupersedingEvents. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aSupersedingEventwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifSupersedingEventdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteSupersedingEvent
void deleteSupersedingEvent(Id supersedingEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes theSupersedingEventidentified by the givenId.- Parameters:
supersedingEventId- theIdof theSupersedingEventto delete- Throws:
NotFoundException- aSupersedingEventwas not found identified by the givenIdNullArgumentException-supersedingEventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageSupersedingEventAliases
boolean canManageSupersedingEventAliases()Tests if this user can manageIdaliases forSupersedingEvents. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifSupersedingEventaliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasSupersedingEvent
void aliasSupersedingEvent(Id supersedingEventId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aSupersedingEventfor the purpose of creating compatibility. The primaryIdof theSupersedingEventis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another superseding event, it is reassigned to the given superseding eventId.- Parameters:
supersedingEventId- theIdof aSupersedingEventaliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-supersedingEventIdnot foundNullArgumentException-supersedingEventIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-