Class AefMarkerSupport
- java.lang.Object
-
- com._1c.g5.aef2.standard.validation.AbstractExternalValidationSupport<T,EVR>
-
- com._1c.g5.aef2.standard.definitions.validation.AbstractManagingComponentValidationSupport<IManagingComponent<? extends IManagingModel>,Marker>
-
- com._1c.g5.v8.dt.ui.aef.validation.AefMarkerSupport
-
public final class AefMarkerSupport extends AbstractManagingComponentValidationSupport<IManagingComponent<? extends IManagingModel>,Marker>
Provides EDT markers support forIManagingComponent
s.
It setups appropriate listeners withinAbstractExternalValidationSupport.initialize()
method and detaches it onAbstractExternalValidationSupport.dispose()
.
-
-
Constructor Summary
Constructors Constructor Description AefMarkerSupport(IMarkerManager markerManager, IBmModelManager modelManager, IManagingComponent<? extends IManagingModel> component)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Iterable<Marker>
getExternalValidationResults(Object validable)
Returns a external validation result.protected String
getMessage(Marker result)
Returns the message of the external validation result object.protected Object
getQuery(Marker result)
Returns the query to component matching by the validation result.protected ExternalValidationStatusSeverity
getSeverity(Marker result)
Returns the severity of the specified validation result.protected org.eclipse.emf.ecore.EObject
getValidable()
Returns the object to perform external validation.protected void
setValidable(Object validable)
Sets the object to external validation.-
Methods inherited from class com._1c.g5.aef2.standard.definitions.validation.AbstractManagingComponentValidationSupport
getQuery, onComponentModelChange
-
Methods inherited from class com._1c.g5.aef2.standard.validation.AbstractExternalValidationSupport
dispose, disposeInternal, getComponent, getScene, initialize, initializeInternal, isDisposed, onExternalValidationRequired
-
-
-
-
Constructor Detail
-
AefMarkerSupport
public AefMarkerSupport(IMarkerManager markerManager, IBmModelManager modelManager, IManagingComponent<? extends IManagingModel> component)
Creates a new instance.- Parameters:
markerManager
- theIMarkerManager
instance, cannot benull
.modelManager
- theIBmModelManager
instance, cannot benull
.component
- the component to support the EDT markers, cannot benull
.
-
-
Method Detail
-
setValidable
protected void setValidable(Object validable)
Description copied from class:AbstractExternalValidationSupport
Sets the object to external validation.- Overrides:
setValidable
in classAbstractExternalValidationSupport<IManagingComponent<? extends IManagingModel>,Marker>
- Parameters:
validable
- the object to validate, can benull
.
-
getValidable
protected org.eclipse.emf.ecore.EObject getValidable()
Description copied from class:AbstractExternalValidationSupport
Returns the object to perform external validation.- Overrides:
getValidable
in classAbstractExternalValidationSupport<IManagingComponent<? extends IManagingModel>,Marker>
- Returns:
- the object to perform external validation, or
null
if there no validable object at the moment.
-
getExternalValidationResults
protected Iterable<Marker> getExternalValidationResults(Object validable)
Description copied from class:AbstractExternalValidationSupport
Returns a external validation result.- Specified by:
getExternalValidationResults
in classAbstractExternalValidationSupport<IManagingComponent<? extends IManagingModel>,Marker>
- Parameters:
validable
- the object to validate, cannot benull
.- Returns:
- the iterable with the external validation result, cannot be
null
.
-
getQuery
protected Object getQuery(Marker result)
Description copied from class:AbstractExternalValidationSupport
Returns the query to component matching by the validation result.- Specified by:
getQuery
in classAbstractExternalValidationSupport<IManagingComponent<? extends IManagingModel>,Marker>
- Parameters:
result
- the result of the validation, cannot benull
.- Returns:
- the query or
null
if there are no matching component.
-
getMessage
protected String getMessage(Marker result)
Description copied from class:AbstractExternalValidationSupport
Returns the message of the external validation result object.- Specified by:
getMessage
in classAbstractExternalValidationSupport<IManagingComponent<? extends IManagingModel>,Marker>
- Parameters:
result
- the result of the validation, cannot benull
.- Returns:
- the message, cannot be
null
.
-
getSeverity
protected ExternalValidationStatusSeverity getSeverity(Marker result)
Description copied from class:AbstractExternalValidationSupport
Returns the severity of the specified validation result.- Specified by:
getSeverity
in classAbstractExternalValidationSupport<IManagingComponent<? extends IManagingModel>,Marker>
- Parameters:
result
- the result of the validation, cannot benull
.- Returns:
- the severity, never
null
.
-
-