1 21 22 package com.jaspersoft.jasperserver.api.common.service.impl; 23 24 import java.util.List ; 25 import java.util.Map ; 26 27 import com.jaspersoft.jasperserver.api.common.service.ImplementationObjectFactory; 28 import com.jaspersoft.jasperserver.api.common.service.ObjectFactory; 29 30 34 public class ImplementationClassObjectFactoryImpl implements ImplementationObjectFactory { 35 36 private Map implementationClassMappings; 37 38 private ObjectFactory objectFactory; 39 40 public Map getImplementationClassMappings() { 41 return implementationClassMappings; 42 } 43 44 public void setImplementationClassMappings(Map implementationClassMappings) { 45 this.implementationClassMappings = implementationClassMappings; 46 } 47 48 public ObjectFactory getObjectFactory() { 49 return objectFactory; 50 } 51 52 public void setObjectFactory(ObjectFactory factoryImpl) { 53 this.objectFactory = factoryImpl; 54 } 55 56 public Class getImplementationClass(Class _class) { 57 return getObjectFactory().getImplementationClass(getImplementationClassMappings(), _class); 58 } 59 60 public Class getImplementationClass(String id) { 61 return getObjectFactory().getImplementationClass(getImplementationClassMappings(), id); 62 } 63 64 public String getImplementationClassName(Class _class) { 65 return getObjectFactory().getImplementationClassName(getImplementationClassMappings(), _class); 66 } 67 68 public String getImplementationClassName(String id) { 69 return getObjectFactory().getImplementationClassName(getImplementationClassMappings(), id); 70 } 71 72 public Class getInterface(Class _class) { 73 return getObjectFactory().getInterface(getImplementationClassMappings(), _class); 74 } 75 76 public String getInterfaceName(Class _class) { 77 return getObjectFactory().getInterfaceName(getImplementationClassMappings(), _class); 78 } 79 80 public String getIdForClass(Class _class) { 81 return getObjectFactory().getIdForClass(getImplementationClassMappings(), _class); 82 } 83 84 public Object newObject(Class _class) { 85 return getObjectFactory().newObject(getImplementationClassMappings(), _class); 86 } 87 88 public Object newObject(String id) { 89 return getObjectFactory().newObject(getImplementationClassMappings(), id); 90 } 91 92 95 public List getKeys() { 96 return getObjectFactory().getKeys(getImplementationClassMappings()); 97 } 98 } 99 | Popular Tags |