org.alfresco.web.forms
Class FormDataFunctions

java.lang.Object
  extended by org.alfresco.web.forms.FormDataFunctions
Direct Known Subclasses:
ServletContextFormDataFunctionsAdapter

public class FormDataFunctions
extends java.lang.Object

Common implementation of functions called in the context of FormDataRenderers. This uses AVMRemote rather than AVMService so that in can be used in the context of both the alfresco webapp and the virtualization server.


Constructor Summary
FormDataFunctions(org.alfresco.service.cmr.remote.AVMRemote avmRemote)
           
 
Method Summary
 java.lang.String encodeQuotes(java.lang.String text)
          Encodes invalid HTML characters.
 org.w3c.dom.Document parseXMLDocument(java.lang.String avmPath)
          Loads and parses an xml document at the specified path using avm remote.
 java.util.Map parseXMLDocuments(java.lang.String formName, java.lang.String avmPath)
          Loads and parses all xml documents at the specified path generated by the specified form using avm remote.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormDataFunctions

public FormDataFunctions(org.alfresco.service.cmr.remote.AVMRemote avmRemote)
Method Detail

parseXMLDocument

public org.w3c.dom.Document parseXMLDocument(java.lang.String avmPath)
                                      throws java.io.IOException,
                                             org.xml.sax.SAXException
Loads and parses an xml document at the specified path using avm remote.

Parameters:
avmPath - a path within the avm repository.
Returns:
the parsed document.
Throws:
java.io.IOException
org.xml.sax.SAXException

parseXMLDocuments

public java.util.Map parseXMLDocuments(java.lang.String formName,
                                       java.lang.String avmPath)
                                throws java.io.IOException,
                                       org.xml.sax.SAXException
Loads and parses all xml documents at the specified path generated by the specified form using avm remote.

Parameters:
formName - a form name
avmPath - a path within the avm repository.
Returns:
the parsed document.
Throws:
java.io.IOException
org.xml.sax.SAXException

encodeQuotes

public java.lang.String encodeQuotes(java.lang.String text)
                              throws java.io.IOException,
                                     org.xml.sax.SAXException
Encodes invalid HTML characters. (Fix for ETWOTWO-504 issue) This code was adopted from WebDAVHelper.encodeHTML() method with some restrictions.

Parameters:
text - to encode
Returns:
encoded text
Throws:
java.io.IOException
org.xml.sax.SAXException
See Also:
for pattern.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.