Package ch.tocco.nice2.model.entity.impl
Class DataModelImpl
java.lang.Object
ch.tocco.nice2.model.base.spi.base.AbstractModel<NiceModelReceiver>
ch.tocco.nice2.model.entity.impl.DataModelImpl
- All Implemented Interfaces:
ReloadAction,DataModel,NiceDataModel
@Component
public final class DataModelImpl
extends AbstractModel<NiceModelReceiver>
implements NiceDataModel, ReloadAction
The actual implementation of the data-model.
-
Field Summary
Fields inherited from class ch.tocco.nice2.model.base.spi.base.AbstractModel
log, modelProviders -
Constructor Summary
ConstructorsConstructorDescriptionDataModelImpl(org.slf4j.Logger log, TypeManager typeManager, ReloadEventEmitter reloadEvent, SchemaModelValidator schemaModelValidator, L10N l10n, ThreadHandlerManager threadHandlerManager) -
Method Summary
Modifier and TypeMethodDescription@Nullable EntityModelgetEntityModel(String model) booleanhasRemovedEntity(String name) A possibility to ask the configuration if something got removed.voidvoidonReload()requireEntityModel(String model) voidsetConceptionModelValidators(List<NiceModelValidator> validators) voidsetFinalModelValidators(List<NiceModelValidator> validators) voidsetValidateModel(boolean validateModel) Methods inherited from class ch.tocco.nice2.model.base.spi.base.AbstractModel
addListener, fireFinished, removeListener, setModelProvidersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.tocco.nice2.model.entity.api.NiceDataModel
addListener, removeListener
-
Constructor Details
-
DataModelImpl
public DataModelImpl(org.slf4j.Logger log, TypeManager typeManager, ReloadEventEmitter reloadEvent, @Lazy SchemaModelValidator schemaModelValidator, L10N l10n, ThreadHandlerManager threadHandlerManager)
-
-
Method Details
-
getEntityModels
- Specified by:
getEntityModelsin interfaceDataModel- Specified by:
getEntityModelsin interfaceNiceDataModel
-
getEntityModel
- Specified by:
getEntityModelin interfaceDataModel- Specified by:
getEntityModelin interfaceNiceDataModel- Parameters:
model- the model's name- Returns:
- null if there is no such model
- See Also:
-
requireEntityModel
- Specified by:
requireEntityModelin interfaceDataModel- Specified by:
requireEntityModelin interfaceNiceDataModel- Parameters:
model- the model's name- Throws:
ModelException- If there is no such model.
-
getTypeManager
- Specified by:
getTypeManagerin interfaceDataModel
-
hasRemovedEntity
Description copied from interface:NiceDataModelA possibility to ask the configuration if something got removed. This is importat to remove dependend stuff.
For example we remove the Field 'username' on an entity. Then the form-system need to know that this it's removed explictly and no spelling-error in the form-configuration. Then the form-system can remove the field aswell which would normally show this entity-field.- Specified by:
hasRemovedEntityin interfaceNiceDataModel
-
onReload
public void onReload()- Specified by:
onReloadin interfaceNiceDataModel- Specified by:
onReloadin interfaceReloadAction- Specified by:
onReloadin classAbstractModel<NiceModelReceiver>
-
setValidateModel
public void setValidateModel(boolean validateModel) -
setConceptionModelValidators
-
setFinalModelValidators
-
initializeService
@PostConstruct public void initializeService()
-