Class FormModelImpl
java.lang.Object
ch.tocco.nice2.model.base.spi.base.AbstractModel<FormCollector>
ch.tocco.nice2.model.form.impl.form2.FormModelImpl
- All Implemented Interfaces:
ReloadAction
,FormModel
Contains all
Form
objects based on the Component
structure.
The forms are parsed when the service is initialized.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.form2.FormModel
FormModel.FormId
-
Field Summary
Fields inherited from class ch.tocco.nice2.model.base.spi.base.AbstractModel
log, modelProviders
-
Constructor Summary
ConstructorDescriptionFormModelImpl
(org.slf4j.Logger log, ReloadEventEmitter reloadEvent, ThreadHandlerManager threadHandlerManager, LegacyActionsContext legacyActionsContext, L10N l10n) -
Method Summary
Modifier and TypeMethodDescriptioncreateFormBuilder
(EntityModel entityModel, String name) Returns theFormModel.FormId
of all available forms.protected List
<FormInterceptor> void
void
onReload()
protected void
postProcess
(AbstractCompositeComponent component) protected void
postProcess
(List<Form> forms) retrieveForm
(String baseName, FormScope scope) Returns a form based on baseName and scope.void
setFormInterceptors
(List<FormInterceptor> formInterceptors) Methods inherited from class ch.tocco.nice2.model.base.spi.base.AbstractModel
addListener, fireFinished, removeListener, setModelProviders
-
Constructor Details
-
FormModelImpl
public FormModelImpl(org.slf4j.Logger log, ReloadEventEmitter reloadEvent, ThreadHandlerManager threadHandlerManager, LegacyActionsContext legacyActionsContext, L10N l10n)
-
-
Method Details
-
initializeService
@PostConstruct public void initializeService() -
setFormInterceptors
-
onReload
public void onReload()- Specified by:
onReload
in interfaceFormModel
- Specified by:
onReload
in interfaceReloadAction
- Specified by:
onReload
in classAbstractModel<FormCollector>
-
doLoadForms
- Throws:
ModelBuildException
-
getFormInterceptors
-
postProcess
-
postProcess
-
createFormBuilder
- Specified by:
createFormBuilder
in interfaceFormModel
-
getFormIds
Description copied from interface:FormModel
Returns theFormModel.FormId
of all available forms.- Specified by:
getFormIds
in interfaceFormModel
-
retrieveForm
Description copied from interface:FormModel
Returns a form based on baseName and scope. It will look for fallback forms if the explicitly specified one is not available. (e.g. it will return "User", DETAIL if you try to retrieve "User", CREATE as user does not have an explicit CREATE form.- Specified by:
retrieveForm
in interfaceFormModel
-