public class PropertySupport extends Object
Properties of the platform, a
Site or an Application.Properties,
PropertyHolder| Modifier and Type | Field and Description |
|---|---|
static String |
PREFIX_PLATFORM |
static String |
PROP_PATTERN |
| Constructor and Description |
|---|
PropertySupport(PropertyHolder propertyHolder)
Creates a new
PropertySupport using the given PropertyHolder. |
| Modifier and Type | Method and Description |
|---|---|
static String |
getNodePrefix(String nodeId)
Returns the dot-separated property-prefix for a node-property.
|
static Properties |
getProperties(Properties platFormConfig,
Site site,
Application application,
boolean addPlatformScope)
Aggregates the
Properties of the platform, the given Site and given Application to a
single Properties object, using a prefix for determining the origin of a certain property.The
prefix for a site-property is site., for a platform-property it's "platform.". |
static String |
getPropertyName(Site site,
Application application,
String name)
Returns the dot-separated full name for a given property, depending on whether a
Site and/or an
Application are given. |
static String |
getPropertyPrefix(Site site,
Application application)
Returns the dot-separated property-prefix, depending on whether a
Site and/or an Application are
given. |
static String |
getSitePrefix(Site site)
Returns the dot-separated property-prefix for a site-property.
|
void |
initNodeConfig(boolean finalize)
Initializes the node configuration with the default values.
|
void |
initPlatformConfig(String rootPath,
Boolean devMode) |
void |
initPlatformConfig(String rootPath,
Boolean devMode,
Properties immutableOverrides,
boolean finalize)
Initializes the platform configuration with the default values.
|
void |
initSiteProperties(SiteImpl site,
Properties platformConfig)
Initializes the
Site configuration with the default values. |
public static final String PREFIX_PLATFORM
public static final String PROP_PATTERN
public PropertySupport(PropertyHolder propertyHolder)
PropertySupport using the given PropertyHolder.propertyHolder - the PropertyHolder to usepublic static Properties getProperties(Properties platFormConfig, Site site, Application application, boolean addPlatformScope)
Properties of the platform, the given Site and given Application to a
single Properties object, using a prefix for determining the origin of a certain property.The
prefix for a site-property is site., for a platform-property it's "platform.". For an
Application property no prefix is used.platFormConfig - the platform configuration, only needed if addPlatformScope is true.site - the Site to retrieve Properties from (may be null)application - the Application to retrieve Properties from (may be null)addPlatformScope - set to true to add the platform propertiesProperties with prefixed entriesProperties.getPlainProperties()public static String getPropertyName(Site site, Application application, String name)
Site and/or an
Application are given.site - the Site, may be nullapplication - the Application, may be nullname - the raw name of the property, without dot-notationpublic static String getPropertyPrefix(Site site, Application application)
Site and/or an Application are
given.site - the Site, may be nullapplication - the Application, may be nullpublic static String getSitePrefix(Site site)
site - the Sitepublic void initSiteProperties(SiteImpl site, Properties platformConfig)
Site configuration with the default values. The properties are added to the
PropertyHolder this PropertySupport was created with.site - the Site to initialize the Properties forplatformConfig - the platform configurationPropertySupport(PropertyHolder),
SitePropertiespublic void initPlatformConfig(String rootPath, Boolean devMode, Properties immutableOverrides, boolean finalize)
PropertyHolder this PropertySupport was created with.rootPath - the root path of the platform (see
Platform.Property.PLATFORM_ROOT_PATH)devMode - value for the Platform.Property.DEV_MODE property to setimmutableOverrides - some Properties used to override the default valuesfinalize - whether or not to call PropertyHolder.setFinal()PropertySupport(PropertyHolder),
Platform.Propertypublic static String getNodePrefix(String nodeId)
nodeId - the node id as returned by Messaging.getNodeId(org.appng.api.Environment)public void initNodeConfig(boolean finalize)
PropertyHolder this PropertySupport was created with.finalize - whether or not to call PropertyHolder.setFinal()PropertySupport(PropertyHolder)Copyright © 2011–2022 aiticon GmbH. All rights reserved.