public class PropertyList
extends java.util.HashMap
implements java.lang.Cloneable, java.lang.Comparable, com.labvantage.sapphire.gwt.shared.JSONable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL_MODULES |
static java.lang.String |
ALL_ROLES |
protected java.util.HashMap |
attributes |
static java.lang.String |
ENCRYPT_PREFIX |
protected java.lang.String |
id |
static java.lang.String |
JSON_PROPERTYLISTATTRIBUTES |
static java.lang.String |
JSON_PROPERTYLISTID |
static java.lang.String |
JSON_PROPERTYLISTSEQUENCE |
protected boolean |
usePropertyValues |
Constructor and Description |
---|
PropertyList() |
PropertyList(java.util.HashMap mapProps)
Creates a new PropertyList from a HashMap
|
PropertyList(org.json.JSONObject jsonObject)
Creates a new propertylist from a JSONObhect (created with toJSONObject)
|
PropertyList(com.labvantage.sapphire.PropertyList propertyList)
Creates a new PropertyList from a (core) PropertyList
|
PropertyList(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyList(org.w3c.dom.Node propertyList,
boolean merge,
java.lang.String propertyTreeNodeId) |
void |
addPropertyList(com.labvantage.sapphire.PropertyList propertyList) |
int |
compareTo(java.lang.Object o) |
PropertyList |
copy() |
PropertyList |
copy(java.lang.String rolelist,
java.lang.String modulelist) |
PropertyList |
copy(java.lang.String rolelist,
java.lang.String modulelist,
java.util.Set<java.lang.String> inactiveRoles) |
PropertyList |
copy(java.lang.String languageid,
TranslationProcessor tp) |
PropertyList |
copy(java.lang.String languageid,
TranslationProcessor tp,
java.lang.String rolelist,
java.lang.String modulelist,
java.util.Set<java.lang.String> inactiveRoles) |
PropertyList |
copy(java.lang.String languageid,
TranslationProcessor tp,
java.lang.String rolelist,
java.lang.String modulelist,
java.util.Set<java.lang.String> inactiveRoles,
java.lang.String guimode) |
void |
deleteProperty(java.lang.String propertyid) |
boolean |
equals(PropertyList compare) |
java.lang.String |
findProperty(java.lang.String findId) |
PropertyList |
findPropertyList(java.lang.String findId) |
java.lang.String |
getAttribute(java.lang.String attributeId) |
java.util.HashMap |
getAttributes() |
protected java.lang.String |
getAttributesText(java.util.HashMap attribs,
java.lang.String ignorelist) |
PropertyListCollection |
getCollection(java.lang.String propertyId)
Returns the propertylistcollection for the specified property.
|
PropertyListCollection |
getCollectionNotNull(java.lang.String propertyId)
Returns the propertylistcollection for the specified property.
|
java.lang.String |
getDecryptedProperty(java.lang.String propertyId) |
java.util.ArrayList |
getFilteredCollections(java.lang.String propertyId,
java.util.HashMap filterMap) |
java.lang.String |
getId()
Returns the PropertyList identifier
|
java.lang.String |
getModuleListNodeid() |
PropertyValue |
getParentPropertyValue()
Returns the PropertyValue for the property that this propertylist resides in.
|
java.lang.String |
getPreviousModuleList() |
java.lang.String |
getPreviousRoleList() |
java.lang.String |
getPreviousSequence() |
java.lang.String |
getProperty(java.lang.String propertyId) |
java.lang.String |
getProperty(java.lang.String propertyId,
java.lang.String defaultValue) |
PropertyList |
getPropertyList(java.lang.String propertyId)
Returns the propertylist for the specified property.
|
PropertyList |
getPropertyListNotNull(java.lang.String propertyId)
Returns the propertylist for the specified property.
|
java.lang.String |
getPropertyTreeNodeId()
Returns the treenodeid when the propertylist has been populated from a propertytree
|
java.lang.String |
getPropertyTreeNodeId(java.lang.String propertyId) |
PropertyValue |
getPropertyValue(java.lang.String propertyId) |
java.lang.String |
getRoleListNodeid() |
long |
getSequence() |
boolean |
isCollection(java.lang.String propertyId) |
boolean |
isPropertyList(java.lang.String propertyId) |
boolean |
isSimple(java.lang.String propertyId) |
void |
mergeAttributes(java.util.HashMap attributes) |
void |
mergeAttributes(java.util.HashMap attributes,
java.lang.String propertyTreeNodeid) |
protected void |
propertyToXML(java.lang.StringBuffer xml,
java.lang.String propertyid,
java.lang.Object value,
PropertyValue pv,
java.lang.String roleList,
java.lang.String moduleList,
int level) |
void |
setAttribute(java.lang.String id,
java.lang.String value)
Sets a single attribute on this propertylist
|
void |
setAttribute(java.lang.String id,
java.lang.String value,
boolean deep)
Sets a single attribute on this propertylist with the option of cascading
|
void |
setAttributes(java.util.HashMap attributes)
Sets the attributes for the PropertyList
|
void |
setDatabaseid(java.lang.String databaseid)
Sets the databaseid
|
void |
setDbms(java.lang.String dbms)
Sets the database type
|
void |
setGuiMode(java.lang.String guiMode)
Sets the guimode value to return when encountering a guimode-based property like $R{high:xxx:|:medium:yyy:|:low:zzz}
|
void |
setId(java.lang.String id)
Set the PropertyList identifier
|
void |
setJSONString(java.lang.String jsonString) |
void |
setJSONString(java.lang.String jsonString,
boolean blankIsPropertyList) |
void |
setLanguage(java.lang.String language)
Sets the language when getting translated toXMLString
|
void |
setLocale(java.util.Locale locale) |
void |
setProperty(java.lang.String propertyId,
PropertyList value) |
void |
setProperty(java.lang.String propertyId,
PropertyListCollection value) |
void |
setProperty(java.lang.String propertyId,
java.lang.String value) |
void |
setPropertyList(java.io.File file) |
void |
setPropertyList(java.io.File file,
boolean merge) |
void |
setPropertyList(java.io.File file,
boolean merge,
boolean cache) |
void |
setPropertyList(java.lang.String xml) |
void |
setPropertyList(java.lang.String xml,
boolean merge) |
void |
setPropertyList(java.lang.String xml,
boolean merge,
boolean cache) |
void |
setPropertyList(java.lang.String xml,
boolean merge,
java.lang.String propertyTreeNodeid,
boolean cache) |
void |
setPropertyTree(java.io.File file,
java.lang.String nodeId) |
void |
setPropertyTree(java.io.File file,
java.lang.String nodeId,
boolean setDefaults) |
void |
setPropertyTree(org.w3c.dom.Node contextNode,
java.lang.String nodeId,
boolean setDefaults) |
void |
setPropertyTree(java.lang.String xml,
java.lang.String nodeId) |
void |
setPropertyTree(java.lang.String xml,
java.lang.String nodeId,
boolean setDefaults) |
void |
setPropertyTree(java.lang.String xml,
java.lang.String nodeId,
boolean setDefaults,
boolean cache) |
boolean |
setPropertyTreeDefaults(org.w3c.dom.Node propertyListDef) |
boolean |
setPropertyTreeDefaults(com.labvantage.sapphire.xml.PropertyDefaultList propertyDefaultList) |
void |
setPropertyTreeDefaults(java.lang.String propertyTree) |
void |
setSequence(long seq) |
void |
setSequence(java.lang.String seq) |
void |
setTimeZone(java.util.TimeZone timezone) |
void |
setTranslationProcessor(TranslationProcessor tp)
Translation processor to be used when translating in toXMLString()
|
void |
setUsePropertyValues(boolean usePropertyValues)
States whether to use PropertyValues.
|
org.w3c.dom.Element |
toElement(org.w3c.dom.Document doc) |
org.json.JSONObject |
toJSONObject() |
org.json.JSONObject |
toJSONObject(boolean includeAttributes) |
org.json.JSONObject |
toJSONObject(boolean includeAttributes,
boolean includeEmpties) |
java.lang.String |
toJSONString() |
java.lang.String |
toJSONString(boolean includeAttributes) |
java.lang.String |
toJSONString(boolean includeAttributes,
boolean includeEmpties) |
java.lang.String |
toString() |
java.lang.String |
toXMLString() |
java.lang.String |
toXMLString(int level) |
java.lang.String |
toXMLString(java.lang.String roleList,
java.lang.String moduleList) |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
protected java.lang.String id
protected java.util.HashMap attributes
protected boolean usePropertyValues
public static final java.lang.String ALL_ROLES
public static final java.lang.String ALL_MODULES
public static final java.lang.String ENCRYPT_PREFIX
public static final java.lang.String JSON_PROPERTYLISTID
public static final java.lang.String JSON_PROPERTYLISTSEQUENCE
public static final java.lang.String JSON_PROPERTYLISTATTRIBUTES
public PropertyList()
public PropertyList(java.lang.String id)
public PropertyList(java.util.HashMap mapProps)
mapProps
- public PropertyList(com.labvantage.sapphire.PropertyList propertyList)
propertyList
- public PropertyList(org.json.JSONObject jsonObject)
jsonObject
- public void setId(java.lang.String id)
id
- The PropertyList identifierpublic java.lang.String getId()
public void setUsePropertyValues(boolean usePropertyValues)
usePropertyValues
- Whether to use PropertyValuespublic void setGuiMode(java.lang.String guiMode)
guiMode
- the guimode value should be returned by the propertylistpublic void setLanguage(java.lang.String language)
language
- the language to translate topublic void setDbms(java.lang.String dbms)
dbms
- the database type (ORA, MSS)public void setDatabaseid(java.lang.String databaseid)
databaseid
- the database idpublic PropertyValue getParentPropertyValue()
public void setTranslationProcessor(TranslationProcessor tp)
tp
- TranslationProcessor to usepublic java.lang.String getPropertyTreeNodeId()
public void setAttributes(java.util.HashMap attributes)
attributes
- public void setAttribute(java.lang.String id, java.lang.String value)
id
- attribute identifiervalue
- attribute valuepublic void setAttribute(java.lang.String id, java.lang.String value, boolean deep)
id
- attribute identifiervalue
- attribute valuedeep
- setting this to true will set the same attribute on all nested propertylists and collectionspublic void mergeAttributes(java.util.HashMap attributes)
public void mergeAttributes(java.util.HashMap attributes, java.lang.String propertyTreeNodeid)
public java.util.HashMap getAttributes()
public java.lang.String getAttribute(java.lang.String attributeId)
public java.lang.String getPreviousSequence()
public java.lang.String getPreviousRoleList()
public java.lang.String getPreviousModuleList()
public java.lang.String getRoleListNodeid()
public java.lang.String getModuleListNodeid()
public void setSequence(long seq)
public void setSequence(java.lang.String seq)
public long getSequence()
public void setPropertyList(java.io.File file) throws SapphireException
SapphireException
public void setPropertyList(java.io.File file, boolean merge) throws SapphireException
SapphireException
public void setPropertyList(java.io.File file, boolean merge, boolean cache) throws SapphireException
SapphireException
public void setPropertyList(java.lang.String xml) throws SapphireException
SapphireException
public void setPropertyList(java.lang.String xml, boolean merge) throws SapphireException
SapphireException
public void setPropertyList(java.lang.String xml, boolean merge, java.lang.String propertyTreeNodeid, boolean cache) throws SapphireException
SapphireException
public void setPropertyList(java.lang.String xml, boolean merge, boolean cache) throws SapphireException
SapphireException
public void setPropertyTree(java.io.File file, java.lang.String nodeId) throws SapphireException
SapphireException
public void setPropertyTree(java.lang.String xml, java.lang.String nodeId) throws SapphireException
SapphireException
public void setPropertyTree(java.io.File file, java.lang.String nodeId, boolean setDefaults) throws SapphireException
SapphireException
public void setPropertyTree(java.lang.String xml, java.lang.String nodeId, boolean setDefaults) throws SapphireException
SapphireException
public void setPropertyTree(java.lang.String xml, java.lang.String nodeId, boolean setDefaults, boolean cache) throws SapphireException
SapphireException
public void setPropertyTree(org.w3c.dom.Node contextNode, java.lang.String nodeId, boolean setDefaults) throws SapphireException
SapphireException
public void addPropertyList(com.labvantage.sapphire.PropertyList propertyList)
public void setProperty(java.lang.String propertyId, java.lang.String value)
public void deleteProperty(java.lang.String propertyid)
public void setProperty(java.lang.String propertyId, PropertyList value)
public void setProperty(java.lang.String propertyId, PropertyListCollection value)
public void addPropertyList(org.w3c.dom.Node propertyList, boolean merge, java.lang.String propertyTreeNodeId) throws SapphireException
SapphireException
public void setPropertyTreeDefaults(java.lang.String propertyTree) throws SapphireException
SapphireException
public boolean setPropertyTreeDefaults(org.w3c.dom.Node propertyListDef) throws SapphireException
SapphireException
public boolean setPropertyTreeDefaults(com.labvantage.sapphire.xml.PropertyDefaultList propertyDefaultList) throws SapphireException
SapphireException
public java.lang.String toXMLString()
public java.lang.String toXMLString(int level)
public java.lang.String toXMLString(java.lang.String roleList, java.lang.String moduleList)
protected void propertyToXML(java.lang.StringBuffer xml, java.lang.String propertyid, java.lang.Object value, PropertyValue pv, java.lang.String roleList, java.lang.String moduleList, int level)
protected java.lang.String getAttributesText(java.util.HashMap attribs, java.lang.String ignorelist)
public java.lang.String getDecryptedProperty(java.lang.String propertyId)
public java.lang.String getProperty(java.lang.String propertyId)
public java.lang.String getProperty(java.lang.String propertyId, java.lang.String defaultValue)
public PropertyValue getPropertyValue(java.lang.String propertyId)
public PropertyList getPropertyList(java.lang.String propertyId)
propertyId
- The property containing the propertylistpublic PropertyListCollection getCollection(java.lang.String propertyId)
propertyId
- The property containing the collectionpublic PropertyList getPropertyListNotNull(java.lang.String propertyId)
propertyId
- The property containing the propertylistpublic PropertyListCollection getCollectionNotNull(java.lang.String propertyId)
propertyId
- The property containing the collectionpublic boolean isSimple(java.lang.String propertyId)
public boolean isPropertyList(java.lang.String propertyId)
public boolean isCollection(java.lang.String propertyId)
public java.lang.String getPropertyTreeNodeId(java.lang.String propertyId)
public java.util.ArrayList getFilteredCollections(java.lang.String propertyId, java.util.HashMap filterMap)
public PropertyList copy()
public PropertyList copy(java.lang.String rolelist, java.lang.String modulelist)
public PropertyList copy(java.lang.String rolelist, java.lang.String modulelist, java.util.Set<java.lang.String> inactiveRoles)
public PropertyList copy(java.lang.String languageid, TranslationProcessor tp)
public PropertyList copy(java.lang.String languageid, TranslationProcessor tp, java.lang.String rolelist, java.lang.String modulelist, java.util.Set<java.lang.String> inactiveRoles)
public PropertyList copy(java.lang.String languageid, TranslationProcessor tp, java.lang.String rolelist, java.lang.String modulelist, java.util.Set<java.lang.String> inactiveRoles, java.lang.String guimode)
public org.w3c.dom.Element toElement(org.w3c.dom.Document doc)
public java.lang.String findProperty(java.lang.String findId)
public PropertyList findPropertyList(java.lang.String findId)
public boolean equals(PropertyList compare)
public java.lang.String toString()
toString
in class java.util.AbstractMap
public org.json.JSONObject toJSONObject()
public org.json.JSONObject toJSONObject(boolean includeAttributes)
public org.json.JSONObject toJSONObject(boolean includeAttributes, boolean includeEmpties)
public java.lang.String toJSONString()
toJSONString
in interface com.labvantage.sapphire.gwt.shared.JSONable
public java.lang.String toJSONString(boolean includeAttributes, boolean includeEmpties)
public java.lang.String toJSONString(boolean includeAttributes)
public void setJSONString(java.lang.String jsonString) throws org.json.JSONException
org.json.JSONException
public void setJSONString(java.lang.String jsonString, boolean blankIsPropertyList) throws org.json.JSONException
org.json.JSONException
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public void setLocale(java.util.Locale locale)
public void setTimeZone(java.util.TimeZone timezone)