Package org.apache.cocoon.environment.commandline

Examples of org.apache.cocoon.environment.commandline.CommandLineContext


        Request request = new CommandLineRequest(this, "", uri, null, null, null);
        this.objectModel.put(ObjectModelHelper.REQUEST_OBJECT, request)
        this.objectModel.put(ObjectModelHelper.RESPONSE_OBJECT,
                             new CommandLineResponse());
        this.objectModel.put(ObjectModelHelper.CONTEXT_OBJECT,
                             new CommandLineContext(context.getAbsolutePath()) );

    }
View Full Code Here


        String testPath = System.getProperty("testPath", "build/test");
        File testRootDir = new File(testPath);
        context.put("test-path", testRootDir);

        Context envContext = new CommandLineContext(contextRoot);
        ContainerUtil.enableLogging(envContext, getLogger());
        context.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, envContext);

        File tempDir = new File(tempPath);
View Full Code Here

              }
            }

            this.conf = getConfigurationFile(this.context, this.configFile);

            this.cliContext = new CommandLineContext(this.contextDir);
            this.cliContext.enableLogging(this.log);

            appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, this.cliContext);
            appContext.put(Constants.CONTEXT_CLASS_LOADER, org.apache.cocoon.bean.CocoonWrapper.class
                .getClassLoader());
View Full Code Here

        new File(commandLineContextDir, "foo" + File.separator + "bar").mkdirs();

        String level = System.getProperty("junit.test.loglevel", "" + ConsoleLogger.LEVEL_DEBUG);
        Logger logger = new ConsoleLogger(Integer.parseInt(level));

        commandLineContext = new CommandLineContext(commandLineContextDir);
        commandLineContext.enableLogging(logger);
    }
View Full Code Here

    protected void addContext(DefaultContext context) {
        this.context = context;

        context.put(Constants.CONTEXT_WORK_DIR, workDir);

        CommandLineContext commandline_context = new CommandLineContext(commandlineContextDir.toString());
        commandline_context.enableLogging(getLogEnabledLogger());
        context.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, commandline_context);
    }
View Full Code Here

        try {
            DefaultContext appContext = new DefaultContext();
            appContext.put(
                Constants.CONTEXT_CLASS_LOADER,
                CocoonWrapper.class.getClassLoader());
            cliContext = new CommandLineContext(contextDir);
            cliContext.enableLogging(log);
            appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, cliContext);
            LogKitLoggerManager logKitLoggerManager =
                    new LogKitLoggerManager(Hierarchy.getDefaultHierarchy());
            logKitLoggerManager.enableLogging(log);
View Full Code Here

            this.ctx = new DefaultContext(context);

            File contextDir = (File) this.ctx.get("context-root");
            File workDir = (File) this.ctx.get(Constants.CONTEXT_WORK_DIR);

            CommandLineContext clContext = new CommandLineContext(contextDir.toString());
            clContext.enableLogging(getLogger());
            this.ctx.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, clContext);
            this.ctx.put(Constants.CONTEXT_CLASSPATH, getClassPath(contextDir));

            this.ctx.put(Constants.CONTEXT_UPLOAD_DIR, new File(contextDir, "upload-dir"));
            this.ctx.put(Constants.CONTEXT_CACHE_DIR, new File(workDir, "cache-dir"));
View Full Code Here

        try {
            DefaultContext appContext = new DefaultContext();
            appContext.put(
                Constants.CONTEXT_CLASS_LOADER,
                CocoonBean.class.getClassLoader());
            cliContext = new CommandLineContext(contextDir);
            cliContext.enableLogging(new LogKitLogger(log));
            appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, cliContext);
            DefaultLogKitManager logKitManager = null;
            if (logKit != null) {
                final FileInputStream fis = new FileInputStream(logKit);
View Full Code Here

        try {
            DefaultContext appContext = new DefaultContext();
            appContext.put(
                Constants.CONTEXT_CLASS_LOADER,
                CocoonBean.class.getClassLoader());
            cliContext = new CommandLineContext(contextDir);
            cliContext.enableLogging(new LogKitLogger(log));
            appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, cliContext);
            DefaultLogKitManager logKitManager = null;
            if (logKit != null) {
                final FileInputStream fis = new FileInputStream(logKit);
View Full Code Here

            classLoader = (ClassLoader) this.ctx.get(Constants.CONTEXT_CLASS_LOADER);
            File contextDir = (File) this.ctx.get("context-root");
            File workDir = (File) this.ctx.get(Constants.CONTEXT_WORK_DIR);

            CommandLineContext clContext = new CommandLineContext(contextDir.toString());
            clContext.enableLogging(getLogger());
            this.ctx.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, clContext);
            this.ctx.put(Constants.CONTEXT_CLASSPATH, getClassPath(contextDir));

            this.ctx.put(Constants.CONTEXT_UPLOAD_DIR, new File(contextDir, "upload-dir"));
            this.ctx.put(Constants.CONTEXT_CACHE_DIR, new File(workDir, "cache-dir"));
View Full Code Here

TOP

Related Classes of org.apache.cocoon.environment.commandline.CommandLineContext

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.