Package org.apache.cocoon.components.source

Examples of org.apache.cocoon.components.source.SourceHandler


      throws Exception {
        InvokeContext context = new InvokeContext(pipeline, eventPipeline);

        context.setLogger(getLogger());

        SourceHandler oldSourceHandler = environment.getSourceHandler();
        CocoonComponentManager.enterEnvironment(environment, environment.getObjectModel());
        try {
            environment.setSourceHandler(this.sourceHandler);
            return process(environment, context);
        } finally {
View Full Code Here


    }

    protected boolean process(Environment environment, InvokeContext context)
      throws Exception {

        SourceHandler oldSourceHandler = environment.getSourceHandler();
        CocoonComponentManager.enterEnvironment(environment, environment.getObjectModel());

        try {
            environment.setSourceHandler(this.sourceHandler);
            if (this.rootNode == null || this.source.getLastModified() > this.lastModified) {
View Full Code Here

        synchronized (AbstractComplementaryConfigurableAction.configurations) {
            conf = (ConfigurationHelper) AbstractComplementaryConfigurableAction.configurations.get(descriptor);

            if (reloadable || conf == null) {
                SourceHandler sourceHandler = null;
                Source resource = null;

                try {
                    sourceHandler = (SourceHandler) this.manager.lookup(SourceHandler.ROLE);
                    if (descriptor.startsWith("file:")) {
                        resource = sourceHandler.getSource((Environment)resolver,((Environment)resolver).getContext(), descriptor.substring(5));
                    } else
                        resource = sourceHandler.getSource(null, descriptor);

                    if (conf == null || conf.lastModified < resource.getLastModified()) {
                        getLogger().debug("(Re)Loading " + descriptor);
                        if (conf == null)
                            conf = new ConfigurationHelper();
View Full Code Here

    protected void regenerateAsynchronously(Environment environment) throws Exception {
        if (this.sourceFileName.charAt(this.sourceFileName.length() - 1) == '/') {
            this.sourceFileName = this.sourceFileName + "sitemap.xmap";
        }
        SourceHandler oldSourceHandler = environment.getSourceHandler();
        try {
            environment.setSourceHandler(this.sourceHandler);

            if (this.source != null) this.source.recycle();
            this.source = new DelayedRefreshSourceWrapper(
View Full Code Here

        throwEventualException();
    }

    public boolean process(Environment environment) throws Exception {
        checkSanity();
        SourceHandler oldSourceHandler = environment.getSourceHandler();
        CocoonComponentManager.enterEnvironment(environment, environment.getObjectModel());
        try {
            environment.setSourceHandler(this.sourceHandler);
            return sitemap.process(environment);
        } finally {
View Full Code Here

    }

    public boolean process(Environment environment, StreamPipeline pipeline,
        EventPipeline eventPipeline) throws Exception {
        checkSanity();
        SourceHandler oldSourceHandler = environment.getSourceHandler();
        CocoonComponentManager.enterEnvironment(environment, environment.getObjectModel());
        try {
            environment.setSourceHandler(this.sourceHandler);
            return sitemap.process(environment, pipeline, eventPipeline);
        } finally {
View Full Code Here

     * Process the given <code>Environment</code> to generate the sitemap.
     */
    public void generateSitemap(Environment environment)
    throws Exception {
        ProgramGenerator programGenerator = null;
        SourceHandler oldSourceHandler = environment.getSourceHandler();
        SourceHandler sourceHandler = null;
        try {
            programGenerator = (ProgramGenerator) this.manager.lookup(ProgramGenerator.ROLE);
            sourceHandler = (SourceHandler) this.manager.lookup(SourceHandler.ROLE);
            environment.setSourceHandler(sourceHandler);
            String markupLanguage = "sitemap";
View Full Code Here

    }

    protected boolean process(Environment environment, InvokeContext context)
      throws Exception {

        SourceHandler oldSourceHandler = environment.getSourceHandler();

        try {
            environment.setSourceHandler(this.sourceHandler);
            if (this.rootNode == null || this.source.getLastModified() > this.lastModified) {
                setupRootNode(environment);
View Full Code Here

    private void regenerateAsynchronously(Environment environment) throws Exception {
        if (this.sourceFileName.charAt(this.sourceFileName.length() - 1) == '/') {
            this.sourceFileName = this.sourceFileName + "sitemap.xmap";
        }
        SourceHandler oldSourceHandler = environment.getSourceHandler();
        try {
            environment.setSourceHandler(this.sourceHandler);

            if (this.source != null) {
                this.source.recycle();
View Full Code Here

        throwEventualException();
    }

    public boolean process(Environment environment) throws Exception {
        checkSanity();
        SourceHandler oldSourceHandler = environment.getSourceHandler();
        CocoonComponentManager.enterEnvironment(environment,
                                                environment.getObjectModel(),
                                                this);
        environment.setComponentManager(this.manager);
        try {
View Full Code Here

TOP

Related Classes of org.apache.cocoon.components.source.SourceHandler

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.