- private String getContext(SvcLogicContext ctx, Properties prop) throws Exception {
- String context;
- if (StringUtils.isNotBlank(ctx.getAttribute(INPUT_CONTEXT))) {
- context = "/" + ctx.getAttribute(INPUT_CONTEXT);
- } else if (prop.getProperty(ctx.getAttribute(INPUT_REQUEST_ACTION) + ".context") != null) {
- context = "/" + prop.getProperty(ctx.getAttribute(INPUT_REQUEST_ACTION) + ".context");
- } else {
- throw new Exception("Could Not found the context for operation " + ctx.getAttribute(INPUT_REQUEST_ACTION));
+ private String getContext(SvcLogicContext ctx, Properties prop) throws Exception {
+ String context;
+ String urlPath = ctx.getAttribute(VNF_TYPE) + "." + REST_PROTOCOL + "." + ctx.getAttribute(INPUT_REQUEST_ACTION)
+ + "." + REST_CONTEXT_URL;
+ if (StringUtils.isNotBlank(ctx.getAttribute(INPUT_CONTEXT))) {
+ context = "/" + ctx.getAttribute(INPUT_CONTEXT);
+ } else if (prop.getProperty(urlPath) != null) {
+ context = "/" + prop.getProperty(urlPath);
+ } else {
+ throw new Exception("Could not find the context for operation " + ctx.getAttribute(INPUT_REQUEST_ACTION));
+ }
+ return context;