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