Class FormDefinitionUtils
- java.lang.Object
-
- de.hybris.platform.xyformsfacades.utils.FormDefinitionUtils
-
public class FormDefinitionUtils extends java.lang.ObjectStatic class used to interact with yForm Definition and yForm Data
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static org.jdom2.input.SAXBuildercreateSAXBuilder()static 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 org.jdom2.ElementgetFormDefinitionMetadata(java.lang.String content)It returns the DOM representation of the Metadata TAG from the given content parameter.static java.lang.StringgetXML(org.jdom2.Document doc)Given a DOM document it returns the String representationstatic java.lang.Stringnormalize(java.lang.String content)Normalizes the given xml content.
-
-
-
Method Detail
-
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 org.jdom2.Element 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.jdom2.Document doc) throws java.io.IOExceptionGiven a DOM document it returns the String representation- Parameters:
doc-- Throws:
java.io.IOException
-
createSAXBuilder
protected static org.jdom2.input.SAXBuilder createSAXBuilder()
-
-