- java.lang.Object
-
- net.n2oapp.framework.config.metadata.compile.widget.BaseWidgetCompiler<D,S>
-
- All Implemented Interfaces:
SourceClassAware,SourceCompiler<D,S,CompileContext<?,?>>,BaseSourceCompiler<D,S,CompileContext<?,?>>
- Direct Known Subclasses:
CustomWidgetCompiler,FormCompiler,HtmlWidgetCompiler,ListWidgetCompiler,TableCompiler,TreeCompiler
public abstract class BaseWidgetCompiler<D extends Widget,S extends N2oWidget> extends Object implements BaseSourceCompiler<D,S,CompileContext<?,?>>
Компиляция абстрактного виджета
-
-
Constructor Summary
Constructors Constructor Description BaseWidgetCompiler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcollectValidation(FieldSet fs, Map<String,List<Validation>> clientValidations, ValidationScope validationScope)protected voidcompileDataProviderAndRoutes(D compiled, S source, CompileProcessor p, ValidationList validationList, ParentRouteScope widgetRouteScope, SubModelsScope subModelsScope, CopiedFieldScope copiedFieldScope)protected voidcompileToolbarAndAction(D compiled, S source, CompileContext<?,?> context, CompileProcessor p, WidgetScope widgetScope, ParentRouteScope widgetRouteScope, MetaActions widgetActions, CompiledObject object, ValidationList validationList)protected voidcompileWidget(D compiled, S source, CompileContext<?,?> context, CompileProcessor p, CompiledObject object)protected PaginationcreatePaging(Integer size, Boolean prev, Boolean next, String property, CompileProcessor p)protected StringgetFailAlertWidget(Widget widget)protected StringgetMessagesForm(Widget widget)protected CompiledObjectgetObject(S source, CompileProcessor p)protected abstract StringgetPropertyWidgetSrc()protected CompiledQuerygetQuery(S source, CompileProcessor p)Получить скомпилированную выборкуprotected QueryContextgetQueryContext(D widget, S source, String route, CompiledQuery query, ValidationList validationList, SubModelsScope subModelsScope, CopiedFieldScope copiedFieldScope, CompileProcessor p)protected StringgetSuccessAlertWidget(Widget widget)protected List<FieldSet>initFieldSets(NamespaceUriAware[] fields, CompileContext<?,?> context, CompileProcessor p, WidgetScope widgetScope, CompiledQuery widgetQuery, CompiledObject widgetObject, ModelsScope modelsScope, FiltersScope filtersScope, SubModelsScope subModelsScope, UploadScope uploadScope, MomentScope momentScope, CopiedFieldScope copiedFieldScope)Инициализация филдсетовprotected FieldSetScopeinitFieldSetScope(CompiledQuery query, CompiledObject object)protected ParentRouteScopeinitWidgetRouteScope(D compiled, CompileContext<?,?> context, CompileProcessor p)Инициализация текущего маршрута виджета при сборке-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.n2oapp.framework.api.metadata.aware.SourceClassAware
getSourceClass
-
Methods inherited from interface net.n2oapp.framework.api.metadata.compile.SourceCompiler
compile
-
-
-
-
Method Detail
-
getPropertyWidgetSrc
protected abstract String getPropertyWidgetSrc()
-
compileWidget
protected void compileWidget(D compiled, S source, CompileContext<?,?> context, CompileProcessor p, CompiledObject object)
-
initWidgetRouteScope
protected ParentRouteScope initWidgetRouteScope(D compiled, CompileContext<?,?> context, CompileProcessor p)
Инициализация текущего маршрута виджета при сборке- Parameters:
context- Контекстp- Процессор сборки- Returns:
- Маршрут виджета соединенный с родительским маршрутом
-
compileDataProviderAndRoutes
protected void compileDataProviderAndRoutes(D compiled, S source, CompileProcessor p, ValidationList validationList, ParentRouteScope widgetRouteScope, SubModelsScope subModelsScope, CopiedFieldScope copiedFieldScope)
-
collectValidation
protected void collectValidation(FieldSet fs, Map<String,List<Validation>> clientValidations, ValidationScope validationScope)
-
compileToolbarAndAction
protected void compileToolbarAndAction(D compiled, S source, CompileContext<?,?> context, CompileProcessor p, WidgetScope widgetScope, ParentRouteScope widgetRouteScope, MetaActions widgetActions, CompiledObject object, ValidationList validationList)
-
getObject
protected CompiledObject getObject(S source, CompileProcessor p)
-
getQueryContext
protected QueryContext getQueryContext(D widget, S source, String route, CompiledQuery query, ValidationList validationList, SubModelsScope subModelsScope, CopiedFieldScope copiedFieldScope, CompileProcessor p)
-
getQuery
protected CompiledQuery getQuery(S source, CompileProcessor p)
Получить скомпилированную выборку
-
initFieldSetScope
protected FieldSetScope initFieldSetScope(CompiledQuery query, CompiledObject object)
-
initFieldSets
protected List<FieldSet> initFieldSets(NamespaceUriAware[] fields, CompileContext<?,?> context, CompileProcessor p, WidgetScope widgetScope, CompiledQuery widgetQuery, CompiledObject widgetObject, ModelsScope modelsScope, FiltersScope filtersScope, SubModelsScope subModelsScope, UploadScope uploadScope, MomentScope momentScope, CopiedFieldScope copiedFieldScope)
Инициализация филдсетов- Parameters:
fields- Список полей или филдсетов или строк или столбцовcontext- Контекст сборкиwidgetQuery- Выборка виджетаp- Процессор сборки- Returns:
- Список филдсетов
-
createPaging
protected Pagination createPaging(Integer size, Boolean prev, Boolean next, String property, CompileProcessor p)
-
-