com.silverpeas.mydb.control
Class FormManager

java.lang.Object
  extended by com.silverpeas.mydb.control.FormManager

public class FormManager
extends Object

Database record form manager.

Author:
Antoine HEDIN

Field Summary
static String FIELD_PREFIX
           
 
Constructor Summary
FormManager(DateFormatter dateFormatter)
           
 
Method Summary
 com.silverpeas.form.DataRecord getDataRecord(DbLine dbLine)
           
 com.silverpeas.form.DataRecord getDataRecord(String[][] formParameters)
           
 com.silverpeas.form.Form getForm(DbTable dbTable, com.stratelia.silverpeas.util.ResourcesWrapper resources, boolean consultation, boolean newRecord, String beanName, String componentId, String method)
           
 com.silverpeas.form.RecordTemplate getRecordTemplate(DbTable dbTable, com.stratelia.silverpeas.util.ResourcesWrapper resources, boolean consultation, boolean newRecord, String beanName, String componentId, String method)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_PREFIX

public static final String FIELD_PREFIX
See Also:
Constant Field Values
Constructor Detail

FormManager

public FormManager(DateFormatter dateFormatter)
Method Detail

getForm

public com.silverpeas.form.Form getForm(DbTable dbTable,
                                        com.stratelia.silverpeas.util.ResourcesWrapper resources,
                                        boolean consultation,
                                        boolean newRecord,
                                        String beanName,
                                        String componentId,
                                        String method)
                                 throws MyDBException
Parameters:
dbTable - The table which the record belongs to.
resources - The resources wrapper.
consultation - The flag indicating if data have to be displayed as labels or input fields.
newRecord - The flag indicating if the record is a new or a modified one.
beanName - The bean name.
componentId - The component name.
method - The method name.
Returns:
The XML form describing the concerned database record.
Throws:
MyDBException

getRecordTemplate

public com.silverpeas.form.RecordTemplate getRecordTemplate(DbTable dbTable,
                                                            com.stratelia.silverpeas.util.ResourcesWrapper resources,
                                                            boolean consultation,
                                                            boolean newRecord,
                                                            String beanName,
                                                            String componentId,
                                                            String method)
                                                     throws MyDBException
Parameters:
dbTable - The table which the record belongs to.
resources - The resources wrapper.
consultation - The flag indicating if data have to be displayed as labels or input fields.
newRecord - The flag indicating if the record is a new or a modified one.
beanName - The bean name.
componentId - The component name.
method - The method name.
Returns:
The template needed to create the XML form describing the concerned database record.
Throws:
MyDBException

getDataRecord

public com.silverpeas.form.DataRecord getDataRecord(DbLine dbLine)
                                             throws com.silverpeas.form.FormException
Parameters:
dbLine - The database record line.
Returns:
The data record corresponding to the line.
Throws:
com.silverpeas.form.FormException

getDataRecord

public com.silverpeas.form.DataRecord getDataRecord(String[][] formParameters)
                                             throws com.silverpeas.form.FormException
Parameters:
formParameters - the names and values of the form parameters.
Returns:
The data record corresponding to the database record.
Throws:
com.silverpeas.form.FormException


Copyright © 2016 Silverpeas. All Rights Reserved.