Examples of EnvironmentContext


Examples of com.caucho.el.EnvironmentContext

  }

  public static ELContext getEnvironment(HashMap<String,Object> varMap)
  {
    if (varMap != null)
      return new EnvironmentContext(varMap);
    else
      return new EnvironmentContext();
  }
View Full Code Here

Examples of com.hubspot.singularity.executor.models.EnvironmentContext

  }

  private ProcessBuilder buildProcessBuilder(TaskInfo taskInfo, ExecutorData executorData) {
    final String cmd = getCommand(executorData);

    templateManager.writeEnvironmentScript(getPath("deploy.env"), new EnvironmentContext(taskInfo));

    task.getLog().info("Writing a runner script to execute {}", cmd);

    templateManager.writeRunnerScript(getPath("runner.sh"), new RunnerContext(cmd, configuration.getTaskAppDirectory(), executorData.getUser().or(configuration.getDefaultRunAsUser()), configuration.getServiceLog(), task.getTaskId(), executorData.getMaxTaskThreads().or(configuration.getMaxTaskThreads())));
View Full Code Here

Examples of com.volantis.mcs.context.EnvironmentContext

        // The processed page will be written to the response, so
        // we don't need to do anything further.
        XMLReader reader = MarlinSAXHelper.getXMLReader(mcsContext, null);

        EnvironmentContext environmentContext =
                ContextInternals.getEnvironmentContext(mcsContext);

        // The getXMLReader() call above will set up the pipelineContext in
        // the environmentContext.  See MarlinSAXHelper.setPipelineContext()
        XMLPipelineContext pipelineContext =
                environmentContext.getPipelineContext();

        // Set the Base URI in the pipeline's context
        URL baseURI = this.getServletContext().getResource("/");
        if (logger.isDebugEnabled()) {
            logger.debug("Setting Base URI " + baseURI.toExternalForm());
View Full Code Here

Examples of com.volantis.mcs.context.EnvironmentContext

            // The processed page will be written to the response, so
            // we don't need to do anything further.
            XMLReader reader =
                    MarlinSAXHelper.getXMLReader( requestContext, null );

            EnvironmentContext environmentContext =
                    ContextInternals.getEnvironmentContext( requestContext );

            // The getXMLReader() call above will set up the pipelineContext in
            // the environmentContext.  See MarlinSAXHelper.setPipelineContext()
            XMLPipelineContext pipelineContext =
                    environmentContext.getPipelineContext();
            // set the Base URI in the pipeline's context
            try {
                URL baseURI = new URL( baseUrl );
                if( logger.isDebugEnabled() ) {
                    logger.debug( "Setting Base URI "
View Full Code Here

Examples of com.volantis.mcs.context.EnvironmentContext

        if (context != null) {
            sessionContext = context.getCurrentSessionContext();
            expressionContext = context.getExpressionContext();
        }
        try {
            EnvironmentContext environmentContext
                    = new InternalEnvironmentContext(this, sessionContext);
            environmentContext.setExpressionContext(expressionContext);

            initialise(config, request, response, environmentContext);
        } catch (RepositoryException e) {
            throw new MarinerContextException(e);
        }
View Full Code Here

Examples of com.volantis.mcs.context.EnvironmentContext

                                        ServletRequest request,
                                        ServletResponse response)
            throws IOException,
            MarinerContextException {

        EnvironmentContext environmentContext
                = new ServletEnvironmentContext(this);

        initialise(config, config.getServletContext(),
                (HttpServletRequest) request, (HttpServletResponse) response,
                environmentContext);
View Full Code Here

Examples of com.volantis.mcs.context.EnvironmentContext

                                        ServletResponse response,
                                        EnvironmentContext envContext)
            throws IOException,
            MarinerContextException {

        EnvironmentContext newContext = new ServletEnvironmentContext(this);
        if (envContext != null) {
            newContext.setExpressionContext(envContext.getExpressionContext());
        }

        initialise(null, context, (HttpServletRequest) request,
                (HttpServletResponse) response, newContext);
    }
View Full Code Here

Examples of com.volantis.mcs.context.EnvironmentContext

            RepositoryException,
            MarinerContextException {

        // Retrieve the environment context so that it may be shared with the
        // new nested context.
        EnvironmentContext envContext =
                ContextInternals.getEnvironmentContext(this);
        return new MarinerServletRequestContext(servletContext,
                request, response,
                envContext);
    }
View Full Code Here

Examples of com.volantis.mcs.context.EnvironmentContext

            // todo: The following baseURI initialisation code should be
            // unnecessary if the system id is properly set on the InputSource.
            // However, this needs to be tested properly before changing it as
            // there were some problems with the pipeline.
            EnvironmentContext environmentContext =
                ContextInternals.getEnvironmentContext(servletRequestContext);

            // The getXMLReader() call above will set up the pipelineContext in
            // the environmentContext.  See MarlinSAXHelper.setPipelineContext()
             XMLPipelineContext pipelineContext = environmentContext.getPipelineContext();
             // set the Base URI in the pipeline's context
             try {
                 URL baseURI = filterConfig.getServletContext().getResource("/");
                 String baseURIAsString = baseURI.toExternalForm();
                 if (logger.isDebugEnabled()) {
View Full Code Here

Examples of com.volantis.mcs.context.EnvironmentContext

        requestContext = new MockMarinerServletRequestContext(servletRequest, new MockHTTPServletResponse());

        Project project = new RuntimeProjectMock("projectMock", expectations);
//        requestContext.pushProject(project);

        EnvironmentContext environmentContext = new ServletEnvironmentContext(
                requestContext);
        ContextInternals.setEnvironmentContext(requestContext,
                environmentContext);

        ExpressionFactory expressionFactory = ExpressionFactory.getDefaultInstance();

        ExpressionContext expressionContext =
                expressionFactory.createExpressionContext(
                        null,
                        NamespaceFactory.getDefaultInstance()
                        .createPrefixTracker());

        expressionContext.setProperty(MarinerRequestContext.class,
                                      requestContext, false);

        final CurrentProjectProviderMock projectProviderMock =
                new CurrentProjectProviderMock("projectProviderMock",
                        expectations);
        projectProviderMock.expects.getCurrentProject().returns(project).any();

        // Add a project provider in for resolving relative policy expressions
        // without a project into absolute IDs containing a project.
        expressionContext.setProperty(CurrentProjectProvider.class,
                projectProviderMock, false);

        environmentContext.setExpressionContext(expressionContext);
        return requestContext;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.