com.silverpeas.mydb.control
Class FormManager
java.lang.Object
  
com.silverpeas.mydb.control.FormManager
public class FormManager
- extends Object
 
Database record form manager.
- Author:
 
  - Antoine HEDIN
 
 
 
| 
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_PREFIX
public static final String FIELD_PREFIX
- See Also:
 - Constant Field Values
 
FormManager
public FormManager(DateFormatter dateFormatter)
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.