private void initializeNavigationFromFlowNonThreadSafe(Flow toInspect) { String fullyQualifiedFlowId = toInspect.getDefiningDocumentId() + toInspect.getId(); // Is there an existing NavigationMap for this flowId if (navigationMaps.containsKey(fullyQualifiedFlowId)) { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, "PENDING(edburns): merge existing map"); } } else { Map<String, Set<NavigationCase>> navRules = toInspect.getNavigationCases(); Map<String, SwitchNode> switches = toInspect.getSwitches(); if (!navRules.isEmpty() || !switches.isEmpty()) { NavigationInfo info = new NavigationInfo(); if (!switches.isEmpty()) { info.switches = new ConcurrentHashMap<>(); for (Map.Entry<String, SwitchNode> cur : switches.entrySet()) { info.switches.put(cur.getKey(), cur.getValue()); } } if (!navRules.isEmpty()) { info.ruleSet = new NavigationMap(); info.ruleSet.putAll(navRules); } navigationMaps.put(fullyQualifiedFlowId, info); } } }
private void initializeNavigationFromFlowNonThreadSafe(Flow toInspect) { String fullyQualifiedFlowId = toInspect.getDefiningDocumentId() + toInspect.getId(); // Is there an existing NavigationMap for this flowId if (navigationMaps.containsKey(fullyQualifiedFlowId)) { if (logger.isLoggable(Level.INFO)) { logger.log(Level.INFO, "PENDING(edburns): merge existing map"); } } else { Map<String, Set<NavigationCase>> navRules = toInspect.getNavigationCases(); Map<String, SwitchNode> switches = toInspect.getSwitches(); if (!navRules.isEmpty() || !switches.isEmpty()) { NavigationInfo info = new NavigationInfo(); if (!switches.isEmpty()) { info.switches = new ConcurrentHashMap<String, SwitchNode>(); for (Map.Entry<String, SwitchNode> cur : switches.entrySet()) { info.switches.put(cur.getKey(), cur.getValue()); } } if (!navRules.isEmpty()) { info.ruleSet = new NavigationMap(); info.ruleSet.putAll(navRules); } navigationMaps.put(fullyQualifiedFlowId, info); } } }
private void initializeNavigationFromFlowNonThreadSafe(Flow toInspect) { String fullyQualifiedFlowId = toInspect.getDefiningDocumentId() + toInspect.getId(); // Is there an existing NavigationMap for this flowId if (navigationMaps.containsKey(fullyQualifiedFlowId)) { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, "PENDING(edburns): merge existing map"); } } else { Map<String, Set<NavigationCase>> navRules = toInspect.getNavigationCases(); Map<String, SwitchNode> switches = toInspect.getSwitches(); if (!navRules.isEmpty() || !switches.isEmpty()) { NavigationInfo info = new NavigationInfo(); if (!switches.isEmpty()) { info.switches = new ConcurrentHashMap<>(); for (Map.Entry<String, SwitchNode> cur : switches.entrySet()) { info.switches.put(cur.getKey(), cur.getValue()); } } if (!navRules.isEmpty()) { info.ruleSet = new NavigationMap(); info.ruleSet.putAll(navRules); } navigationMaps.put(fullyQualifiedFlowId, info); } } }
private void initializeNavigationFromFlowNonThreadSafe(Flow toInspect) { String fullyQualifiedFlowId = toInspect.getDefiningDocumentId() + toInspect.getId(); // Is there an existing NavigationMap for this flowId if (navigationMaps.containsKey(fullyQualifiedFlowId)) { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, "PENDING(edburns): merge existing map"); } } else { Map<String, Set<NavigationCase>> navRules = toInspect.getNavigationCases(); Map<String, SwitchNode> switches = toInspect.getSwitches(); if (!navRules.isEmpty() || !switches.isEmpty()) { NavigationInfo info = new NavigationInfo(); if (!switches.isEmpty()) { info.switches = new ConcurrentHashMap<>(); for (Map.Entry<String, SwitchNode> cur : switches.entrySet()) { info.switches.put(cur.getKey(), cur.getValue()); } } if (!navRules.isEmpty()) { info.ruleSet = new NavigationMap(); info.ruleSet.putAll(navRules); } navigationMaps.put(fullyQualifiedFlowId, info); } } }
@Override public void inspectFlow(FacesContext context, Flow flow) Map<String, Set<NavigationCase>> rules = flow.getNavigationCases(); int rulesSize = rules.size();