Class StandardObjectMultilanguageModel
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.models.EditableModel
-
- com._1c.g5.v8.dt.md.ui.aef.models.StandardObjectSwitchingSourceModel<IMultilanguageModel>
-
- com._1c.g5.v8.dt.md.ui.aef.models.StandardObjectMultilanguageModel
-
- All Implemented Interfaces:
IEditableModel
,IModel
,IMap<String,String>
,IValidable
,IModelApiAwareModel
,IMultilanguageModel
,Map<String,String>
public class StandardObjectMultilanguageModel extends StandardObjectSwitchingSourceModel<IMultilanguageModel> implements IMultilanguageModel, IEditableModel
TheIMultilanguageModel
implementation for standard attributes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.md.ui.aef.models.StandardObjectSwitchingSourceModel
StandardObjectSwitchingSourceModel.IStandardAttributeModelCreator<T extends IModel>
-
-
Constructor Summary
Constructors Constructor Description StandardObjectMultilanguageModel(StandardObjectProxy proxy, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IEditingLanguageManager languageManager)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMapListener(IMapListener<String,String> listener)
Adds the map listener.void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
IMap<String,String>
createWorkingCopy()
Set<Map.Entry<String,String>>
entrySet()
void
fill(Map<? extends String,? extends String> map)
Clears the current stored map and adds all elements of the given map to the stored one.String
get(Object key)
String
getEditingLanguageCode()
IV8Project
getV8project()
Returns the V8 project.Version
getVersion()
Gets current version.boolean
isEditable()
Checks if this model is editable.boolean
isEmpty()
boolean
isEqual(Map<String,String> other)
Checks the map for equality with the current stored map.Set<String>
keySet()
String
put(String key, String value)
void
putAll(Map<? extends String,? extends String> m)
String
remove(Object key)
void
removeMapListener(IMapListener<String,String> listener)
Removes the map listener.void
setEditable(boolean editable)
Sets model editable state.int
size()
Collection<String>
values()
-
Methods inherited from class com._1c.g5.v8.dt.md.ui.aef.models.StandardObjectSwitchingSourceModel
dispose, getChange, getModelApi, getProxy, getWrappedModel, isOnline, setModelApi
-
Methods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, discard, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, notifyModelChanged, notifyModelCommitted, removeModelListener, setComponent, setOnline, toString
-
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, getValidatorTarget, 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, discard, dispose, getChange, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
StandardObjectMultilanguageModel
public StandardObjectMultilanguageModel(StandardObjectProxy proxy, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IEditingLanguageManager languageManager)
The constructor.- Parameters:
proxy
- theStandardObjectProxy
object, cannot benull
.object
- theStandardAttribute
instance, cannot benull
.feature
- the feature, cannot benull
.v8project
- the V8 project, cannot benull
languageManager
- the language manager, cannot benull
-
-
Method Detail
-
fill
public void fill(Map<? extends String,? extends String> map)
Description copied from interface:IMap
Clears the current stored map and adds all elements of the given map to the stored one.
-
isEqual
public boolean isEqual(Map<String,String> other)
Description copied from interface:IMap
Checks the map for equality with the current stored map.
-
addMapListener
public void addMapListener(IMapListener<String,String> listener)
Description copied from interface:IMap
Adds the map listener.- Specified by:
addMapListener
in interfaceIMap<String,String>
- Parameters:
listener
- the listener to add.
-
removeMapListener
public void removeMapListener(IMapListener<String,String> listener)
Description copied from interface:IMap
Removes the map listener.- Specified by:
removeMapListener
in interfaceIMap<String,String>
- Parameters:
listener
- the listener to add.
-
createWorkingCopy
public IMap<String,String> createWorkingCopy()
- Specified by:
createWorkingCopy
in interfaceIMap<String,String>
- Specified by:
createWorkingCopy
in interfaceIModel
- Overrides:
createWorkingCopy
in classModel
- Returns:
- the model working copy or
null
if working copies is not supported by the model.
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<String,String>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<String,String>
-
getV8project
public IV8Project getV8project()
Description copied from interface:IMultilanguageModel
Returns the V8 project.- Specified by:
getV8project
in interfaceIMultilanguageModel
- Returns:
- the V8 project.
-
getEditingLanguageCode
public String getEditingLanguageCode()
- Specified by:
getEditingLanguageCode
in interfaceIMultilanguageModel
- Returns:
- the editing language code.
-
getVersion
public Version getVersion()
Description copied from interface:IMultilanguageModel
Gets current version.- Specified by:
getVersion
in interfaceIMultilanguageModel
- Returns:
- the current version, can be
null
-
isEditable
public boolean isEditable()
Description copied from interface:IEditableModel
Checks if this model is editable.- Specified by:
isEditable
in interfaceIEditableModel
- Overrides:
isEditable
in classEditableModel
- Returns:
true
if this model is editable,false
otherwise
-
setEditable
public void setEditable(boolean editable)
Description copied from interface:IEditableModel
Sets model editable state.- Specified by:
setEditable
in interfaceIEditableModel
- Overrides:
setEditable
in classEditableModel
- Parameters:
editable
- the editable state,true
if this model is editable,false
otherwise
-
-