1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 package org.openoffice.xmerge;
25 
26 /**
27  *  <p>All plug-in implementations of the <code>PluginFactory</code>
28  *  interface that also support merging must also implement
29  *  this interface.</p>
30  *
31  *  <p>Merge is useful when an <code>OfficeDocument</code>
32  *  is converted to a &quot;Device&quot; <code>Document</code> format,
33  *  and the &quot;Device&quot; <code>Document</code> version is modified.
34  *  Those changes can be merged back into the original
35  *  <code>OfficeDocument</code> with the merger.  The merger is capable
36  *  of doing this even if the &quot;Device&quot; format is lossy in
37  *  comparison to the <code>OfficeDocument</code> format.</p>
38  *
39  *  @see  PluginFactory
40  *  @see  DocumentMerger
41  *  @see  ConverterCapabilities
42  *
43  */
44 public interface DocumentMergerFactory {
45 
46     /**
47      *  <p>Create a <code>DocumentMerger</code> object given a
48      *  <code>Document</code> object.</p>
49      *
50      *  @param  doc  <code>Document</code> object that the created
51      *               <code>DocumentMerger</code> object uses as a base
52      *               <code>Document</code> for merging changes into.
53      *
54      *  @return  A <code>DocumentMerger</code> object or null if none
55      *           exists.
56      */
createDocumentMerger(Document doc)57     public DocumentMerger createDocumentMerger(Document doc);
58 }
59 
60