Interface FormProcessor

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Form generate​(Item item, java.util.List<java.lang.String> fields, java.util.List<java.lang.String> forcedFields, java.util.Map<java.lang.String,​java.lang.Object> context)
      Returns a Form representation for an item
      boolean isActive()
      Determines whether this form processor is active
      boolean isApplicable​(Item item)
      Determines whether this form processor is applicable for the supplied item
      java.lang.Object persist​(Item item, FormData data)
      Persists the given object representing the form data for an item
    • Method Detail

      • isApplicable

        boolean isApplicable​(Item item)
        Determines whether this form processor is applicable for the supplied item
        Parameters:
        item - The item the form is being generated for
        Returns:
        true if the processor is applicable
      • isActive

        boolean isActive()
        Determines whether this form processor is active
        Returns:
        true if the processor is active
      • generate

        Form generate​(Item item,
                      java.util.List<java.lang.String> fields,
                      java.util.List<java.lang.String> forcedFields,
                      java.util.Map<java.lang.String,​java.lang.Object> context)
        Returns a Form representation for an item
        Parameters:
        item - The item to generate a Form object for
        fields - Restricted list of fields to include, null indicates all possible fields for the item should be included
        forcedFields - List of field names from 'fields' list that should be forcibly included, it is up to the form processor implementation to determine how to enforce this
        context - Map representing optional context that can be used during retrieval of the form
        Returns:
        The Form representation
      • persist

        java.lang.Object persist​(Item item,
                                 FormData data)
        Persists the given object representing the form data for an item
        Parameters:
        item - The item to generate a Form object for
        data - An object representing the data of the form
        Returns:
        The object persisted