|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.configuration.protocol.obj.ConfObjectBase
public abstract class ConfObjectBase
Base class for configuration objects, objects' child structures, delta objects and brief info classes.
ConfObject
,
ConfStructure
,
ConfObjectBrief
,
ConfObjectDelta
Constructor Summary | |
---|---|
protected |
ConfObjectBase(CfgDescription metadata)
Protected constructor with base logic and properties container initialization. |
Method Summary | |
---|---|
protected void |
checkTypeCompatibility(CfgDescriptionAttribute attrInfo,
java.lang.Object value)
Internal method for value type validation. |
ConfObjectBase |
clone()
|
protected java.lang.Object |
createChildElement(CfgDescriptionAttribute attrInfo)
Protected method for child configuration structures. |
boolean |
equals(java.lang.Object obj)
|
CfgDescriptionAttributeReference |
getAttributeInfo()
Returns reference to "this" attribute MetaData description or null if it is a stand alone object. |
CfgDescriptionClass |
getClassInfo()
Returns reference to the class MetaData description if it is a stand-alone object or class description if it is a structure inside of main object. |
java.lang.Object |
getOrCreatePropertyValue(java.lang.String propName)
Returns value of a class property. If current property value is null, it tries to create a new child structure or structures collection for it. |
CfgDescriptionAttribute |
getPropertyInfo(java.lang.String propName)
Returns class MetaData attribute description. |
java.lang.Object |
getPropertyValue(int propIndex)
Returns value of a class property by the property index. |
java.lang.Object |
getPropertyValue(java.lang.String propName)
Returns value of a class property. |
int |
hashCode()
|
void |
setPropertyValue(int propIndex,
java.lang.Object propValue)
Sets value of a class property by the property index in the class MetaData description. |
void |
setPropertyValue(java.lang.String propName,
java.lang.Object propValue)
Sets value of a class property. |
java.lang.String |
toString()
|
java.lang.String |
toString(boolean truncate,
boolean hideAllowed)
Helper method for generation of string representation with object content. |
protected void |
toStringContentHelper(java.lang.StringBuilder buffer,
java.lang.String prefix,
boolean truncate,
boolean hideAllowed)
Virtual helper method for generation of string representation separating object content generation. |
protected void |
toStringHelper(java.lang.StringBuilder buffer,
java.lang.String prefix,
boolean truncate,
boolean hideAllowed)
Helper method for generation of string representation with object content. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ConfObjectBase(CfgDescription metadata)
metadata
- reference to actual MetaData class description.
ConfObjectAttributeException
- if given MetaData is null or there is some problem
with its usage as a base for configuration object or structure.Method Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public CfgDescriptionClass getClassInfo()
public CfgDescriptionAttributeReference getAttributeInfo()
public CfgDescriptionAttribute getPropertyInfo(java.lang.String propName)
propName
- name of the class attribute.
ConfObjectAttributeException
- if actual class MetaData does not contain
attribute with given name.public java.lang.Object getPropertyValue(java.lang.String propName)
propName
- name of the class attribute (property).
ConfObjectAttributeException
- if actual class MetaData does not contain
attribute with given name.public java.lang.Object getPropertyValue(int propIndex)
propIndex
- index of the class attribute (property).
ConfObjectAttributeException
- if property index is out of actual attributes range.CfgDescription.getIndex()
public java.lang.Object getOrCreatePropertyValue(java.lang.String propName)
propName
- name of the class attribute (property).
ConfObjectAttributeException
- if actual class MetaData does not contain
attribute with given name or child structure can't be created because
the attribute is not of configuration structure type.public void setPropertyValue(java.lang.String propName, java.lang.Object propValue)
propName
- name of the class attribute (property).propValue
- new value for the property.
ConfObjectAttributeException
- if actual class MetaData does not contain
attribute with given name.
ConfObjectValueException
- if type of the value conflicts with correspondent
attribute MetaData description.public void setPropertyValue(int propIndex, java.lang.Object propValue)
propIndex
- index of the class attribute (property).propValue
- new value for the property.
ConfObjectAttributeException
- if property index is out of actual attributes range.CfgDescription.getIndex()
public ConfObjectBase clone()
clone
in class java.lang.Object
protected void checkTypeCompatibility(CfgDescriptionAttribute attrInfo, java.lang.Object value)
attrInfo
- attribute MetaData description.value
- property value for type appliance.
ConfObjectValueException
- if given value type is not applicable to the attribute described.protected java.lang.Object createChildElement(CfgDescriptionAttribute attrInfo)
attrInfo
- attribute MetsData description.
ConfObjectAttributeException
- in case of wrong attribute typepublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean truncate, boolean hideAllowed)
truncate
- if this parameter value is "true", then resulting string should contain
truncated long values and long collections.hideAllowed
- "true" value of this parameter means that values of "sensitive" attributes
should not appear in the result string.
protected void toStringHelper(java.lang.StringBuilder buffer, java.lang.String prefix, boolean truncate, boolean hideAllowed)
buffer
- content output buffer.prefix
- this prefix will be added as begin of each new line in the result string for formatting purposes.truncate
- if this parameter value is "true", then resulting string should contain
truncated long values and long collections.hideAllowed
- "true" value of this parameter means that values of "sensitive" attributes
should not appear in the result buffer.protected void toStringContentHelper(java.lang.StringBuilder buffer, java.lang.String prefix, boolean truncate, boolean hideAllowed)
buffer
- content output buffer.prefix
- this prefix will be added as begin of each new line in the result string for formatting purposes.truncate
- if this parameter value is "true", then resulting string should contain
truncated long values and long collections.hideAllowed
- "true" value of this parameter means that values of "sensitive" attributes
should not appear in the result buffer.
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |