public interface PaymentBusinessAssignmentSession extends OsidSession
This session provides methods to re-assign Payments to
Business objects A Payment may appear in
multiple Business objects and removing the last reference
to a Payment is the equivalent of deleting it. Each
Business may have its own authorizations governing who is allowed
to operate on it.
Adding a reference of a Payment to another
Business is not a copy operation (eg: does not change its
Id ).
| Modifier and Type | Method and Description |
|---|---|
void |
assignPaymentToBusiness(Id paymentId,
Id businessId)
Adds an existing
Payment to a Business. |
boolean |
canAssignPayments()
Tests if this user can alter payment/business mappings.
|
boolean |
canAssignPaymentToBusiness(Id businessId)
Tests if this user can alter payment/business mappings.
|
IdList |
getAssignableBusinessIds(Id businessId)
Gets a list of businesses including and under the given business node
in which any payment can be assigned.
|
IdList |
getAssignableBusinessIdsForPayment(Id businessId,
Id paymentId)
Gets a list of businesses including and under the given business node
in which a specific payment can be assigned.
|
void |
reassignPaymentToBusiness(Id paymentId,
Id fromBusinessId,
Id toBusinessId)
Moves a
Payment from one Business to
another. |
void |
unassignPaymentFromBusiness(Id paymentId,
Id businessId)
Removes a
Payment from a Business. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignPayments()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false if mapping is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignPaymentToBusiness(Id businessId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users.businessId - the Id of the Business
false if mapping is not authorized, true
otherwiseNullArgumentException - businessId is
null mandatory - This method must be implemented. IdList getAssignableBusinessIds(Id businessId) throws OperationFailedException
businessId - the Id of the Business
Ids NullArgumentException - businessId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableBusinessIdsForPayment(Id businessId, Id paymentId) throws OperationFailedException
businessId - the Id of the Business
paymentId - the Id of the Payment Ids NullArgumentException - businessId or
paymentId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignPaymentToBusiness(Id paymentId, Id businessId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Payment to a Business. paymentId - the Id of the Payment businessId - the Id of the Business
AlreadyExistsException - paymentId is
already assigned to businessId NotFoundException - paymentId or
businessId not foundNullArgumentException - paymentId or
businessId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignPaymentFromBusiness(Id paymentId, Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Payment from a Business. paymentId - the Id of the Payment businessId - the Id of the Business
NotFoundException - paymentId or
businessId not found or paymentId not
assigned to businessId NullArgumentException - paymentId or
businessId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void reassignPaymentToBusiness(Id paymentId, Id fromBusinessId, Id toBusinessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Payment from one Business to
another. Mappings to other Businesses are unaffected.paymentId - the Id of the Payment fromBusinessId - the Id of the current
Business toBusinessId - the Id of the destination
Business NotFoundException - paymentId, fromBusinessId,
or toBusinessId not found or
paymentId not mapped to fromBusinessId NullArgumentException - paymentId,
fromBusinessId, or toBusinessId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.