Class ConfigurationStandaloneContentModel
- 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.ui.aef.models.NavigatorTreeModel
-
- com._1c.g5.v8.dt.md.ui.editor.aef.descriptor.configuration.ConfigurationStandaloneContentModel
-
- All Implemented Interfaces:
IEditableModel
,IModel
,IValidable
,IModelApiAwareModel
,IDynamicTreeModel<Object>
public class ConfigurationStandaloneContentModel extends NavigatorTreeModel implements IModelApiAwareModel
The AEF 2.0 component for the configuration standalone content.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.ui.aef.models.NavigatorTreeModel
NavigatorTreeModel.PredicateFilter
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.ui.aef.models.NavigatorTreeModel
features
-
-
Constructor Summary
Constructors Constructor Description ConfigurationStandaloneContentModel(Configuration configuration, org.eclipse.core.resources.IProject project, org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider, IFilteredNavigatorContentProvider filteredNavigatorContentProvider)
Initializes a new instance of the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ILabelProvider
createLabelProvider()
Creates label provider.protected void
editExchangePlanContent(MdObject mdObject, AutoRegistrationChanges changes)
Sets auto registration changes.protected void
editExchangePlanContent(MdObject mdObject, Boolean add)
Adds/removes exchange plan content.protected Optional<ExchangePlanContentItem>
findContentItem(MdObject mdObject)
Finds the content item for the provided metadata object in exchange plan content.protected boolean
findNoCodeCorrections(MdObject mdObject)
Checks if metadata object content item present in the exchange plan content.Configuration
getConfiguration()
Gets a configuration for model.protected StandaloneContentDataExchangeSettings
getDataExchangeSettings()
Returns standalone content exchange settings.protected ExchangePlan
getExchangePlan()
Returns standalone content exchange settings exchange plan if present.IFilteredNavigatorContentProvider
getFilteredNavigatorContentProvider()
Gets a filtered navigator content provider.Object
getInput()
IModelApi
getModelApi()
Returns the model API.org.eclipse.xtext.naming.IQualifiedNameProvider
getQualifiedNameProvider()
Gets a qualified name provider for model.protected void
setAutoCorrectCode(MdObject mdObject, Boolean correct)
Sets auto correct code.void
setModelApi(IModelApi modelApi)
Sets the specified API to the model.protected void
setPriority(MdObject mdObject, StandaloneContentItemPriority newPriority)
Sets content item priority.-
Methods inherited from class com._1c.g5.v8.dt.ui.aef.models.NavigatorTreeModel
createTreeContentProvider, dispose, getChange, getCheckStateProvider, getContentService, getFeatures, getFilter, getFilters, getLabelProvider, getTrackingFeatures, getTrackingObjectFeatures, getTreeContentProvider, setSubtreeInducer
-
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, createWorkingCopy, discard, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, 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, createWorkingCopy, discard, dispose, getChange, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
-
-
-
Constructor Detail
-
ConfigurationStandaloneContentModel
public ConfigurationStandaloneContentModel(Configuration configuration, org.eclipse.core.resources.IProject project, org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider, IFilteredNavigatorContentProvider filteredNavigatorContentProvider)
Initializes a new instance of the class.- Parameters:
configuration
- the configuration, can't benull
project
- the project, can't benull
qualifiedNameProvider
- the qualified name provider, can't benull
filteredNavigatorContentProvider
- the filtered navigator content provider, can't benull
-
-
Method Detail
-
getInput
public Object getInput()
- Specified by:
getInput
in interfaceIDynamicTreeModel<Object>
- Overrides:
getInput
in classNavigatorTreeModel
- Returns:
- the input for content provider
-
getModelApi
public IModelApi getModelApi()
Description copied from interface:IModelApiAwareModel
Returns the model API.- Specified by:
getModelApi
in interfaceIModelApiAwareModel
- Returns:
- the model API or
null
if it is not set.
-
setModelApi
public void setModelApi(IModelApi modelApi)
Description copied from interface:IModelApiAwareModel
Sets the specified API to the model.- Specified by:
setModelApi
in interfaceIModelApiAwareModel
- Parameters:
modelApi
- the API, can benull
.
-
getConfiguration
public Configuration getConfiguration()
Gets a configuration for model.- Returns:
- the configuration, never
null
.
-
getQualifiedNameProvider
public org.eclipse.xtext.naming.IQualifiedNameProvider getQualifiedNameProvider()
Gets a qualified name provider for model.- Returns:
- the qualified name provider, never
null
.
-
getFilteredNavigatorContentProvider
public IFilteredNavigatorContentProvider getFilteredNavigatorContentProvider()
Gets a filtered navigator content provider.- Returns:
- the filtered navigator content provider, never
null
.
-
createLabelProvider
protected ILabelProvider createLabelProvider()
Description copied from class:NavigatorTreeModel
Creates label provider.- Overrides:
createLabelProvider
in classNavigatorTreeModel
- Returns:
- the label provider, cannot be
null
-
getExchangePlan
protected ExchangePlan getExchangePlan()
Returns standalone content exchange settings exchange plan if present.- Returns:
- the exchange settings exchange plan if present,
null
otherwise
-
getDataExchangeSettings
protected StandaloneContentDataExchangeSettings getDataExchangeSettings()
Returns standalone content exchange settings.- Returns:
- the exchange settings, can be
null
-
findNoCodeCorrections
protected boolean findNoCodeCorrections(MdObject mdObject)
Checks if metadata object content item present in the exchange plan content.- Parameters:
mdObject
- the metadata object, cannot benull
- Returns:
true
if metadata object content item present,false
otherwise
-
findContentItem
protected Optional<ExchangePlanContentItem> findContentItem(MdObject mdObject)
Finds the content item for the provided metadata object in exchange plan content.- Parameters:
mdObject
- the metadata object, cannot benull
- Returns:
- the optional content item for the provided metadata object
-
setPriority
protected void setPriority(MdObject mdObject, StandaloneContentItemPriority newPriority)
Sets content item priority.- Parameters:
mdObject
- the md-object to set priority, cannot benull
newPriority
- the new priority, cannot benull
-
editExchangePlanContent
protected void editExchangePlanContent(MdObject mdObject, Boolean add)
Adds/removes exchange plan content.- Parameters:
mdObject
- the md-object to add/remove, cannot benull
add
-true
to add,false
remove
-
editExchangePlanContent
protected void editExchangePlanContent(MdObject mdObject, AutoRegistrationChanges changes)
Sets auto registration changes.- Parameters:
mdObject
- the md-object to set changes value, cannot benull
changes
- the changes, cannot benull
-
-