Interface FormService

All Known Implementing Classes:
FormServiceImpl

public interface FormService
Form service API.

This service API is designed to support the public facing Form APIs

Author:
Gavin Cornwell
  • Method Summary

    Modifier and Type
    Method
    Description
    getForm(Item item)
    Returns a form representation of the given item, all known fields for the item are included.
    getForm(Item item, List<String> fields)
    Returns a form representation of the given item consisting only of the given fields.
    getForm(Item item, List<String> fields, List<String> forcedFields)
    Returns a form representation of the given item consisting only of the given fields.
    getForm(Item item, List<String> fields, List<String> forcedFields, Map<String,Object> context)
    Returns a form representation of the given item consisting only of the given fields.
    getForm(Item item, List<String> fields, Map<String,Object> context)
    Returns a form representation of the given item consisting only of the given fields.
    getForm(Item item, Map<String,Object> context)
    Returns a form representation of the given item, all known fields for the item are included.
    saveForm(Item item, FormData data)
    Persists the given form representation for the given item.
  • Method Details

    • getForm

      Form getForm(Item item)
      Returns a form representation of the given item, all known fields for the item are included.
      Parameters:
      item - The item to get a form for
      Returns:
      The Form representation
    • getForm

      Form getForm(Item item, Map<String,Object> context)
      Returns a form representation of the given item, all known fields for the item are included.
      Parameters:
      item - The item to get a form for
      context - Map representing optional context that can be used during retrieval of the form
      Returns:
      The Form representation
    • getForm

      Form getForm(Item item, List<String> fields)
      Returns a form representation of the given item consisting only of the given fields.
      Parameters:
      item - The item to get a form for
      fields - Restricted list of fields to include, null indicates all possible fields for the item should be included
      Returns:
      The Form representation
    • getForm

      Form getForm(Item item, List<String> fields, Map<String,Object> context)
      Returns a form representation of the given item consisting only of the given fields.
      Parameters:
      item - The item to get a form for
      fields - Restricted list of fields to include, null indicates all possible fields for the item should be included
      context - Map representing optional context that can be used during retrieval of the form
      Returns:
      The Form representation
    • getForm

      Form getForm(Item item, List<String> fields, List<String> forcedFields)
      Returns a form representation of the given item consisting only of the given fields.
      Parameters:
      item - The item to get a form 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
      Returns:
      The Form representation
    • getForm

      Form getForm(Item item, List<String> fields, List<String> forcedFields, Map<String,Object> context)
      Returns a form representation of the given item consisting only of the given fields.
      Parameters:
      item - The item to get a form 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
    • saveForm

      Object saveForm(Item item, FormData data)
      Persists the given form representation for the given item.
      Parameters:
      item - The item to persist the form for
      data - An object representing the form data to persist
      Returns:
      The object persisted