Interface CommissionEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes commission enablers. The data for
create and update is provided via the CommissionEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasCommissionEnabler(Id commissionEnablerId, Id aliasId) Adds anIdto aCommissionEnablerfor the purpose of creating compatibility.booleanTests if this user can create commission enablers.booleancanCreateCommissionEnablerWithRecordTypes(Type[] commissionEnablerRecordTypes) Tests if this user can create a singleCommissionEnablerusing the desired record types.booleanTests if this user can delete commission enablers.booleanTests if this user can manageIdaliases for commission enablers.booleanTests if this user can update commission enablers.createCommissionEnabler(CommissionEnablerForm commissionEnablerForm) Creates a newCommissionEnabler.voiddeleteCommissionEnabler(Id commissionEnablerId) Deletes aCommissionEnabler.getCommissionEnablerFormForCreate(Type[] commissionEnablerRecordTypes) Gets the commission enabler form for creating new commission enablers.getCommissionEnablerFormForUpdate(Id commissionEnablerId) Gets the commission enabler form for updating an existing commission enabler.Gets theFoundryassociated with this session.Gets theFoundryIdassociated with this session.voidupdateCommissionEnabler(CommissionEnablerForm commissionEnablerForm) Updates an existing commission 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
-
getFoundryId
Id getFoundryId()Gets theFoundryIdassociated with this session.- Returns:
- the
Foundry Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getFoundry
Gets theFoundryassociated with this session.- Returns:
- the foundry
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateCommissionEnabler
boolean canCreateCommissionEnabler()Tests if this user can create commission enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aCommissionEnablerwill 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:
falseifCommissionEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateCommissionEnablerWithRecordTypes
Tests if this user can create a singleCommissionEnablerusing the desired record types. WhileResourcingRulesManager.getCommissionEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificCommissionEnabler. Providing an empty array tests if aCommissionEnablercan be created with no records.- Parameters:
commissionEnablerRecordTypes- array of commission enabler record types- Returns:
trueifCommissionEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-commissionEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getCommissionEnablerFormForCreate
CommissionEnablerForm getCommissionEnablerFormForCreate(Type[] commissionEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the commission enabler form for creating new commission enablers. A new form should be requested for each create transaction.- Parameters:
commissionEnablerRecordTypes- array of commission enabler record types- Returns:
- the commission enabler form
- Throws:
NullArgumentException-commissionEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form with requested record types- Compliance:
mandatory- This method must be implemented.
-
createCommissionEnabler
CommissionEnabler createCommissionEnabler(CommissionEnablerForm commissionEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newCommissionEnabler.- Parameters:
commissionEnablerForm- the form for thisCommissionEnabler- Returns:
- the new
CommissionEnabler - Throws:
IllegalStateException-commissionEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-commissionEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-commissionEnablerFormdid not originate fromgetCommissionEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateCommissionEnablers
boolean canUpdateCommissionEnablers()Tests if this user can update commission enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aCommissionEnablerwill 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:
falseifCommissionEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getCommissionEnablerFormForUpdate
CommissionEnablerForm getCommissionEnablerFormForUpdate(Id commissionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the commission enabler form for updating an existing commission enabler. A new commission enabler form should be requested for each update transaction.- Parameters:
commissionEnablerId- theIdof theCommissionEnabler- Returns:
- the commission enabler form
- Throws:
NotFoundException-commissionEnablerIdis not foundNullArgumentException-commissionEnablerdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateCommissionEnabler
void updateCommissionEnabler(CommissionEnablerForm commissionEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing commission enabler.- Parameters:
commissionEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-commissionEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-commissionEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-commissionEnablerFormdid not originate fromgetCommissionEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteCommissionEnablers
boolean canDeleteCommissionEnablers()Tests if this user can delete commission enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aCommissionEnablerwill 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:
falseifCommissionEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteCommissionEnabler
void deleteCommissionEnabler(Id commissionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aCommissionEnabler.- Parameters:
commissionEnablerId- theIdof theCommissionEnablerto remove- Throws:
NotFoundException-commissionEnablerIdnot foundNullArgumentException-commissionEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageCommissionEnablerAliases
boolean canManageCommissionEnablerAliases()Tests if this user can manageIdaliases for commission 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:
falseifCommissionEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasCommissionEnabler
void aliasCommissionEnabler(Id commissionEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aCommissionEnablerfor the purpose of creating compatibility. The primaryIdof theCommissionEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another commission enabler. it is reassigned to the given commission enablerId.- Parameters:
commissionEnablerId- theIdof aCommissionEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-commissionEnablerIdnot foundNullArgumentException-commissionEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-