Package com.orientechnologies.orient.core.command

Examples of com.orientechnologies.orient.core.command.OCommandContext


      final Object[] args = new String[parts.length - 3];
      for (int i = 3; i < parts.length; ++i)
        args[i - 3] = parts[i];

      // BIND CONTEXT VARIABLES
      final OCommandContext context = new OBasicCommandContext();
      int argIdx = 0;
      for (Object arg : args)
        context.setVariable("arg" + (argIdx++), arg);

      context.setVariable("session", OHttpSessionManager.getInstance().getSession(iRequest.sessionId));
      context.setVariable("request", new OHttpRequestWrapper(iRequest, (String[]) args));
      context.setVariable("response", new OHttpResponseWrapper(iResponse));

      final String debugMode = iRequest.getParameter("debug");
      if (debugMode != null && Boolean.parseBoolean(debugMode))
        context.setVariable("debugMode", Boolean.TRUE);

      final OComposableProcessor processEngine = (OComposableProcessor) OProcessorManager.getInstance().get("composable");
      Object result = processEngine.processFromFile(name, context, iRequest.httpMethod.equals("GET"));

      if (result instanceof ODocument)
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.command.OCommandContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.