public interface CyclicTimePeriodAdminSession extends OsidSession
This session creates, updates, and deletes CyclicTimePeriods.
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
CyclicTimePeriod, a CyclicTimePeriodForm is
requested using getCyclicTimePeriodFormForCreate()
specifying the desired record Types or none if no record
Types are needed. The returned CyclicTimePeriodForm
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 CyclicTimePeriodForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each CyclicTimePeriodForm
corresponds to an attempted transaction.
For updates, CyclicTimePeriodForms are requested to the
CyclicTimePeriod Id that is to be updated
using getCyclicTimePeriodFormForUpdate(). Similarly, the
CyclicTimePeriodForm has metadata about the data that can
be updated and it can perform validation before submitting the update. The
CyclicTimePeriodForm can only be used once for a successful
update and cannot be reused.
The delete operations delete CyclicTimePeriodForms. To unmap a
CyclicTimePeriodFor from the current Calendar, the
CyclicTimePeriodCalendarAssignmentSession should be used.
These delete operations attempt to remove the CyclicTimePeriod
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 |
aliasCyclicTimePeriod(Id cyclicTimePeriodId,
Id aliasId)
Adds an
Id to a CyclicTimePeriod for the
purpose of creating compatibility. |
boolean |
canCreateCyclicTimePeriods()
Tests if this user can create
CyclicTimePeriods. |
boolean |
canCreateCyclicTimePeriodWithRecordTypes(Type[] cyclicTimePeriodRecordTypes)
Tests if this user can create a single
CyclicTimePeriod
using the desired record types. |
boolean |
canDeleteCyclicTimePeriods()
Tests if this user can delete
CyclicTimePeriods. |
boolean |
canManageCyclicTimePeriodAliases()
Tests if this user can manage
Id aliases for
CyclicTimePeriods. |
boolean |
canUpdateCyclicTimePeriods()
Tests if this user can update
CyclicTimePeriods. |
CyclicTimePeriod |
createCyclicTimePeriod(CyclicTimePeriodForm cyclicTimePeriodForm)
Creates a new
CyclicTimePeriod. |
void |
deleteCyclicTimePeriod(Id cyclicTimePeriodId)
Deletes the
CyclicTimePeriod identified by the given
Id. |
Calendar |
getCalendar()
Gets the
Calendar associated with this session. |
Id |
getCalendarId()
Gets the
Calendar Id associated with
this session. |
CyclicTimePeriodForm |
getCyclicTimePeriodFormForCreate(Type[] cyclicTimePeriodRecordTypes)
Gets the cyclic time period form for creating new cyclic time periods.
|
CyclicTimePeriodForm |
getCyclicTimePeriodFormForUpdate(Id cyclicTimePeriodId)
Gets the cyclic time period form for updating an existing cyclic time
period.
|
void |
updateCyclicTimePeriod(CyclicTimePeriodForm cyclicTimePeriodForm)
Updates an existing tiem period.
|
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 canCreateCyclicTimePeriods()
CyclicTimePeriods. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known creating a CyclicTimePeriod 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 CyclicTimePeriod
creation is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateCyclicTimePeriodWithRecordTypes(Type[] cyclicTimePeriodRecordTypes)
CyclicTimePeriod
using the desired record types. While
CalendaringCycleManager.getCyclicTimePeriodRecordTypes() can
be used to examine which records are supported, this method tests
which record(s) are required for creating a specific
CyclicTimePeriod. Providing an empty array tests if a
CyclicTimePeriod can be created with no records.cyclicTimePeriodRecordTypes - array of cyclic time period record
types true if CyclicTimePeriod
creation using the specified record Types is
supported, false otherwiseNullArgumentException -
cyclicTimePeriodRecordTypes is null mandatory - This method must be implemented. CyclicTimePeriodForm getCyclicTimePeriodFormForCreate(Type[] cyclicTimePeriodRecordTypes) throws OperationFailedException, PermissionDeniedException
cyclicTimePeriodRecordTypes - array of cyclic time period record
typesNullArgumentException -
cyclicTimePeriodRecordTypes is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. CyclicTimePeriod createCyclicTimePeriod(CyclicTimePeriodForm cyclicTimePeriodForm) throws OperationFailedException, PermissionDeniedException
CyclicTimePeriod. cyclicTimePeriodForm - the forms for this
CyclicTimePeriod CyclicTimePeriod IllegalStateException - cyclicTimePeriodForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - cyclicTimePeriodForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - cyclicTimePeriodForm
did not originate from
getCyclicTimePeriodFormForCreate() mandatory - This method must be implemented. boolean canUpdateCyclicTimePeriods()
CyclicTimePeriods. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known updating a CyclicTimePeriod
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 time period modification is not
authorized, true otherwisemandatory - This method must be implemented. CyclicTimePeriodForm getCyclicTimePeriodFormForUpdate(Id cyclicTimePeriodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
cyclicTimePeriodId - the Id of the
CyclicTimePeriod NotFoundException - cyclicTimePeriodId
is not foundNullArgumentException - cyclicTimePeriodid
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateCyclicTimePeriod(CyclicTimePeriodForm cyclicTimePeriodForm) throws OperationFailedException, PermissionDeniedException
cyclicTimePeriodForm - the form containing the elements to be
updatedIllegalStateException - cyclicTimePeriodForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - cyclicTimePeriodForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - cyclicTimePeriodForm
did not originate from
getCyclicTimePeriodFormForUpdate() mandatory - This method must be implemented. boolean canDeleteCyclicTimePeriods()
CyclicTimePeriods. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known deleting a CyclicTimePeriod
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 CyclicTimePeriod
deletion is not authorized, true otherwisemandatory - This method must be implemented. void deleteCyclicTimePeriod(Id cyclicTimePeriodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CyclicTimePeriod identified by the given
Id. cyclicTimePeriodId - the Id of the
CyclicTimePeriod to deleteNotFoundException - a CyclicTimePeriod
was not found identified by the given Id NullArgumentException - cyclicTimePeriodId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageCyclicTimePeriodAliases()
Id aliases for
CyclicTimePeriods. 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 CyclicTimePeriod
aliasing is not authorized, true otherwisemandatory - This method must be implemented. void aliasCyclicTimePeriod(Id cyclicTimePeriodId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a CyclicTimePeriod for the
purpose of creating compatibility. The primary Id of
the CyclicTimePeriod 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 time period, it is
reassigned to the given cyclic time period Id. cyclicTimePeriodId - the Id of a
CyclicTimePeriod aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - cyclicTimePeriodId
not foundNullArgumentException - cyclicTimePeriodId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.