Package com.day.cq.wcm.foundation.forms
Interface FormStructureHelper
- 
public interface FormStructureHelperInterface for retrieving form properties from different form node structures. A form node structure consists of following kinds of nodes:- 
         Form node which has form properties like 
FormsConstants.START_PROPERTY_ACTION_TYPE,FormsConstants.START_PROPERTY_LOAD_PATH. - Form field node which correspond to various input elements which can be present in form.
 
FormStructureHelperwhosecanManage(Resource)returns true for a given resource, will get used. For getting an instance of this interface checkFormStructureHelperFactory - 
         Form node which has form properties like 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanManage(Resource resource)Tests whether thisFormStructureHelpercan obtain form properties from the given node.java.lang.Iterable<Resource>getFormElements(Resource resource)Gets the resources corresponding to fields of given form resource.ResourcegetFormResource(Resource resource)Gets the resource corresponding to form element i.e.ResourceupdateFormStructure(Resource resource)Updates necessary changes to the form resource. 
 - 
 
- 
- 
Method Detail
- 
canManage
boolean canManage(Resource resource)
Tests whether thisFormStructureHelpercan obtain form properties from the given node.- Parameters:
 resource-Resource.- Returns:
 - true if this 
FormStructureHelpercan obtain form properties, false otherwise. 
 
- 
getFormResource
Resource getFormResource(Resource resource)
Gets the resource corresponding to form element i.e. the resource with form properties. 
- 
getFormElements
java.lang.Iterable<Resource> getFormElements(Resource resource)
Gets the resources corresponding to fields of given form resource. 
- 
updateFormStructure
Resource updateFormStructure(Resource resource)
Updates necessary changes to the form resource. Can be used to set minimal default values for the form (e.g. action type) and to ensure additional mandatory resources (e.g. form start and form end resource)- Parameters:
 resource-Resourceany resource.- Returns:
 - updated form resource or null if it wasn't a form related resource or nothing has to be adapted.
 
 
 - 
 
 -