Statistics
| Revision:

gvsig-webmap / org.gvsig.webmap / trunk / org.gvsig.webmap / org.gvsig.webmap.lib / org.gvsig.webmap.lib.api / src / main / java / org / gvsig / webmap / lib / api / WebMapService.java @ 58

History | View | Annotate | Download (2.5 KB)

1
/* gvSIG. Desktop Geographic Information System.
2
 *
3
 * Copyright ? 2007-2016 gvSIG Association
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 * MA  02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us
21
 * at info AT gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.webmap.lib.api;
24

    
25
import org.gvsig.fmap.dal.DataStoreParameters;
26
import org.gvsig.fmap.dal.exception.InitializeException;
27
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
28
import org.gvsig.fmap.mapcontext.layers.FLayer;
29
import org.gvsig.fmap.mapcontrol.MapControl;
30
import org.gvsig.tools.swing.api.Component;
31
import org.gvsig.webmap.lib.api.exceptions.WebMapInvalidParamsException;
32

    
33
/**
34
 * Services to be added to webmap addlayer
35
 * @author dmartinezizquierdo
36
 *
37
 */
38
public interface WebMapService {
39
    /**
40
     * Label to identify service
41
     * @return String
42
     */
43
    public String getLabel();
44

    
45
    /**
46
     * Componente to require parameters to user and to be added to webmaps tab
47
     * @return Component
48
     */
49
    public Component getParametersPanel();
50

    
51
    /**
52
     * extracts panel parameters to create data store
53
     * @param parametersPanel
54
     * @return DataStoreParameters
55
     * @throws InitializeException
56
     * @throws ProviderNotRegisteredException
57
     */
58
    public DataStoreParameters getParameters() throws InitializeException, ProviderNotRegisteredException;
59

    
60
    /**
61
     * creates the layer to be shown
62
     * @param params
63
     * @return FLayer
64
     */
65
    public FLayer createLayer(DataStoreParameters params);
66

    
67
    /**
68
     * Validates panel parameters
69
     * @param parametersPanel
70
     * @return boolean
71
     * @throws WebMapInvalidParamsException
72
     */
73
    boolean isValid() throws WebMapInvalidParamsException;
74

    
75
    /**
76
     * Sets the mapControl
77
     * @param mapControl
78
     */
79
    void setMapCtrl(MapControl mapControl);
80

    
81
}