public static String getReturnUrlTypeClassMapper(String actionName) throws NException { String handlerClassName; String returnUrlType = NNavigationMapper.getReturnUrlTypeMapper(actionName); if (returnUrlType == null || "".equals(returnUrlType)) { String specName = actionSpecOnly(actionName); if ("nsf".equals(specName)) { specName = "default"; } String defaultHandler = NConfiguration.getInstance() .get("/configuration/nsf/navigation<" + specName + ">/default-handler"); if (defaultHandler == null || "".equals(defaultHandler)) { handlerClassName = "nsf.foundation.front.channel.handler.NFowardHandler"; } else { handlerClassName = NConfiguration.getInstance() .get("/configuration/nsf/navigation-handlers/handler<" + defaultHandler + ">"); } } else { handlerClassName = NConfiguration.getInstance() .get("/configuration/nsf/navigation-handlers/handler<" + returnUrlType + ">"); } return handlerClassName; }
private static String actionSpecOnly(String fullActionName) throws NException { try { int pathLastIndex = fullActionName.lastIndexOf("."); String specStr = fullActionName.substring(pathLastIndex + 1); String aliasStr = NConfiguration.getInstance() .get("/configuration/nsf/navigation<" + specStr + ">/navigation-alias"); if (aliasStr != null && !"".equals(aliasStr)) { specStr = aliasStr; if ("default".equals(specStr)) specStr = "nsf"; } return specStr; } catch (Exception e) { throw new NException(e); } }