01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon;
18:
19: import java.util.Map;
20:
21: import org.apache.avalon.framework.activity.Disposable;
22: import org.apache.avalon.framework.component.Component;
23: import org.apache.avalon.framework.thread.ThreadSafe;
24: import org.apache.cocoon.components.pipeline.ProcessingPipeline;
25: import org.apache.cocoon.environment.Environment;
26:
27: /**
28: * This class is a wrapper around the real processor (the <code>Cocoon</code> class).
29: * It is necessary to avoid infinite dispose loops
30: * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
31: * @deprecated This class is not used anymore and will be removed with 2.2
32: * @version CVS $Id: ProcessorWrapper.java 433543 2006-08-22 06:22:54Z crossley $
33: */
34: public final class ProcessorWrapper implements Processor, Component,
35: Disposable, ThreadSafe {
36:
37: private Processor processor;
38:
39: public void dispose() {
40: this .processor = null;
41: }
42:
43: public ProcessorWrapper(Processor processor) {
44: this .processor = processor;
45: }
46:
47: /**
48: * Process the given <code>Environment</code> producing the output
49: */
50: public boolean process(Environment environment) throws Exception {
51: return this .processor.process(environment);
52: }
53:
54: /**
55: * Process the given <code>Environment</code> to assemble
56: * a <code>ProcessingPipeline</code>.
57: * @since 2.1
58: */
59: public ProcessingPipeline buildPipeline(Environment environment)
60: throws Exception {
61: return this .processor.buildPipeline(environment);
62: }
63:
64: /**
65: * Get the sitemap component configurations
66: * @since 2.1
67: */
68: public Map getComponentConfigurations() {
69: return this .processor.getComponentConfigurations();
70: }
71:
72: /**
73: * Get the root parent processor of this processor
74: * @since 2.1.1
75: */
76: public Processor getRootProcessor() {
77: return this.processor.getRootProcessor();
78: }
79:
80: }
|