Class FormModelImpl

All Implemented Interfaces:
ReloadAction, FormModel

@Component("legacyFormModelImpl") public final class FormModelImpl extends AbstractModel<FormModelReceiver> implements FormModel
  • Constructor Details

  • Method Details

    • initializeService

      @PostConstruct public void initializeService()
    • sort

      public void sort(Form form, boolean isUserAdjust)
      Sorts all children lists of the components in the given form. If the form is backed by an entity model, it is used to resolve positions relative to virtual localized fields.
    • setValidators

      @Autowired public void setValidators(List<ComponentValidator> validator)
    • onReload

      public void onReload()
      Specified by:
      onReload in interface FormModel
      Specified by:
      onReload in interface ReloadAction
      Specified by:
      onReload in class AbstractModel<FormModelReceiver>
    • getForm

      @Nullable public @Nullable Form getForm(String fullFormName)
      Description copied from interface: FormModel
      Returns the loaded form by name with user adjustments.
      Specified by:
      getForm in interface FormModel
      Parameters:
      fullFormName - For example "Address_list", so it's the combination of entity type and view (aka scope).
      Returns:
      Null if no such form.
    • getFormWithoutUsersettings

      @Nullable public @Nullable Form getFormWithoutUsersettings(String fullFormName)
      Description copied from interface: FormModel
      Returns the loaded form by name without user adjustments.
      Specified by:
      getFormWithoutUsersettings in interface FormModel
      Parameters:
      fullFormName - For example "Address_list", so it's the combination of entity type and view (aka scope).
      Returns:
      Null if no such form.
    • getForm

      @Nullable public @Nullable Form getForm(String formOrEntityName, String scope)
      Description copied from interface: FormModel
      Returns the loaded form by name and scope with user adjustments.

      Note: The scope may be a specific or default one. For example there might be a specialized form "Address_create", or just the generic one named "Address_detail" which handles all crud scopes if there are no specific ones (for create, update, delete, read).

      Specified by:
      getForm in interface FormModel
      Parameters:
      formOrEntityName - For example "Address".
      scope - For example "detail" or "create", in lower case.
      Returns:
      Null if no form in that scope or fallback default scope.
    • getFormWithoutUsersettings

      @Nullable public @Nullable Form getFormWithoutUsersettings(String formOrEntityName, String scope)
      Description copied from interface: FormModel
      Returns the loaded form by name and scope without user adjustments.

      Note: The scope may be a specific or default one. For example there might be a specialized form "Address_create", or just the generic one named "Address_detail" which handles all crud scopes if there are no specific ones (for create, update, delete, read).

      Specified by:
      getFormWithoutUsersettings in interface FormModel
      Parameters:
      formOrEntityName - For example "Address".
      scope - For example "detail" or "create", in lower case.
      Returns:
      Null if no form in that scope or fallback default scope.
    • getForms

      public Collection<Form> getForms()
      Description copied from interface: FormModel
      Returns all loaded forms. The entries provide the getName() method.
      Specified by:
      getForms in interface FormModel
    • sort

      public static void sort(Component c) throws TopoSort.CircularGraphException
      Throws:
      TopoSort.CircularGraphException