Class Partner
java.lang.Object
org.kopi.ebics.client.Partner
- All Implemented Interfaces:
EbicsPartner, Savable
Simple implementation of an EBICS customer.
This object is not serializable, but it should be persisted every time it needs to be saved.
Persistence is achieved via
save(ObjectOutputStream) and the matching constructor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBank()Returns the bank we are customer of.Returns the next order available IDReturns the customers id at the bank.Returns the save name of this savable object.booleanDid any persistable attribute change since last load/save operation.In EBICS XSD schema - ebics_types.xsd, The order ID pattern is defined as following: pattern value="[A-Z][A-Z0-9]{3}".voidsave(ObjectOutputStream oos) Writes all persistable attributes to the given stream.voidsetOrderId(Integer orderId) Sets the order ID
-
Constructor Details
-
Partner
Reconstructs a persisted EBICS customer.- Parameters:
bank- the bankois- the stream object- Throws:
IOException
-
Partner
-
-
Method Details
-
getNextOrderId
-
setOrderId
-
save
Description copied from interface:SavableWrites all persistable attributes to the given stream.- Specified by:
savein interfaceSavable- Parameters:
oos- the given stream.- Throws:
IOException- save process failed
-
needsSave
public boolean needsSave()Did any persistable attribute change since last load/save operation.- Returns:
- True if the object needs to be saved.
-
getBank
Description copied from interface:EbicsPartnerReturns the bank we are customer of.- Specified by:
getBankin interfaceEbicsPartner- Returns:
- the bank we are customer of
-
getPartnerId
Description copied from interface:EbicsPartnerReturns the customers id at the bank.- Specified by:
getPartnerIdin interfaceEbicsPartner- Returns:
- the customers id at the bank.
-
nextOrderId
In EBICS XSD schema - ebics_types.xsd, The order ID pattern is defined as following: pattern value="[A-Z][A-Z0-9]{3}".This means that the order ID should start with a letter followed by three alphanumeric characters.
The
nextOrderId()aims to generate orders from A000 to ZZZZ. The sequence cycle is performed infinitely.The order index
orderIdis saved whenever it changes.- Specified by:
nextOrderIdin interfaceEbicsPartner- Returns:
- the next order number.
-
getSaveName
Description copied from interface:SavableReturns the save name of this savable object.- Specified by:
getSaveNamein interfaceSavable- Returns:
- the save name
-