01: package de.schlund.pfixcore.example.bank.context;
02:
03: import java.util.List;
04:
05: import org.w3c.dom.Element;
06:
07: import de.schlund.pfixcore.example.bank.model.Account;
08: import de.schlund.pfixcore.example.bank.model.Customer;
09: import de.schlund.pfixcore.workflow.Context;
10: import de.schlund.pfixxml.ResultDocument;
11:
12: public class ContextCustomerImpl implements ContextCustomer {
13:
14: private Customer customer;
15:
16: public void init(Context context) throws Exception {
17: }
18:
19: public void insertStatus(ResultDocument resdoc, Element elem)
20: throws Exception {
21: if (customer != null) {
22: List<Account> accounts = customer.getAccounts();
23: ResultDocument.addObject(elem, accounts);
24: }
25: }
26:
27: public Customer getCustomer() {
28: return customer;
29: }
30:
31: public void setCustomer(Customer customer) {
32: this.customer = customer;
33: }
34:
35: }
|