1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.contract.model.impl; |
17 | |
|
18 | |
import java.util.List; |
19 | |
|
20 | |
import org.kuali.student.contract.model.MessageStructure; |
21 | |
import org.kuali.student.contract.model.Service; |
22 | |
import org.kuali.student.contract.model.ServiceContractModel; |
23 | |
import org.kuali.student.contract.model.ServiceMethod; |
24 | |
import org.kuali.student.contract.model.XmlType; |
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
public class ServiceContractModelCache implements ServiceContractModel |
32 | |
{ |
33 | |
|
34 | |
private ServiceContractModel model; |
35 | |
|
36 | |
public ServiceContractModelCache (ServiceContractModel model) |
37 | 0 | { |
38 | 0 | this.model = model; |
39 | 0 | } |
40 | |
|
41 | 0 | private List<ServiceMethod> serviceMethods = null; |
42 | |
|
43 | |
@Override |
44 | |
public List<ServiceMethod> getServiceMethods () |
45 | |
{ |
46 | 0 | if (serviceMethods == null) |
47 | |
{ |
48 | 0 | serviceMethods = model.getServiceMethods (); |
49 | |
} |
50 | 0 | return serviceMethods; |
51 | |
} |
52 | |
|
53 | |
private List<XmlType> xmlTypes; |
54 | |
|
55 | |
@Override |
56 | |
public List<XmlType> getXmlTypes () |
57 | |
{ |
58 | 0 | if (xmlTypes == null) |
59 | |
{ |
60 | 0 | xmlTypes = model.getXmlTypes (); |
61 | |
} |
62 | 0 | return xmlTypes; |
63 | |
} |
64 | |
|
65 | 0 | private List<MessageStructure> messageStructures = null; |
66 | |
|
67 | |
@Override |
68 | |
public List<MessageStructure> getMessageStructures () |
69 | |
{ |
70 | 0 | if (messageStructures == null) |
71 | |
{ |
72 | 0 | messageStructures = model.getMessageStructures (); |
73 | |
} |
74 | 0 | return messageStructures; |
75 | |
} |
76 | |
|
77 | 0 | private List<Service> services = null; |
78 | |
|
79 | |
@Override |
80 | |
public List<Service> getServices () |
81 | |
{ |
82 | 0 | if (services == null) |
83 | |
{ |
84 | 0 | services = model.getServices (); |
85 | |
} |
86 | 0 | return services; |
87 | |
} |
88 | |
|
89 | |
|
90 | |
@Override |
91 | |
public List<String> getSourceNames () |
92 | |
{ |
93 | 0 | return model.getSourceNames (); |
94 | |
} |
95 | |
|
96 | |
} |