@Service(value="blSystemPropertiesService") public class SystemPropertiesServiceImpl extends Object implements SystemPropertiesService
Modifier and Type | Field and Description |
---|---|
protected SystemPropertyServiceExtensionManager |
extensionManager |
protected RuntimeEnvironmentPropertiesManager |
propMgr |
protected SystemPropertiesDao |
systemPropertiesDao |
protected net.sf.ehcache.Cache |
systemPropertyCache |
protected int |
systemPropertyCacheTimeout |
Constructor and Description |
---|
SystemPropertiesServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addPropertyToCache(String propertyName,
String propertyValue) |
protected String |
buildKey(String propertyName)
Properties can vary by site.
|
protected String |
buildKey(SystemProperty systemProperty)
Properties can vary by site.
|
SystemProperty |
findById(Long id)
Finds a SystemProperty by its internal id
|
protected String |
getPropertyFromCache(String propertyName) |
protected net.sf.ehcache.Cache |
getSystemPropertyCache() |
boolean |
isValueValidForType(String value,
SystemPropertyFieldType type)
Determines if the given value is valid for the specified type
|
void |
removeFromCache(SystemProperty systemProperty)
Evicts the given SystemProperty from the cache
|
boolean |
resolveBooleanSystemProperty(String name)
Resolves a boolean system property.
|
boolean |
resolveBooleanSystemProperty(String name,
boolean defaultValue) |
int |
resolveIntSystemProperty(String name)
Resolves an int system property.
|
int |
resolveIntSystemProperty(String name,
int defaultValue) |
long |
resolveLongSystemProperty(String name)
Resolves an long system property.
|
long |
resolveLongSystemProperty(String name,
long defaultValue) |
String |
resolveSystemProperty(String name)
Preferred method for looking up properties.
|
String |
resolveSystemProperty(String name,
String defaultValue) |
protected net.sf.ehcache.Cache systemPropertyCache
protected SystemPropertiesDao systemPropertiesDao
protected SystemPropertyServiceExtensionManager extensionManager
@Value(value="${system.property.cache.timeout}") protected int systemPropertyCacheTimeout
@Autowired protected RuntimeEnvironmentPropertiesManager propMgr
public String resolveSystemProperty(String name, String defaultValue)
resolveSystemProperty
in interface SystemPropertiesService
public String resolveSystemProperty(String name)
SystemPropertiesService
resolveSystemProperty
in interface SystemPropertiesService
protected String buildKey(String propertyName)
propertyName
- protected String buildKey(SystemProperty systemProperty)
systemProperty
- protected net.sf.ehcache.Cache getSystemPropertyCache()
public SystemProperty findById(Long id)
SystemPropertiesService
findById
in interface SystemPropertiesService
SystemProperty
public void removeFromCache(SystemProperty systemProperty)
SystemPropertiesService
removeFromCache
in interface SystemPropertiesService
public int resolveIntSystemProperty(String name)
SystemPropertiesService
resolveIntSystemProperty
in interface SystemPropertiesService
public int resolveIntSystemProperty(String name, int defaultValue)
resolveIntSystemProperty
in interface SystemPropertiesService
public boolean resolveBooleanSystemProperty(String name)
SystemPropertiesService
resolveBooleanSystemProperty
in interface SystemPropertiesService
public boolean resolveBooleanSystemProperty(String name, boolean defaultValue)
resolveBooleanSystemProperty
in interface SystemPropertiesService
public long resolveLongSystemProperty(String name)
SystemPropertiesService
resolveLongSystemProperty
in interface SystemPropertiesService
public long resolveLongSystemProperty(String name, long defaultValue)
resolveLongSystemProperty
in interface SystemPropertiesService
public boolean isValueValidForType(String value, SystemPropertyFieldType type)
SystemPropertiesService
isValueValidForType
in interface SystemPropertiesService
Copyright © 2017. All rights reserved.