jbpm-form-modeler-ui 1.0-SNAPSHOT

org.jbpm.formModeler.core.processing.formProcessing
Class Functions

java.lang.Object
  extended by org.jbpm.formModeler.service.bb.commons.config.componentsFactory.BasicFactoryElement
      extended by org.jbpm.formModeler.core.processing.formProcessing.Functions
All Implemented Interfaces:
Serializable, org.jbpm.formModeler.service.bb.commons.config.componentsFactory.FactoryLifecycle

public class Functions
extends org.jbpm.formModeler.service.bb.commons.config.componentsFactory.BasicFactoryElement

Util functions that can be used on field Formulas.

See Also:
Serialized Form

Field Summary
static org.apache.commons.lang.StringUtils String
          This enables using StringUtils functions by using something like Functions.String.replace(...)
static org.apache.commons.lang.WordUtils Word
          This enables using WordUtils functions by using something like Functions.String.replace(...)
 
Constructor Summary
Functions()
           
 
Method Summary
 boolean checkCCC(String CCC)
           
 boolean checkCIF(String CIF)
           
 boolean checkIBAN(String numIBAN)
           
 boolean checkNIF(String dni)
           
 Date getDateFromFields(String sDay, String sMonth, String sYear)
           
 FormManagerImpl getFormManager()
           
 Map getMonths()
           
 Map getValidDays()
           
 Map getValidDays(String value)
           
 Map getValidDays(String sMonth, String sYear)
           
 Map getValidHTMLContainers()
           
 Map getYearsBetween(int min, int max)
           
 String semaphor(Number value, Number low, Number high)
          Returns a color depending on the supplied values.
 void setFormManager(FormManagerImpl formManagerImpl)
           
 void setValidHTMLContainers(Map validHTMLContainers)
           
 void start()
           
 String str()
          Return an empty string.
 String str(String s)
          String given as argument
 int yearsOld(Date birthDate)
           
 
Methods inherited from class org.jbpm.formModeler.service.bb.commons.config.componentsFactory.BasicFactoryElement
addPeriodicTask, addPeriodicTask, factoryLookup, getComponentAlias, getComponentDescription, getComponentName, getComponentScope, init, setComponentAlias, shutdown, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

String

public static final org.apache.commons.lang.StringUtils String
This enables using StringUtils functions by using something like Functions.String.replace(...)


Word

public static final org.apache.commons.lang.WordUtils Word
This enables using WordUtils functions by using something like Functions.String.replace(...)

Constructor Detail

Functions

public Functions()
Method Detail

start

public void start()
           throws Exception
Specified by:
start in interface org.jbpm.formModeler.service.bb.commons.config.componentsFactory.FactoryLifecycle
Overrides:
start in class org.jbpm.formModeler.service.bb.commons.config.componentsFactory.BasicFactoryElement
Throws:
Exception

getValidHTMLContainers

public Map getValidHTMLContainers()

setValidHTMLContainers

public void setValidHTMLContainers(Map validHTMLContainers)

getFormManager

public FormManagerImpl getFormManager()

setFormManager

public void setFormManager(FormManagerImpl formManagerImpl)

checkNIF

public boolean checkNIF(String dni)

checkIBAN

public boolean checkIBAN(String numIBAN)

checkCCC

public boolean checkCCC(String CCC)

checkCIF

public boolean checkCIF(String CIF)

yearsOld

public int yearsOld(Date birthDate)
             throws ParseException
Throws:
ParseException

getYearsBetween

public Map getYearsBetween(int min,
                           int max)
                    throws Exception
Throws:
Exception

getMonths

public Map getMonths()

getValidDays

public Map getValidDays()

getValidDays

public Map getValidDays(String value)

getValidDays

public Map getValidDays(String sMonth,
                        String sYear)

getDateFromFields

public Date getDateFromFields(String sDay,
                              String sMonth,
                              String sYear)

str

public String str()
Return an empty string. This method, in combination with str(s) serve as default string inside formulas.

Returns:
an empty string

str

public String str(String s)
String given as argument

Parameters:
s - string to return
Returns:
String given as argument

semaphor

public String semaphor(Number value,
                       Number low,
                       Number high)
Returns a color depending on the supplied values.

Parameters:
value - value to consider
low - lower limit
high - upper limit
Returns:
green, orange or red, depending on the

jbpm-form-modeler-ui 1.0-SNAPSHOT

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