com.genesyslab.platform.commons.protocol.runtime.codec.CustomPackager
, com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
ConfObjectPackV6
, ConfObjectPackV7
public abstract class ConfObjectPack
extends java.lang.Object
implements com.genesyslab.platform.commons.protocol.runtime.codec.CustomPackager
Modifier and Type | Class | Description |
---|---|---|
static interface |
ConfObjectPack.CfgMetadataStorage |
Modifier and Type | Field | Description |
---|---|---|
protected static java.lang.String |
ACCOUNT_ID_ATTR_NAME |
|
protected static java.lang.String |
ACCOUNT_ID_ATTR_SID |
|
protected static java.lang.String |
APP_ID_ATTR_NAME |
|
protected static java.lang.String |
APP_ID_ATTR_SID |
|
protected static java.lang.String |
BRIEF |
|
protected static java.lang.String |
CFG_DELTA |
|
protected static java.lang.String |
CONF_ACL |
|
protected static java.lang.String |
CONF_BRIEF_OBJECT_ATTR_NAME |
|
protected static java.lang.String |
CONF_ID |
|
protected static java.lang.String |
CONF_ID_ATTR_NAME |
|
protected static java.lang.String |
CONF_ID_ATTR_SID |
|
protected static java.lang.String |
CONF_OBJ_ATTR_NAME |
|
protected static java.lang.String |
CONF_OBJ_ATTR_SID |
|
protected static java.lang.String |
CONF_OBJECT_ATTR_NAME |
|
protected static java.lang.String |
CONF_OBJECT_DELTA_ATTR_NAME |
|
protected static java.lang.String |
CONF_OBJECTS_ATTR_NAME |
|
protected static java.lang.String |
CONF_SCHEMA |
|
protected java.lang.String |
confObjectsData |
|
protected java.lang.Integer |
confObjectsType |
|
protected static int |
DELTA_INDEX |
|
protected Message |
message |
|
protected CfgMetadata |
metadata |
|
protected static java.lang.String |
OBJ_TYPE_ATTR_NAME |
|
protected static java.lang.String |
OBJ_TYPE_ATTR_SID |
|
protected static java.lang.String |
PERMISSIONS_ATTR_SID |
|
protected static java.lang.String |
PERMISSIONS_DATA_ATTR_NAME |
|
protected static java.lang.String |
SCHEMA_DATA_ATTR_NAME |
|
protected static java.lang.String |
SCHEMA_INFO_ATTR_SID |
|
protected ConfSerializer |
serializer |
Constructor | Description |
---|---|
ConfObjectPack() |
Modifier and Type | Method | Description |
---|---|---|
void |
appendLogValue(java.lang.StringBuffer buf,
java.lang.Object customTypeObject,
boolean truncate,
boolean hideAllowed) |
Appends value of the custom-type object to the buffer.
|
java.lang.Object |
decodeFromXml(javax.xml.transform.Source attributeElement,
AttributeDescription attributeDescription) |
Deserializes custom-type object from xml representation.
|
void |
encodeToXml(java.lang.Object customTypeObject,
javax.xml.transform.Result attributeElement) |
Serializes custom-type object to xml.
|
protected void |
ensureOutgoingObjectTypeAttr(java.lang.Object customTypeObject,
java.lang.String id,
MessageTransport transport,
java.lang.Object transportState) |
Method is used with serialization of user provided data for sending it to server.
|
protected CfgDescriptionClass |
getClassDescription() |
Method is used for deserialization of data from server.
|
protected CfgDescriptionClass |
getClassDescription(CfgDescriptionClass objType) |
Virtual method is used for substitution of main object class
with delta or brief representation where it is required.
|
protected CfgDescriptionClass |
getClassDescription(java.lang.Integer typeId) |
Method is used for serialization and deserialization of data to/from server.
|
java.lang.String |
getLogType() |
Returns type signature for attribute record written to log.
|
java.lang.String |
getNS() |
Returns Xml namespace of custom type or null
if namespace is default for protocol.
|
void |
onAttribute(java.lang.String id,
java.lang.Object value) |
|
void |
onMessageEnd() |
|
void |
onMessageStart(Message message) |
|
void |
setMessage(Message message) |
Sets message this codec works on.
|
void |
setProtocolData(java.lang.Object protocolData) |
Sets additional protocol specific data for this codec.
|
protected void |
setSerializer(ConfSerializer serializer) |
protected static final java.lang.String CONF_OBJ_ATTR_SID
protected static final java.lang.String CONF_OBJ_ATTR_NAME
protected static final java.lang.String OBJ_TYPE_ATTR_SID
protected static final java.lang.String OBJ_TYPE_ATTR_NAME
protected static final java.lang.String CONF_ID_ATTR_SID
protected static final java.lang.String CONF_ID_ATTR_NAME
protected static final java.lang.String APP_ID_ATTR_SID
protected static final java.lang.String APP_ID_ATTR_NAME
protected static final java.lang.String ACCOUNT_ID_ATTR_SID
protected static final java.lang.String ACCOUNT_ID_ATTR_NAME
protected static final java.lang.String PERMISSIONS_ATTR_SID
protected static final java.lang.String PERMISSIONS_DATA_ATTR_NAME
protected static final java.lang.String SCHEMA_INFO_ATTR_SID
protected static final java.lang.String SCHEMA_DATA_ATTR_NAME
protected static final java.lang.String CONF_OBJECT_ATTR_NAME
protected static final java.lang.String CONF_OBJECTS_ATTR_NAME
protected static final java.lang.String CONF_OBJECT_DELTA_ATTR_NAME
protected static final java.lang.String CONF_BRIEF_OBJECT_ATTR_NAME
protected static final int DELTA_INDEX
protected static final java.lang.String CFG_DELTA
protected static final java.lang.String BRIEF
protected static final java.lang.String CONF_ID
protected static final java.lang.String CONF_ACL
protected static final java.lang.String CONF_SCHEMA
protected Message message
protected java.lang.Integer confObjectsType
protected java.lang.String confObjectsData
protected ConfSerializer serializer
protected CfgMetadata metadata
public void setProtocolData(java.lang.Object protocolData)
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
It is highly recommended to implement the protocolData object
as set of interfaces that in turn provide access to codec specific
data. Do not use protocolData as an object for a single codec,
since it will be impossible to extend such object.
Wrong: CodecData data = (CodecData) protocolData;
Right: CodecData data =
((CodecDataHolder) protocolData).getCodecData();
setProtocolData
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
protocolData
- protocol specific dataprotected void setSerializer(ConfSerializer serializer)
public void setMessage(Message message)
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
setMessage
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
message
- protocol specific datapublic void onMessageStart(Message message)
onMessageStart
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomPackager
public void onAttribute(java.lang.String id, java.lang.Object value) throws com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
onAttribute
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomPackager
com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
public void onMessageEnd() throws com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
onMessageEnd
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomPackager
com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
protected CfgDescriptionClass getClassDescription() throws com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
protected CfgDescriptionClass getClassDescription(java.lang.Integer typeId) throws com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
protected CfgDescriptionClass getClassDescription(CfgDescriptionClass objType) throws com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
protected void ensureOutgoingObjectTypeAttr(java.lang.Object customTypeObject, java.lang.String id, MessageTransport transport, java.lang.Object transportState) throws PlatformException
PlatformException
public java.lang.String getLogType()
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
LogTypes
class to return standard values.getLogType
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
public void appendLogValue(java.lang.StringBuffer buf, java.lang.Object customTypeObject, boolean truncate, boolean hideAllowed) throws com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
appendLogValue
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
buf
- buffer to append datacustomTypeObject
- value of custom-type objecttruncate
- whether long value should be truncatedhideAllowed
- whether value should be hiddencom.genesyslab.platform.commons.protocol.runtime.codec.CodecException
- if some codec problems occurredpublic java.lang.String getNS()
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
getNS
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
public void encodeToXml(java.lang.Object customTypeObject, javax.xml.transform.Result attributeElement) throws com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
encodeToXml
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
customTypeObject
- object to serializeattributeElement
- xml attribute to store the data incom.genesyslab.platform.commons.protocol.runtime.codec.CodecException
- if some codec problems occurredpublic java.lang.Object decodeFromXml(javax.xml.transform.Source attributeElement, AttributeDescription attributeDescription) throws com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
decodeFromXml
in interface com.genesyslab.platform.commons.protocol.runtime.codec.CustomTypeCodec
attributeElement
- xml attribute to restore the data fromattributeDescription
- attribute description objectcom.genesyslab.platform.commons.protocol.runtime.codec.CodecException
- if there is problems with xml dataSend comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.