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.forms.binding;
18:
19: import org.apache.excalibur.source.Source;
20: import org.w3c.dom.Element;
21:
22: /**
23: * BindingManager declares the factory method that produces actual Bindings.
24: *
25: * @version $Id: BindingManager.java 493517 2007-01-06 17:35:37Z joerg $
26: */
27: public interface BindingManager {
28:
29: /**
30: * Avalon Role for this service interface.
31: */
32: String ROLE = BindingManager.class.getName();
33:
34: /**
35: * Constant matching the namespace used for the Binding config files.
36: */
37: String NAMESPACE = "http://apache.org/cocoon/forms/1.0#binding";
38:
39: /**
40: * Creates a binding from the XML config found at source parameter.
41: * The binding will be cached.
42: */
43: Binding createBinding(Source bindingFile) throws BindingException;
44:
45: /**
46: * Creates a binding from the XML config found at bindingURI parameter.
47: * The binding will be cached.
48: */
49: Binding createBinding(String bindingURI) throws BindingException;
50:
51: /**
52: * Creates a binding from the XML config that is supplied as a DOM tree.
53: *
54: * <p>The specified element must be a fb:context element.</p>
55: *
56: * <p>The binding will <b>not</b> be cached.</p>
57: */
58: Binding createBinding(Element bindingElement)
59: throws BindingException;
60:
61: }
|