com.jalios.jcms.mashup
Class ExportUtil

java.lang.Object
  extended by com.jalios.jcms.mashup.ExportUtil
All Implemented Interfaces:
MashupConstants

public class ExportUtil
extends Object
implements MashupConstants

This class provides utility methods for the ExportManager.

Since:
jcms-5.7.2
Version:
$Revision: 23874 $
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
 
Fields inherited from interface com.jalios.jcms.mashup.MashupConstants
DATA_TAG, DATASET_TAG, FIELD_CLASS, FIELD_ENTRY, FIELD_ITEM, FIELD_KEY, FIELD_NAME, FIELD_TAG, FIELD_VALUE, FILE_FIELD, FILE_ID, FILE_MTIME, FILE_SIZE, FILE_TAG, FILE_TICKET, FILESET_TAG, RELATED_TAG
 
Constructor Summary
ExportUtil()
           
 
Method Summary
static String exportField(int indentLevel, String name, boolean value)
          Returns a XML representation of a primitive boolean field.
static String exportField(int indentLevel, String name, boolean[] value)
          Returns a XML representation of a boolean array field.
static String exportField(int indentLevel, String name, Collection<?> values)
          Returns a XML representation of a data collection field (Data or String).
static String exportField(int indentLevel, String name, Data value)
          Returns a XML representation of a data field.
static String exportField(int indentLevel, String name, Data[] value)
          Returns a XML representation of a data array field.
static String exportField(int indentLevel, String name, Date value)
          Returns a XML representation of a date field.
static String exportField(int indentLevel, String name, Date[] value)
          Returns a XML representation of a date array field.
static String exportField(int indentLevel, String name, double value)
          Returns a XML representation of a primitive double field.
static String exportField(int indentLevel, String name, double[] value)
          Returns a XML representation of a primitive double array field.
static String exportField(int indentLevel, String name, int value)
          Returns a XML representation of a primitive integer field.
static String exportField(int indentLevel, String name, int[] value)
          Returns a XML representation of a primitive integer array field.
static String exportField(int indentLevel, String name, Locale value)
          Returns a XML representation of a Locale field.
static String exportField(int indentLevel, String name, long value)
          Returns a XML representation of a primitive long integer field.
static String exportField(int indentLevel, String name, long[] value)
          Returns a XML representation of a primitive long integer array field.
static String exportField(int indentLevel, String name, Map map)
          Returns a XML representation of a map field.
static String exportField(int indentLevel, String name, String value)
          Returns a XML representation of a text field.
static String exportField(int indentLevel, String name, String[] value)
          Returns a XML representation of a String array field.
static String exportField(int indentLevel, String name, String[] value, boolean isAbstract)
          Returns a XML representation of a String array field.
static String exportField(int indentLevel, String name, String[] value, String mlField)
          Returns a XML representation of a String array field.
static String exportField(int indentLevel, String name, String[] value, String mlField, boolean isAbstract)
          Returns a XML representation of a String array field.
static String exportField(int indentLevel, String name, String value, boolean isAbstract)
          Returns a XML representation of a text field.
static String exportField(int indentLevel, String name, String value, String mlField)
          Returns a XML representation of a text field.
static String exportField(int indentLevel, String name, String value, String[] attNames, String[] attValues)
          Returns a XML representation of a text field with attributes
static String exportField(int indentLevel, String name, String value, String mlField, boolean isAbstract)
          Returns a XML representation of a text field.
static String exportFile(int indentLevel, String fieldName, FileDocument doc)
          Returns a XML representation of a FileDocument.
static String exportFile(int indentLevel, String fieldName, FileDocument[] docs)
          Returns a XML representation of an array of FileDocument.
static String exportFile(int indentLevel, String fieldName, String filename)
          Returns a XML representation of a file.
static String exportFile(int indentLevel, String fieldName, String[] filenames)
          Returns a XML representation of an array of files.
static String exportFile(int indentLevel, String fieldName, String filename, String id)
          Returns a XML representation of a file.
static String exportRelated(int indentLevel, String name, Object value)
          Returns a XML representation of a related (result of a method, after computation or search from an index).
static String getIndent(int indentLevel)
          Returns a String of indentLevel * INDENT_UNIT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

ExportUtil

public ExportUtil()
Method Detail

exportRelated

public static String exportRelated(int indentLevel,
                                   String name,
                                   Object value)
Returns a XML representation of a related (result of a method, after computation or search from an index).

Parameters:
indentLevel - the indentation level
name - the realted's name
value - the related's value
Returns:
a XML representation of a related.
Since:
jcms-6.1

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 String value)
Returns a XML representation of a text field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a date field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 String value,
                                 boolean isAbstract)
Returns a XML representation of a text field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
isAbstract - is it the abstact field?
Returns:
a XML representation of a date field.
Since:
jcms-6.0.1

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 String value,
                                 String mlField)
