Class CXMLElementBrowser

java.lang.Object
de.hybris.platform.b2b.punchout.services.CXMLElementBrowser

public class CXMLElementBrowser extends Object
Allows for browsing and finding elements part of a CXML instance.
  • Constructor Details

    • CXMLElementBrowser

      public CXMLElementBrowser(CXML cxml)
      Constructor.
      Parameters:
      cxml - the CXML instance
  • Method Details

    • findHeader

      public Header findHeader()
      Returns:
      the header as a child of CXML or null if not found
    • findRequestByType

      public <T> T findRequestByType(Class<T> clazz)
      Parameters:
      clazz - the request type class
      Returns:
      the instance of the request type or null if not found
    • findRequest

      public Request findRequest()
      Returns:
      the request element or null if not found
    • findResponseByType

      public <T> T findResponseByType(Class<T> clazz)
      Finds a response by type.
      Parameters:
      clazz - the element type class
      Returns:
      the response element type or null if not found
    • findResponse

      public Response findResponse()
      Returns:
      the response instance of a CXML or null if not found
    • findElementInList

      protected <T> T findElementInList(List<?> list, Class<T> clazz)
    • hasResponse

      public boolean hasResponse()
      Checks whether there is Response instance.
      Returns:
      true if CXML contains element of type Response