Class PromptConfirmationOnRestructureModel

All Implemented Interfaces:
IEditableModel, IModel, IValue<Boolean>, IValidable

public class PromptConfirmationOnRestructureModel extends PojoValue<Boolean>
Model allowing to edit prompt confirmation on restructure preference for an infobase.

Initial value is taken from infobase preferences manager during instantiation. Resulting value could be saved back to preferences manager via save(). Components with this model vould be found via findModels(ContainerComponent). Model instances can be created using PromptConfirmationOnRestructureModel.Factory. The model is suitable for usage with CheckBoxComponent and can be parametrized using PromptConfirmationOnRestructureModel.Parameterization or just ILabeledParametrization to set label and leave the property editable. Ready to be displayed name of the property can be obtained with getPropertyDisplayName().

  • Constructor Details

    • PromptConfirmationOnRestructureModel

      public PromptConfirmationOnRestructureModel(IInfobasePreferencesManager infobasePreferencesManager, InfobaseReference infobase)
      Creates new instance initialized with infobase current preference.
      Parameters:
      infobasePreferencesManager - Preferences manager that is to be used to obtain initial value and save resulting value. Must not be null.
      infobase - Infobase for which to load and save prompt confirmation flag. Must not be null.
  • Method Details

    • getPropertyDisplayName

      public static String getPropertyDisplayName()
      Gets localized displayable name of the property being edited that can be shown to a user.
      Returns:
      Property name. Never null.
    • findModels

      public static Stream<PromptConfirmationOnRestructureModel> findModels(ContainerComponent<?,?> containerComponent)
      Finds PromptConfirmationOnRestructureModel models among components tree.
      Parameters:
      containerComponent - Tree root to start search from. Must not be null.
      Returns:
      Models of type PromptConfirmationOnRestructureModel for components that lie under the specified root. Never null.
    • save

      public void save()
      Saves the current value from model to preferences manager.