Interface CanonicalUnitEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes canonical unit enablers. The data for
create and update is provided via the CanonicalUnitEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasCanonicalUnitEnabler(Id canonicalUnitEnablerId, Id aliasId) Adds anIdto aCanonicalUnitEnablerfor the purpose of creating compatibility.booleanTests if this user can create canonical unit enablers.booleancanCreateCanonicalUnitEnablerWithRecordTypes(Type[] canonicalUnitEnablerRecordTypes) Tests if this user can create a singleCanonicalUnitEnablerusing the desired record types.booleanTests if this user can delete canonical unit enablers.booleanTests if this user can manageIdaliases for canonical unit enablers.booleanTests if this user can update canonical unit enablers.createCanonicalUnitEnabler(CanonicalUnitEnablerForm canonicalUnitEnablerForm) Creates a newCanonicalUnitEnabler.voiddeleteCanonicalUnitEnabler(Id canonicalUnitEnablerId) Deletes aCanonicalUnitEnabler.getCanonicalUnitEnablerFormForCreate(Type[] canonicalUnitEnablerRecordTypes) Gets the canonical unit enabler form for creating new canonical unit enablers.getCanonicalUnitEnablerFormForUpdate(Id canonicalUnitEnablerId) Gets the canonical unit enabler form for updating an existing canonical unit enabler.Gets theCatalogueassociated with this session.Gets theCatalogueIdassociated with this session.voidupdateCanonicalUnitEnabler(CanonicalUnitEnablerForm canonicalUnitEnablerForm) Updates an existing canonical unit 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
-
getCatalogueId
Id getCatalogueId()Gets theCatalogueIdassociated with this session.- Returns:
- the
Catalogue Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCatalogue
Gets theCatalogueassociated with this session.- Returns:
- the catalogue
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateCanonicalUnitEnabler
boolean canCreateCanonicalUnitEnabler()Tests if this user can create canonical unit enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aCanonicalUnitEnablerwill 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:
falseifCanonicalUnitEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateCanonicalUnitEnablerWithRecordTypes
Tests if this user can create a singleCanonicalUnitEnablerusing the desired record types. WhileOfferingRulesManager.getCanonicalUnitEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificCanonicalUnitEnabler. Providing an empty array tests if aCanonicalUnitEnablercan be created with no records.- Parameters:
canonicalUnitEnablerRecordTypes- array of canonical unit enabler record types- Returns:
trueifCanonicalUnitEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-canonicalUnitEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getCanonicalUnitEnablerFormForCreate
CanonicalUnitEnablerForm getCanonicalUnitEnablerFormForCreate(Type[] canonicalUnitEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the canonical unit enabler form for creating new canonical unit enablers. A new form should be requested for each create transaction.- Parameters:
canonicalUnitEnablerRecordTypes- array of canonical unit enabler record types- Returns:
- the canonical unit enabler form
- Throws:
NullArgumentException-canonicalUnitEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createCanonicalUnitEnabler
CanonicalUnitEnabler createCanonicalUnitEnabler(CanonicalUnitEnablerForm canonicalUnitEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newCanonicalUnitEnabler.- Parameters:
canonicalUnitEnablerForm- the form for thisCanonicalUnitEnabler- Returns:
- the new
CanonicalUnitEnabler - Throws:
IllegalStateException-canonicalUnitEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-canonicalUnitEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-canonicalUnitEnablerForm did not originate from getCanonicalUnitEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateCanonicalUnitEnablers
boolean canUpdateCanonicalUnitEnablers()Tests if this user can update canonical unit enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aCanonicalUnitEnablerwill 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:
falseifCanonicalUnitEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getCanonicalUnitEnablerFormForUpdate
CanonicalUnitEnablerForm getCanonicalUnitEnablerFormForUpdate(Id canonicalUnitEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the canonical unit enabler form for updating an existing canonical unit enabler. A new canonical unit enabler form should be requested for each update transaction.- Parameters:
canonicalUnitEnablerId- theIdof theCanonicalUnitEnabler- Returns:
- the canonical unit enabler form
- Throws:
NotFoundException-canonicalUnitEnablerIdis not foundNullArgumentException-canonicalUnitEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateCanonicalUnitEnabler
void updateCanonicalUnitEnabler(CanonicalUnitEnablerForm canonicalUnitEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing canonical unit enabler.- Parameters:
canonicalUnitEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-canonicalUnitEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-canonicalUnitEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-canonicalUnitEnablerFormdid not originate fromgetCanonicalUnitEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteCanonicalUnitEnablers
boolean canDeleteCanonicalUnitEnablers()Tests if this user can delete canonical unit enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aCanonicalUnitEnablerwill 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:
falseifCanonicalUnitEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteCanonicalUnitEnabler
void deleteCanonicalUnitEnabler(Id canonicalUnitEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aCanonicalUnitEnabler.- Parameters:
canonicalUnitEnablerId- theIdof theCanonicalUnitEnablerto remove- Throws:
NotFoundException-canonicalUnitEnablerIdnot foundNullArgumentException-canonicalUnitEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageCanonicalUnitEnablerAliases
boolean canManageCanonicalUnitEnablerAliases()Tests if this user can manageIdaliases for canonical unit 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:
falseifCanonicalUnitEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasCanonicalUnitEnabler
void aliasCanonicalUnitEnabler(Id canonicalUnitEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aCanonicalUnitEnablerfor the purpose of creating compatibility. The primaryIdof theCanonicalUnitEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another canonical unit enabler. it is reassigned to the given canonical unit enablerId.- Parameters:
canonicalUnitEnablerId- theIdof aCanonicalUnitEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-canonicalUnitEnablerIdnot foundNullArgumentException-canonicalUnitEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-