/** * Creates an action with the given id. * @param target component containing this action */ public static RefreshAction create(ListComponent target, String id) { return AppBeans.getPrototype("cuba_RefreshAction", target, id); }
/** * Creates an action with default id. * @param target component containing this action * @param openType how to open the editor screen */ public static CreateAction create(ListComponent target, WindowManager.OpenType openType) { return AppBeans.getPrototype("cuba_CreateAction", target, openType); }
/** * Creates an action with default id. Autocommit is set to true. * @param target component containing this action */ public static RemoveAction create(ListComponent target) { return AppBeans.getPrototype("cuba_RemoveAction", target); }
/** * Creates an action with the given id. * @param target component containing this action * @param autocommit whether to commit datasource immediately * @param id action's identifier */ public static RemoveAction create(ListComponent target, boolean autocommit, String id) { return AppBeans.getPrototype("cuba_RemoveAction", target, autocommit, id); }
/** * Creates an action with the given id. * @param target component containing this action * @param autocommit whether to commit datasource immediately * @param confirm whether to show the confirmation dialog to user * @param id action's name */ public static ExcludeAction create(ListComponent target, boolean autocommit, boolean confirm, String id) { return AppBeans.getPrototype("cuba_ExcludeAction", target, autocommit, confirm, id); }
/** * Creates an action with default id. * @param target component containing this action * @param display ExportDisplay implementation */ public static ExcelAction create(ListComponent target, ExportDisplay display) { return AppBeans.getPrototype("cuba_ExcelAction", target, display); }
@Override public UI createInstance(UICreateEvent event) { return AppBeans.getPrototype(AppUI.NAME); } }
/** * Creates an action with default id. * @param target component containing this action * @param openType how to open the editor screen */ public static EditAction create(ListComponent target, OpenType openType) { return AppBeans.getPrototype("cuba_EditAction", target, openType); }
/** * Creates an action with the given id. * @param target component containing this action * @param openType how to open the editor screen * @param id action name */ public static EditAction create(ListComponent target, OpenType openType, String id) { return AppBeans.getPrototype("cuba_EditAction", target, openType, id); }
/** * Creates an action with specified id. * * @param target component containing data to export * @param id action's id */ public static ShowPivotAction create(ListComponent target, String id) { return AppBeans.getPrototype(NAME, target, id); }
/** * Creates an action with default id, opening the lookup screen in THIS tab. * @param target component containing this action * @param handler lookup handler. If null, an instance of {@link DefaultHandler} will be used. * @param openType how to open the editor screen */ public static AddAction create(ListComponent target, @Nullable Window.Lookup.Handler handler, OpenType openType) { return AppBeans.getPrototype("cuba_AddAction", target, handler, openType); }
/** * Creates an action with the given id. * @param target component containing this action * @param handler lookup handler. If null, an instance of {@link DefaultHandler} will be used. * @param openType how to open the editor screen * @param id action's name */ public static AddAction create(ListComponent target, @Nullable Window.Lookup.Handler handler, OpenType openType, String id) { return AppBeans.getPrototype("cuba_AddAction", target, handler, openType, id); }
/** * Creates DsBuilder for building datasources for the given {@link DsContext}. * * @param dsContext context instance or null */ public static DsBuilder create(@Nullable DsContext dsContext) { return AppBeans.getPrototype(NAME, dsContext); }
@Override public void loadMenu() { MenuBuilder menuBuilder = AppBeans.getPrototype(MenuBuilder.NAME); menuBuilder.build(this); }
@Override public byte[] generateTemplate(ReportData reportData, TemplateFileType templateFileType) throws TemplateGenerationException { TemplateGeneratorApi templateGeneratorApi = AppBeans.getPrototype(TemplateGeneratorApi.NAME, reportData, templateFileType); return templateGeneratorApi.generateTemplate(); }
@Override public String generateSelectScript(Entity entity) { Preconditions.checkNotNullArgument(entity); EntitySqlGenerator generator = AppBeans.getPrototype(EntitySqlGenerator.NAME, entity.getClass()); return generator.generateSelectScript(entity); }
public WebPivotTableExtension(PivotTable pivotTable) { this.pivotTable = pivotTable; excelExporter = AppBeans.getPrototype(PivotExcelExporter.NAME, pivotTable); CubaPivotTable cubaPivotTable = pivotTable.unwrap(CubaPivotTable.class); pivotTableExtension = new CubaPivotTableExtension(cubaPivotTable); }
@Override public String generateUpdateScript(Entity entity) { Preconditions.checkNotNullArgument(entity); EntitySqlGenerator generator = AppBeans.getPrototype(EntitySqlGenerator.NAME, entity.getClass()); entity = reload(entity); return generator.generateUpdateScript(entity); }
@Override public String generateInsertScript(Entity entity) { Preconditions.checkNotNullArgument(entity); EntitySqlGenerator generator = AppBeans.getPrototype(EntitySqlGenerator.NAME, entity.getClass()); entity = reload(entity); return generator.generateInsertScript(entity); }
protected String dateIntervalConditionToJpql(String propertyName) { if (param.getValue() == null) return null; DateIntervalValue filterDateIntervalValue = AppBeans.getPrototype(DateIntervalValue.NAME, (String) param.getValue()); return filterDateIntervalValue.toJPQL(propertyName); }