@ApplicationScoped public class PropertyResolver extends Object
CDIProperties with properties read from a Url. CDIProperties is
in its turn responsible for injecting properties based on @Inject and @Property. This Resolver needs an Application scoped bean that
produces a url and a boolean fromJar, it is up to users of this library to provide that bean. The bean can for example use System properties
that are set in the environment to produce the values.| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_FILE_URL
Value of @Named String producer, the produced string is the url for
settings
|
static String |
FROM_JAR
Value of @Named boolean producer, the produced boolean tells to load
settings from jar or not
|
| Constructor and Description |
|---|
PropertyResolver() |
| Modifier and Type | Method and Description |
|---|---|
com.vectorprint.configuration.EnhancedMap |
initSettings(String configFileUrl,
Boolean fromJar)
Call
readAsSettingsOrProperties(java.lang.String, boolean), needs a CDI producer for its arguments |
public static final String CONFIG_FILE_URL
public static final String FROM_JAR
@Produces
@Named(value="CONFIGPROPS")
public com.vectorprint.configuration.EnhancedMap initSettings(@Named(value="configFileUrl")
String configFileUrl,
@Named(value="fromJar")
Boolean fromJar)
throws Exception
readAsSettingsOrProperties(java.lang.String, boolean), needs a CDI producer for its argumentsconfigFileUrl - create an application scoped bean to produce this
argument, pointing to a configfilefromJar - create an application scoped bean to produce this
argument, when true read from jar in classpathExceptionStringConverter.URLParser,
SettingsXMLHelper.XSDCopyright © 2018–2019 Fryske Akademy. All rights reserved.