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.component.Component;
22: import org.apache.cocoon.components.pipeline.ProcessingPipeline;
23: import org.apache.cocoon.environment.Environment;
24:
25: /**
26: *
27: * @author <a href="mailto:pier@apache.org">Pierpaolo Fumagalli</a>
28: * (Apache Software Foundation)
29: * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
30: * @version CVS $Id: Processor.java 433543 2006-08-22 06:22:54Z crossley $
31: */
32: public interface Processor extends Component {
33:
34: String ROLE = Processor.class.getName();
35:
36: /**
37: * Process the given <code>Environment</code> producing the output.
38: * @return If the processing is successfull <code>true</code> is returned.
39: * If no match is found in the sitemap <code>false</code>
40: * is returned.
41: * @throws ResourceNotFoundException If a sitemap component tries
42: * to access a resource which can not
43: * be found, e.g. the generator
44: * ConnectionResetException If the connection was reset
45: */
46: boolean process(Environment environment) throws Exception;
47:
48: /**
49: * Process the given <code>Environment</code> to assemble
50: * a <code>ProcessingPipeline</code>.
51: * @since 2.1
52: */
53: ProcessingPipeline buildPipeline(Environment environment)
54: throws Exception;
55:
56: /**
57: * Get the sitemap component configurations
58: * @since 2.1
59: */
60: Map getComponentConfigurations();
61:
62: /**
63: * Get the root processor parent of this processor.
64: *
65: * @since 2.1.1
66: */
67: Processor getRootProcessor();
68: }
|