Interface CanonicalUnitProcessorAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes canonical unit processors. The data
for create and update is provided via the
CanonicalUnitProcessorForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasCanonicalUnitProcessor(Id canonicalUnitProcessorId, Id aliasId) Adds anIdto aCanonicalUnitProcessorfor the purpose of creating compatibility.booleanTests if this user can create canonical unit processors.booleancanCreateCanonicalUnitProcessorWithRecordTypes(Type[] canonicalUnitProcessorRecordTypes) Tests if this user can create a singleCanonicalUnitProcessorusing the desired record types.booleanTests if this user can delete canonical unit processors.booleanTests if this user can manageIdaliases for canonical unit processors.booleanTests if this user can update canonical unit processors.createCanonicalUnitProcessor(CanonicalUnitProcessorForm canonicalUnitProcessorForm) Creates a newCanonicalUnitProcessor.voiddeleteCanonicalUnitProcessor(Id canonicalUnitProcessorId) Deletes aCanonicalUnitProcessor.getCanonicalUnitProcessorFormForCreate(Type[] canonicalUnitProcessorRecordTypes) Gets the canonical unit processor form for creating new canonical unit processors.getCanonicalUnitProcessorFormForUpdate(Id canonicalUnitProcessorId) Gets the canonical unit processor form for updating an existing canonical unit processor.Gets theCatalogueassociated with this session.Gets theCatalogueIdassociated with this session.voidupdateCanonicalUnitProcessor(CanonicalUnitProcessorForm canonicalUnitProcessorForm) Updates an existing canonical unit processor.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.
-
canCreateCanonicalUnitProcessor
boolean canCreateCanonicalUnitProcessor()Tests if this user can create canonical unit processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aCanonicalUnitProcessorwill 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:
falseifCanonicalUnitProcessorcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateCanonicalUnitProcessorWithRecordTypes
Tests if this user can create a singleCanonicalUnitProcessorusing the desired record types. WhileOfferingRulesManager.getCanonicalUnitProcessorRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificCanonicalUnitProcessor. Providing an empty array tests if aCanonicalUnitProcessorcan be created with no records.- Parameters:
canonicalUnitProcessorRecordTypes- array of canonical unit processor record types- Returns:
trueifCanonicalUnitProcessorcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-canonicalUnitProcessorRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getCanonicalUnitProcessorFormForCreate
CanonicalUnitProcessorForm getCanonicalUnitProcessorFormForCreate(Type[] canonicalUnitProcessorRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the canonical unit processor form for creating new canonical unit processors. A new form should be requested for each create transaction.- Parameters:
canonicalUnitProcessorRecordTypes- array of canonical unit processor record types- Returns:
- the canonical unit processor form
- Throws:
NullArgumentException-canonicalUnitProcessorRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createCanonicalUnitProcessor
CanonicalUnitProcessor createCanonicalUnitProcessor(CanonicalUnitProcessorForm canonicalUnitProcessorForm) throws OperationFailedException, PermissionDeniedException Creates a newCanonicalUnitProcessor.- Parameters:
canonicalUnitProcessorForm- the form for thisCanonicalUnitProcessor- Returns:
- the new
CanonicalUnitProcessor - Throws:
IllegalStateException-canonicalUnitProcessorFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-canonicalUnitProcessorFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-canonicalUnitProcessorForm did not originate from getCanonicalUnitProcessorFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateCanonicalUnitProcessors
boolean canUpdateCanonicalUnitProcessors()Tests if this user can update canonical unit processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aCanonicalUnitProcessorwill 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:
falseifCanonicalUnitProcessormodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getCanonicalUnitProcessorFormForUpdate
CanonicalUnitProcessorForm getCanonicalUnitProcessorFormForUpdate(Id canonicalUnitProcessorId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the canonical unit processor form for updating an existing canonical unit processor. A new canonical unit processor form should be requested for each update transaction.- Parameters:
canonicalUnitProcessorId- theIdof theCanonicalUnitProcessor- Returns:
- the canonical unit processor form
- Throws:
NotFoundException-canonicalUnitProcessorIdis not foundNullArgumentException-canonicalUnitProcessorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateCanonicalUnitProcessor
void updateCanonicalUnitProcessor(CanonicalUnitProcessorForm canonicalUnitProcessorForm) throws OperationFailedException, PermissionDeniedException Updates an existing canonical unit processor.- Parameters:
canonicalUnitProcessorForm- the form containing the elements to be updated- Throws:
IllegalStateException-canonicalUnitProcessorFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-canonicalUnitProcessorFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-canonicalUnitProcessorForm did not originate from getCanonicalUnitProcessorFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteCanonicalUnitProcessors
boolean canDeleteCanonicalUnitProcessors()Tests if this user can delete canonical unit processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aCanonicalUnitProcessorwill 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:
falseifCanonicalUnitProcessordeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteCanonicalUnitProcessor
void deleteCanonicalUnitProcessor(Id canonicalUnitProcessorId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aCanonicalUnitProcessor.- Parameters:
canonicalUnitProcessorId- theIdof theCanonicalUnitProcessorto remove- Throws:
NotFoundException-canonicalUnitProcessorIdnot foundNullArgumentException-canonicalUnitProcessorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageCanonicalUnitProcessorAliases
boolean canManageCanonicalUnitProcessorAliases()Tests if this user can manageIdaliases for canonical unit processors. 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:
falseifCanonicalUnitProcessoraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasCanonicalUnitProcessor
void aliasCanonicalUnitProcessor(Id canonicalUnitProcessorId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aCanonicalUnitProcessorfor the purpose of creating compatibility. The primaryIdof theCanonicalUnitProcessoris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another canonical unit processor. it is reassigned to the given canonical unit processorId.- Parameters:
canonicalUnitProcessorId- theIdof aCanonicalUnitProcessoraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-canonicalUnitProcessorIdnot foundNullArgumentException-canonicalUnitProcessorIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-