Interface OffsetEventEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes offset event enablers. The data for
create and update is provided via the OffsetEventEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasOffsetEventEnabler(Id offsetEventEnablerId, Id aliasId) Adds anIdto anOffsetEventEnablerfor the purpose of creating compatibility.booleanTests if this user can create offset event enablers.booleancanCreateOffsetEventEnablerWithRecordTypes(Type[] offsetEventEnablerRecordTypes) Tests if this user can create a singleOffsetEventEnablerusing the desired record types.booleanTests if this user can delete offset event enablers.booleanTests if this user can manageIdaliases for offset event enablers.booleanTests if this user can update offset event enablers.createOffsetEventEnabler(OffsetEventEnablerForm offsetEventEnablerForm) Creates a newOffsetEventEnabler.voiddeleteOffsetEventEnabler(Id offsetEventEnablerId) Deletes anOffsetEventEnabler.Gets theCalendarassociated with this session.Gets theCalendarIdassociated with this session.getOffsetEventEnablerFormForCreate(Type[] offsetEventEnablerRecordTypes) Gets the offset event enabler form for creating new offset event enablers.getOffsetEventEnablerFormForUpdate(Id offsetEventEnablerId) Gets the offset event enabler form for updating an existing offset event enabler.voidupdateOffsetEventEnabler(OffsetEventEnablerForm offsetEventEnablerForm) Updates an existing offset event enabler.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 calendar
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateOffsetEventEnabler
boolean canCreateOffsetEventEnabler()Tests if this user can create offset event enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anOffsetEventEnablerwill 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:
falseifOffsetEventEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateOffsetEventEnablerWithRecordTypes
Tests if this user can create a singleOffsetEventEnablerusing the desired record types. WhileCalendarRulesManager.getOffsetEventEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificOffsetEventEnabler. Providing an empty array tests if anOffsetEventEnablercan be created with no records.- Parameters:
offsetEventEnablerRecordTypes- array of offset event enabler record types- Returns:
trueifOffsetEventEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-offsetEventEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getOffsetEventEnablerFormForCreate
OffsetEventEnablerForm getOffsetEventEnablerFormForCreate(Type[] offsetEventEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the offset event enabler form for creating new offset event enablers. A new form should be requested for each create transaction.- Parameters:
offsetEventEnablerRecordTypes- array of offset event enabler record types- Returns:
- the offset event enabler form
- Throws:
NullArgumentException-offsetEventEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createOffsetEventEnabler
OffsetEventEnabler createOffsetEventEnabler(OffsetEventEnablerForm offsetEventEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newOffsetEventEnabler.- Parameters:
offsetEventEnablerForm- the form for thisOffsetEventEnabler- Returns:
- the new
OffsetEventEnabler - Throws:
IllegalStateException-offsetEventEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-offsetEventEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-offsetEventEnablerFormdid not originate fromgetOffsetEventEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateOffsetEventEnablers
boolean canUpdateOffsetEventEnablers()Tests if this user can update offset event enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anOffsetEventEnablerwill 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:
falseifOffsetEventEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getOffsetEventEnablerFormForUpdate
OffsetEventEnablerForm getOffsetEventEnablerFormForUpdate(Id offsetEventEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the offset event enabler form for updating an existing offset event enabler. A new offset event enabler form should be requested for each update transaction.- Parameters:
offsetEventEnablerId- theIdof theOffsetEventEnabler- Returns:
- the offset event enabler form
- Throws:
NotFoundException-offsetEventEnablerIdis not foundNullArgumentException-offsetEventEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateOffsetEventEnabler
void updateOffsetEventEnabler(OffsetEventEnablerForm offsetEventEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing offset event enabler.- Parameters:
offsetEventEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-offsetEventEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-offsetEventEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-offsetEventEnablerFormdid not originate fromgetOffsetEventEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteOffsetEventEnablers
boolean canDeleteOffsetEventEnablers()Tests if this user can delete offset event enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anOffsetEventEnablerwill 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:
falseifOffsetEventEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteOffsetEventEnabler
void deleteOffsetEventEnabler(Id offsetEventEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anOffsetEventEnabler.- Parameters:
offsetEventEnablerId- theIdof theOffsetEventEnablerto remove- Throws:
NotFoundException-offsetEventEnablerIdnot foundNullArgumentException-offsetEventEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageOffsetEventEnablerAliases
boolean canManageOffsetEventEnablerAliases()Tests if this user can manageIdaliases for offset event enablers. 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:
falseifOffsetEventEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasOffsetEventEnabler
void aliasOffsetEventEnabler(Id offsetEventEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anOffsetEventEnablerfor the purpose of creating compatibility. The primaryIdof theOffsetEventEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another offset event enabler. it is reassigned to the given offset event enablerId.- Parameters:
offsetEventEnablerId- theIdof anOffsetEventEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-offsetEventEnablerIdnot foundNullArgumentException-offsetEventEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-