jbpm-form-modeler-api 6.0.0.Beta5

org.jbpm.formModeler.core.processing
Interface FieldHandler


public interface FieldHandler


Method Summary
 boolean acceptsPropertyName(String propName)
          Determine if given property name is accepted by this handler.
 String[] getCompatibleClassNames()
          Determine the list of class names this field can generate.
 String getHumanName(Locale locale)
          Return a human readable name for displaying in given locale.
 String getName()
           
 String getPageToIncludeForDisplaying()
          When rendering a form, if field is handled by this handler, determine the page that renders the displaying of the value
 String getPageToIncludeForRendering()
          When rendering a form, if field is handled by this handler, determine the page that renders the input(s)
 String getPageToIncludeForSearching()
          When rendering a form, if field is handled by this handler, determine the page that renders the displaying of the value
 Map getParamValue(String inputName, Object objectValue, String pattern)
          Determine the value as a parameter map for a given input value.
 Object getValue(Field field, String inputName, Map parametersMap, Map filesMap, String desiredClassName, Object previousValue)
          Read a parameter value (normally from a request), and translate it to an object with desired class (that must be one of the returned by this handler)
 void initialize(Field field, String namespace)
          Initialize any status stored in the field.
 boolean isEmpty(Object value)
          Determine if supplied value is empty
 boolean isEvaluable(String inputName, Map parameterMap, Map filesMap)
           
 boolean shouldPersist()
           
 

Method Detail

getName

String getName()

getCompatibleClassNames

String[] getCompatibleClassNames()
Determine the list of class names this field can generate. That is, normally, a field can generate multiple outputs (an input text can generate Strings, Integers, ...)

Returns:
the set of class types that can be generated by this handler.

getValue

Object getValue(Field field,
                String inputName,
                Map parametersMap,
                Map filesMap,
                String desiredClassName,
                Object previousValue)
                throws Exception
Read a parameter value (normally from a request), and translate it to an object with desired class (that must be one of the returned by this handler)

Returns:
a object with desired class
Throws:
Exception

getParamValue

Map getParamValue(String inputName,
                  Object objectValue,
                  String pattern)
Determine the value as a parameter map for a given input value. This is like the inverse operation of getValue()

Parameters:
objectValue - Object value to represent
pattern - Pattern to apply if any
Returns:
a Map representing the parameter values expected inside a request that would cause the form to generate given object value as a result.

getPageToIncludeForRendering

String getPageToIncludeForRendering()
When rendering a form, if field is handled by this handler, determine the page that renders the input(s)

Returns:
a page to include

getPageToIncludeForDisplaying

String getPageToIncludeForDisplaying()
When rendering a form, if field is handled by this handler, determine the page that renders the displaying of the value

Returns:
a page to include

getPageToIncludeForSearching

String getPageToIncludeForSearching()
When rendering a form, if field is handled by this handler, determine the page that renders the displaying of the value

Returns:
a page to include

isEmpty

boolean isEmpty(Object value)
Determine if supplied value is empty

Parameters:
value -
Returns:
true if value can be considered empty

acceptsPropertyName

boolean acceptsPropertyName(String propName)
Determine if given property name is accepted by this handler.

Parameters:
propName - property name to determine if it is accepted or not.
Returns:
true if handler accepts given property name

getHumanName

String getHumanName(Locale locale)
Return a human readable name for displaying in given locale.

Returns:
a human readable name for displaying in given locale.

initialize

void initialize(Field field,
                String namespace)
Initialize any status stored in the field.


isEvaluable

boolean isEvaluable(String inputName,
                    Map parameterMap,
                    Map filesMap)

shouldPersist

boolean shouldPersist()

jbpm-form-modeler-api 6.0.0.Beta5

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.