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 package com.sun.star.wizards.web.export;
24 
25 import com.sun.star.io.IOException;
26 import com.sun.star.lang.XMultiServiceFactory;
27 import com.sun.star.wizards.ui.event.Task;
28 import com.sun.star.wizards.web.data.*;
29 
30 /**
31  *
32  * @author  rpiterman
33  */
34 public interface Exporter
35 {
36 
37     /**
38      * This method exports a document with a specified filter.<br/>
39      * The method is responsible for exporting the given source document
40      * to the given target directory.
41      * The exporter *must* also set the given CGDocument sizeBytes field to the
42      * size of the converted document, *if* the target document is
43      * of a binary format.
44      * always use source.urlFilename as destination filename.
45      * @param source is a CGDocument object.
46      * @param target contains the URL of a directory to which the
47      * file should be exported to.
48      * @param xmsf this is a basic multiServiceFactory.
49      * @param task - a task monitoring object. This should advance
50      * (call task.advacne(true) ) 3 times, while exporting.
51      *
52      */
export(CGDocument source, String targetDirectory, XMultiServiceFactory xmsf, Task task)53     public boolean export(CGDocument source, String targetDirectory, XMultiServiceFactory xmsf, Task task) throws IOException;
54 
init(CGExporter exporter)55     public void init(CGExporter exporter);
56 }
57 
58