Class EasyFormsRunnerManager

java.lang.Object
io.vertigo.easyforms.runner.EasyFormsRunnerManager
All Implemented Interfaces:
io.vertigo.core.node.component.Activeable, io.vertigo.core.node.component.Component, io.vertigo.core.node.component.CoreComponent, io.vertigo.core.node.component.Manager

public final class EasyFormsRunnerManager extends Object implements io.vertigo.core.node.component.Manager, io.vertigo.core.node.component.Activeable
This interface defines the contract for the EasyFormsRunnerManager. It is not automatically discoverable by Vertigo, we need to declare the feature easyforms to provide parameters.
  • Constructor Details

    • EasyFormsRunnerManager

      @Inject public EasyFormsRunnerManager(io.vertigo.core.locale.LocaleManager localeManager, io.vertigo.core.analytics.AnalyticsManager analyticsManager, io.vertigo.datamodel.smarttype.SmartTypeManager smartTypeManager, io.vertigo.account.security.VSecurityManager securityManager, Optional<String> filestoreNameOpt, Optional<String> tmpFilestoreNameOpt, Optional<String> languagesOpt)
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface io.vertigo.core.node.component.Activeable
    • stop

      public void stop()
      Specified by:
      stop in interface io.vertigo.core.node.component.Activeable
    • getSupportedLang

      public List<String> getSupportedLang()
      Retrieves the list of supported languages.
      Returns:
      A list of supported languages.
    • resolveTextForUserlang

      public String resolveTextForUserlang(Map<String,String> labels)
      Resolves a text for the provided labels based on the user's language. If the user's language is empty, the first supported language is used.
      Parameters:
      labels - The labels to be resolved.
      Returns:
      The resolved text.
    • createStdFileInfo

      public io.vertigo.datastore.filestore.model.FileInfo createStdFileInfo(io.vertigo.datastore.filestore.model.VFile vFile)
      Creates a standard FileInfo object from the provided VFile.
      Parameters:
      vFile - The VFile to be converted into a FileInfo.
      Returns:
      The created FileInfo object.
    • createTmpFileInfo

      public io.vertigo.datastore.filestore.model.FileInfo createTmpFileInfo(io.vertigo.datastore.filestore.model.VFile vFile)
      Creates a temporary FileInfo object from the provided VFile.
      Parameters:
      vFile - The VFile to be converted into a FileInfo.
      Returns:
      The created FileInfo object.
    • isTmpFileInfo

      public boolean isTmpFileInfo(io.vertigo.datastore.filestore.definitions.FileInfoDefinition fileInfoDefinition)
      Checks if the provided FileInfoDefinition corresponds to a temporary FileInfo.
      Parameters:
      fileInfoDefinition - The FileInfoDefinition to be checked.
      Returns:
      True if the FileInfoDefinition corresponds to a temporary FileInfo, false otherwise.
    • isStdFileInfo

      public boolean isStdFileInfo(io.vertigo.datastore.filestore.definitions.FileInfoDefinition fileInfoDefinition)
      Checks if the provided FileInfoDefinition corresponds to a standard FileInfo.
      Parameters:
      fileInfoDefinition - The FileInfoDefinition to be checked.
      Returns:
      True if the FileInfoDefinition corresponds to a standard FileInfo, false otherwise.
    • formatField

      public Object formatField(EasyFormsDataDescriptor fieldDescriptor, Object inputValue) throws io.vertigo.datamodel.smarttype.definitions.FormatterException
      Formats a field based on the provided field descriptor and input value.
      Parameters:
      fieldDescriptor - The descriptor of the field to be formatted.
      inputValue - The value to be formatted.
      Returns:
      The formatted object.
      Throws:
      io.vertigo.datamodel.smarttype.definitions.FormatterException - If an error occurs during formatting.
    • validateField

      public final List<String> validateField(EasyFormsDataDescriptor fieldDescriptor, Object value)
      Validates a field based on the provided field descriptor, value, and context.
      Parameters:
      fieldDescriptor - The descriptor of the field to be validated.
      value - The value to be validated.
      Returns:
      A list of validation error messages, if any.