Class FormDefinitionUtils
java.lang.Object
de.hybris.platform.xyformsfacades.utils.FormDefinitionUtils
-
Method Summary
Modifier and TypeMethodDescriptionprotected static DocumentBuilderprotected static ElementgetElementByXPath(String content, String path) protected static ElementgetElementByXPath(Document doc, String path) static StringgetFormDataIdFromResponse(String response) Given a response it returns id of newly created documentstatic StringgetFormDefinition(String content) Used to get the form definition given the content parameter.static StringgetFormDefinitionContent(String content, YFormDefinitionData yformDefinition) Given a content it returns a new content containing the meta information provided by the given yForm DefinitiongetFormDefinitionMetadata(String content) It returns the DOM representation of the Metadata TAG from the given content parameter.static Stringprotected static XPathgetXPath()static StringNormalizes the given xml content.
-
Method Details
-
getFormDataIdFromResponse
Given a response it returns id of newly created document- Parameters:
response-- Throws:
YFormServiceException
-
getFormDefinitionContent
public static String getFormDefinitionContent(String content, YFormDefinitionData yformDefinition) throws YFormServiceException Given a content it returns a new content containing the meta information provided by the given yForm Definition- Parameters:
content-yformDefinition-- Throws:
YFormServiceException
-
getFormDefinitionMetadata
public static Map<String,String> getFormDefinitionMetadata(String content) throws YFormServiceException It returns the DOM representation of the Metadata TAG from the given content parameter.- Parameters:
content-- Throws:
YFormServiceException
-
normalize
Normalizes the given xml content. Useful when comparing contents that have been manipulated using other xml tools.- Parameters:
content-- Throws:
YFormServiceException
-
getFormDefinition
Used to get the form definition given the content parameter.- Parameters:
content-- Throws:
YFormServiceException
-
getXML
- Throws:
YFormServiceException
-
getElementByXPath
protected static Element getElementByXPath(String content, String path) throws YFormServiceException - Throws:
YFormServiceException
-
getElementByXPath
- Throws:
YFormServiceException
-
getDocumentBuilder
- Throws:
YFormServiceException
-
getXPath
-