|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.skyscreamer.yoga.selector.parser.DynamicPropertyResolver
public class DynamicPropertyResolver
An implementation of AliasSelectorResolver that uses a Properties object accessed from a InputStream
(likely a resource or file) to translate the alias. The key of each property is the alias, and the value is the
fully-formed selector expression.
| Constructor Summary | |
|---|---|
DynamicPropertyResolver()
|
|
DynamicPropertyResolver(InputStream propertyFile)
|
|
| Method Summary | |
|---|---|
String |
resolveSelector(String aliasSelectorExpression)
The method that translates an alias into a fully-formed selector expression |
void |
setPropertyFile(InputStream propertyFile)
Defines the InputStream, such as a FileInputStream, that provides access to the Properties object |
void |
setReloadIntervalSeconds(int reloadIntervalSeconds)
Setting this interval will instruct the resolver to reload the Properties object from the InputStream before resolving the alias, if the specified number of seconds has elapsed since the last time the Properties object was loaded. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DynamicPropertyResolver()
public DynamicPropertyResolver(InputStream propertyFile)
| Method Detail |
|---|
public String resolveSelector(String aliasSelectorExpression)
throws ParseSelectorException
AliasSelectorResolver
resolveSelector in interface AliasSelectorResolveraliasSelectorExpression - the alias expression passed in on the URI
ParseSelectorException - thrown if the input alias expression is not validpublic void setReloadIntervalSeconds(int reloadIntervalSeconds)
reloadIntervalSeconds - interval in seconds, 0 is defaultpublic void setPropertyFile(InputStream propertyFile)
propertyFile - the input stream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||