public ConfigurationData(Artifact configId, Naming naming) { this(new Environment(configId), naming); }
public ConfigurationData(Artifact configId, Naming naming, GBeanState gbeanState) { this(new Environment(configId), naming, gbeanState); }
protected Environment buildEnvironment(ConfigurationData configurationData) { Environment environment = new Environment(defaultEnvironment); environment.setConfigId(configurationData.getId()); return environment; }
private void createTempManifest() throws DeploymentException, IOException { Environment env = new Environment(environment); Artifact id = env.getConfigId(); env.setConfigId(new Artifact(id.getGroupId(), id.getArtifactId() + "-DEPLOYMENT", id.getVersion(), id.getType())); env.addToBundleClassPath(bundleClassPath); env.setBundleActivator(null); env.addDynamicImportPackage("*"); OSGiMetaDataBuilder osgiMetaDataBuilder = new OSGiMetaDataBuilder(bundleContext, new DummyExportPackagesSelector()); try { osgiMetaDataBuilder.build(env); } catch (IllegalConfigurationException e) { throw new DeploymentException(e); } Manifest manifest; try { manifest = env.getManifest(); } catch (ManifestException e) { throw new DeploymentException(e); } File metaInf = new File(getConfigurationDir(), "META-INF"); metaInf.mkdirs(); FileWriter fw = new FileWriter(new File(metaInf, "MANIFEST.MF")); PrintWriter pw = new PrintWriter(fw); try { manifest.write(pw); } finally { pw.close(); fw.close(); } }
private static void insertEnvironment(Artifact configId, Artifact parentId, XmlCursor cursor, QName environmentQname, boolean suppressDefaultEnvironment) { positionEnvironment(cursor); Environment environment = new Environment(); environment.setConfigId(configId); if (parentId != null) { environment.addDependency(parentId, ImportType.ALL); } environment.setSuppressDefaultEnvironment(suppressDefaultEnvironment); extractDependencies(cursor, environment); EnvironmentType environmentType = EnvironmentBuilder.buildEnvironmentType(environment); cursor.beginElement(environmentQname); XmlCursor element = environmentType.newCursor(); try { element.copyXmlContents(cursor); } finally { element.dispose(); } }
public static Environment buildEnvironment(EnvironmentType environmentType, Environment defaultEnvironment) { Environment environment = new Environment(); if (environmentType != null) { if (environmentType.getModuleId() != null) {
public static Environment buildEnvironment(EnvironmentType environmentType) { Environment environment = new Environment(); if (environmentType != null) { if (environmentType.isSetModuleId()) {