Interface OfferingConstrainerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes offering constrainers. The data for
create and update is provided via the OfferingConstrainerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasOfferingConstrainer(Id offeringConstrainerId, Id aliasId) Adds anIdto anOfferingConstrainerfor the purpose of creating compatibility.booleanTests if this user can create offering constrainers.booleancanCreateOfferingConstrainerWithRecordTypes(Type[] offeringConstrainerRecordTypes) OfferingRulesManager.getOfferingConstrainerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificOfferingConstrainer.booleanTests if this user can delete offering constrainers.booleanTests if this user can manageIdaliases for offering constrainers.booleanTests if this user can update offering constrainers.createOfferingConstrainer(OfferingConstrainerForm offeringConstrainerForm) Creates a newOfferingConstrainer.voiddeleteOfferingConstrainer(Id offeringConstrainerId) Deletes anOfferingConstrainer.Gets theCatalogueassociated with this session.Gets theCatalogueIdassociated with this session.getOfferingConstrainerFormForCreate(Type[] offeringConstrainerRecordTypes) Gets the offering constrainer form for creating new offering constrainers.getOfferingConstrainerFormForUpdate(Id offeringConstrainerId) Gets the offering constrainer form for updating an existing offering constrainer.voidupdateOfferingConstrainer(OfferingConstrainerForm offeringConstrainerForm) Updates an existing offering constrainer.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.
-
canCreateOfferingConstrainer
boolean canCreateOfferingConstrainer()Tests if this user can create offering constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anOfferingConstrainerwill 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:
falseifOfferingConstrainercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateOfferingConstrainerWithRecordTypes
OfferingRulesManager.getOfferingConstrainerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificOfferingConstrainer. Providing an empty array tests if anOfferingConstrainercan be created with no records.- Parameters:
offeringConstrainerRecordTypes- array of offering constrainer record types- Returns:
trueifOfferingConstrainercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-offeringConstrainerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getOfferingConstrainerFormForCreate
OfferingConstrainerForm getOfferingConstrainerFormForCreate(Type[] offeringConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the offering constrainer form for creating new offering constrainers. A new form should be requested for each create transaction.- Parameters:
offeringConstrainerRecordTypes- array of offering constrainer record types- Returns:
- the offering constrainer form
- Throws:
NullArgumentException-offeringConstrainerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createOfferingConstrainer
OfferingConstrainer createOfferingConstrainer(OfferingConstrainerForm offeringConstrainerForm) throws OperationFailedException, PermissionDeniedException Creates a newOfferingConstrainer.- Parameters:
offeringConstrainerForm- the form for thisOfferingConstrainer- Returns:
- the new
OfferingConstrainer - Throws:
IllegalStateException-offeringConstrainerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-offeringConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-offeringConstrainerFormdid not originate fromgetOfferingConstrainerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateOfferingConstrainers
boolean canUpdateOfferingConstrainers()Tests if this user can update offering constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anOfferingConstrainerwill 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:
falseifOfferingConstrainermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getOfferingConstrainerFormForUpdate
OfferingConstrainerForm getOfferingConstrainerFormForUpdate(Id offeringConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the offering constrainer form for updating an existing offering constrainer. A new offering constrainer form should be requested for each update transaction.- Parameters:
offeringConstrainerId- theIdof theOfferingConstrainer- Returns:
- the offering constrainer form
- Throws:
NotFoundException-offeringConstrainerIdis not foundNullArgumentException-offeringConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateOfferingConstrainer
void updateOfferingConstrainer(OfferingConstrainerForm offeringConstrainerForm) throws OperationFailedException, PermissionDeniedException Updates an existing offering constrainer.- Parameters:
offeringConstrainerForm- the form containing the elements to be updated- Throws:
IllegalStateException-offeringConstrainerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-offeringConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-offeringConstrainerFormdid not originate fromgetOfferingConstrainerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteOfferingConstrainers
boolean canDeleteOfferingConstrainers()Tests if this user can delete offering constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anOfferingConstrainerwill 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:
falseifOfferingConstrainerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteOfferingConstrainer
void deleteOfferingConstrainer(Id offeringConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anOfferingConstrainer.- Parameters:
offeringConstrainerId- theIdof theOfferingConstrainerto remove- Throws:
NotFoundException-offeringConstrainerIdnot foundNullArgumentException-offeringConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageOfferingConstrainerAliases
boolean canManageOfferingConstrainerAliases()Tests if this user can manageIdaliases for offering constrainers. 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:
falseifOfferingConstraineraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasOfferingConstrainer
void aliasOfferingConstrainer(Id offeringConstrainerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anOfferingConstrainerfor the purpose of creating compatibility. The primaryIdof theOfferingConstraineris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another offering constrainer. it is reassigned to the given offering constrainerId.- Parameters:
offeringConstrainerId- theIdof anOfferingConstraineraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-offeringConstrainerIdnot foundNullArgumentException-offeringConstrainerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-