|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.props.PropsData
public class PropsData
Props data storage for base and profile properties. Properties can be lookuped and modified only through this class.
| Field Summary | |
|---|---|
protected boolean |
appendDuplicateProps
If set, duplicate props will be appended to the end, separated by comma. |
protected java.util.HashMap<java.lang.String,PropsValue> |
baseProperties
|
protected java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,PropsValue>> |
profileProperties
|
protected jodd.util.StringTemplateParser |
stringTemplateParser
|
| Constructor Summary | |
|---|---|
|
PropsData()
|
protected |
PropsData(java.util.HashMap<java.lang.String,PropsValue> properties,
java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,PropsValue>> profiles)
|
| Method Summary | |
|---|---|
PropsData |
clone()
|
int |
countBaseProperties()
Counts base properties. |
int |
countProfileProperties()
Counts profile properties. |
void |
extract(java.util.Map target,
java.lang.String[] profiles,
java.lang.String[] wildcardPatterns)
Extract props to target map. |
protected void |
extractMap(java.util.Map target,
java.util.Map<java.lang.String,PropsValue> map,
java.lang.String[] wildcardPatterns)
|
PropsValue |
getBaseProperty(java.lang.String key)
Returns base property or null if it doesn't exist. |
PropsValue |
getProfileProperty(java.lang.String profile,
java.lang.String key)
Returns profile property. |
protected java.lang.String |
lookupValue(java.lang.String key,
java.lang.String... profiles)
Lookup props value through profiles and base properties. |
protected void |
put(java.util.Map<java.lang.String,PropsValue> map,
java.lang.String key,
java.lang.String value)
Puts key-value pair into the map, with respect of appending duplicate properties |
void |
putBaseProperty(java.lang.String key,
java.lang.String value)
Adds base property. |
void |
putProfileProperty(java.lang.String key,
java.lang.String value,
java.lang.String profile)
Adds profile property. |
void |
resolveMacros()
Resolves all macros in this props set. |
protected boolean |
resolveMacros(java.util.Map<java.lang.String,PropsValue> map,
java.lang.String profile)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.HashMap<java.lang.String,PropsValue> baseProperties
protected final java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,PropsValue>> profileProperties
protected final jodd.util.StringTemplateParser stringTemplateParser
protected boolean appendDuplicateProps
| Constructor Detail |
|---|
public PropsData()
protected PropsData(java.util.HashMap<java.lang.String,PropsValue> properties,
java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,PropsValue>> profiles)
| Method Detail |
|---|
public PropsData clone()
clone in class java.lang.Object
protected void put(java.util.Map<java.lang.String,PropsValue> map,
java.lang.String key,
java.lang.String value)
public int countBaseProperties()
public void putBaseProperty(java.lang.String key,
java.lang.String value)
public PropsValue getBaseProperty(java.lang.String key)
null if it doesn't exist.
public int countProfileProperties()
public void putProfileProperty(java.lang.String key,
java.lang.String value,
java.lang.String profile)
public PropsValue getProfileProperty(java.lang.String profile,
java.lang.String key)
protected java.lang.String lookupValue(java.lang.String key,
java.lang.String... profiles)
public void resolveMacros()
protected boolean resolveMacros(java.util.Map<java.lang.String,PropsValue> map,
java.lang.String profile)
public void extract(java.util.Map target,
java.lang.String[] profiles,
java.lang.String[] wildcardPatterns)
protected void extractMap(java.util.Map target,
java.util.Map<java.lang.String,PropsValue> map,
java.lang.String[] wildcardPatterns)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||