protected List<String> getAllScreensIds() { return windowConfig.getWindows().stream() .map(WindowInfo::getId) .collect(Collectors.toList()); }
protected Set<String> getAllWindowIds() { Collection<WindowInfo> windows = windowConfig.getWindows(); return windows.stream() .map(WindowInfo::getId) .collect(Collectors.toSet()); } }
private void walkOtherScreens(Node<BasicPermissionTarget> othersRoot, Node<BasicPermissionTarget> menuRoot) { Set<String> menuItems = new HashSet<>(); for (Node<BasicPermissionTarget> node : new Tree<>(menuRoot).toList()) { menuItems.add(node.getData().getId()); } // filter non-unique windows with specified agent windowConfig.getWindows().stream() .map(WindowInfo::getId) .filter(id -> !menuItems.contains("item:" + id)) .distinct() .sorted() .forEach(id -> { Node<BasicPermissionTarget> n = new Node<>(new BasicPermissionTarget("item:" + id, id, id)); othersRoot.addChild(n); }); }
protected List<String> getAllLookupIds() { Collection<WindowInfo> allWindows = windowConfig.getWindows(); List<String> lookupIds = new ArrayList<>(); for (WindowInfo winInfo : allWindows) { if (isNotBlank(winInfo.getTemplate()) && isLookupWindow(winInfo)) { lookupIds.add(winInfo.getId()); } else if (winInfo.getScreenClass() != null && AbstractLookup.class.isAssignableFrom(winInfo.getScreenClass())) { lookupIds.add(winInfo.getId()); } } filterLookupFields(lookupIds); return lookupIds; }
Collection<WindowInfo> windowInfoCollection = windowConfig.getWindows(); screensMap = new TreeMap<>();
protected void init() { widgetTypeInfos = new ArrayList<>(); try { for (WindowInfo windowInfo : windowConfig.getWindows()) { DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); if (StringUtils.isNoneEmpty(windowInfo.getTemplate())) {
protected void initScreens() { screenTable.addAction(new RemoveAction(screenTable, false)); List<WindowInfo> windowInfoCollection = new ArrayList<>(windowConfig.getWindows());
protected void initScreenFilter() { WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME); Collection<WindowInfo> windows = sortWindowInfos(windowConfig.getWindows()); Map<String, String> screens = new LinkedHashMap<>(); for (WindowInfo windowInfo : windows) { String id = windowInfo.getId(); String menuId = "menu-config." + id; String localeMsg = messages.getMessage(AppConfig.getMessagesPack(), menuId); String title = menuId.equals(localeMsg) ? id : localeMsg + " (" + id + ")"; screens.put(title, id); } screenFilter.setOptionsMap(screens); componentsTreeBtn.setEnabled(screenFilter.getValue() != null); screenFilter.addValueChangeListener(e -> { componentsTreeBtn.setEnabled(screenFilter.getValue() != null); componentDescriptorsDs.setScreenId(screenFilter.getValue()); componentDescriptorsDs.refresh(); componentsTree.expandTree(); }); }