Class MdTypedObjectModel<M extends MdObject>
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.models.CompoundModel
-
- com._1c.g5.v8.dt.md.ui.wizards.aef.models.MdObjectModel<M>
-
- com._1c.g5.v8.dt.md.ui.wizards.aef.models.MdTypedObjectModel<M>
-
- All Implemented Interfaces:
ICompoundModel
,IModel
,IValidable
,IMdObjectModel
,IMdTypedObjectModel
- Direct Known Subclasses:
FormWizard.FormModel
public class MdTypedObjectModel<M extends MdObject> extends MdObjectModel<M> implements IMdTypedObjectModel
The model for AEF wizard pages which allows to select the type of creating object, e.g. form wizard page or template wizard page.
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.md.ui.wizards.aef.models.MdObjectModel
languageProvider
-
-
Constructor Summary
Constructors Constructor Description MdTypedObjectModel(IDtNewWizardContext<M> context, String modelNamePrefix)
Creates a new model.MdTypedObjectModel(IDtNewWizardContext<M> context, String modelNamePrefix, String projectNamePrefix)
Creates a new model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<org.eclipse.emf.ecore.EStructuralFeature,IModel>
getAdditionalModels()
IValue<MdModelTypesExtension>
getExtension()
List<MdModelTypesExtension>
getExtensions()
boolean
isApplicableForType(MdModelTypesExtension ext)
Returns the value indicating whenever to allow select the given model type.protected void
setDefaultName(MdModelTypesExtension ext, String name)
Sets the default name for the given type.protected void
setDefaultType()
Sets the current type to default value.-
Methods inherited from class com._1c.g5.v8.dt.md.ui.wizards.aef.models.MdObjectModel
dispose, getComment, getContext, getModelClass, getModelEditingSupport, getName, getParent, getSynonym, getUniqueName, getV8project
-
Methods inherited from class com._1c.g5.aef2.models.CompoundModel
addModel, getChange, getModels, isOnline, setComponent, validate
-
Methods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, createWorkingCopy, discard, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, notifyModelChanged, notifyModelCommitted, removeModelListener, setOnline, toString
-
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, getValidatorTarget, removeValidator, 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.v8.dt.md.ui.wizards.aef.models.IMdObjectModel
getComment, getModelClass, getName, getParent, getSynonym, getUniqueName, getV8project
-
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, createWorkingCopy, discard, dispose, getChange, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
-
-
-
Constructor Detail
-
MdTypedObjectModel
public MdTypedObjectModel(IDtNewWizardContext<M> context, String modelNamePrefix)
Creates a new model.- Parameters:
context
- the wizard context.modelNamePrefix
- the name prefix of creating object.
-
MdTypedObjectModel
public MdTypedObjectModel(IDtNewWizardContext<M> context, String modelNamePrefix, String projectNamePrefix)
Creates a new model.- Parameters:
context
- the wizard context.modelNamePrefix
- the name prefix of creating object.projectNamePrefix
- the project name prefix ornull
if not needed
-
-
Method Detail
-
getExtension
public IValue<MdModelTypesExtension> getExtension()
- Specified by:
getExtension
in interfaceIMdTypedObjectModel
- Returns:
- the extension value
-
getExtensions
public List<MdModelTypesExtension> getExtensions()
- Specified by:
getExtensions
in interfaceIMdTypedObjectModel
- Returns:
- the list of extensions
-
isApplicableForType
public boolean isApplicableForType(MdModelTypesExtension ext)
Description copied from interface:IMdTypedObjectModel
Returns the value indicating whenever to allow select the given model type.- Specified by:
isApplicableForType
in interfaceIMdTypedObjectModel
- Parameters:
ext
- is theMdModelTypesExtension
- Returns:
- true, if the given extension has no predicate or has predicate that is applicable.
-
getAdditionalModels
public Map<org.eclipse.emf.ecore.EStructuralFeature,IModel> getAdditionalModels()
- Specified by:
getAdditionalModels
in interfaceIMdTypedObjectModel
- Returns:
- the map where the keys are
EStructuralFeature
s that are needed to display for the current extension and values are models for components.
-
setDefaultName
protected void setDefaultName(MdModelTypesExtension ext, String name)
Sets the default name for the given type.- Parameters:
ext
- the type.name
- the default name.
-
setDefaultType
protected void setDefaultType()
Sets the current type to default value. By default select the first type. Override to change the default behaviour.
-
-