Package com._1c.g5.v8.dt.aef2.bm.models
Class BmValue<T>
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.v8.dt.aef2.bm.models.BmValue<T>
- All Implemented Interfaces:
IAttribute<IBmObject,,org.eclipse.emf.ecore.EStructuralFeature> IEditableModel,IEmfAttribute<IBmObject>,IModel,IEmfValueAttribute<T,,IBmObject> IValue<T>,IValidable,IModelApiAwareModel
- Direct Known Subclasses:
AddInModel,AggregatesModel,BinaryDataModel,BmAdjustableBooleanModel,BmBorderValue,BmCharacteristicsDescriptionDataPathModel,BmCharacteristicsDescriptionFieldModel,BmChartColorPaletteDescriptionModel,BmChartLineModel,BmChartReferenceBandsModelValue,BmChartReferenceLinesModelValue,BmChartScaleModelValue,BmCodeModel,BmColorModel,BmCommonAttributeDataSeparationModel,BmCommonModuleEnvironmentModel,BmConfigurationCompatibilityModeModel,BmDocumentNumeratorValue,BmEnableContentChangeModel,BmEventSubscriptionEventsModel,BmFontSelectionModel,BmFormDynamicListModel,BmFormItemTypeModel,BmFormPagesRepresentationModelValue,BmFormTableNameValueModel,BmGaugeChartQualityBandsModelValue,BmGraphicalSchemeLineModel,BmHandlerModel,BmInformationRegisterWriteModeModel,BmInlineTaskValue,BmIntervalBoundModelValue,BmMdObjectNameModel,BmMdTypeLinkModel,BmNamedElementNameModel,BmNullableChartLineModel,BmOpenMdHelpModel,BmPictureModel,BmPredefinedItemNameModel,BmRealPiePointModelValue,BmRealPointCountValue,BmRealSeriesCountValue,BmRealStockSeriesModelValue,BmSearchStringLocationModelValue,BmSkipNullValue,BmSourceUrlModel,BmStyleItemTypeModel,BmUnsettablePropertyFieldModel,BmUserSettingsGroupModel,BmValueModel,BmValueSelectionModel,BmValueUsedMobileApplicationFunctionalitiesModel,BmVersionedValue,BmVersionedValueGroupBehavior,FormBmValue,GeographicalCoordinatesSelectionModel,GraphicalSchemeCaseValue,GraphicalSchemeItemValue,IBaseBmHandlerNameModel.BaseBmHandlerNameModel,NavigatorTreeDialogActionBarBmValue,PropertyStateModel,TypeDescriptionExtensionModel,XdtoObjectTextRefactoringModel
public class BmValue<T>
extends Value<T>
implements IEmfValueAttribute<T,IBmObject>, IModelApiAwareModel
Represents a BM object feature value.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionBmValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature) Instantiates a new BM value.BmValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, boolean resolve) Instantiates a new BM value.protectedBmValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, T initialValue) Instantiates a new BM value with initial value. -
Method Summary
Modifier and TypeMethodDescriptionprotected static IModelApiTaskN<Void>Converts the specified BM task toIModelApiTaskN.protected IModelApiTaskN<Void>createTask(IBmObject object, org.eclipse.emf.ecore.EStructuralFeature feature, T valueToApply) Creates anIModelApiTaskNthat executes during applying changes.voiddispose()Disposes this model.Returns the model API.Returns the object that keeps the attribute.protected TgetObjectValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, boolean resolve) Gets the current value of the provided model object feature.org.eclipse.emf.ecore.EStructuralFeatureReturns the property.protected voidprocessBmValueChange(Object value) Process the BM value change and apply changes to thisBmValue.voidsetModelApi(IModelApi modelApi) Sets the specified API to the model.protected voidsetObjectValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, T newValue) Sets the new value of the provided model object feature during the commit.
The method is invoked within the task, so the given objects have the relevant state (e.g. attached to transaction).Methods inherited from class com._1c.g5.aef2.models.value.Value
addValueListener, createWorkingCopy, discard, get, getCommittedValue, getUncommittedValue, getValidatorTarget, isEqual, notifyValueChanged, queueNotifyValueChanged, removeValueListener, set, setCommittedValue, setUncommittedValue, setValue, toStringMethods inherited from class com._1c.g5.aef2.models.EditableModel
isEditable, setEditableMethods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setComponent, setOnlineMethods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, removeValidator, validate, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, discard, getComponent, isOnline, removeModelListener, setComponentMethods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validateMethods inherited from interface com._1c.g5.aef2.models.value.IValue
addValueListener, createWorkingCopy, get, isEqual, removeValueListener, set
-
Constructor Details
-
BmValue
public BmValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature) Instantiates a new BM value.- Parameters:
object- the object, cannot benullfeature- the object feature, cannot benull
-
BmValue
public BmValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, boolean resolve) Instantiates a new BM value.- Parameters:
object- the object, cannot benullfeature- the object feature, cannot benullresolve-trueif need resolve object forfeature,falseotherwise
-
BmValue
protected BmValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, T initialValue) Instantiates a new BM value with initial value. It is client responsibility to provide valid initial value.- Parameters:
object- the object, cannot benullfeature- the object feature, cannot benullinitialValue- the initial value, can benull
-
-
Method Details
-
getChange
-
dispose
public void dispose()Description copied from interface:IModelDisposes this model. -
getObject
Description copied from interface:IAttributeReturns the object that keeps the attribute.- Specified by:
getObjectin interfaceIAttribute<IBmObject,org.eclipse.emf.ecore.EStructuralFeature> - Returns:
- the object that keeps the attribute.
-
getProperty
public org.eclipse.emf.ecore.EStructuralFeature getProperty()Description copied from interface:IAttributeReturns the property.- Specified by:
getPropertyin interfaceIAttribute<IBmObject,org.eclipse.emf.ecore.EStructuralFeature> - Returns:
- the property.
-
setModelApi
Description copied from interface:IModelApiAwareModelSets the specified API to the model.- Specified by:
setModelApiin interfaceIModelApiAwareModel- Parameters:
modelApi- the API, can benull.
-
getModelApi
Description copied from interface:IModelApiAwareModelReturns the model API.- Specified by:
getModelApiin interfaceIModelApiAwareModel- Returns:
- the model API or
nullif it is not set.
-
createTask
protected IModelApiTaskN<Void> createTask(IBmObject object, org.eclipse.emf.ecore.EStructuralFeature feature, T valueToApply) Creates anIModelApiTaskNthat executes during applying changes.- Parameters:
object- the object to change, cannot benull.feature- the feature the feature to change, cannot benull.valueToApply- the value to apply.- Returns:
- the created
IModelApiTaskN.
-
getObjectValue
protected T getObjectValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, boolean resolve) Gets the current value of the provided model object feature.- Parameters:
object- the object to get new value, cannot benullfeature- the feture to get, cannot benull- Returns:
- the current value, can be
null
-
setObjectValue
protected void setObjectValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, T newValue) Sets the new value of the provided model object feature during the commit.
The method is invoked within the task, so the given objects have the relevant state (e.g. attached to transaction).- Parameters:
object- the object to set new value, cannot benull.feature- the feture to set, cannot benull.newValue- the new value to set, can benull.
-
processBmValueChange
Process the BM value change and apply changes to thisBmValue.- Parameters:
value- the new value, can benull
-
adapt
Converts the specified BM task toIModelApiTaskN.NOTE: this method is required until exists the API (tasks) that encapsulates the business logic in the BM task manner.
- Parameters:
bmTask- the BM task, cannot benull.- Returns:
- model api task, never
null.
-