Interface CatalogEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes catalog enablers. The data for create
and update is provided via the CatalogEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasCatalogEnabler(Id catalogEnablerId, Id aliasId) Adds anIdto aCatalogEnablerfor the purpose of creating compatibility.booleanTests if this user can create catalog enablers.booleancanCreateCatalogEnablerWithRecordTypes(Type[] catalogEnablerRecordTypes) Tests if this user can create a singleCatalogEnablerusing the desired record types.booleanTests if this user can delete catalog enablers.booleanTests if this user can manageIdaliases for catalog enablers.booleanTests if this user can update catalog enablers.createCatalogEnabler(CatalogEnablerForm catalogEnablerForm) Creates a newCatalogEnabler.voiddeleteCatalogEnabler(Id catalogEnablerId) Deletes aCatalogEnabler.Gets theCatalogassociated with this session.getCatalogEnablerFormForCreate(Type[] catalogEnablerRecordTypes) Gets the catalog enabler form for creating new catalog enablers.getCatalogEnablerFormForUpdate(Id catalogEnablerId) Gets the catalog enabler form for updating an existing catalog enabler.Gets theCatalogIdassociated with this session.voidupdateCatalogEnabler(CatalogEnablerForm catalogEnablerForm) Updates an existing catalog 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
-
getCatalogId
Id getCatalogId()Gets theCatalogIdassociated with this session.- Returns:
- the
Catalog Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCatalog
Gets theCatalogassociated with this session.- Returns:
- the catalog
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateCatalogEnabler
boolean canCreateCatalogEnabler()Tests if this user can create catalog enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aCatalogEnablerwill 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:
falseifCatalogEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateCatalogEnablerWithRecordTypes
Tests if this user can create a singleCatalogEnablerusing the desired record types. WhileCatalogingRulesManager.getCatalogEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificCatalogEnabler. Providing an empty array tests if aCatalogEnablercan be created with no records.- Parameters:
catalogEnablerRecordTypes- array of catalog enabler record types- Returns:
trueifCatalogEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-catalogEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getCatalogEnablerFormForCreate
CatalogEnablerForm getCatalogEnablerFormForCreate(Type[] catalogEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the catalog enabler form for creating new catalog enablers. A new form should be requested for each create transaction.- Parameters:
catalogEnablerRecordTypes- array of catalog enabler record types- Returns:
- the catalog enabler form
- Throws:
NullArgumentException-catalogEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createCatalogEnabler
CatalogEnabler createCatalogEnabler(CatalogEnablerForm catalogEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newCatalogEnabler.- Parameters:
catalogEnablerForm- the form for thisCatalogEnabler- Returns:
- the new
CatalogEnabler - Throws:
IllegalStateException-catalogEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-catalogEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-catalogEnablerFormdid not originate fromgetCatalogEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateCatalogEnablers
boolean canUpdateCatalogEnablers()Tests if this user can update catalog enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aCatalogEnablerwill 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:
falseifCatalogEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getCatalogEnablerFormForUpdate
CatalogEnablerForm getCatalogEnablerFormForUpdate(Id catalogEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the catalog enabler form for updating an existing catalog enabler. A new catalog enabler form should be requested for each update transaction.- Parameters:
catalogEnablerId- theIdof theCatalogEnabler- Returns:
- the catalog enabler form
- Throws:
NotFoundException-catalogEnablerIdis not foundNullArgumentException-catalogEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateCatalogEnabler
void updateCatalogEnabler(CatalogEnablerForm catalogEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing catalog enabler.- Parameters:
catalogEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-catalogEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-catalogEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-catalogEnablerFormdid not originate fromgetCatalogEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteCatalogEnablers
boolean canDeleteCatalogEnablers()Tests if this user can delete catalog enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aCatalogEnablerwill 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:
falseifCatalogEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteCatalogEnabler
void deleteCatalogEnabler(Id catalogEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aCatalogEnabler.- Parameters:
catalogEnablerId- theIdof theCatalogEnablerto remove- Throws:
NotFoundException-catalogEnablerIdnot foundNullArgumentException-catalogEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageCatalogEnablerAliases
boolean canManageCatalogEnablerAliases()Tests if this user can manageIdaliases for catalog 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:
falseifCatalogEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasCatalogEnabler
void aliasCatalogEnabler(Id catalogEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aCatalogEnablerfor the purpose of creating compatibility. The primaryIdof theCatalogEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another catalog enabler. it is reassigned to the given catalog enablerId.- Parameters:
catalogEnablerId- theIdof aCatalogEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-catalogEnablerIdnot foundNullArgumentException-catalogEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-