|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.im.df.api.support.CalcTemplate
public final class CalcTemplate
The template used in DFFieldCalcCapability. This is typically used as template for URL field with generated link.
For example message format can be "http://www.mycompany.com/detail_for_structure?id={0}" where {0} will be replaced with value
of field provided as params for each row.
| Method Summary | |
|---|---|
static CalcTemplate |
create(String msgFormatPattern,
DFField[] params)
Creates a CalcTemplate instance for the message format and parameters |
static CalcTemplate |
create(String msgFormatPattern,
String[] fieldIDs,
DFEntity entity)
Creates a CalcTemplate instance for the message format and fields given by IDs. |
String |
getFormatPattern()
|
DFField[] |
getParams()
|
String |
getValue(Map<String,Object> values)
Resolve the URL (as String) for given row. |
boolean |
isValid()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static CalcTemplate create(String msgFormatPattern,
String[] fieldIDs,
DFEntity entity)
public static CalcTemplate create(String msgFormatPattern,
DFField[] params)
public String getFormatPattern()
public DFField[] getParams()
getParams in interface Calculablepublic boolean isValid()
public String getValue(Map<String,Object> values)
getValue in interface Calculablevalues - Values represents map of data in a single row. You can use the same Map you get from
DFEntityDataProvider.getData(java.util.List, com.im.commons.progress.DFEnvironmentRO)
method - obviously only Map for single row. It's expected that keys in this Map are Field.getId() and values
are actual data for each field. These values are used for resolution of URL.
IllegalStateException - if there is something incorrect (any used field is invalid, or if values doesn't contain
the appropriate data for each used field, etc.)
|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||