/** * Sets the specified system property. * * @param name The name of the system property * @param value The value for the system property * @return the {@link JavaApplicationSchema} */ @SuppressWarnings("unchecked") public S setSystemProperty(String name, Object value) { m_systemPropertiesBuilder.setProperty(name, value); return (S) this; }
/** * Sets the specified environment variable to the specified value. * * @param name the name of the environment variable * @param value the value of the environment variable * * @return the {@link ApplicationSchema} (so that we can perform method chaining) */ @SuppressWarnings("unchecked") public S setEnvironmentVariable(String name, Object value) { m_propertiesBuilder.setProperty(name, value); return (S) this; }
/** * Defines a custom environment variable for remote {@link Application}s * realized by this {@link RemoteApplicationBuilder}. * * @param name the name of the environment variable * @param value the value of the environment variable * * @return this {@link RemoteApplicationBuilder} to permit fluent method calls */ public B setEnvironmentVariable(String name, Object value) { remoteEnvironmentVariablesBuilder.setProperty(name, value); return (B) this; }
/** * Defines a custom environment variable for remote {@link Application}s * realized by this {@link RemoteApplicationBuilder} based on values * returned by the {@link Iterator}. * * @param name the name of the environment variable * @param iterator an {@link Iterator} providing values for the environment * variable * * @return this {@link RemoteApplicationBuilder} to permit fluent method calls */ public B setEnvironmentVariable(String name, Iterator<?> iterator) { remoteEnvironmentVariablesBuilder.setProperty(name, iterator); return (B) this; }
/** * Sets the specified environment variable to use an {@link Iterator} from * which to retrieve it's values. * * @param name the name of the environment variable * @param iterator an {@link Iterator} providing values for the environment * variable * * @return the {@link ApplicationSchema} (so that we can perform method chaining) */ @SuppressWarnings("unchecked") public S setEnvironmentVariable(String name, Iterator<?> iterator) { m_propertiesBuilder.setProperty(name, iterator); return (S) this; }
/** * Optionally sets the specified named property to have the specified value. * * @param name the name of the property * @param value the value of the property * * @return the {@link PropertiesBuilder} to which the property was added so * that further chained method calls, like to other * <code>setProperty(...)</code> methods on this class may be used */ public PropertiesBuilder setPropertyIfAbsent(String name, Object value) { if (containsProperty(name)) { return this; } else { return setProperty(name, value); } }
/** * Optionally sets the specified named property to use an {@link Iterator} * (to provide successive requests for the property with values from the said * {@link Iterator} when the {@link PropertiesBuilder} is realized) * * @param name the name of the property * @param iterator an {@link Iterator} that will provide successive property * values for the property when the {@link PropertiesBuilder} * is realized * * @return the {@link PropertiesBuilder} to which the property was added so * that further chained method calls, like to other * <code>setProperty(...)</code> methods on this class may be used. */ public PropertiesBuilder setPropertyIfAbsent(String name, Iterator<?> iterator) { if (containsProperty(name)) { return this; } else { return setProperty(name, iterator); } }