View Javadoc

1   /*
2    * This file is a part of CAST project.
3    * (c) Copyright 2007, AGH University of Science & Technology
4    * https://caribou.iisg.agh.edu.pl/trac/cast
5    *
6    * Licensed under the Eclipse Public License, Version 1.0 (the "License").
7    * You may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    * http://www.eclipse.org/legal/epl-v10.html
10   */
11  /*
12   * File: IExporter.java
13   * Created: 2007-00-00
14   * Author: kpietak
15   * $Id: IExporter.java 3020 2009-07-17 14:41:19Z kpietak $
16   */
17  
18  package pl.edu.agh.cast.backward.resources;
19  
20  import java.io.File;
21  import java.io.IOException;
22  import java.util.List;
23  
24  import pl.edu.agh.cast.model.visual.backward.IDiagram;
25  
26  /**
27   * Interface for project and diagram exporters, which can save the diagrams list (whole project) or a single diagram in
28   * format which is understandable between different instances and versions of system.
29   *
30   * @author AGH CAST Team
31   */
32  public interface IExporter {
33  
34  	/**
35  	 * Exports list of IDiagram objects to external format and saves the output to specified file.
36  	 *
37  	 * @param projectName
38  	 *            project name
39  	 * @param diagrams
40  	 *            list of IDiagram object to be exported
41  	 * @param file
42  	 *            file where exported data will be saved
43  	 */
44  	public void export(String projectName, List<IDiagram> diagrams, File file) throws IOException;
45  
46  	/**
47  	 * Exports a single IDiagram to external format and saves the output to specified file.
48  	 *
49  	 * @param diagram
50  	 *            diagram to export
51  	 * @param file
52  	 *            file to save data to
53  	 * @throws IOException
54  	 */
55  	public void export(IDiagram diagram, File file) throws IOException;
56  
57  }