|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A context for serialization of multi-references for SOAP encoded style.
Nested Class Summary | |
static interface |
ReferenceSerializationContext.AttachmentWithType
|
Method Summary | |
void |
clearMultirefs()
Clears table of multirefs. |
java.util.Iterator |
getAttachments()
Returns an iterator of all attachments. |
java.util.List |
getAttachmentsWithType()
List of registered attachments. |
java.lang.String |
getMultirefId(java.lang.Object reference)
Returns id of a multiref. |
java.lang.String |
getMultirefRef(java.lang.Object reference)
Returns the value of the href parameter. |
Type |
getMultirefType(java.lang.Object reference)
Returns schema type for a given reference. |
java.util.Map |
getReferences()
Returns map of reference => id. |
boolean |
isMultirefsInline()
Returns true if multirefs should be serialized inline (at
the first ocurrence), false if multirefs are serialized
externally. |
boolean |
isReferenceSerialized(java.lang.Object reference)
Returns whether a reference is already serialized so it referenced only. |
boolean |
isSerializingMultirefs()
Returns true if mutirefs are serialized as data, false if they are serialized as references. |
void |
registerAttachment(MessageAttachment attachment)
Adds an attachment, leading to placing it at the end of the message. |
void |
registerAttachment(MessageAttachment attachment,
AttachmentType attType)
Adds an attachment to the end of attachment list. |
java.lang.String |
registerReference(java.lang.Object reference,
Type type)
Registers a reference to an object. |
java.lang.String |
registerReference(java.lang.Object reference,
Type type,
java.lang.String id,
java.lang.String ref)
Registers a reference to an object. |
void |
setMultirefsInline(boolean flag)
Sets whether multirefs should be serialized inline (at the first ocurrence), false if multirefs are serialized
externally. |
void |
setReferenceSerialized(java.lang.Object reference)
Sets the flag that a given reference is being serialized. |
void |
setSerializingMultirefs(boolean doSerializeMultirefs)
If set up, multirefs will be serialized as a normal data, otherwise will be serialized as references. |
Method Detail |
public java.lang.String registerReference(java.lang.Object reference, Type type) throws MessageCreatingException
reference
- the reference to be registeredtype
- the type of the reference
MessageCreatingException
- if some serialization exception occurspublic java.lang.String registerReference(java.lang.Object reference, Type type, java.lang.String id, java.lang.String ref) throws MessageCreatingException
Mostly used with references to other mime parts of the message
reference
- the reference to be registeredtype
- the type of the referenceid
- the id of the referenceref
- the value of the 'ref' attribute of the reference
MessageCreatingException
- if some serialization exception occurspublic java.util.Map getReferences() throws MessageCreatingException
If the returned id is >= 0, the reference is a multiref.
MessageCreatingException
- if some serialization exception occurspublic java.lang.String getMultirefId(java.lang.Object reference)
If an object is not a multiref, null is returned
reference
- the reference for which id is to be returned
public java.lang.String getMultirefRef(java.lang.Object reference)
If the object is not a multiref, null is returned.
reference
- the reference for which id is to be returned
public Type getMultirefType(java.lang.Object reference)
public void setSerializingMultirefs(boolean doSerializeMultirefs)
doSerializeMultirefs
- if true, multirefs are to be
serialized just as normal data, if false, they are to be
serialized as referencespublic boolean isSerializingMultirefs()
public void clearMultirefs()
public void registerAttachment(MessageAttachment attachment)
attachment
- the attachment being registeredgetAttachments()
public java.util.Iterator getAttachments()
registerAttachment(org.idoox.wasp.types.MessageAttachment)
public void registerAttachment(MessageAttachment attachment, AttachmentType attType)
registerAttachment(org.idoox.wasp.types.MessageAttachment)
.
attachment
- an attachment to registerattType
- type of the attachment; can be null
public java.util.List getAttachmentsWithType()
ReferenceSerializationContext.AttachmentWithType
public boolean isMultirefsInline()
true
if multirefs should be serialized inline (at
the first ocurrence), false
if multirefs are serialized
externally.
public void setMultirefsInline(boolean flag)
false
if multirefs are serialized
externally.
flag
- true
if multirefs should be serialized inlinepublic void setReferenceSerialized(java.lang.Object reference)
reference
- the object that is to be serializedisReferenceSerialized(java.lang.Object)
public boolean isReferenceSerialized(java.lang.Object reference)
reference
- the referenced object
true
if the reference value was already serialized;
false
if the reference was not serialized yet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |