Class AbstractDefinitionModel
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.standard.definitions.models.AbstractDefinitionModel
-
- All Implemented Interfaces:
ICompoundModel,IModel,IDefinitionModel,IValidable
- Direct Known Subclasses:
DefinitionModel,DtGranularEditorPageDefinitionModel
public abstract class AbstractDefinitionModel extends Model implements IDefinitionModel
The abstract definition model.
It implements the basic functionality: the sub-models managing and the rule result processing.
It doesn't specify the way of getting the model objects or definition.
-
-
Constructor Summary
Constructors Constructor Description AbstractDefinitionModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddModel(IModel model)Adds the givenmodelto the current definition model.voidaddRuleResultListener(IRuleResultListener listener)Adds the rule result listener.voiddispose()Disposes this model.IChangegetChange()Iterable<IModel>getModels()IRuleResultgetRuleResult()Returns the rule result.IRuleResultProcessorgetRuleResultProcessor()Returns aIRuleResultProcessorinstance.protected voidhandleRuleResultChanged(IRuleResult oldRuleResult, IRuleResult newRuleResult)Handle rule result changed.voidremoveModel(IModel model)Removes the givenmodelfrom the current definition model.voidremoveRuleResultListener(IRuleResultListener listener)Removes the rule result listener.voidsetRuleResult(IRuleResult ruleResult)Sets the rule result.voidsetRuleResultProcessor(IRuleResultProcessor ruleResultProcessor)Sets the specifiedruleResultProcessorto the model.StringtoString()-
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
-
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.standard.definitions.models.IDefinitionModel
getDefinition, getObjects
-
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, createWorkingCopy, discard, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
-
-
-
Method Detail
-
getChange
public final IChange getChange()
-
getRuleResult
public IRuleResult getRuleResult()
Description copied from interface:IDefinitionModelReturns the rule result.- Specified by:
getRuleResultin interfaceIDefinitionModel- Returns:
- the rule result, never
null. - See Also:
IRuleResult
-
setRuleResult
public void setRuleResult(IRuleResult ruleResult)
Description copied from interface:IDefinitionModelSets the rule result.- Specified by:
setRuleResultin interfaceIDefinitionModel- Parameters:
ruleResult- the rule result, cannot benull.- See Also:
IRuleResult
-
addRuleResultListener
public void addRuleResultListener(IRuleResultListener listener)
Description copied from interface:IDefinitionModelAdds the rule result listener.- Specified by:
addRuleResultListenerin interfaceIDefinitionModel- Parameters:
listener- the listener to add, cannot benull.
-
removeRuleResultListener
public void removeRuleResultListener(IRuleResultListener listener)
Description copied from interface:IDefinitionModelRemoves the rule result listener.- Specified by:
removeRuleResultListenerin interfaceIDefinitionModel- Parameters:
listener- the listener to remove, cannot benull.
-
addModel
public void addModel(IModel model)
Description copied from interface:IDefinitionModelAdds the givenmodelto the current definition model.- Specified by:
addModelin interfaceIDefinitionModel- Parameters:
model- the model to add, cannot benull.
-
removeModel
public void removeModel(IModel model)
Description copied from interface:IDefinitionModelRemoves the givenmodelfrom the current definition model.- Specified by:
removeModelin interfaceIDefinitionModel- Parameters:
model- the model to remove, cannot benull.
-
dispose
public void dispose()
Description copied from interface:IModelDisposes this model.
-
getModels
public Iterable<IModel> getModels()
- Specified by:
getModelsin interfaceICompoundModel- Returns:
- the models this compound model contains.
-
setRuleResultProcessor
public void setRuleResultProcessor(IRuleResultProcessor ruleResultProcessor)
Description copied from interface:IDefinitionModelSets the specifiedruleResultProcessorto the model.- Specified by:
setRuleResultProcessorin interfaceIDefinitionModel- Parameters:
ruleResultProcessor- theIRuleResultProcessorinstance, cannot benull.
-
getRuleResultProcessor
public IRuleResultProcessor getRuleResultProcessor()
Description copied from interface:IDefinitionModelReturns aIRuleResultProcessorinstance.- Specified by:
getRuleResultProcessorin interfaceIDefinitionModel- Returns:
IRuleResultProcessorinstance ornull.
-
handleRuleResultChanged
protected void handleRuleResultChanged(IRuleResult oldRuleResult, IRuleResult newRuleResult)
Handle rule result changed. It notifies theIRuleResultListeners that are added to the model.- Parameters:
oldRuleResult- the old rule result, cannot benull.newRuleResult- the new rule result, cannot benull.
-
-