Interface OfferingConstrainerEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes offering constrainer enablers. The
data for create and update is provided via the
OfferingConstrainerEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasOfferingConstrainerEnabler(Id offeringConstrainerEnablerId, Id aliasId) Adds anIdto anOfferingConstrainerEnablerfor the purpose of creating compatibility.booleanTests if this user can create offering constrainer enablers.booleancanCreateOfferingConstrainerEnablerWithRecordTypes(Type[] offeringConstrainerEnablerRecordTypes) Tests if this user can create a singleOfferingConstrainerEnablerusing the desired record types.booleanTests if this user can delete offering constrainer enablers.booleanTests if this user can manageIdaliases for offering constrainer enablers.booleanTests if this user can update offering constrainer enablers.createOfferingConstrainerEnabler(OfferingConstrainerEnablerForm offeringConstrainerEnablerForm) Creates a newOfferingConstrainerEnabler.voiddeleteOfferingConstrainerEnabler(Id offeringConstrainerEnablerId) Deletes anOfferingConstrainerEnabler.Gets theCatalogueassociated with this session.Gets theCatalogueIdassociated with this session.getOfferingConstrainerEnablerFormForCreate(Type[] offeringConstrainerEnablerRecordTypes) Gets the offering constrainer enabler form for creating new offering constrainer enablers.getOfferingConstrainerEnablerFormForUpdate(Id offeringConstrainerEnablerId) Gets the offering constrainer enabler form for updating an existing offering constrainer enabler.voidupdateOfferingConstrainerEnabler(OfferingConstrainerEnablerForm offeringConstrainerEnablerForm) Updates an existing offering constrainer 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.
-
canCreateOfferingConstrainerEnabler
boolean canCreateOfferingConstrainerEnabler()Tests if this user can create offering constrainer enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anOfferingConstrainerEnablerwill 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:
falseifOfferingConstrainerEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateOfferingConstrainerEnablerWithRecordTypes
boolean canCreateOfferingConstrainerEnablerWithRecordTypes(Type[] offeringConstrainerEnablerRecordTypes) Tests if this user can create a singleOfferingConstrainerEnablerusing the desired record types. WhileOfferingRulesManager.getOfferingConstrainerEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificOfferingConstrainerEnabler. Providing an empty array tests if anOfferingConstrainerEnablercan be created with no records.- Parameters:
offeringConstrainerEnablerRecordTypes- array of offering constrainer enabler record types- Returns:
trueifOfferingConstrainerEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-offeringConstrainerEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getOfferingConstrainerEnablerFormForCreate
OfferingConstrainerEnablerForm getOfferingConstrainerEnablerFormForCreate(Type[] offeringConstrainerEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the offering constrainer enabler form for creating new offering constrainer enablers. A new form should be requested for each create transaction.- Parameters:
offeringConstrainerEnablerRecordTypes- array of offering constrainer enabler record types- Returns:
- the offering constrainer enabler form
- Throws:
NullArgumentException-offeringConstrainerEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createOfferingConstrainerEnabler
OfferingConstrainerEnabler createOfferingConstrainerEnabler(OfferingConstrainerEnablerForm offeringConstrainerEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newOfferingConstrainerEnabler.- Parameters:
offeringConstrainerEnablerForm- the form for thisOfferingConstrainerEnabler- Returns:
- the new
OfferingConstrainerEnabler - Throws:
IllegalStateException-offeringConstrainerEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-offeringConstrainerEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-offeringConstrainerEnablerForm did not originate from getOfferingConstrainerEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateOfferingConstrainerEnablers
boolean canUpdateOfferingConstrainerEnablers()Tests if this user can update offering constrainer enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anOfferingConstrainerEnablerwill 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:
falseifOfferingConstrainerEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getOfferingConstrainerEnablerFormForUpdate
OfferingConstrainerEnablerForm getOfferingConstrainerEnablerFormForUpdate(Id offeringConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the offering constrainer enabler form for updating an existing offering constrainer enabler. A new offering constrainer enabler form should be requested for each update transaction.- Parameters:
offeringConstrainerEnablerId- theIdof theOfferingConstrainerEnabler- Returns:
- the offering constrainer enabler form
- Throws:
NotFoundException-offeringConstrainerEnablerIdis not foundNullArgumentException-offeringConstrainerEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateOfferingConstrainerEnabler
void updateOfferingConstrainerEnabler(OfferingConstrainerEnablerForm offeringConstrainerEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing offering constrainer enabler.- Parameters:
offeringConstrainerEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-offeringConstrainerEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-offeringConstrainerEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-offeringConstrainerEnablerFormdid not originate fromgetOfferingConstrainerEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteOfferingConstrainerEnablers
boolean canDeleteOfferingConstrainerEnablers()Tests if this user can delete offering constrainer enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anOfferingConstrainerEnablerwill 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:
falseifOfferingConstrainerEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteOfferingConstrainerEnabler
void deleteOfferingConstrainerEnabler(Id offeringConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anOfferingConstrainerEnabler.- Parameters:
offeringConstrainerEnablerId- theIdof theOfferingConstrainerEnablerto remove- Throws:
NotFoundException-offeringConstrainerEnablerIdnot foundNullArgumentException-offeringConstrainerEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageOfferingConstrainerEnablerAliases
boolean canManageOfferingConstrainerEnablerAliases()Tests if this user can manageIdaliases for offering constrainer 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:
falseifOfferingConstrainerEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasOfferingConstrainerEnabler
void aliasOfferingConstrainerEnabler(Id offeringConstrainerEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anOfferingConstrainerEnablerfor the purpose of creating compatibility. The primaryIdof theOfferingConstrainerEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another offering constrainer enabler. it is reassigned to the given offering constrainer enablerId.- Parameters:
offeringConstrainerEnablerId- theIdof anOfferingConstrainerEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-offeringConstrainerEnablerIdnot foundNullArgumentException-offeringConstrainerEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-