Class PromptConfirmationOnRestructureModel
java.lang.Object
com._1c.g5.aef2.validators.Validable
com._1c.g5.aef2.models.Model
com._1c.g5.aef2.models.EditableModel
com._1c.g5.aef2.models.value.Value<T>
com._1c.g5.aef2.models.pojo.PojoValue<Boolean>
com._1c.g5.v8.dt.internal.platform.services.ui.editors.infobase.PromptConfirmationOnRestructureModel
- All Implemented Interfaces:
IEditableModel
,IModel
,IValue<Boolean>
,IValidable
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()
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Factory forPromptConfirmationOnRestructureModel
.static class
Parameters forPromptConfirmationOnRestructureModel
. -
Constructor Summary
ConstructorsConstructorDescriptionPromptConfirmationOnRestructureModel
(IInfobasePreferencesManager infobasePreferencesManager, InfobaseReference infobase) Creates new instance initialized with infobase current preference. -
Method Summary
Modifier and TypeMethodDescriptionfindModels
(ContainerComponent<?, ?> containerComponent) FindsPromptConfirmationOnRestructureModel
models among components tree.static String
Gets localized displayable name of the property being edited that can be shown to a user.void
save()
Saves the current value from model to preferences manager.Methods inherited from class com._1c.g5.aef2.models.value.Value
addValueListener, createWorkingCopy, discard, dispose, get, getCommittedValue, getUncommittedValue, getValidatorTarget, isEqual, notifyValueChanged, queueNotifyValueChanged, removeValueListener, set, setCommittedValue, setUncommittedValue, setValue, toString
Methods inherited from class com._1c.g5.aef2.models.EditableModel
isEditable, setEditable
Methods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setComponent, setOnline
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, removeValidator, validate, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, getComponent, isOnline, removeModelListener, setComponent
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
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 benull
.infobase
- Infobase for which to load and save prompt confirmation flag. Must not benull
.
-
-
Method Details
-
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) FindsPromptConfirmationOnRestructureModel
models among components tree.- Parameters:
containerComponent
- Tree root to start search from. Must not benull
.- Returns:
- Models of type
PromptConfirmationOnRestructureModel
for components that lie under the specified root. Nevernull
.
-
save
public void save()Saves the current value from model to preferences manager.
-