01: /*
02: * Copyright 2004 Outerthought bvba and Schaubroeck nv
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: package org.outerj.daisy.tools.importexport.import_.schema;
17:
18: import org.outerj.daisy.repository.ValueType;
19:
20: public interface SchemaLoadListener {
21: void conflictingFieldType(String fieldTypeName,
22: ValueType requiredType, ValueType foundType)
23: throws Exception;
24:
25: /**
26: * Reports that a conflict is found between the multivalue setting of the
27: * currently existing field type and the field type in the import definition
28: * with the same name.
29: *
30: * <p>The implementation may choose to simply log this error and continue, or
31: * throw an exception to interrupt the schema import process.
32: */
33: void conflictingMultiValue(String fieldTypeName,
34: boolean needMultivalue, boolean foundMultivalue)
35: throws Exception;
36:
37: void conflictingHierarchical(String fieldTypeName,
38: boolean needHierarchical, boolean foundHierarchical)
39: throws Exception;
40:
41: void fieldTypeLoaded(String fieldTypeName, SchemaLoadResult result);
42:
43: void partTypeLoaded(String partTypeName, SchemaLoadResult result);
44:
45: void documentTypeLoaded(String documentTypeName,
46: SchemaLoadResult result);
47:
48: void done();
49:
50: /**
51: * If this method returns true, the import will be interrupted by throwing an exception.
52: */
53: boolean isInterrupted();
54: }
|