Class FormDefinitionUtils
- java.lang.Object
-
- de.hybris.platform.xyformsfacades.utils.FormDefinitionUtils
-
public class FormDefinitionUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static javax.xml.parsers.DocumentBuildergetDocumentBuilder()protected static org.w3c.dom.ElementgetElementByXPath(java.lang.String content, java.lang.String path)protected static org.w3c.dom.ElementgetElementByXPath(org.w3c.dom.Document doc, java.lang.String path)static java.lang.StringgetFormDataIdFromResponse(java.lang.String response)Given a response it returns id of newly created documentstatic java.lang.StringgetFormDefinition(java.lang.String content)Used to get the form definition given the content parameter.static java.lang.StringgetFormDefinitionContent(java.lang.String content, YFormDefinitionData yformDefinition)Given a content it returns a new content containing the meta information provided by the given yForm Definitionstatic java.util.Map<java.lang.String,java.lang.String>getFormDefinitionMetadata(java.lang.String content)It returns the DOM representation of the Metadata TAG from the given content parameter.static java.lang.StringgetXML(org.w3c.dom.Document doc)protected static javax.xml.xpath.XPathgetXPath()static java.lang.Stringnormalize(java.lang.String content)Normalizes the given xml content.
-
-
-
Method Detail
-
getFormDataIdFromResponse
public static java.lang.String getFormDataIdFromResponse(java.lang.String response) throws YFormServiceExceptionGiven a response it returns id of newly created document- Parameters:
response-- Throws:
YFormServiceException
-
getFormDefinitionContent
public static java.lang.String getFormDefinitionContent(java.lang.String content, YFormDefinitionData yformDefinition) throws YFormServiceExceptionGiven 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 java.util.Map<java.lang.String,java.lang.String> getFormDefinitionMetadata(java.lang.String content) throws YFormServiceExceptionIt returns the DOM representation of the Metadata TAG from the given content parameter.- Parameters:
content-- Throws:
YFormServiceException
-
normalize
public static java.lang.String normalize(java.lang.String content) throws YFormServiceExceptionNormalizes the given xml content. Useful when comparing contents that have been manipulated using other xml tools.- Parameters:
content-- Throws:
YFormServiceException
-
getFormDefinition
public static java.lang.String getFormDefinition(java.lang.String content) throws YFormServiceExceptionUsed to get the form definition given the content parameter.- Parameters:
content-- Throws:
YFormServiceException
-
getXML
public static java.lang.String getXML(org.w3c.dom.Document doc) throws YFormServiceException- Throws:
YFormServiceException
-
getElementByXPath
protected static org.w3c.dom.Element getElementByXPath(java.lang.String content, java.lang.String path) throws YFormServiceException- Throws:
YFormServiceException
-
getElementByXPath
protected static org.w3c.dom.Element getElementByXPath(org.w3c.dom.Document doc, java.lang.String path) throws YFormServiceException- Throws:
YFormServiceException
-
getDocumentBuilder
protected static javax.xml.parsers.DocumentBuilder getDocumentBuilder() throws YFormServiceException- Throws:
YFormServiceException
-
getXPath
protected static javax.xml.xpath.XPath getXPath()
-
-