Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.newlayer / org.gvsig.newlayer.lib / org.gvsig.newlayer.lib.api / src / main / java / org / gvsig / newlayer / NewLayerManager.java @ 40560

History | View | Annotate | Download (3.24 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
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 3
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.newlayer;
25

    
26
import java.util.List;
27

    
28
import org.gvsig.fmap.mapcontext.MapContext;
29
import org.gvsig.newlayer.preferences.NewLayerPreferencesComponent;
30
import org.gvsig.tools.service.ServiceException;
31

    
32
/**
33
 * This class is responsible of the management of the library's business logic.
34
 * It is the library's main entry point, and provides all the services to manage
35
 * {@link NewLayerService}s.
36
 * 
37
 * @see NewLayerService
38
 * @author gvSIG team
39
 * @version $Id$
40
 */
41
public interface NewLayerManager {
42

    
43
    public enum STORETYPE{ANY,TABULAR,SPATIAL};
44
    
45

    
46
    /**
47
     * Create an instance of a {@link NewLayerService}.
48
     * @return {@link NewLayerService}
49
     * @throws ServiceException
50
     *             if there is an error getting the service
51
     */
52
    public NewLayerService createNewLayerService(MapContext mapContext);
53
    
54
    public void registerProvider(NewLayerProviderFactory factory);
55
    
56
    public List<NewLayerProviderFactory> getProviders(STORETYPE filter);
57

    
58
    public List<NewLayerProviderFactory> getProviders();
59
    
60
    public NewLayerWizard createNewLayerWizard(NewLayerService service);
61

    
62
    /**
63
     * Returns the provider factory with the given name.
64
     * 
65
     * @param name
66
     *            of the provider
67
     * @return the provider factory
68
     * @throws ServiceException
69
     *             if there is an error getting the provider factory
70
     */
71
    public NewLayerProviderFactory getNewLayerProviderFactory(
72
        String providerName) throws ServiceException;
73

    
74
    /**
75
     * Enables or disables a new layer provider.
76
     * 
77
     * @param factory
78
     *            of the provider to enable or disable
79
     * @param value
80
     *            if the provider must be enabled or disabled
81
     */
82
    public void enableProvider(NewLayerProviderFactory factory, Boolean false1);
83

    
84
    /**
85
     * Creates a preferences component to manage the export to properties.
86
     * 
87
     * @return a preferences component
88
     */
89
    public NewLayerPreferencesComponent createNewLayerProvidersPreferences();
90

    
91
    /**
92
     * Returns if the provider whose factory is provided is enabled.
93
     * 
94
     * @param factory
95
     *            of the provider to check
96
     * @return if the provider whose factory is provided is enabled
97
     */
98
    public boolean isProviderEnabled(NewLayerProviderFactory factory);
99

    
100
}