Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / org.gvsig.newlayer / org.gvsig.newlayer.lib / org.gvsig.newlayer.lib.api / src / main / java / org / gvsig / newlayer / NewLayerManager.java @ 37891

History | View | Annotate | Download (3.19 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.newlayer;
23

    
24
import java.util.List;
25

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

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

    
41
    public enum STORETYPE{ANY,TABULAR,SPATIAL};
42
    
43

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

    
56
    public List<NewLayerProviderFactory> getProviders();
57
    
58
    public NewLayerWizard createNewLayerWizard(NewLayerService service);
59

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

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

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

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

    
98
}