/** * Register a Web Script URI * * @param script */ private void registerURIs(WebScript script) { Description desc = script.getDescription(); for (String uri : desc.getURIs()) { PathImpl path = uriByPath.get("/"); String[] parts = uri.split("/"); for (String part : parts) { if (part.indexOf("?") != -1) { part = part.substring(0, part.indexOf("?")); } PathImpl subpath = uriByPath.get(PathImpl.concatPath(path.getPath(), part)); if (subpath == null) { subpath = path.createChildPath(part); uriByPath.put(subpath.getPath(), subpath); } path = subpath; } path.addScript(script); } }
/** * Register a Web Script Family * * @param script WebScript */ private void registerFamily(WebScript script) { Description desc = script.getDescription(); Set<String> familys = desc.getFamilys(); for(String family : familys) { if (family != null && family.length() > 0) { PathImpl path = familyByPath.get("/"); String[] parts = family.split("/"); for (String part : parts) { PathImpl subpath = familyByPath.get(PathImpl.concatPath(path.getPath(), part)); if (subpath == null) { subpath = path.createChildPath(part); familyByPath.put(subpath.getPath(), subpath); } path = subpath; } path.addScript(script); } } }
/** * Register a Web Script Package * * @param script WebScript */ private Path registerPackage(WebScript script) { Description desc = script.getDescription(); PathImpl path = packageByPath.get("/"); String[] parts = desc.getScriptPath().split("/"); for (String part : parts) { PathImpl subpath = packageByPath.get(PathImpl.concatPath(path.getPath(), part)); if (subpath == null) { subpath = path.createChildPath(part); packageByPath.put(subpath.getPath(), subpath); } path = subpath; } path.addScript(script); return path; }
/** * Register a Web Script Package * * @param script WebScript */ private Path registerPackage(WebScript script) { Description desc = script.getDescription(); PathImpl path = packageByPath.get("/"); String[] parts = desc.getScriptPath().split("/"); for (String part : parts) { PathImpl subpath = packageByPath.get(PathImpl.concatPath(path.getPath(), part)); if (subpath == null) { subpath = path.createChildPath(part); packageByPath.put(subpath.getPath(), subpath); } path = subpath; } path.addScript(script); return path; }
/** * Register a Web Script URI * * @param script WebScript */ private void registerURIs(WebScript script) { Description desc = script.getDescription(); for (String uri : desc.getURIs()) { PathImpl path = uriByPath.get("/"); String[] parts = uri.split("/"); for (String part : parts) { if (part.indexOf("?") != -1) { part = part.substring(0, part.indexOf("?")); } PathImpl subpath = uriByPath.get(PathImpl.concatPath(path.getPath(), part)); if (subpath == null) { subpath = path.createChildPath(part); uriByPath.put(subpath.getPath(), subpath); } path = subpath; } path.addScript(script); } }
/** * Register a Web Script Package * * @param script */ private Path registerPackage(WebScript script) { Description desc = script.getDescription(); PathImpl path = packageByPath.get("/"); String[] parts = desc.getScriptPath().split("/"); for (String part : parts) { PathImpl subpath = packageByPath.get(PathImpl.concatPath(path.getPath(), part)); if (subpath == null) { subpath = path.createChildPath(part); packageByPath.put(subpath.getPath(), subpath); } path = subpath; } path.addScript(script); return path; }
/** * Register a Web Script URI * * @param script WebScript */ private void registerURIs(WebScript script) { Description desc = script.getDescription(); for (String uri : desc.getURIs()) { PathImpl path = uriByPath.get("/"); String[] parts = uri.split("/"); for (String part : parts) { if (part.indexOf("?") != -1) { part = part.substring(0, part.indexOf("?")); } PathImpl subpath = uriByPath.get(PathImpl.concatPath(path.getPath(), part)); if (subpath == null) { subpath = path.createChildPath(part); uriByPath.put(subpath.getPath(), subpath); } path = subpath; } path.addScript(script); } }
/** * Register a Web Script Family * * @param script WebScript */ private void registerFamily(WebScript script) { Description desc = script.getDescription(); Set<String> familys = desc.getFamilys(); for(String family : familys) { if (family != null && family.length() > 0) { PathImpl path = familyByPath.get("/"); String[] parts = family.split("/"); for (String part : parts) { PathImpl subpath = familyByPath.get(PathImpl.concatPath(path.getPath(), part)); if (subpath == null) { subpath = path.createChildPath(part); familyByPath.put(subpath.getPath(), subpath); } path = subpath; } path.addScript(script); } } }
/** * Register a Web Script Family * * @param script */ private void registerFamily(WebScript script) { Description desc = script.getDescription(); Set<String> familys = desc.getFamilys(); for(String family : familys) { if (family != null && family.length() > 0) { PathImpl path = familyByPath.get("/"); String[] parts = family.split("/"); for (String part : parts) { PathImpl subpath = familyByPath.get(PathImpl.concatPath(path.getPath(), part)); if (subpath == null) { subpath = path.createChildPath(part); familyByPath.put(subpath.getPath(), subpath); } path = subpath; } path.addScript(script); } } }
/** * Register a lifecycle * * @param script WebScript */ private void registerLifecycle(WebScript script) { Description desc = script.getDescription(); Lifecycle lifecycle = desc.getLifecycle(); PathImpl path = lifecycleByPath.get("/"); PathImpl subpath = lifecycleByPath.get(PathImpl.concatPath(path.getPath(), lifecycle.toString())); if (subpath == null) { subpath = path.createChildPath(lifecycle.toString()); lifecycleByPath.put(subpath.getPath(), subpath); } subpath.addScript(script); }
/** * Register a lifecycle * * @param script WebScript */ private void registerLifecycle(WebScript script) { Description desc = script.getDescription(); Lifecycle lifecycle = desc.getLifecycle(); PathImpl path = lifecycleByPath.get("/"); PathImpl subpath = lifecycleByPath.get(PathImpl.concatPath(path.getPath(), lifecycle.toString())); if (subpath == null) { subpath = path.createChildPath(lifecycle.toString()); lifecycleByPath.put(subpath.getPath(), subpath); } subpath.addScript(script); }
/** * Register a lifecycle * * @param script */ private void registerLifecycle(WebScript script) { Description desc = script.getDescription(); Lifecycle lifecycle = desc.getLifecycle(); if (lifecycle != Lifecycle.none) { PathImpl path = lifecycleByPath.get("/"); PathImpl subpath = lifecycleByPath.get(PathImpl.concatPath(path.getPath(), lifecycle.toString())); if (subpath == null) { subpath = path.createChildPath(lifecycle.toString()); lifecycleByPath.put(subpath.getPath(), subpath); } subpath.addScript(script); } }