private IWARProduct createBasicProduct() { WARProductModel model = new WARProductModel(); WARProductModelFactory factory = new WARProductModelFactory(model); String requiredBundles[] = Validator.REQUIRED_BUNDLES; IWARProduct product = (IWARProduct) factory.createProduct(); for (int i = 0; i < requiredBundles.length; i++) { addBundleToProduct(factory, requiredBundles[i], product); } return product; }
private void addBundleToProduct( final WARProductModelFactory factory, final String id, final IWARProduct product) { IProductPlugin bundle = factory.createPlugin(); bundle.setId(id); bundle.setVersion("0.0.0"); product.addPlugins(new IProductPlugin[] {bundle}); }
private IWARProduct createPlainProduct() { WARProductModel model = new WARProductModel(); WARProductModelFactory factory = new WARProductModelFactory(model); IWARProduct product = (IWARProduct) factory.createProduct(); return product; }