public interface CommissionEnablerAdminSession extends OsidSession
This session creates and removes commission enablers. The data for
create and update is provided via the CommissionEnablerForm.
Modifier and Type | Method and Description |
---|---|
void |
aliasCommissionEnabler(Id commissionEnablerId,
Id aliasId)
Adds an
Id to a CommissionEnabler for
the purpose of creating compatibility. |
boolean |
canCreateCommissionEnabler()
Tests if this user can create commission enablers.
|
boolean |
canCreateCommissionEnablerWithRecordTypes(Type[] commissionEnablerRecordTypes)
Tests if this user can create a single
CommissionEnabler
using the desired record types. |
boolean |
canDeleteCommissionEnablers()
Tests if this user can delete commission enablers.
|
boolean |
canManageCommissionEnablerAliases()
Tests if this user can manage
Id aliases for commission
enablers. |
boolean |
canUpdateCommissionEnablers()
Tests if this user can update commission enablers.
|
CommissionEnabler |
createCommissionEnabler(CommissionEnablerForm commissionEnablerForm)
Creates a new
CommissionEnabler. |
void |
deleteCommissionEnabler(Id commissionEnablerId)
Deletes a
CommissionEnabler. |
CommissionEnablerForm |
getCommissionEnablerFormForCreate(Type[] commissionEnablerRecordTypes)
Gets the commission enabler form for creating new commission enablers.
|
CommissionEnablerForm |
getCommissionEnablerFormForUpdate(Id commissionEnablerId)
Gets the commission enabler form for updating an existing commission
enabler.
|
Foundry |
getFoundry()
Gets the
Foundry associated with this session. |
Id |
getFoundryId()
Gets the
Foundry Id associated with this
session. |
void |
updateCommissionEnabler(CommissionEnablerForm commissionEnablerForm)
Updates an existing commission enabler.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getFoundryId()
Foundry
Id
associated with this
session. Foundry Id
associated with this sessionmandatory
- This method must be implemented. Foundry getFoundry() throws OperationFailedException, PermissionDeniedException
Foundry
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateCommissionEnabler()
CommissionEnabler
will result in a PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer create operations
to an unauthorized user. false
if CommissionEnabler
creation is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateCommissionEnablerWithRecordTypes(Type[] commissionEnablerRecordTypes)
CommissionEnabler
using the desired record types. While
ResourcingRulesManager.getCommissionEnablerRecordTypes()
can
be used to examine which records are supported, this method tests
which record(s) are required for creating a specific
CommissionEnabler.
Providing an empty array tests if a
CommissionEnabler
can be created with no records.commissionEnablerRecordTypes
- array of commission enabler
record types true
if CommissionEnabler
creation using the specified record Types
is
supported, false
otherwiseNullArgumentException
-
commissionEnablerRecordTypes
is null
mandatory
- This method must be implemented. CommissionEnablerForm getCommissionEnablerFormForCreate(Type[] commissionEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
commissionEnablerRecordTypes
- array of commission enabler
record typesNullArgumentException
-
commissionEnablerRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form with
requested record typesmandatory
- This method must be implemented. CommissionEnabler createCommissionEnabler(CommissionEnablerForm commissionEnablerForm) throws OperationFailedException, PermissionDeniedException
CommissionEnabler.
commissionEnablerForm
- the form for this
CommissionEnabler
CommissionEnabler
IllegalStateException
- commissionEnablerForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- commissionEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- commissionEnablerForm
did not originate from
getCommissionEnablerFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateCommissionEnablers()
CommissionEnabler
will result in a PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer update operations
to an unauthorized user. false
if CommissionEnabler
modification is not authorized, true
otherwisemandatory
- This method must be implemented. CommissionEnablerForm getCommissionEnablerFormForUpdate(Id commissionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
commissionEnablerId
- the Id
of the
CommissionEnabler
NotFoundException
- commissionEnablerId
is not foundNullArgumentException
- commissionEnablerd
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateCommissionEnabler(CommissionEnablerForm commissionEnablerForm) throws OperationFailedException, PermissionDeniedException
commissionEnablerForm
- the form containing the elements to be
updatedIllegalStateException
- commissionEnablerForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- commissionEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- commissionEnablerForm
did not originate from
getCommissionEnablerFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteCommissionEnablers()
CommissionEnabler
will result in a PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer delete operations
to an unauthorized user. false
if CommissionEnabler
deletion is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteCommissionEnabler(Id commissionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CommissionEnabler.
commissionEnablerId
- the Id
of the
CommissionEnabler
to removeNotFoundException
- commissionEnablerId
not foundNullArgumentException
- commissionEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageCommissionEnablerAliases()
Id
aliases 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 a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false
if CommissionEnabler
aliasing is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasCommissionEnabler(Id commissionEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a CommissionEnabler
for
the purpose of creating compatibility. The primary Id
of the CommissionEnabler
is determined by the provider.
The new Id
performs as an alias to the primary
Id
. If the alias is a pointer to another commission enabler.
it is reassigned to the given commission enabler Id.
commissionEnablerId
- the Id
of a
CommissionEnabler
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- commissionEnablerId
not foundNullArgumentException
- commissionEnablerId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.