Returns a XML representation of a text field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
mlField - the name of the ML Field bound to this field
Returns:
a XML representation of a date field.
Since:
jcms-6.0.1

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 String value,
                                 String mlField,
                                 boolean isAbstract)
Returns a XML representation of a text field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
mlField - the name of the ML Field bound to this field
isAbstract - is it the abstact field?
Returns:
a XML representation of a date field.
Since:
jcms-6.0.1

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 String value,
                                 String[] attNames,
                                 String[] attValues)
Returns a XML representation of a text field with attributes

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
attNames - an array of attribute names
attValues - an array of attribute values
Returns:
a XML representation of a date field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 Data value)
Returns a XML representation of a data field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a date field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 Data[] value)
Returns a XML representation of a data array field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a date field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 Collection<?> values)
Returns a XML representation of a data collection field (Data or String).

Parameters:
indentLevel - the indentation level
name - the field's name
values - the collection of Data or String
Returns:
a XML representation of a collection field.
Since:
jcms-6.0.0

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 String[] value)
Returns a XML representation of a String array field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a data String field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 String[] value,
                                 boolean isAbstract)
Returns a XML representation of a String array field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
isAbstract - is it the abstact field?
Returns:
a XML representation of a data String field.
Since:
jcms-6.0.1

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 String[] value,
                                 String mlField)
Returns a XML representation of a String array field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
mlField - the name of the ML Field bound to this field
Returns:
a XML representation of a data String field.
Since:
jcms-6.0.1

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 String[] value,
                                 String mlField,
                                 boolean isAbstract)
Returns a XML representation of a String array field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
mlField - the name of the ML Field bound to this field
isAbstract - is it the abstact field?
Returns:
a XML representation of a data String field.
Since:
jcms-6.0.1

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 Date value)
Returns a XML representation of a date field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a date field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 Date[] value)
Returns a XML representation of a date array field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a date array field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 int value)
Returns a XML representation of a primitive integer field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a primitive integer field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 int[] value)
Returns a XML representation of a primitive integer array field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a primitive integer array field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 long value)
Returns a XML representation of a primitive long integer field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a primitive long integer field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 long[] value)
Returns a XML representation of a primitive long integer array field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a primitive long integer array field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 double value)
Returns a XML representation of a primitive double field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a primitive double field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 double[] value)
Returns a XML representation of a primitive double array field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a primitive double array field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 boolean value)
Returns a XML representation of a primitive boolean field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a primitive boolean field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 Locale value)
Returns a XML representation of a Locale field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a Locale field.
Since:
jcms-6.1.0

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 boolean[] value)
Returns a XML representation of a boolean array field.

Parameters:
indentLevel - the indentation level
name - the field's name
value - the field's value
Returns:
a XML representation of a boolean array field.
Since:
jcms-5.7.2

exportField

public static String exportField(int indentLevel,
                                 String name,
                                 Map map)
Returns a XML representation of a map field.

Parameters:
indentLevel - the indentation level
name - the field's name
map - the map to be exported
Returns:
a XML representation of a map field.
Since:
jcms-5.7.2

exportFile

public static String exportFile(int indentLevel,
                                String fieldName,
                                String filename)
Returns a XML representation of a file.

Parameters:
indentLevel - the indentation level
fieldName - the field's name
filename - the filename
Returns:
a XML representation of a file.
Since:
jcms-5.7.2

exportFile

public static String exportFile(int indentLevel,
                                String fieldName,
                                String[] filenames)
Returns a XML representation of an array of files.

Parameters:
indentLevel - the indentation level
fieldName - the field's name
filenames - an array of filenames
Returns:
a XML representation of an array of files.
Since:
jcms-5.7.2

exportFile

public static String exportFile(int indentLevel,
                                String fieldName,
                                String filename,
                                String id)
Returns a XML representation of a file.

Parameters:
indentLevel - the indentation level
fieldName - the field's name
filename - the filename
id - the id of the FileDocument bound to this file
Returns:
a XML representation of a file.
Since:
jcms-5.7.2

exportFile

public static String exportFile(int indentLevel,
                                String fieldName,
                                FileDocument doc)
Returns a XML representation of a FileDocument.

Parameters:
indentLevel - the indentation level
fieldName - the field's name
doc - the FileDocument
Returns:
a XML representation of a FileDocument.
Since:
jcms-5.7.2

exportFile

public static String exportFile(int indentLevel,
                                String fieldName,
                                FileDocument[] docs)
Returns a XML representation of an array of FileDocument.

Parameters:
indentLevel - the indentation level
fieldName - the field's name
docs - the array of FileDocument
Returns:
a XML representation of an array of FileDocument.
Since:
jcms-5.7.2

getIndent

public static String getIndent(int indentLevel)
Returns a String of indentLevel * INDENT_UNIT.

Parameters:
indentLevel - the indentation level
Returns:
a String of indentLevel * INDENT_UNIT.
Since:
jcms-5.7.2


Copyright © 2001-2007 Jalios SA. All Rights Reserved.