Interface CustomBuilder.Selector

Enclosing interface:
CustomBuilder

public static interface CustomBuilder.Selector
Selects the elements to which a custom builder is applied. Note that this interface may be implemented by the CustomBuilder itself.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Selects the message payload element.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accepts(OMContainer parent, int depth, String namespaceURI, String localName)
    Check if the custom builder registered with this selector should be applied to the given element.
  • Field Details

    • PAYLOAD

      static final CustomBuilder.Selector PAYLOAD
      Selects the message payload element. For plain XML documents, that is the document element. For SOAP messages, that is the child element of the SOAP body.
  • Method Details

    • accepts

      boolean accepts(OMContainer parent, int depth, String namespaceURI, String localName)
      Check if the custom builder registered with this selector should be applied to the given element. Note that this method will only be invoked for elements that can be represented as OMSourcedElement instances in the object model. For plain XML documents this means every element, but for SOAP messages this restricts the set of elements. E.g. this method will never be invoked for SOAP faults.
      Parameters:
      parent - the parent of the OMElement to be built
      depth - the depth of the element (with the root element having depth 1)
      namespaceURI - the namespace URI of the element; never null
      localName - the local name of the element; never null
      Returns:
      true if the element should be built as an OMSourcedElement using the custom builder registered with this selector, in which case CustomBuilder.create(OMElement) will be called to create the corresponding OMDataSource; false otherwise