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.
Modifier and Type | Method and Description |
---|---|
void |
aliasSupersedingEvent(Id supersedingEventId,
Id aliasId)
Adds an
Id to a SupersedingEvent for the
purpose of creating compatibility. |
boolean |
canCreateSupersedingEvents()
Tests if this user can create
SupersedingEvents. |
boolean |
canCreateSupersedingEventWithRecordTypes(Type[] supersdeingEventRecordTypes)
Tests if this user can create a single
SupersedingEvent
using the desired record types. |
boolean |
canDeleteSupersedingEvents()
Tests if this user can delete
SupersedingEvents. |
boolean |
canManageSupersedingEventAliases()
Tests if this user can manage
Id aliases for
SupersedingEvents. |
boolean |
canUpdateSupersedingEvents()
Tests if this user can update
SupersedingEvents. |
SupersedingEvent |
createSupersedingEvent(SupersedingEventForm supersedingEventForm)
Creates a new
SupersedingEvent. |
void |
deleteSupersedingEvent(Id supersedingEventId)
Deletes the
SupersedingEvent identified by the given
Id. |
Calendar |
getCalendar()
Gets the
Calendar associated with this session. |
Id |
getCalendarId()
Gets the
Calendar Id associated with
this session. |
SupersedingEventForm |
getSupersedingEventFormForCreate(Id supersededEventId,
Id supersedingEventId,
Type[] supersdeingEventRecordTypes)
Gets the superseding event form for creating new events.
|
SupersedingEventForm |
getSupersedingEventFormForUpdate(Id supersedingEventId)
Gets the superseding event form for updating an existing superseding
event.
|
void |
updateSupersedingEvent(SupersedingEventForm supersedingEventForm)
Updates an existing superseding event.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCalendarId()
Calendar
Id
associated with
this session. Calendar Id
associated with this sessionmandatory
- This method must be implemented. Calendar getCalendar() throws OperationFailedException, PermissionDeniedException
Calendar
associated with this session. Calendar
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateSupersedingEvents()
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. false
if Event
creation is not
authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateSupersedingEventWithRecordTypes(Type[] supersdeingEventRecordTypes)
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.supersdeingEventRecordTypes
- array of superseding evnt record
types true
if SupersedingEvent
creation using the specified record Types
is
supported, false
otherwiseNullArgumentException
-
supersedingEventRecordTypes
is null
mandatory
- This method must be implemented. SupersedingEventForm getSupersedingEventFormForCreate(Id supersededEventId, Id supersedingEventId, Type[] supersdeingEventRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
supersededEventId
- the Id
of the superseded
eventsupersedingEventId
- the Id
of the superseding
eventsupersdeingEventRecordTypes
- array of superseding evnt record
typesNotFoundException
- supersededEventId
or
supersedingEventId
not foundNullArgumentException
- supersededEventId,
supersedingEventId,
or
supersdeingEventRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. SupersedingEvent createSupersedingEvent(SupersedingEventForm supersedingEventForm) throws OperationFailedException, PermissionDeniedException
SupersedingEvent.
supersedingEventForm
- the form for this SupersedingEvent
SupersedingEvent
IllegalStateException
- supersdeingEventForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- supersdeingEventForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- supersedingEventForm
did not originate from
getSupersedingEventFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateSupersedingEvents()
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. false
if superseding event modification is not
authorized, true
otherwisemandatory
- This method must be implemented. SupersedingEventForm getSupersedingEventFormForUpdate(Id supersedingEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException
supersedingEventId
- the Id
of the
SupersedingEvent
NotFoundException
- supersedingEventId
is not foundNullArgumentException
- supersedingEventId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateSupersedingEvent(SupersedingEventForm supersedingEventForm) throws OperationFailedException, PermissionDeniedException
supersedingEventForm
- the form containing the elements to be
updatedIllegalStateException
- supersdeingEventForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- supersedingEventForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- supersedingEventForm
did not originate from
getSupersedingEventFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteSupersedingEvents()
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. false
if SupersedingEvent
deletion is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteSupersedingEvent(Id supersedingEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException
SupersedingEvent
identified by the given
Id.
supersedingEventId
- the Id
of the
SupersedingEvent
to deleteNotFoundException
- a SupersedingEvent
was not found identified by the given Id
NullArgumentException
- supersedingEventId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageSupersedingEventAliases()
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. false
if SupersedingEvent
aliasing is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasSupersedingEvent(Id supersedingEventId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
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.
supersedingEventId
- the Id
of a
SupersedingEvent
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- supersedingEventId
not foundNullArgumentException
- supersedingEventId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.