/** * Add model class packages after the object has been instantiated * * @param addedModelClasses map with version number as key and package names has value */ public void addModels(Map<String, String[]> addedModelClasses) { if (customModelClasses == null) { customModelClasses = new HashMap<String, String[]>(); } for (Entry<String, String[]> entry : addedModelClasses.entrySet()) { addModel(entry.getKey(), entry.getValue()); } }
/** * Add model class packages after the object has been instantiated * * @param addedModelClasses map with version number as key and package names has value */ public void addModels(Map<String, String[]> addedModelClasses) { if (customModelClasses == null) { customModelClasses = new HashMap<String, String[]>(); } for (Entry<String, String[]> entry : addedModelClasses.entrySet()) { addModel(entry.getKey(), entry.getValue()); } }
/** * Constructor * * @param packageName The base package name to use. * <p> * When searching, package specified here will be appended with .[version].[structure type]. * </p> * <p> * So, for instance, when looking for a v2.5 segment object, if "<code>com.foo</code>" is passed in, HAPI will look in "<code>com.foo.v25.segment.*</code>" * </p> */ public CustomModelClassFactory(String packageName) { this(new HashMap<String, String[]>()); if (!packageName.endsWith(".")) { packageName += "."; } for (Version v : Version.values()) { addModel(v.getVersion(), new String[] {packageName + v.getPackageVersion()}); } }
/** * Constructor * * @param packageName The base package name to use. * <p> * When searching, package specified here will be appended with .[version].[structure type]. * </p> * <p> * So, for instance, when looking for a v2.5 segment object, if "<code>com.foo</code>" is passed in, HAPI will look in "<code>com.foo.v25.segment.*</code>" * </p> */ public CustomModelClassFactory(String packageName) { this(new HashMap<String, String[]>()); if (!packageName.endsWith(".")) { packageName += "."; } for (Version v : Version.values()) { addModel(v.getVersion(), new String[] {packageName + v.getPackageVersion()}); } }