Class FormJsonService

java.lang.Object
fr.paris.lutece.plugins.forms.service.json.AbstractFormJsonService
fr.paris.lutece.plugins.forms.service.json.FormJsonService

@ApplicationScoped public class FormJsonService extends AbstractFormJsonService
Json service to handle import/export
  • Constructor Details

    • FormJsonService

      @Inject public FormJsonService(IFormDatabaseService formDatabaseService)
      CDI constructor-injection entry point.
      Parameters:
      formDatabaseService - the database service
  • Method Details

    • getInstance

      @Deprecated(since="4.0", forRemoval=true) public static FormJsonService getInstance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use @Inject to obtain the FormJsonService instance. This method will be removed in future versions.
      Returns the unique instance of the FormJsonService service.
      Returns:
      the singleton instance managed by the CDI container
    • jsonExportForm

      public String jsonExportForm(int idForm) throws com.fasterxml.jackson.core.JsonProcessingException
      Export the form as a Json Object.
      Returns:
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • jsonImportForm

      public void jsonImportForm(String json, Locale locale) throws com.fasterxml.jackson.core.JsonProcessingException
      Import the form from a Json Object.
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException