public interface CyclicEventAdminSession extends OsidSession
This session creates, updates, and deletes Cyclic 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
CyclicEvent, a CyclicEventForm is requested using
getCyclicEventFormForCreate() specifying the desired record
Types or none if no record Types are needed.
The returned CycllicEventForm 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 CyclicEventForm
is submiited to a create operation, it cannot be reused with another
create operation unless the first operation was unsuccessful. Each
CyclicEventForm corresponds to an attempted transaction.
For updates, CycliccEventForms are requested to the
CyclicEvent Id that is to be updated using
getCyclicEventFormForUpdate(). Similarly, the
CyclicEventForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
CyclicEventForm can only be used once for a successful update and
cannot be reused.
The delete operations delete Cyclic Events. To unmap a
CyclicEvent from the current Calendar, the
CyclicEventCalendarAssignmentSession should be used. These
delete operations attempt to remove the CyclicEvent 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 |
aliasCyclicEvent(Id cyclicEventId,
Id aliasId)
Adds an
Id to a CyclicEvent for the
purpose of creating compatibility. |
boolean |
canCreateCyclicEvents()
Tests if this user can create
CyclicEvents. |
boolean |
canCreateCyclicEventWithRecordTypes(Type[] cyclicEventRecordTypes)
Tests if this user can create a single
CyclicEvent
using the desired record types. |
boolean |
canDeleteCyclicEvents()
Tests if this user can delete
CyclicEvents. |
boolean |
canManageCyclicEventAliases()
Tests if this user can manage
Id aliases for
CyclicEvents. |
boolean |
canUpdateCyclicEvents()
Tests if this user can update
CyclicEvents. |
CyclicEvent |
createCyclicEvent(CyclicEventForm cyclicEventForm)
Creates a new
CyclicEvent. |
void |
deleteCyclicEvent(Id cyclicEventId)
Deletes the
CyclicEvent identified by the given
Id. |
Calendar |
getCalendar()
Gets the
Calendar associated with this session. |
Id |
getCalendarId()
Gets the
Calendar Id associated with
this session. |
CyclicEventForm |
getCyclicEventFormForCreate(Type[] cyclicEventRecordTypes)
Gets the cyclic event form for creating new cyclic events.
|
CyclicEventForm |
getCyclicEventFormForUpdate(Id cyclicEventId)
Gets the cyclic event form for updating an existing cyclic event.
|
void |
updateCyclicEvent(CyclicEventForm cyclicEventForm)
Updates an existing cyclic event.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId 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 canCreateCyclicEvents()
CyclicEvents. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating a CyclicEvent 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 CyclicEvent creation is
not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateCyclicEventWithRecordTypes(Type[] cyclicEventRecordTypes)
CyclicEvent
using the desired record types. While
CalendaringCycleManager.getCyclicEventRecordTypes() can be
used to examine which records are supported, this method tests which
record(s) are required for creating a specific CyclicEvent.
Providing an empty array tests if a CyclicEvent
can be created with no records.cyclicEventRecordTypes - array of cyclic event record types true if CyclicEvent creation
using the specified record Types is supported,
false otherwiseNullArgumentException - cyclicEventRecordTypes
is null mandatory - This method must be implemented. CyclicEventForm getCyclicEventFormForCreate(Type[] cyclicEventRecordTypes) throws OperationFailedException, PermissionDeniedException
cyclicEventRecordTypes - array of cyclic event record typesNullArgumentException - cyclicEventRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. CyclicEvent createCyclicEvent(CyclicEventForm cyclicEventForm) throws OperationFailedException, PermissionDeniedException
CyclicEvent. cyclicEventForm - the form for this CyclicEvent CyclicEvent IllegalStateException - cyclicEventForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - cyclicEventForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - cyclicEventForm
did not originate from getCyclicEventFormForCreate()
mandatory - This method must be implemented. boolean canUpdateCyclicEvents()
CyclicEvents. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating a CyclicEvent 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 cyclic event modification is not
authorized, true otherwisemandatory - This method must be implemented. CyclicEventForm getCyclicEventFormForUpdate(Id cyclicEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException
cyclicEventId - the Id of the CyclicEvent
NotFoundException - cyclicEventId is not
foundNullArgumentException - cyclicEventId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateCyclicEvent(CyclicEventForm cyclicEventForm) throws OperationFailedException, PermissionDeniedException
cyclicEventForm - the form containing the elements to be updatedIllegalStateException - cyclicEventForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - cyclicEventForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - cyclicEventForm
did not originate from getCyclicEventFormForUpdate()
mandatory - This method must be implemented. boolean canDeleteCyclicEvents()
CyclicEvents. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known deleting a CyclicEvent 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 CyclicEvent deletion is
not authorized, true otherwisemandatory - This method must be implemented. void deleteCyclicEvent(Id cyclicEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CyclicEvent identified by the given
Id. cyclicEventId - the Id of the CyclicEvent
to deleteNotFoundException - a CyclicEvent was
not found identified by the given Id NullArgumentException - cyclicEventId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageCyclicEventAliases()
Id aliases for
CyclicEvents. 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 CyclicEvent aliasing is
not authorized, true otherwisemandatory - This method must be implemented. void aliasCyclicEvent(Id cyclicEventId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a CyclicEvent for the
purpose of creating compatibility. The primary Id of
the CyclicEvent is determined by the provider. The new
Id performs as an alias to the primary Id.
If the alias is a pointer to another cyclic event, it is
reassigned to the given cyclic event Id. cyclicEventId - the Id of a CyclicEvent
aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - cyclicEventId not
foundNullArgumentException - cyclicEventId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.