/** * Filters the matching editors for the given resource type from the list of all available editors.<p> * * @param resourceType the resource type to filter * @return a map of filtered editor configurations sorted asceding by the ranking for the current resource type, with the (Float) ranking as key */ private SortedMap<Float, CmsWorkplaceEditorConfiguration> filterEditorsForResourceType(String resourceType) { SortedMap<Float, CmsWorkplaceEditorConfiguration> filteredEditors = new TreeMap<Float, CmsWorkplaceEditorConfiguration>(); Iterator<CmsWorkplaceEditorConfiguration> i = m_editorConfigurations.iterator(); while (i.hasNext()) { CmsWorkplaceEditorConfiguration currentConfig = i.next(); if (currentConfig.matchesResourceType(resourceType)) { float key = currentConfig.getRankingForResourceType(resourceType); if (key >= 0) { filteredEditors.put(new Float(key), currentConfig); } } } return filteredEditors; }
/** * Filters the matching editors for the given resource type from the list of all available editors.<p> * * @param resourceType the resource type to filter * @return a map of filtered editor configurations sorted asceding by the ranking for the current resource type, with the (Float) ranking as key */ private SortedMap filterEditorsForResourceType(String resourceType) { SortedMap filteredEditors = new TreeMap(); Iterator i = m_editorConfigurations.iterator(); while (i.hasNext()) { CmsWorkplaceEditorConfiguration currentConfig = (CmsWorkplaceEditorConfiguration)i.next(); if (currentConfig.matchesResourceType(resourceType)) { float key = currentConfig.getRankingForResourceType(resourceType); if (key >= 0) { filteredEditors.put(new Float(key), currentConfig); } } } return filteredEditors; }
editorConfigs.put(new Float(currentConfig.getRankingForResourceType(key)), currentConfig);
editorConfigs.put(new Float(currentConfig.getRankingForResourceType(key)), currentConfig);