jbpm-form-modeler-ui 6.2.0.CR1

org.jbpm.formModeler.core.processing.fieldHandlers
Class NumericFieldHandler

java.lang.Object
  extended by org.jbpm.formModeler.core.processing.AbstractFieldHandler
      extended by org.jbpm.formModeler.core.processing.DefaultFieldHandler
          extended by org.jbpm.formModeler.core.processing.fieldHandlers.NumericFieldHandler
All Implemented Interfaces:
FieldHandler

@Named(value="org.jbpm.formModeler.core.processing.fieldHandlers.NumericFieldHandler")
public class NumericFieldHandler
extends DefaultFieldHandler

Handler for numeric text input


Nested Class Summary
 class NumericFieldHandler.EmptyNumberException
           
 
Field Summary
static boolean DEFAULT_MAX_VALUE
           
 
Constructor Summary
NumericFieldHandler()
           
 
Method Summary
protected  String[] buildParamValue(Object value, String pattern)
          Builds a correct paramValue for a given inputValue.
 String[] getCompatibleClassNames()
          Determine the list of class types this field can generate.
 Map getParamValue(Field field, String inputName, Object objectValue)
           
 Object getTheValue(Field field, String[] paramValue, String desiredClassName)
           
 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)
 boolean isEmpty(Object value)
           
 
Methods inherited from class org.jbpm.formModeler.core.processing.DefaultFieldHandler
getFieldHandlersManager, getFieldPattern, getFieldTypeManager, getFormManager, getFormProcessor, getFormStatusManager, getFunctionsProvider, getNamespaceManager, getReplacementManager
 
Methods inherited from class org.jbpm.formModeler.core.processing.AbstractFieldHandler
getFieldName, getPageToIncludeForDisplaying, getPageToIncludeForRendering
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_VALUE

public static final boolean DEFAULT_MAX_VALUE
See Also:
Constant Field Values
Constructor Detail

NumericFieldHandler

public NumericFieldHandler()
Method Detail

getValue

public 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:
NumericFieldHandler.EmptyNumberException
Exception

getTheValue

public Object getTheValue(Field field,
                          String[] paramValue,
                          String desiredClassName)
                   throws Exception
Throws:
Exception

getParamValue

public Map getParamValue(Field field,
                         String inputName,
                         Object objectValue)

buildParamValue

protected String[] buildParamValue(Object value,
                                   String pattern)
Builds a correct paramValue for a given inputValue.

Parameters:
value - Object value to build its paramValue
pattern - pattern to apply if any
Returns:
a String[] with the paramValue on it or null if the value received is null

getCompatibleClassNames

public String[] getCompatibleClassNames()
Determine the list of class types 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.

isEmpty

public boolean isEmpty(Object value)

jbpm-form-modeler-ui 6.2.0.CR1

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