Interface AvailabilityEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes availability enablers. The data for
create and update is provided via the AvailabilityEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasAvailabilityEnabler(Id availabilityEnablerId, Id aliasId) Adds anIdto anAvailabilityEnablerfor the purpose of creating compatibility.booleanTests if this user can create availability enablers.booleancanCreateAvailabilityEnablerWithRecordTypes(Type[] availabilityEnablerRecordTypes) Tests if this user can create a singleAvailabilityEnablerusing the desired record types.booleanTests if this user can delete availability enablers.booleanTests if this user can manageIdaliases for availability enablers.booleanTests if this user can update availability enablers.createAvailabilityEnabler(AvailabilityEnablerForm availabilityEnablerForm) Creates a newAvailabilityEnabler.voiddeleteAvailabilityEnabler(Id availabilityEnablerId) Deletes anAvailabilityEnabler.getAvailabilityEnablerFormForCreate(Type[] availabilityEnablerRecordTypes) Gets the availability enabler form for creating new availability enablers.getAvailabilityEnablerFormForUpdate(Id availabilityEnablerId) Gets the availability enabler form for updating an existing availability enabler.Gets theFoundryassociated with this session.Gets theFoundryIdassociated with this session.voidupdateAvailabilityEnabler(AvailabilityEnablerForm availabilityEnablerForm) Updates an existing availability 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
-
getFoundryId
Id getFoundryId()Gets theFoundryIdassociated with this session.- Returns:
- the
Foundry Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getFoundry
Gets theFoundryassociated with this session.- Returns:
- the foundry
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateAvailabilityEnabler
boolean canCreateAvailabilityEnabler()Tests if this user can create availability enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anAvailabilityEnablerwill 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:
falseifAvailabilityEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateAvailabilityEnablerWithRecordTypes
Tests if this user can create a singleAvailabilityEnablerusing the desired record types. WhileResourcingRulesManager.getAvailabilityEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAvailabilityEnabler. Providing an empty array tests if anAvailabilityEnablercan be created with no records.- Parameters:
availabilityEnablerRecordTypes- array of availability enabler record types- Returns:
trueifAvailabilityEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-availabilityEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getAvailabilityEnablerFormForCreate
AvailabilityEnablerForm getAvailabilityEnablerFormForCreate(Type[] availabilityEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the availability enabler form for creating new availability enablers. A new form should be requested for each create transaction.- Parameters:
availabilityEnablerRecordTypes- array of availability enabler record types- Returns:
- the availability enabler form
- Throws:
NullArgumentException-availabilityEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form with requested record types- Compliance:
mandatory- This method must be implemented.
-
createAvailabilityEnabler
AvailabilityEnabler createAvailabilityEnabler(AvailabilityEnablerForm availabilityEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newAvailabilityEnabler.- Parameters:
availabilityEnablerForm- the form for thisAvailabilityEnabler- Returns:
- the new
AvailabilityEnabler - Throws:
IllegalStateException-availabilityEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-availabilityEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-availabilityEnablerFormdid not originate fromgetAvailabilityEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateAvailabilityEnablers
boolean canUpdateAvailabilityEnablers()Tests if this user can update availability enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAvailabilityEnablerwill 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:
falseifAvailabilityEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getAvailabilityEnablerFormForUpdate
AvailabilityEnablerForm getAvailabilityEnablerFormForUpdate(Id availabilityEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the availability enabler form for updating an existing availability enabler. A new availability enabler form should be requested for each update transaction.- Parameters:
availabilityEnablerId- theIdof theAvailabilityEnabler- Returns:
- the availability enabler form
- Throws:
NotFoundException-availabilityEnablerIdis not foundNullArgumentException-availabilityEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateAvailabilityEnabler
void updateAvailabilityEnabler(AvailabilityEnablerForm availabilityEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing availability enabler.- Parameters:
availabilityEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-availabilityEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-availabilityEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-availabilityEnablerFormdid not originate fromgetAvailabilityEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteAvailabilityEnablers
boolean canDeleteAvailabilityEnablers()Tests if this user can delete availability enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAvailabilityEnablerwill 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:
falseifAvailabilityEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteAvailabilityEnabler
void deleteAvailabilityEnabler(Id availabilityEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anAvailabilityEnabler.- Parameters:
availabilityEnablerId- theIdof theAvailabilityEnablerto remove- Throws:
NotFoundException-availabilityEnablerIdnot foundNullArgumentException-availabilityEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageAvailabilityEnablerAliases
boolean canManageAvailabilityEnablerAliases()Tests if this user can manageIdaliases for availability 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:
falseifAvailabilityEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasAvailabilityEnabler
void aliasAvailabilityEnabler(Id availabilityEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anAvailabilityEnablerfor the purpose of creating compatibility. The primaryIdof theAvailabilityEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another availability enabler. it is reassigned to the given availability enablerId.- Parameters:
availabilityEnablerId- theIdof anAvailabilityEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-availabilityEnablerIdnot foundNullArgumentException-availabilityEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-