public interface PaymentNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Payment
objects in this Business.
This
also includes existing payments that may appear or disappear due to
changes in the Business
hierarchy, This session is intended
for consumers needing to synchronize their state with this service without
the use of polling. Notifications are cancelled when this session is
closed.
The two views defined in this session correspond to the views in the
PaymentLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgePaymentNotification(Id notificationId)
Acknowledge a payment notification.
|
boolean |
canRegisterForPaymentNotifications()
Tests if this user can register for
Payment
notifications. |
Business |
getBusiness()
Gets the
Business associated with this session. |
Id |
getBusinessId()
Gets the
Business Id associated with
this session. |
void |
registerForChangedPayment(Id paymentId)
Registers for notification of an updated payment.
|
void |
registerForChangedPayments()
Registers for notification of updated payments.
|
void |
registerForChangedPaymentsForCustomer(Id customerId)
Registers for notification of updated payments applied the given
customer.
|
void |
registerForChangedPaymentsForPayer(Id payerId)
Registers for notification of updated payments by the given payer.
|
void |
registerForDeletedPayment(Id paymentId)
Registers for notification of a deleted payment.
|
void |
registerForDeletedPayments()
Registers for notification of deleted payments.
|
void |
registerForDeletedPaymentsForCustomer(Id customerId)
Registers for notification of deleted payments applied to the given
customer.
|
void |
registerForDeletedPaymentsForPayer(Id payerId)
Registers for notification of deleted payments from the given payer.
|
void |
registerForNewPayments()
Register for notifications of new payments.
|
void |
registerForNewPaymentsForCustomer(Id customerId)
Register for notifications of new payments applied to the given
customer.
|
void |
registerForNewPaymentsForPayer(Id payerId)
Register for notifications of new payments from the given payer.
|
void |
reliablePaymentNotifications()
Reliable notifications are desired.
|
void |
unreliablePaymentNotifications()
Unreliable notifications are desired.
|
void |
useFederatedBusinessView()
Federates the view for methods in this session.
|
void |
useIsolatedBusinessView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBusinessId()
Business
Id
associated with
this session. Business Id
associated with this sessionmandatory
- This method must be implemented. Business getBusiness() throws OperationFailedException, PermissionDeniedException
Business
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForPaymentNotifications()
Payment
notifications. A return of true does not guarantee successful
authorization. A return of false indicates that it is known all
methods in this session will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer notification operations. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useFederatedBusinessView()
mandatory
- This method is must be implemented. void useIsolatedBusinessView()
mandatory
- This method is must be implemented. void reliablePaymentNotifications()
acknowledgePaymentNotification()
.mandatory
- This method is must be implemented. void unreliablePaymentNotifications()
mandatory
- This method is must be implemented. void acknowledgePaymentNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewPayments() throws OperationFailedException, PermissionDeniedException
PaymentReceiver.newPayments()
is invoked when a new
Payment
appears in this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewPaymentsForPayer(Id payerId) throws OperationFailedException, PermissionDeniedException
PaymentReceiver.newPayments()
is invoked when a new
Payment
appears in this business.payerId
- the Id
of the Payer
to
monitorNullArgumentException
- payerId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewPaymentsForCustomer(Id customerId) throws OperationFailedException, PermissionDeniedException
PaymentReceiver.newPayments()
is invoked when
a new Payment
appears in this business.customerId
- the Id
of the Customer
to monitorNullArgumentException
- customerId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPayments() throws OperationFailedException, PermissionDeniedException
PaymentReceiver.changedPayments()
is invoked when a payment in
this business is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPaymentsForPayer(Id payerId) throws OperationFailedException, PermissionDeniedException
PaymentReceiver.changedPayments()
is invoked when the
specified payment in this business is changed.payerId
- the Id
of the Payer
to
monitorNullArgumentException
- payerId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPaymentsForCustomer(Id customerId) throws OperationFailedException, PermissionDeniedException
PaymentReceiver.changedPayments()
is invoked
when the specified payment in this business is changed.customerId
- the Id
of the Customer
to monitorNullArgumentException
- customerId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPayment(Id paymentId) throws OperationFailedException, PermissionDeniedException
PaymentReceiver.changedPayments()
is invoked when the
specified payment in this business is changed.paymentId
- the Id
of the Payment
to monitorNullArgumentException
- paymentId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPayments() throws OperationFailedException, PermissionDeniedException
PaymentReceiver.deletedPayments()
is invoked when a payment is
deleted or removed from this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPaymentsForPayer(Id payerId) throws OperationFailedException, PermissionDeniedException
PaymentReceiver.deletedPayments()
is invoked when a
payment is deleted or removed from this business.payerId
- the Id
of the Payer
to
monitorNullArgumentException
- payerId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPaymentsForCustomer(Id customerId) throws OperationFailedException, PermissionDeniedException
PaymentReceiver.deletedPayments()
is invoked
when a payment is deleted or removed from this business.customerId
- the Id
of the Customer
to monitorNullArgumentException
- customerId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPayment(Id paymentId) throws OperationFailedException, PermissionDeniedException
PaymentReceiver.deletedPayments()
is invoked when the
specified payment is deleted or removed from this business.paymentId
- the Id
of the Payment
to monitorNullArgumentException
- paymentId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.