Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / org.gvsig.exportto / org.gvsig.exportto.swing / org.gvsig.exportto.swing.spi / src / main / java / org / gvsig / exportto / swing / spi / ExporttoSwingProviderManager.java @ 37779

History | View | Annotate | Download (3.48 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 * 
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 * 
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 * 
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
 * MA  02110-1301, USA.
20
 * 
21
 */
22
package org.gvsig.exportto.swing.spi;
23

    
24
import java.util.List;
25

    
26
import javax.print.attribute.standard.OutputDeviceAssigned;
27

    
28
import org.cresques.cts.IProjection;
29

    
30
import org.gvsig.exportto.swing.ExporttoSwingManager;
31
import org.gvsig.fmap.dal.feature.FeatureSet;
32
import org.gvsig.fmap.dal.feature.FeatureStore;
33
import org.gvsig.fmap.dal.feature.FeatureType;
34
import org.gvsig.tools.service.ServiceException;
35
import org.gvsig.tools.service.spi.ProviderManager;
36

    
37
/**
38
 * Responsible of the management of the providers business logic.
39
 * 
40
 * @see ExporttoSwingProvider
41
 * @author gvSIG Team
42
 * @version $Id$
43
 */
44
public interface ExporttoSwingProviderManager extends ProviderManager {
45

    
46
    /**
47
     * @return
48
     *          the list of providers that has been registered.
49
     */
50
    public List<String> getProviderNames();
51

    
52
    /**
53
     * Returns a list of providers that support all the 
54
     * provider types.
55
     * @param
56
     *           a list of provider types, that are constants 
57
     *           defined in the {@link ExporttoSwingManager}.
58
     * @return
59
     *          the list of providers that has been registered.
60
     */
61
    public List<String> getProviderNames(int[] providerTypes);
62

    
63
    /**
64
     * Returns the description for a concrete provider
65
     * @param providerName
66
     *      the exportto provider.
67
     * @return
68
     *      the description of the provider.
69
     */
70
    public String getDescription(String providerName);
71

    
72
    /**
73
     * Return if a provider supports a data type.
74
     * @param providerName
75
     *      the provider name.
76
     * @param providerType
77
     *      the provider type. One of the constants defined in the
78
     *      {@link ExporttoSwingManager}.
79
     * @return
80
     *      if the provider supports a dataType.
81
     * @throws ServiceException 
82
     */
83
    public boolean support(String providerName, int providerType) throws ServiceException;
84

    
85
    /**
86
     * Creates a {@link ExporttoSwingProvider} that is used to export a {@link FeatureSet}.
87
     * @param providerName
88
     *          the name of the provider that has to be created.
89
     * @param featureStore
90
     *          the source feature store. It can be used to fix some parameters like the
91
     *          {@link FeatureType} of the destination {@link FeatureStore}.
92
     * @param projection
93
     *          the projection of the {@link OutputDeviceAssigned} store.
94
     * @return
95
     *          a provider that has to be used to export a {@link FeatureSet}.     
96
     */
97
    public ExporttoSwingProvider createExporttoSwingProvider(String providerName, FeatureStore featureStore, IProjection projection) throws ServiceException;
98

    
99
}