Interface HoldEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes hold enablers. The data for create and
update is provided via the HoldEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasHoldEnabler(Id holdEnablerId, Id aliasId) Adds anIdto aHoldEnablerfor the purpose of creating compatibility.booleanTests if this user can create hold enablers.booleancanCreateHoldEnablerWithRecordTypes(Type[] holdEnablerRecordTypes) Tests if this user can create a singleHoldEnablerusing the desired record types.booleanTests if this user can delete hold enablers.booleanTests if this user can manageIdaliases for hold enablers.booleanTests if this user can update hold enablers.createHoldEnabler(HoldEnablerForm holdEnablerForm) Creates a newHoldEnabler.voiddeleteHoldEnabler(Id holdEnablerId) Deletes aHoldEnabler.getHoldEnablerFormForCreate(Type[] holdEnablerRecordTypes) Gets the hold enabler form for creating new hold enablers.getHoldEnablerFormForUpdate(Id holdEnablerId) Gets the hold enabler form for updating an existing hold enabler.Gets theOublietteassociated with this session.Gets theOublietteIdassociated with this session.voidupdateHoldEnabler(HoldEnablerForm holdEnablerForm) Updates an existing hold 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
-
getOublietteId
Id getOublietteId()Gets theOublietteIdassociated with this session.- Returns:
- the
Oubliette Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getOubliette
Gets theOublietteassociated with this session.- Returns:
- the oubliette
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateHoldEnabler
boolean canCreateHoldEnabler()Tests if this user can create hold enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aHoldEnablerwill 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:
falseifHoldEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateHoldEnablerWithRecordTypes
Tests if this user can create a singleHoldEnablerusing the desired record types. WhileHoldRulesManager.getHoldEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificHoldEnabler. Providing an empty array tests if aHoldEnablercan be created with no records.- Parameters:
holdEnablerRecordTypes- array of hold enabler record types- Returns:
trueifHoldEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-holdEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getHoldEnablerFormForCreate
HoldEnablerForm getHoldEnablerFormForCreate(Type[] holdEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the hold enabler form for creating new hold enablers. A new form should be requested for each create transaction.- Parameters:
holdEnablerRecordTypes- array of hold enabler record types- Returns:
- the hold enabler form
- Throws:
NullArgumentException-holdEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createHoldEnabler
HoldEnabler createHoldEnabler(HoldEnablerForm holdEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newHoldEnabler.- Parameters:
holdEnablerForm- the form for thisHoldEnabler- Returns:
- the new
HoldEnabler - Throws:
IllegalStateException-holdEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-holdEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-holdEnablerFormdid not originate fromgetHoldEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateHoldEnablers
boolean canUpdateHoldEnablers()Tests if this user can update hold enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aHoldEnablerwill 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:
falseifHoldEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getHoldEnablerFormForUpdate
HoldEnablerForm getHoldEnablerFormForUpdate(Id holdEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the hold enabler form for updating an existing hold enabler. A new hold enabler form should be requested for each update transaction.- Parameters:
holdEnablerId- theIdof theHoldEnabler- Returns:
- the hold enabler form
- Throws:
NotFoundException-holdEnablerIdis not foundNullArgumentException-holdEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateHoldEnabler
void updateHoldEnabler(HoldEnablerForm holdEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing hold enabler.- Parameters:
holdEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-holdEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-holdEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-holdEnablerFormdid not originate fromgetHoldEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteHoldEnablers
boolean canDeleteHoldEnablers()Tests if this user can delete hold enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aHoldEnablerwill 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:
falseifHoldEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteHoldEnabler
void deleteHoldEnabler(Id holdEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aHoldEnabler.- Parameters:
holdEnablerId- theIdof theHoldEnablerto remove- Throws:
NotFoundException-holdEnablerIdnot foundNullArgumentException-holdEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageHoldEnablerAliases
boolean canManageHoldEnablerAliases()Tests if this user can manageIdaliases for hold 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:
falseifHoldEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasHoldEnabler
void aliasHoldEnabler(Id holdEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aHoldEnablerfor the purpose of creating compatibility. The primaryIdof theHoldEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another hold enabler. it is reassigned to the given hold enablerId.- Parameters:
holdEnablerId- theIdof aHoldEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-holdEnablerIdnot foundNullArgumentException-holdEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-