Class AbstractXOPType

    • Constructor Detail

      • AbstractXOPType

        public AbstractXOPType​(boolean useXmimeBinaryType,
                               String expectedContentTypes)
        Create an XOP type. This type will use xmime to publish and receive the content type via xmime:base64Binary if useXmimeBinaryType is true. If expectedContentTypes != null, then it will use xmime to advertise expected content types.
        Parameters:
        useXmimeBinaryType - whether to use xmime:base64Binary.
        expectedContentTypes - whether to public xmime:expectedContentTypes.
    • Method Detail

      • createAttachment

        protected abstract org.apache.cxf.message.Attachment createAttachment​(Object object,
                                                                              String id)
      • getContentType

        protected abstract String getContentType​(Object object,
                                                 Context context)
      • wrapBytes

        protected abstract Object wrapBytes​(byte[] bareBytes,
                                            String contentType)
        If one of these types arrives unoptimized, we need to convert it to the desired return type.
        Parameters:
        bareBytes - the bytes pulled out of the base64.
        contentType - when we support xmime:contentType, this will be passed along.
        Returns:
      • getBytes

        protected abstract byte[] getBytes​(Object object)
        if MtoM is not enabled, we need bytes to turn into base64.
        Returns:
      • addToSchemaElement

        public void addToSchemaElement​(org.apache.ws.commons.schema.XmlSchemaElement schemaElement)
        Description copied from class: AegisType
        If the type object merely wants to contribute attributes to the xsd:element element, it can implement this.
        Overrides:
        addToSchemaElement in class AegisType