com.webmethods.caf.faces.data.task.impl
Class TaskDataHelper

java.lang.Object
  extended by com.webmethods.caf.faces.data.task.impl.TaskDataHelper

public class TaskDataHelper
extends Object

TaskDataHelper defines a collection of helper methods for ITaskData conversion.


Field Summary
static int MAX_ARRAY_DIFF_ELEMENTS
          Max different elements in the array which may be different
 
Constructor Summary
TaskDataHelper()
           
 
Method Summary
static void addMapOrder(Map object)
          Stores the order of elements in the map in the "__fieldsOrder" element of type of String[]
static void cleanObjectMap(Map object)
          Cleans object map from runtime artifacts.
static Object cloneObjectFromMap(Map map, Class objectClass, String[] properties)
          Clones an object from Map *
static Object cloneObjectToMap(Object object, String[] properties)
          Clones object to the Map implementation contains
static Map iDataToMap(IData data)
          Converts IS IData document type into generic java Map
static IData mapToIData(Map map)
          Converts generic java Map into IS IData document type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_ARRAY_DIFF_ELEMENTS

public static final int MAX_ARRAY_DIFF_ELEMENTS
Max different elements in the array which may be different

See Also:
Constant Field Values
Constructor Detail

TaskDataHelper

public TaskDataHelper()
Method Detail

cloneObjectToMap

public static Object cloneObjectToMap(Object object,
                                      String[] properties)
                               throws Exception
Clones object to the Map implementation contains

Parameters:
object -
properties - selected top level properties of an object will be cloned
Returns:
Throws:
PortalException
Exception
See Also:
ObjectUtil.cloneObjectToMap(Object, String[])

addMapOrder

public static void addMapOrder(Map object)
Stores the order of elements in the map in the "__fieldsOrder" element of type of String[]


cleanObjectMap

public static void cleanObjectMap(Map object)
Cleans object map from runtime artifacts. This is used when object map is returned to IS and thus

Parameters:
object - object map needs to be cleaned.

cloneObjectFromMap

public static Object cloneObjectFromMap(Map map,
                                        Class objectClass,
                                        String[] properties)
                                 throws Exception
Clones an object from Map *

Parameters:
map -
objectClass -
properties - allowed properties to clone
Returns:
Throws:
PortalException
Exception
See Also:
ObjectUtil.cloneObjectFromMap(Map, Class, String[], boolean)

iDataToMap

public static Map iDataToMap(IData data)
                      throws Exception
Converts IS IData document type into generic java Map

Parameters:
data - IS IData
Returns:
map
Throws:
Exception

mapToIData

public static IData mapToIData(Map map)
                        throws Exception
Converts generic java Map into IS IData document type

Throws:
Exception