ProductConfig config = new ProductConfig("Vodka"); config.alcohol = 0.38; config.size = 0.7; config.price = 17.99; Product p = new Product(config);
public static ProductConfig fromFilesystemSlot(ModuleLoader loader, String home, Map<?, ?> providedProperties) { return new ProductConfig(loader, getProductConfProperties(home), providedProperties); }
public static ProductConfig fromFilesystemSlot(ModuleLoader loader, String home, Map<?, ?> providedProperties) { return new ProductConfig(loader, getProductConfProperties(home), providedProperties); }
private static boolean handleHelpOrVersion(String arg, String jbossHome) { if (CommandLineConstants.HELP.equals(arg) || CommandLineConstants.SHORT_HELP.equals(arg) || CommandLineConstants.OLD_HELP.equals(arg)) { usage(); return true; } else if (CommandLineConstants.VERSION.equals(arg) || CommandLineConstants.SHORT_VERSION.equals(arg) || CommandLineConstants.OLD_VERSION.equals(arg) || CommandLineConstants.OLD_SHORT_VERSION.equals(arg)) { System.out.println(new ProductConfig(Module.getBootModuleLoader(), jbossHome, null).getPrettyVersionString()); return true; } return false; }
private ServerEnvironment createStandaloneServerEnvironment() { Properties props = new Properties(); File home = new File("target/jbossas"); delete(home); home.mkdir(); delay(10); props.put(ServerEnvironment.HOME_DIR, home.getAbsolutePath()); File standalone = new File(home, "standalone"); standalone.mkdir(); props.put(ServerEnvironment.SERVER_BASE_DIR, standalone.getAbsolutePath()); File configuration = new File(standalone, "configuration"); configuration.mkdir(); props.put(ServerEnvironment.SERVER_CONFIG_DIR, configuration.getAbsolutePath()); File xml = new File(configuration, "standalone.xml"); try { xml.createNewFile(); } catch (IOException e) { throw new RuntimeException(e); } props.put(ServerEnvironment.JBOSS_SERVER_DEFAULT_CONFIG, "standalone.xml"); ProductConfig pc = new ProductConfig("Test", Version.AS_VERSION, "main"); return new ServerEnvironment(null, props, new HashMap<String, String>(), "standalone.xml", null, LaunchType.STANDALONE, runningModeControl.getRunningMode(), pc, false); }
private ServerEnvironment createStandaloneServerEnvironment() { Properties props = new Properties(); File home = new File("target/jbossas"); delete(home); home.mkdir(); delay(10); props.put(ServerEnvironment.HOME_DIR, home.getAbsolutePath()); File standalone = new File(home, "standalone"); standalone.mkdir(); props.put(ServerEnvironment.SERVER_BASE_DIR, standalone.getAbsolutePath()); File configuration = new File(standalone, "configuration"); configuration.mkdir(); props.put(ServerEnvironment.SERVER_CONFIG_DIR, configuration.getAbsolutePath()); File xml = new File(configuration, "standalone.xml"); try { xml.createNewFile(); } catch (IOException e) { throw new RuntimeException(e); } props.put(ServerEnvironment.JBOSS_SERVER_DEFAULT_CONFIG, "standalone.xml"); ProductConfig pc = new ProductConfig("Test", Version.AS_VERSION, "main"); return new ServerEnvironment(null, props, new HashMap<String, String>(), "standalone.xml", null, LaunchType.STANDALONE, runningModeControl.getRunningMode(), pc, false); }
public static ProductConfig fromKnownSlot(String slot, ModuleLoader loader, Map<?, ?> providedProperties) { return new ProductConfig(loader, new ProductConfProps(slot), providedProperties); }
public static ProductConfig fromKnownSlot(String slot, ModuleLoader loader, Map<?, ?> providedProperties) { return new ProductConfig(loader, new ProductConfProps(slot), providedProperties); }
private InstalledIdentity loadIdentity(String productName, String productVersion) throws PatchingException { try { return LayersFactory.load(installedImage, new ProductConfig(productName, productVersion == null ? Constants.UNKNOWN : productVersion, null), moduleRoots, bundleRoots); } catch (IOException e) { throw new PatchingException(PatchLogger.ROOT_LOGGER.failedToLoadInfo(productName), e); } }
private InstalledIdentity loadIdentity(String productName, String productVersion) throws PatchingException { try { return LayersFactory.load(installedImage, new ProductConfig(productName, productVersion == null ? Constants.UNKNOWN : productVersion, null), moduleRoots, bundleRoots); } catch (IOException e) { throw new PatchingException(PatchLogger.ROOT_LOGGER.failedToLoadInfo(productName), e); } }
identity = LayersFactory.load(installedImage, new ProductConfig(productName, productVersion, null), moduleRoots, bundleRoots); } catch (IOException e) { throw new PatchingException(PatchLogger.ROOT_LOGGER.failedToLoadInfo(productName), e);
identity = LayersFactory.load(installedImage, new ProductConfig(productName, productVersion, null), moduleRoots, bundleRoots); } catch (IOException e) { throw new PatchingException(PatchLogger.ROOT_LOGGER.failedToLoadInfo(productName), e);
|| "-version".equals(arg) || "-V".equals(arg)) { final String homeDir = getSecurityManager() == null ? getProperty("jboss.home.dir") : Usage.getSystemProperty("jboss.home.dir"); ProductConfig productConfig = new ProductConfig(Module.getBootModuleLoader(), homeDir, Collections.emptyMap()); System.out.println(productConfig.getPrettyVersionString()); return null;
} else if (CommandLineConstants.VERSION.equals(arg) || CommandLineConstants.SHORT_VERSION.equals(arg) || CommandLineConstants.OLD_VERSION.equals(arg) || CommandLineConstants.OLD_SHORT_VERSION.equals(arg)) { productConfig = new ProductConfig(Module.getBootModuleLoader(), SecurityActions.getSystemProperty(ServerEnvironment.HOME_DIR), null); System.out.println(productConfig.getPrettyVersionString()); return null; productConfig = new ProductConfig(Module.getBootModuleLoader(), SecurityActions.getSystemProperty(ServerEnvironment.HOME_DIR), systemProperties); ret.environment = new ServerEnvironment(hostControllerName, systemProperties, systemEnvironment, appClientConfig, null, launchType, null, productConfig); return ret;
@Before public void setup() throws Exception { tempDir = mkdir(new File(System.getProperty("java.io.tmpdir")), "patching-" + randomString()); File jbossHome = mkdir(tempDir, "jboss-installation"); mkdir(jbossHome, MODULES, "system", LAYERS, BASE); mkdir(jbossHome, BUNDLES, "system", LAYERS, BASE); env = TestUtils.createLegacyTestStructure(jbossHome); productConfig = new ProductConfig("product", "version", "consoleSlot"); }
@Before public void setUp() throws IOException { tempDir = mkdir(new File(SYSTEM_TEMP_DIR), randomString()); final File jbossHome = mkdir(tempDir, JBOSS_INSTALLATION); mkdir(jbossHome, MODULES, "system", LAYERS, BASE); mkdir(jbossHome, BUNDLES, "system", LAYERS, BASE); productConfig = new ProductConfig(PRODUCT_NAME, PRODUCT_VERSION, "main"); }
@Override public AsyncFuture<ServiceContainer> run(final List<ServiceActivator> runServices) { final Bootstrap bootstrap = Bootstrap.Factory.newInstance(); final ProductConfig productConfig = new ProductConfig(Module.getBootModuleLoader(), home, properties);
@Override public AsyncFuture<ServiceContainer> run(final List<ServiceActivator> runServices) { final Bootstrap bootstrap = Bootstrap.Factory.newInstance(); final ProductConfig productConfig = new ProductConfig(Module.getBootModuleLoader(), home, properties);
productConfig = new ProductConfig(productConfig.getProductName(), productConfig.getProductVersion() + "-Release1", productConfig.getConsoleSlot());
productConfig = new ProductConfig(productConfig.getProductName(), productConfig.getProductVersion() + "-Release1", productConfig.getConsoleSlot());