Package org.apache.cocoon.environment.commandline

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


        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


        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

     * @since
     */
    public void setUp() throws Exception {
        commandLineContextDir = System.getProperty("java.io.tmpdir", "/tmp");
        new File(commandLineContextDir, "foo"+File.separator+"bar").mkdirs();
        commandLineContext = new CommandLineContext(commandLineContextDir);
        commandLineContext.enableLogging( new ConsoleLogger() );
    }
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,
                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

    public void initialize() throws Exception {
        try {
            DefaultContext appContext = new DefaultContext();
            appContext.put(Constants.CONTEXT_CLASS_LOADER, Main.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

     * @exception  Exception  Description of Exception
     * @since
     */
    public void setUp() throws Exception {
        commandLineContextDir = System.getProperty("java.io.tmpdir", "/tmp");
        commandLineContext = new CommandLineContext(commandLineContextDir);
        commandLineContext.enableLogging( new ConsoleLogger() );
    }
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);

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

            appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, cliContext);
            appContext.put(Constants.CONTEXT_CLASS_LOADER,
                    CocoonWrapper.class.getClassLoader());
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

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.