|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cxf.aegis.type.Type
org.apache.cxf.aegis.type.mtom.AbstractXOPType
public abstract class AbstractXOPType
Base class for MtoM types.
Field Summary | |
---|---|
static java.lang.String |
XML_MIME_ATTR_LOCAL_NAME
|
static javax.xml.namespace.QName |
XML_MIME_BASE64
|
static javax.xml.namespace.QName |
XML_MIME_CONTENT_TYPE
|
static java.lang.String |
XML_MIME_NS
|
static javax.xml.namespace.QName |
XOP_HREF
|
static javax.xml.namespace.QName |
XOP_INCLUDE
|
static java.lang.String |
XOP_NS
|
Fields inherited from class org.apache.cxf.aegis.type.Type |
---|
typeClass |
Constructor Summary | |
---|---|
AbstractXOPType(boolean useXmimeBinaryType,
java.lang.String expectedContentTypes)
Create an XOP type. |
Method Summary | |
---|---|
void |
addToSchemaElement(org.jdom.Element schemaElement)
If the type object merely wants to contribute attributes to the xsd:element element, it can implement this. |
protected abstract Attachment |
createAttachment(java.lang.Object object,
java.lang.String id)
|
protected abstract byte[] |
getBytes(java.lang.Object object)
if MtoM is not enabled, we need bytes to turn into base64. |
protected abstract java.lang.String |
getContentType(java.lang.Object object,
Context context)
|
static org.jaxen.jdom.JDOMXPath |
getXmimeXpathImport()
|
protected abstract java.lang.Object |
readAttachment(Attachment att,
Context context)
|
java.lang.Object |
readMtoM(MessageReader reader,
Context context)
This is called from base64Type when it recognizes an XOP attachment. |
java.lang.Object |
readObject(MessageReader reader,
Context context)
This defers to the plain base64 type, which calls back into here above for XOP. |
boolean |
usesXmime()
|
protected abstract java.lang.Object |
wrapBytes(byte[] bareBytes,
java.lang.String contentType)
If one of these types arrives unoptimized, we need to convert it to the desired return type. |
void |
writeObject(java.lang.Object object,
MessageWriter writer,
Context context)
Writes the object to the MessageWriter. |
Methods inherited from class org.apache.cxf.aegis.type.Type |
---|
equals, getDependencies, getMaxOccurs, getMinOccurs, getSchemaType, getTypeClass, getTypeMapping, hashCode, hasMaxOccurs, hasMinOccurs, isAbstract, isComplex, isNillable, isWriteOuter, setAbstract, setNillable, setSchemaType, setTypeClass, setTypeMapping, setWriteOuter, toString, usesUtilityTypes, writeSchema |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XOP_NS
public static final java.lang.String XML_MIME_NS
public static final java.lang.String XML_MIME_ATTR_LOCAL_NAME
public static final javax.xml.namespace.QName XOP_INCLUDE
public static final javax.xml.namespace.QName XML_MIME_CONTENT_TYPE
public static final javax.xml.namespace.QName XOP_HREF
public static final javax.xml.namespace.QName XML_MIME_BASE64
Constructor Detail |
---|
public AbstractXOPType(boolean useXmimeBinaryType, java.lang.String expectedContentTypes)
useXmimeBinaryType
- whether to use xmime:base64Binary.expectedContentTypes
- whether to public xmime:expectedContentTypes.Method Detail |
---|
public static org.jaxen.jdom.JDOMXPath getXmimeXpathImport()
public java.lang.Object readMtoM(MessageReader reader, Context context) throws DatabindingException
reader
- context
-
DatabindingException
public java.lang.Object readObject(MessageReader reader, Context context) throws DatabindingException
readObject
in class Type
DatabindingException
protected abstract java.lang.Object readAttachment(Attachment att, Context context) throws java.io.IOException
java.io.IOException
public void writeObject(java.lang.Object object, MessageWriter writer, Context context) throws DatabindingException
Type
writeObject
in class Type
DatabindingException
protected abstract Attachment createAttachment(java.lang.Object object, java.lang.String id)
protected abstract java.lang.String getContentType(java.lang.Object object, Context context)
protected abstract java.lang.Object wrapBytes(byte[] bareBytes, java.lang.String contentType)
bareBytes
- the bytes pulled out of the base64.contentType
- when we support xmime:contentType, this will be passed along.
protected abstract byte[] getBytes(java.lang.Object object)
public void addToSchemaElement(org.jdom.Element schemaElement)
Type
addToSchemaElement
in class Type
public boolean usesXmime()
usesXmime
in class Type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |