public void readDataPlugins(String filePath) throws Exception { dataPlugins.clear(); FileInputStream fin = new FileInputStream(filePath); ZipInputStream zin = new ZipInputStream(fin); ZipEntry ze = null; while ((ze = zin.getNextEntry()) != null) { if (ze.getName().equals("configuration.xml") || ze.getName().contains(CONFIGURATION_XML_SUFFIX)) { ByteArrayOutputStream fout = new ByteArrayOutputStream(); for (int c = zin.read(); c != -1; c = zin.read()) { fout.write(c); } zin.closeEntry(); Configuration tmpConfiguration = SerializationUtils.fromXML(fout.toByteArray(), Configuration.class); Component component = tmpConfiguration.getComponent(DataInjectorService.class.getName()); ExternalComponentPlugins externalComponentPlugins = tmpConfiguration .getExternalComponentPlugins(DataInjectorService.class.getName()); if (component != null && component.getComponentPlugins() != null && !component.getComponentPlugins().isEmpty()) { this.addComponentPlugins(component.getComponentPlugins()); } else if (externalComponentPlugins != null && externalComponentPlugins.getComponentPlugins() != null && !externalComponentPlugins.getComponentPlugins().isEmpty()) { this.addComponentPlugins(externalComponentPlugins.getComponentPlugins()); } } } zin.close(); }
TemplateService.class.getName()); List<ComponentPlugin> componentPlugins = new ArrayList<ComponentPlugin>(); if (externalComponentPlugins != null && externalComponentPlugins.getComponentPlugins() != null) { LOG.info("add Template Services externalComponentPlugins"); componentPlugins.addAll(externalComponentPlugins.getComponentPlugins());
&& organizationServiceExternalComponentPlugins.getComponentPlugins() != null) { nbExternalComponentPlugins = organizationServiceExternalComponentPlugins.getComponentPlugins().size(); manager.getConfiguration() .getExternalComponentPlugins(OrganizationService.class.getName()); addComponentPlugin(organizationServiceExternalComponentPlugins.getComponentPlugins());