1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.support.definition.support;
14
15 import java.util.List;
16
17 import com.eviware.soapui.impl.support.AbstractInterface;
18 import com.eviware.soapui.impl.support.definition.DefinitionCache;
19 import com.eviware.soapui.impl.support.definition.InterfaceDefinition;
20 import com.eviware.soapui.impl.support.definition.InterfaceDefinitionPart;
21
22 public abstract class AbstractInterfaceDefinition<T extends AbstractInterface<?>> implements InterfaceDefinition<T>
23 {
24 private DefinitionCache definitionCache;
25 private T iface;
26
27 protected AbstractInterfaceDefinition( T iface )
28 {
29 this.iface = iface;
30 }
31
32 public DefinitionCache getDefinitionCache()
33 {
34 return definitionCache;
35 }
36
37 public void setDefinitionCache( DefinitionCache definitionCache )
38 {
39 this.definitionCache = definitionCache;
40 }
41
42 public InterfaceDefinitionPart getRootPart()
43 {
44 return definitionCache == null ? null : definitionCache.getRootPart();
45 }
46
47 public List<InterfaceDefinitionPart> getDefinitionParts() throws Exception
48 {
49 return definitionCache == null ? null : definitionCache.getDefinitionParts();
50 }
51
52 public T getInterface()
53 {
54 return iface;
55 }
56
57 public void setIface( T iface )
58 {
59 this.iface = iface;
60 }
61 }