/** * Retrieve the list of ClientWidgetInfo's from the blueprint's and geodesks overview map. If clientWidgetInfo's are * defined on both blueprint and geodesk level, that defined in the geodesk is used. * * @param geodesk the blueprint * @return List of ClientWidgetInfo as defined in the blueprint */ public static Map<String, ClientWidgetInfo> getOverviewMapClientWidgetInfo(BaseGeodeskDto geodesk) { Map<String, ClientWidgetInfo> widgetInfos = new HashMap<String, ClientWidgetInfo>(); if (geodesk instanceof GeodeskDto) { widgetInfos.putAll(getOverviewMapClientWidgetInfo(((GeodeskDto) geodesk).getBlueprint())); } if (geodesk instanceof BlueprintDto) { widgetInfos.putAll(getOverviewMapClientWidgetInfo(geodesk.getUserApplicationInfo())); } widgetInfos.putAll(geodesk.getOverviewMapClientWidgetInfos()); return widgetInfos; }
/** * Load all widget editors that are available on this blueprints user application, and add them to the tabset. * * @param bgd * the basegeodesk. */ private void loadWidgetTabs(BaseGeodeskDto bgd) { UserApplication ua = UserApplicationRegistry.getInstance().get(bgd.getUserApplicationInfo().getKey()); for (String key : ua.getSupportedApplicationWidgetKeys()) { addWidgetTab(WidgetEditorFactoryRegistry.getApplicationRegistry().get(key), bgd.getApplicationClientWidgetInfos(), GeodeskDtoUtil.getApplicationClientWidgetInfo(bgd), bgd); } for (String key : ua.getSupportedMainMapWidgetKeys()) { addWidgetTab(WidgetEditorFactoryRegistry.getMapRegistry().get(key), bgd.getMainMapClientWidgetInfos(), GeodeskDtoUtil.getMainMapClientWidgetInfo(bgd), bgd); } for (String key : ua.getSupportedOverviewMapWidgetKeys()) { addWidgetTab(WidgetEditorFactoryRegistry.getMapRegistry().get(key), bgd.getOverviewMapClientWidgetInfos(), GeodeskDtoUtil.getOverviewMapClientWidgetInfo(bgd), bgd); } }
try { addWidgetTab(WidgetEditorFactoryRegistry.getMapRegistry().get(key), bp.getOverviewMapClientWidgetInfos(), GeodeskDtoUtil.getOverviewMapClientWidgetInfo(bp), bp); } catch (Exception e) { Log.logError("Error adding overview map widget editor for key: " + key + ", ", e);