01: /*
02: * Copyright 2004-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.compass.core.config.binding;
18:
19: import java.io.File;
20: import java.io.InputStream;
21: import java.net.URL;
22:
23: import org.compass.core.config.CompassSettings;
24: import org.compass.core.config.ConfigurationException;
25: import org.compass.core.config.InputStreamMappingResolver;
26: import org.compass.core.mapping.CompassMapping;
27: import org.compass.core.mapping.MappingException;
28: import org.compass.core.mapping.ResourceMapping;
29: import org.compass.core.metadata.CompassMetaData;
30:
31: /**
32: * @author kimchy
33: */
34: public interface MappingBinding {
35:
36: void setUpBinding(CompassMapping mapping, CompassMetaData metaData,
37: CompassSettings settings);
38:
39: boolean addResource(String path) throws ConfigurationException,
40: MappingException;
41:
42: boolean addResource(String path, ClassLoader classLoader)
43: throws ConfigurationException, MappingException;
44:
45: boolean addURL(URL url) throws ConfigurationException,
46: MappingException;
47:
48: boolean addDirectory(File dir) throws ConfigurationException,
49: MappingException;
50:
51: boolean addPackage(String packageName)
52: throws ConfigurationException, MappingException;
53:
54: boolean addJar(File jar) throws ConfigurationException,
55: MappingException;
56:
57: boolean addFile(String filePath) throws ConfigurationException,
58: MappingException;
59:
60: boolean addFile(File file) throws ConfigurationException,
61: MappingException;
62:
63: boolean addClass(Class clazz) throws ConfigurationException,
64: MappingException;
65:
66: boolean addMappingResolver(
67: InputStreamMappingResolver mappingResolver)
68: throws ConfigurationException, MappingException;
69:
70: boolean addInputStream(InputStream is, String resourceName)
71: throws ConfigurationException, MappingException;
72:
73: boolean addResoruceMapping(ResourceMapping resourceMapping)
74: throws ConfigurationException, MappingException;
75: }
|