org.cruxframework.crux.core.declarativeui
Class ViewProcessor

java.lang.Object
  extended by org.cruxframework.crux.core.declarativeui.ViewProcessor

public class ViewProcessor
extends Object

Process Crux view files, extracting metadata and generating the host html for application pages.

Author:
Thiago da Rosa de Bustamante

Constructor Summary
ViewProcessor()
           
 
Method Summary
static JSONObject extractWidgetsMetadata(String viewId, Document viewSource, boolean xhmltInput)
          Extract the widgets metadata from the view page.
static void generateHTML(String viewId, Document view, OutputStream out)
          Generate the HTML code from the view page.
static String getOutputCharset()
           
static Document getView(InputStream file, String filename, String device)
           
static void setForceIndent(boolean force)
          Makes it easier to read the output files
static void setOutputCharset(String charset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewProcessor

public ViewProcessor()
Method Detail

getView

public static Document getView(InputStream file,
                               String filename,
                               String device)
Parameters:
file -
device -
Returns:

generateHTML

public static void generateHTML(String viewId,
                                Document view,
                                OutputStream out)
Generate the HTML code from the view page.

Parameters:
viewId -
view -
out -

extractWidgetsMetadata

public static JSONObject extractWidgetsMetadata(String viewId,
                                                Document viewSource,
                                                boolean xhmltInput)
Extract the widgets metadata from the view page.

Parameters:
viewId -
viewSource -
xhmltInput -
Returns:

setForceIndent

public static void setForceIndent(boolean force)
Makes it easier to read the output files

Parameters:
force -

setOutputCharset

public static void setOutputCharset(String charset)
Parameters:
outputCharset -

getOutputCharset

public static String getOutputCharset()
Returns:


Copyright © 2014. All rights reserved.