Revision 5461

View differences:

org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.main/src/main/resources/README.txt
1
====
2
    gvSIG. Desktop Geographic Information System.
3

  
4
    Copyright (C) 2007-2012 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 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
    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

  
25
Put into this folder the resources needed by your classes.
26

  
27
This folder is added to the classpath, so you can load any resources 
28
through the ClassLoader.
29

  
30
By default, in this folder you can find an example of log4j configuration,
31
prepared to log messages through the console, so logging works when you
32
run your classes.
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.main/src/main/resources/log4j.xml
1
<?xml version="1.0" encoding="ISO-8859-1" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2012 gvSIG Association.
7

  
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public License
10
    as published by the Free Software Foundation; either version 2
11
    of the License, or (at your option) any later version.
12

  
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
28

  
29
<!-- 
30
Log4J configuration file for unit tests execution.
31
 -->
32
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
33

  
34
	<!-- Appender configuration to show logging messages through the console -->
35
	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
36
		<layout class="org.apache.log4j.PatternLayout">
37
			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]  %m%n" />
38
		</layout>
39
	</appender>
40

  
41
	<!-- 
42
	Activate logging messages of DEBUG level of higher only for the
43
	org.gvsig.tools packages.
44
	You can put full classes names or packages instead, to configure
45
	logging for all the classes and subpackages of the package.
46
	-->
47
	<category name="org.gvsig">
48
		<priority value="WARN" />
49
	</category>
50
	<category name="org.cresques">
51
		<priority value="WARN" />
52
	</category>
53

  
54
	<!-- 
55
	By default, show only logging messages of INFO level or higher, 
56
	through the previously configured CONSOLE appender. 
57
	-->
58
	<root>
59
		<priority value="INFO" />
60
		<appender-ref ref="CONSOLE" />
61
	</root>
62
</log4j:configuration>
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.main/src/main/assembly/package-main.xml
1
<assembly>
2

  
3
    <id>package-main</id>
4
    <formats>
5
        <format>dir</format>
6
        <format>zip</format>
7
    </formats>
8

  
9
    <baseDirectory>${project.artifactId}</baseDirectory>
10
    <includeBaseDirectory>false</includeBaseDirectory>
11

  
12
    <files>
13
        <file>
14
            <source>target/${project.artifactId}-${project.version}.jar</source>
15
            <outputDirectory>.</outputDirectory>
16
        </file>
17
    </files>
18

  
19
    <fileSets>
20
        <fileSet>
21
            <directory>src/main/resources/data</directory>
22
            <outputDirectory>data</outputDirectory>
23
        </fileSet>
24
    </fileSets>
25

  
26
    <dependencySets>
27
        <dependencySet>
28
            <useProjectArtifact>false</useProjectArtifact>
29
            <useTransitiveDependencies>true</useTransitiveDependencies>
30
            <outputDirectory>lib</outputDirectory>
31
        </dependencySet>
32
    </dependencySets>
33

  
34
</assembly>
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.main/src/main/java/org/gvsig/vcsgis/main/Main.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright ? 2007-2020 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 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
 * 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.vcsgis.main;
25

  
26
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
27

  
28
/**
29
 * Main executable class of vcsgis tool.
30
 *
31
 * @author gvSIG Team
32
 */
33
public class Main {
34

  
35
    public static void main(String args[]) {
36
        new DefaultLibrariesInitializer().fullInitialize();
37
    }
38

  
39
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.main/pom.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
    <modelVersion>4.0.0</modelVersion>
4
    <artifactId>org.gvsig.vcsgis.main</artifactId>
5
    <packaging>jar</packaging>
6
    <name>${project.artifactId}</name>
7
    <parent>
8
        <groupId>org.gvsig</groupId>
9
        <artifactId>org.gvsig.vcsgis</artifactId>
10
        <version>1.0.0-SNAPSHOT</version>
11
    </parent>
12
  
13
  
14
    <build>
15
        <plugins>
16
            <plugin>
17
                <artifactId>maven-assembly-plugin</artifactId>
18
                <executions>
19
                    <execution>
20
                        <id>package-main</id>
21
                        <phase>package</phase>
22
                        <goals>
23
                            <goal>single</goal>
24
                        </goals>
25
                        <configuration>
26
                            <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
27
                            <appendAssemblyId>false</appendAssemblyId>
28
                            <finalName>${project.artifactId}-${project.version}</finalName>
29
                            <descriptors>
30
                                <descriptor>src/main/assembly/package-main.xml</descriptor>
31
                            </descriptors>
32
                        </configuration>
33
                    </execution>
34
                </executions>
35
            </plugin>
36

  
37
            <plugin>
38
                <groupId>org.apache.maven.plugins</groupId>
39
                <artifactId>maven-jar-plugin</artifactId>
40
                <configuration>
41
                    <archive>
42
                        <manifest>
43
                            <addClasspath>true</addClasspath>
44
                            <mainClass>org.gvsig.vcsgis.main.Main</mainClass>
45
                            <classpathPrefix>lib</classpathPrefix>
46
                        </manifest>
47
                    </archive>
48
                </configuration>
49
            </plugin>
50

  
51
        </plugins>
52

  
53
    </build>
54
  
55
  
56
    <dependencies>
57
        <dependency>
58
            <groupId>org.gvsig</groupId>
59
            <artifactId>org.gvsig.vcsgis.lib.api</artifactId>
60
            <scope>compile</scope>
61
        </dependency>
62
        <dependency>
63
            <groupId>org.gvsig</groupId>
64
            <artifactId>org.gvsig.vcsgis.swing.api</artifactId>
65
            <scope>compile</scope>
66
        </dependency>
67

  
68
        <!-- runtime dependencies -->
69
        <dependency>
70
            <groupId>org.gvsig</groupId>
71
            <artifactId>org.gvsig.vcsgis.lib.impl</artifactId>
72
            <scope>runtime</scope>
73
        </dependency>
74
        <dependency>
75
            <groupId>org.gvsig</groupId>
76
            <artifactId>org.gvsig.vcsgis.swing.impl</artifactId>
77
            <scope>compile</scope>
78
        </dependency>
79
        <dependency>
80
            <groupId>org.gvsig</groupId>
81
            <artifactId>${org.gvsig.metadata.lib.basic.impl}</artifactId>
82
            <scope>runtime</scope>
83
        </dependency>
84
        <dependency>
85
            <groupId>org.gvsig</groupId>
86
            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
87
            <scope>runtime</scope>
88
        </dependency>
89
        <dependency>
90
            <groupId>org.gvsig</groupId>
91
            <artifactId>org.gvsig.fmap.dal.spi</artifactId>
92
            <scope>runtime</scope>
93
        </dependency>
94
        <dependency>
95
            <groupId>org.gvsig</groupId>
96
            <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
97
            <scope>runtime</scope>
98
        </dependency>
99
        <dependency>
100
            <groupId>org.gvsig</groupId>
101
            <artifactId>org.gvsig.fmap.dal.file.shp</artifactId>
102
            <scope>runtime</scope>
103
        </dependency>
104
        <dependency>
105
            <groupId>org.gvsig</groupId>
106
            <artifactId>org.gvsig.fmap.dal.file.dbf</artifactId>
107
            <scope>runtime</scope>
108
        </dependency>
109
        <dependency>
110
            <groupId>org.gvsig</groupId>
111
            <artifactId>org.gvsig.fmap.dal.db.lib</artifactId>
112
            <scope>runtime</scope>
113
        </dependency>
114
        <dependency>
115
            <groupId>org.gvsig</groupId>
116
            <artifactId>org.gvsig.fmap.dal.db.h2</artifactId>
117
            <scope>runtime</scope>
118
        </dependency>
119

  
120
        <dependency>
121
            <groupId>org.gvsig</groupId>
122
            <artifactId>org.gvsig.timesupport.lib.api</artifactId>
123
            <scope>runtime</scope>
124
        </dependency>
125
        <dependency>
126
            <groupId>org.gvsig</groupId>
127
            <artifactId>${org.gvsig.timesupport.lib.impl}</artifactId>
128
            <scope>runtime</scope>
129
        </dependency>
130

  
131
        <dependency>
132
            <groupId>org.gvsig</groupId>
133
            <artifactId>${org.gvsig.compat.impl}</artifactId>
134
            <scope>runtime</scope>
135
        </dependency>
136
        <dependency>
137
            <groupId>org.gvsig</groupId>
138
            <artifactId>${org.gvsig.fmap.geometry.impl}</artifactId>
139
            <scope>runtime</scope>
140
        </dependency>
141

  
142
        <dependency>
143
            <groupId>org.gvsig</groupId>            
144
            <artifactId>${org.gvsig.proj.lib.impl}</artifactId>
145
            <scope>runtime</scope>
146
        </dependency>
147

  
148
        <dependency>
149
            <groupId>org.gvsig</groupId>
150
            <artifactId>org.gvsig.tools.swing.api</artifactId>
151
            <scope>runtime</scope>
152
        </dependency>
153
        <dependency>
154
            <groupId>org.gvsig</groupId>
155
            <artifactId>org.gvsig.tools.swing.impl</artifactId>
156
            <scope>runtime</scope>
157
        </dependency>
158

  
159

  
160
    </dependencies>
161
</project>
0 162

  
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/VCSGisEntityEditable.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. 
18
 * 
19
 * For any additional information, do not hesitate to contact us
20
 * at info AT gvsig.com, or visit our website www.gvsig.com.
21
 */
22
package org.gvsig.vcsgis.lib;
23

  
24
import org.cresques.cts.IProjection;
25
import org.gvsig.json.SupportJson;
26

  
27
/**
28
 *
29
 * @author gvSIG Team
30
 */
31
public interface VCSGisEntityEditable extends VCSGisEntity, SupportJson {
32

  
33
    public VCSGisEntityEditable setEntityCode(String code);
34

  
35
    public VCSGisEntityEditable setRepositoryRevisionCode(String revisionCode);
36

  
37
    public VCSGisEntityEditable setEntityName(String entityName);
38

  
39
    public VCSGisEntityEditable setDataTableName(String dataTableName);
40

  
41
    public VCSGisEntityEditable setGeometryFieldName(String geometryFieldName);
42

  
43
    public VCSGisEntityEditable setFeatureIdFieldName(String featureIdFieldName);
44

  
45
    public VCSGisEntityEditable setDescription(String descripcion);
46

  
47
    public VCSGisEntityEditable setFieldForLabel(String fieldForLabel);
48

  
49
    public VCSGisEntityEditable setFeatureTypeAsJson(String featureType);
50

  
51
    public VCSGisEntityEditable setUserCode(String userCode);
52

  
53
    public VCSGisEntityEditable setTopologyPlanCode(String topologyplanCode);
54

  
55
    public VCSGisEntityEditable setCategory(String category);
56
    
57
    public VCSGisEntityEditable setTopologyPlanMode(int topologyPlanMode);
58
    
59
    public void copyfrom(VCSGisEntity entity);
60
    
61
    public VCSGisEntityEditable setLabel(String label);
62
    
63
    public VCSGisEntityEditable setAuthorizations(String authorizations);
64
    
65
    public VCSGisEntityEditable setResources(String resources);
66

  
67
    public VCSGisEntityEditable setDataModels(String dataModels);
68
    
69
    public VCSGisEntityEditable setCRS(IProjection crs);
70
    
71
    public VCSGisEntityEditable setCRS(String crs);
72
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/server/VCSGisServerUtils.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. 
18
 * 
19
 * For any additional information, do not hesitate to contact us
20
 * at info AT gvsig.com, or visit our website www.gvsig.com.
21
 */
22
package org.gvsig.vcsgis.lib.server;
23

  
24
import java.io.File;
25
import java.io.FileOutputStream;
26
import java.io.InputStream;
27
import java.io.OutputStream;
28
import java.io.Writer;
29
import java.net.URL;
30
import java.util.Objects;
31
import javax.json.JsonObject;
32
import org.apache.commons.io.IOUtils;
33
import org.apache.commons.io.output.NullWriter;
34
import org.gvsig.fmap.dal.DALLocator;
35
import org.gvsig.fmap.dal.DataManager;
36
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
37
import org.gvsig.json.Json;
38
import org.gvsig.json.JsonObjectBuilder;
39
import org.gvsig.tools.util.URLUtils;
40
import org.slf4j.Logger;
41
import org.slf4j.LoggerFactory;
42

  
43
/**
44
 *
45
 * @author gvSIG Team
46
 */
47
@SuppressWarnings("UseSpecificCatch")
48
public class VCSGisServerUtils {
49
    private static final Logger LOGGER = LoggerFactory.getLogger(VCSGisServerUtils.class);
50

  
51
    private static Writer consoleWriter = new NullWriter();
52

  
53
    private static JsonObject config = null;
54
    
55
    public static void setConsoleWriter(Writer console) {
56
        consoleWriter = console;
57
    }
58

  
59
    public static Writer getConsoleWriter() {
60
        return consoleWriter;
61
    }
62
    
63
    public static JsonObject getConfiguration() {
64
            return config;
65
    }
66
    
67
    public static void setConfiguration(JsonObject theConfig) {
68
        config = theConfig;
69
    }
70
    
71
    public static void setConfiguration(URL config_url) {
72
        InputStream config_is = null;
73
        try {
74
            config_is = config_url.openStream();
75
            JsonObject theConfig = Json.createObject(config_is);
76
            setConfiguration(theConfig);
77
        } catch (Exception ex) {
78
            LOGGER.warn("Can't set configuration file (url="+Objects.toString(config_url)+").",ex);
79
        } finally {
80
            IOUtils.closeQuietly(config_is);
81
        }
82
    }
83
    
84
    public static void writeConfiguration(URL config_url) {
85
        if( config == null ) {
86
            LOGGER.warn("Can't write configuration to null url.");
87
            return;
88
        }
89
        OutputStream os = null;
90
        try {
91
            File f = URLUtils.toFile(config_url);
92
            os = new FileOutputStream(f);
93
            IOUtils.write(config.toString(), os);
94
        } catch(Exception ex) {
95
            LOGGER.warn("Can't write configuration to "+Objects.toString(config_url)+" url.", ex);
96
        } finally {
97
            IOUtils.closeQuietly(os);
98
        }
99
    }
100
    
101
    public static void setConnectionParameters(JDBCServerExplorerParameters connectionParameters) {
102
        JsonObjectBuilder config_builder = Json.createObjectBuilder(config);
103
        config_builder.add("ConnectionParameters", connectionParameters);
104
        config = config_builder.build();
105
    }
106
    
107
    public static JDBCServerExplorerParameters getConnectionParameters(JsonObject config) {
108
        try {
109
            DataManager dataManager = DALLocator.getDataManager();
110
            
111
            JsonObject connectionParameters_json = config.getJsonObject("ConnectionParameters");
112
            
113
            JDBCServerExplorerParameters connectionParameters = (JDBCServerExplorerParameters) dataManager.createServerExplorerParameters(
114
                    connectionParameters_json.getString("ProviderName")
115
            );
116
            connectionParameters.fromJson(connectionParameters_json);
117
            return connectionParameters;
118
        } catch (Exception ex) {
119
            LOGGER.warn("Can't create connection parameters.",ex);
120
            return null;
121
        }
122
        
123
    }
124
    
125
    public static void console_writeln(String s) {
126
        try {
127
            consoleWriter.write(s);
128
            consoleWriter.write("\n");
129
        } catch (Exception ex) {
130
            LOGGER.info(s);
131
        }
132
    }
133
        
134
    
135
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/server/VCSGisServerController.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. 
18
 * 
19
 * For any additional information, do not hesitate to contact us
20
 * at info AT gvsig.com, or visit our website www.gvsig.com.
21
 */
22
package org.gvsig.vcsgis.lib.server;
23

  
24
import org.gvsig.tools.dispose.Disposable;
25
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
26

  
27
/**
28
 *
29
 * @author jjdelcerro
30
 */
31
public interface VCSGisServerController extends Disposable {
32

  
33
    public VCSGisRepository getRepository();
34
    
35
    public VCSGisServerHandler createEntitiesHandler();
36

  
37
    public VCSGisServerHandler createListWCHandler();
38

  
39
    public VCSGisServerHandler createPrepareWCHandler();
40

  
41
    public VCSGisServerHandler createCommitHandler();
42
   
43
    public VCSGisServerHandler createCheckoutHandler();
44

  
45
    public VCSGisServerHandler createHistoryHandler();
46
    
47
    public VCSGisServerHandler createUpdateHandler();
48
    
49
    public VCSGisServerHandler createRowCreateHandler();
50
    
51
    public VCSGisServerHandler createRowUpdateHandler();
52
    
53
    public VCSGisServerHandler createRowDeleteHandler();
54
    
55
    public VCSGisServerHandler createRowIsOutofdateHandler();
56
    
57
    public VCSGisServerHandler createUsersHandler();
58

  
59
    public VCSGisServerHandler createTopologyPlansHandler();
60

  
61
    public VCSGisServerHandler createAuthenticateHandler();
62

  
63
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/server/VCSGisServerHandler.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. 
18
 * 
19
 * For any additional information, do not hesitate to contact us
20
 * at info AT gvsig.com, or visit our website www.gvsig.com.
21
 */
22
package org.gvsig.vcsgis.lib.server;
23

  
24
import java.io.InputStream;
25
import java.io.Writer;
26
import java.util.Map;
27

  
28
/**
29
 *
30
 * @author gvSIG Team
31
 */
32
public interface VCSGisServerHandler {
33

  
34
    public void handle(Writer console, Map<String,String> params, InputStream request_contents, Writer response_contents) throws Exception;
35

  
36
    
37
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/SupportError.java
1
package org.gvsig.vcsgis.lib;
2

  
3
/**
4
 *
5
 * @author jjdelcerro
6
 */
7
public interface SupportError {
8

  
9
    void cleanLastError();
10

  
11
    int error(int code);
12

  
13
    int error(int code, String message);
14

  
15
    int getLastErrorCode();
16

  
17
    String getLastErrorMessage();
18
    
19
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/UserCancelledException.java
1
package org.gvsig.vcsgis.lib;
2

  
3
/**
4
 *
5
 * @author jjdelcerro
6
 */
7
public class UserCancelledException extends RuntimeException {
8
    public UserCancelledException() {
9
        super("User cancelled.");
10
    }
11
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/VCSGisManager.java
1
package org.gvsig.vcsgis.lib;
2

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

  
26
import java.io.File;
27
import java.net.URL;
28
import java.util.List;
29
import java.util.Map;
30
import javax.servlet.http.HttpServlet;
31
import org.cresques.cts.IProjection;
32
import org.gvsig.fmap.dal.feature.FeatureStore;
33
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
34
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
35
import org.gvsig.tools.dynobject.DynObjectValueItem;
36
import org.gvsig.tools.task.SimpleTaskStatus;
37
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
38
import org.gvsig.vcsgis.lib.server.VCSGisServerController;
39
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
40
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceDescriptor;
41

  
42

  
43
/**
44
 * @author gvSIG Teamn
45
 *
46
 */
47
public interface VCSGisManager {
48

  
49
    public static final int ERR_OK = 0;
50
    public static final int ERR_NO_ERROR = ERR_OK;
51
    public static final int ERR_DBFILE_IS_NULL = 1;
52
    public static final int ERR_WSEXPLORER_IS_NULL = 2;
53
    public static final int ERR_CANT_OPEN_WORKSPACE = 3;
54
    public static final int ERR_CANT_OPEN_WORKSPACE_SERVEREXPLORER = 4;
55
    public static final int ERR_STORE_NOT_IN_VERSION_CONTROL = 5;
56
    public static final int ERR_LABEL_IS_NULL = 6;
57
    public static final int ERR_CANT_EXECUTE_REQUEST = 7;
58
    public static final int ERR_CANT_BUILD_REQUEST_RESPONSE = 8;
59
    public static final int ERR_CANT_BUILD_REQUEST = 9;
60
    public static final int ERR_CANT_HANDLE_REQUEST = 10;
61
    public static final int ERR_CANT_INITIALIZE_REPOSITORY = 11;
62
    public static final int ERR_CANT_CONSUME_RESPONSE = 12;
63
    public static final int ERR_INVALID_DATA = 13;
64
    public static final int ERR_INVALID_REPOSITORY = 14;
65
    public static final int ERR_INVALID_REVISION = 15;
66
    public static final int ERR_INVALID_REVISION_FOR_ENTITY = 16;
67
    public static final int ERR_CANCELLED_BY_USER = 17;
68
    public static final int ERR_CANT_ADD_LAYER = 18;
69
    public static final int ERR_CANT_AUTHENTICATE_USER = 19;
70
    public static final int ERR_INVALID_AUTHENTICATION_TOKEN = 20;
71
    public static final int ERR_USER_NOT_AUTHORIZED = 21;
72
    public static final int ERR_AUTHENTICATION_EXPIRED = 22;
73
    public static final int ERR_INVALID_USERCODE = 23;
74
    public static final int ERR_INVALID_PARAMETERS = 24;
75
    public static final int ERR_EXCEPTION = 25;
76

  
77
    public static final int ERR_CANT_RETRIEVE_USERS = 30;
78
    public static final int ERR_CANT_RETRIEVE_TOPOLOGYPLANS = 31;
79
    public static final int ERR_TOPOLOGYPLAN_REQUIRED = 32;
80
    public static final int ERR_TOPOLOGYPLAN_OUTDATED = 33;
81
    
82
    public static final int ERR_INVALID_RECORDCODE = 34;
83
    public static final int ERR_DATA_RECORD_NOT_FOUND = 35;
84
    
85
    
86
    public static final int ERR_CANT_CREATE_TABLE = 100;
87
    public static final int ERR_CANT_CREATE_TABLE_CONFIG = 110;
88
    public static final int ERR_CANT_CREATE_TABLE_ENTITIES = 120;
89
    public static final int ERR_CANT_CREATE_TABLE_CHANGES = 130;
90
    
91
    public static final int ERR_ENTITY_ALREADY_EXISTS = 200;
92
    public static final int ERR_ENTITY_NOT_HAS_VCSGISCODE = 210;
93
    public static final int ERR_CANT_OPEN_ENTITIES = 220;
94
    public static final int ERR_CANT_INSERT_ENTITIES = 230;
95
    public static final int ERR_ENTITY_NOT_EXISTS = 240;
96
    public static final int ERR_CANT_RETRIEVE_ENTITIES = 250;
97
    public static final int ERR_CANT_ADD_ENTITY_WITHOUT_PRIMARY_KEY = 260;
98
    public static final int ERR_CANT_ADD_TABLE = 270;
99
    public static final int ERR_CANT_REMOVE_ENTITY = 280;
100
    
101
    public static final int ERR_CANT_OPEN_CHANGES = 300;
102
    public static final int ERR_CANT_INSERT_CHANGE = 310;
103
    public static final int ERR_CANT_ADD_CHANGE = 320;
104
    public static final int ERR_CANT_REMOVE_CHANGES = 330;
105

  
106
    public static final int ERR_CANT_OPEN_STORE = 400;
107
    public static final int ERR_CANT_RETRIEVE_SOURCE_FEATURES = 410;
108
    public static final int ERR_CANT_INSERT_FEATURES = 420;
109

  
110
    public static final int ERR_CANT_COMMIT = 500;
111
    public static final int ERR_CANT_COMMIT_WORKSPACE_OUTDATED = 510;
112
    public static final int ERR_CANT_COMMIT_WITH_FEATURE_CODE_BLANK = 520;
113

  
114
    public static final int ERR_CANT_CHECKOUT = 600;
115
    
116
    public static final int ERR_CANT_REVERT = 700;
117
    
118
    public static final int ERR_CANT_UPDATE_ENTITIES = 70;
119

  
120
    public static final int ERR_CANT_UPDATE = 80;
121
    public static final int ERR_CANT_PREPARE_UPDATE = 81;
122
    public static final int ERR_UPDATE_NEED_MERGE = 82;
123
    public static final int ERR_CANT_UPDATE_CLEAN = 83;
124
    public static final int ERR_CANT_MERGE = 84;
125
    public static final int ERR_CANNOT_UPDATE_TABLE_THAT_NOT_EXIST = 85;
126
    
127
    public static final int ERR_CANT_PREPARE_WORKSPACE = 800;
128
    public static final int ERR_REPOSITORY_URL_NOT_DEFINED = 801;
129
    public static final int ERR_WORKING_COPIES_FOLDER_NOT_DEFINED = 802;
130
    
131
    public static final int ERR_CANT_EXPORT = 900;
132
    
133
    public static final int ERR_USER_CANCELLED = 10000;
134
    
135
    public static final int STATE_UNKNOWN = 0; 
136
    public static final int STATE_LOCAL_UNMODIFIED = 1;
137
    public static final int STATE_LOCAL_NEW = 2;
138
    public static final int STATE_LOCAL_MODIFIED = 4;
139
    public static final int STATE_LOCAL_OUTDATED = 6;
140
    public static final int STATE_LOCAL_OUTDATED_AND_MODIFIED = 8;
141
    public static final int STATE_CONFLICT = 16;
142
    public static final int STATE_REPOSITORY_NEW = 32;
143
    public static final int STATE_NOT_IN_LOCAL_OR_REPOSITORY = 64;
144
    public static final int STATE_REPOSITORY_MODIFIED = STATE_LOCAL_OUTDATED;
145
    
146
    // Repository and workspace operations
147
    public static final int OP_UNKNOWN = -1;
148
    public static final int OP_DELETE = 0;
149
    public static final int OP_UPDATE = 1;
150
    public static final int OP_INSERT = 2;
151

  
152
    //Only workspace operations
153
    public static final int OP_ADD_ENTITY = 3;
154
    public static final int OP_IGNORE = 4;
155

  
156
    public static final int TOPOLOGYPLAN_UNKNOWN = 0;
157
    public static final int TOPOLOGYPLAN_PASSED = 1;
158
    public static final int TOPOLOGYPLAN_NOTPASSED = 2;
159
    
160
    public static final int TOPOLOGYPLAN_MODE_RECOMMENDED = 0;
161
    public static final int TOPOLOGYPLAN_MODE_MANDATORY = 1;
162
    
163
    public static final String DEFAULT_DATA_TABLE = "VCSGISREPO_DATA";
164
    public static final String FEATURECODE_FIELD_NAME = "VCSGISCODE";
165
    
166
    public static final int VCSGISCODELEN = 60;
167

  
168
    
169
    public static final String TAG_VCSGIS_LABEL = "vcsgis.label";
170
    public static final String TAG_VCSGIS_DATAMODEL = "vcsgis.datamodel";
171
    public static final String TAG_VCSGIS_CATEGORY = "vcsgis.category";
172
    public static final String TAG_VCSGIS_FIELDFORLABEL = "vcsgis.fieldforlabel";
173
    public static final String TAG_VCSGIS_RESOURCES = "vcsgis.resources";
174
    
175
    
176
    public static final String GUEST_USER_CODE = "00000000000000000000000000000000000000";
177
    
178
    public static final String DEFAULT_REPOSITORY_CRS = "EPSG:25830";
179
    
180
    public void clean();
181
    
182
    /**
183
     * Initializes a workspace in the indicated database with the indicated 
184
     * label and associates it with the indicated repository.
185
     * 
186
     * It fails if a workspace is already created in that database.
187
     * 
188
     * A code will be assigned to the workspace automatically.
189
     * 
190
     * @param database in which to initialize the workspace.
191
     * @param repository to associate the workspace with.
192
     * @param label repository to associate the workspace with.
193
     * @param status
194
     * @return a error code.
195
     */
196
    public int initWorkspace(JDBCServerExplorer database, VCSGisRepository repository, String label, SimpleTaskStatus status);
197

  
198
    /**
199
     * Initializes a workspace in the H2 database associated with the 
200
     * indicated file with the indicated label and associating it with 
201
     * the indicated repository.
202
     * 
203
     * It fails if a workspace is already created in that database.
204
     * 
205
     * A code will be assigned to the workspace automatically.
206
     * 
207
     * @param dbfile file associated with database H2 in which to initialize the workspace.
208
     * @param repository to associate the workspace with.
209
     * @param label repository to associate the workspace with.
210
     * @param status
211
     * @return a error code.
212
     */
213
    public int initWorkspace(File dbfile, VCSGisRepository repository, String label, SimpleTaskStatus status);
214

  
215
    public VCSGisWorkspace openWorkspace(JDBCServerExplorer workspace);
216
    
217
    public VCSGisWorkspace openWorkspace(File wsfile);
218

  
219
    /**
220
     * Return a Map with the workspace descriptors registered in this manager.
221
     * 
222
     * The Map is indexed by the code of the workspace.
223
     * 
224
     * If the manager has not any workspace registered, return a empty Map.
225
     * 
226
     * @return the Map with the registered workspace descriptors.
227
     */
228
    public Map<String, VCSGisWorkspaceDescriptor> getWorkspaces();
229
    
230
    /**
231
     * Register a VCSGis-workspace in this manager.
232
     * 
233
     * @param workspace to register
234
     */
235
    public void registerWorkspace(VCSGisWorkspace workspace);
236

  
237
    /**
238
     * Deregister the VCSGis-workspace of this manager.
239
     * 
240
     * @param workspace to deregister
241
     */
242
    public void deregisterWorkspace(VCSGisWorkspace workspace);
243
    public void deregisterWorkspace(String workspaceCode);
244

  
245
    /**
246
     * Replace the current registered workspaces by the indicaded as the Map
247
     * of parameters in this manager.
248
     * 
249
     * If descriptors is null, remove al registered workspaces in this manager.
250
     * 
251
     * This method is designed to support the persistence of this manager's workspaces.
252
     * 
253
     * @param descriptors 
254
     */
255
    public void restoreWorkspaces(Map<String, VCSGisWorkspaceDescriptor> descriptors);
256
    
257
    /**
258
     * Returns the workspace associated with the store.
259
     * 
260
     * If the store is not associated with any registered workspace, it returns null.
261
     * 
262
     * The method can add properties to the store to optimize future invocations.
263
     * 
264
     * @param store
265
     * 
266
     * @return the workspace of the store or null.
267
     */
268
    public VCSGisWorkspace getWorkspace(FeatureStore store);
269
    
270
    /**
271
     * Return true if the file is a database of H2 that contains a VCSGis-workspace,
272
     * otherwise return false.
273
     * 
274
     * @param dbfile
275
     * @return 
276
     */
277
    public boolean isWorkspace(File dbfile);
278
    
279
    /**
280
     * Return true if the explorer parameters reference a database that contains a VCSGis-workspace,
281
     * otherwise return false.
282
     * 
283
     * @param params
284
     * @return 
285
     */
286
    public boolean isWorkspace(JDBCServerExplorerParameters params);
287

  
288
    public boolean isRepository(JDBCServerExplorerParameters params);
289

  
290
    public VCSGisWorkspaceDescriptor getWorkspaceDescriptor(String code);
291

  
292
    public int initRepository(JDBCServerExplorerParameters repositoryParameters, IProjection crs, SimpleTaskStatus status);
293
    
294
    public int initRepository(JDBCServerExplorerParameters repositoryParameters, SimpleTaskStatus status);
295
    
296
    public VCSGisRepository openRepository(JDBCServerExplorerParameters repositoryParameters);
297
    
298
    public VCSGisRepository openRepository(URL repository);
299
    
300
    public VCSGisServerController createServerController(VCSGisRepository repository);
301

  
302
    public void setCodeGenerator(VCSGisCodeGenerator generator);
303
    
304
    public VCSGisCodeGenerator getCodeGenerator();
305
    
306
    public String getErrorMessage(int errcode);
307
    
308
    public void setUserIdentificationRequester(VCSGisUserIdentificationRequester userIdentificationRequester);
309
    
310
    public VCSGisUserIdentificationRequester getUserIdentificationRequester();
311

  
312
    public VCSGisTopologyPlanStatus createTopologyPlanStatus(String topologyPlanCode, String hashCode, boolean passed);
313
    
314
    public Class<? extends HttpServlet>  getServletClass(String name);
315

  
316
    public List<VCSGisPreparedWorkingCopyInformation> getPreparedWorkingCopyInformation(URL server);
317

  
318
    public List<VCSGisPreparedWorkingCopyInformation> getPreparedWorkingCopyInformation(JDBCServerExplorerParameters repositoryParameters);
319

  
320
    public int preparedWorkingCopy(URL server, String name, String label, String categories, String username, String userpass);
321
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/VCSGisEntity.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. 
18
 * 
19
 * For any additional information, do not hesitate to contact us
20
 * at info AT gvsig.com, or visit our website www.gvsig.com.
21
 */
22
package org.gvsig.vcsgis.lib;
23

  
24
import java.util.List;
25
import org.cresques.cts.IProjection;
26
import org.gvsig.fmap.dal.feature.FeatureType;
27
import org.gvsig.json.SupportToJson;
28
import org.gvsig.tools.util.LabeledValue;
29

  
30
/**
31
 *
32
 * @author gvSIG Team
33
 */
34
public interface VCSGisEntity extends LabeledValue<VCSGisEntity>, SupportToJson {
35

  
36
    public String getEntityCode();
37

  
38
    public String getRepositoryRevisionCode();
39

  
40
    public String getEntityName();
41

  
42
    public String getDataTableName();
43

  
44
    public String getGeometryFieldName();
45

  
46
    public String getFeatureIdFieldName();
47

  
48
    public String getDescription();
49

  
50
    public String getFieldForLabel();
51

  
52
    public FeatureType getFeatureType();
53

  
54
    public String getFeatureTypeAsJson();
55

  
56
    public String getUserCode();
57

  
58
    public String getTopologyPlanCode();
59

  
60
    public String getCategory();
61

  
62
    /**
63
     * Return a list of string with the categories associted to this entity.
64
     * If this entity has not categories, return an enity list.
65
     * 
66
     * @return list of categories, empty if not has categories
67
     */
68
    public List<String> getCategoriesAsList();
69
    
70
    public String getFirstCategory();
71
    
72
    public String getAuthorizations();
73

  
74
    public int getTopologyPlanMode();
75

  
76
    public void copyto(VCSGisEntityEditable entity);
77
    
78
    @Override
79
    public String getLabel();
80
    
81
    public String getLabelOrName();
82
    
83
    public boolean isAuthorized(VCSGisUser user, String operation);
84
    
85
    public String getResources();
86
    
87
    public String getDataModels();
88
    
89
    public List<String> getDataModelsAsList();
90
    
91
    public String getCRS();
92
    
93
    public IProjection getCRSAsProjection();
94
    
95
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/VCSGisUser.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. 
18
 * 
19
 * For any additional information, do not hesitate to contact us
20
 * at info AT gvsig.com, or visit our website www.gvsig.com.
21
 */
22
package org.gvsig.vcsgis.lib;
23

  
24
import java.util.List;
25
import org.gvsig.json.SupportJson;
26

  
27
/**
28
 *
29
 * @author gvSIG Team
30
 */
31
public interface VCSGisUser extends SupportJson {
32

  
33
    public static final String ROLE_CHECKOUT = "checkout";
34
    public static final String ROLE_COMMIT = "commit";
35
    public static final String ROLE_ENTITIES = "entities";
36
    public static final String ROLE_HISTORY = "history";
37
    public static final String ROLE_UPDATE = "update";
38
    public static final String ROLE_USERS = "users";
39
    public static final String ROLE_ROWCREATE = "rowcreate";
40
    public static final String ROLE_ROWUPDATE = "rowupdate";
41
    public static final String ROLE_ROWDELETE = "rowdelete";
42
    
43
    public String getUserCode();
44

  
45
    public String getDescription();
46

  
47
    public String getIdentifier();
48

  
49
    public String getAllowedOperations();
50
    
51
    public List<String> getAllowedOperationsAsList();
52
    
53
    public boolean isAllowedOperation(String operation);
54

  
55
    public String getRoles();
56
    
57
    public List<String> getRolesAsList();
58
    
59
    public void copyFrom(VCSGisUser other);
60
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/repository/VCSGisRepositoryLocaldb.java
1
/*
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6
package org.gvsig.vcsgis.lib.repository;
7

  
8
import org.cresques.cts.IProjection;
9
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
10

  
11
/**
12
 *
13
 * @author fdiaz
14
 */
15
public interface VCSGisRepositoryLocaldb extends VCSGisRepository {
16
    
17
    public JDBCServerExplorer getServerExplorer();
18
 
19
    public IProjection getCRS();
20

  
21
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/repository/VCSGisRepositoryChange.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. 
18
 * 
19
 * For any additional information, do not hesitate to contact us
20
 * at info AT gvsig.com, or visit our website www.gvsig.com.
21
 */
22
package org.gvsig.vcsgis.lib.repository;
23

  
24
import java.sql.Timestamp;
25
import org.gvsig.fmap.geom.Geometry;
26
import org.gvsig.vcsgis.lib.VCSGisChange;
27

  
28
/**
29
 *
30
 * @author gvSIG Team
31
 */
32
public interface VCSGisRepositoryChange extends VCSGisChange {
33

  
34
    public String getRequestCode();
35

  
36
    public String getRevisionCode();
37

  
38
    public long getRevisionNumber();
39
    
40
    public Timestamp getEfectiveDate();
41
            
42
    public Geometry getGeometry();
43
    
44
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/repository/VCSGisRepositoryData.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. 
18
 * 
19
 * For any additional information, do not hesitate to contact us
20
 * at info AT gvsig.com, or visit our website www.gvsig.com.
21
 */
22
package org.gvsig.vcsgis.lib.repository;
23

  
24
import java.sql.Timestamp;
25
import javax.json.JsonObject;
26
import org.gvsig.json.SupportToJson;
27

  
28
/**
29
 *
30
 * @author gvSIG Team
31
 */
32
public interface VCSGisRepositoryData extends SupportToJson {
33

  
34
    public String getDataCode();
35

  
36
    public String getEntityCode();
37
    
38
    public String getFeatureRelatedCode();
39

  
40
    public String getRevisionCode();
41

  
42
    public int getOperation();
43

  
44
    public int getRevisionNumber();
45

  
46
    public Timestamp getEfectiveDate();
47

  
48
    /**
49
     * The feature coded as JSon.
50
     * @return
51
     */
52
    public String getData();
53

  
54
    public JsonObject getDataAsJson();
55
    
56
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/repository/requests/VCSGisRowCreateRequest.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. 
18
 * 
19
 * For any additional information, do not hesitate to contact us
20
 * at info AT gvsig.com, or visit our website www.gvsig.com.
21
 */
22

  
23
package org.gvsig.vcsgis.lib.repository.requests;
24

  
25
import java.sql.Timestamp;
26
import org.gvsig.vcsgis.lib.VCSGisEntityEditable;
27

  
28
/**
29
 *
30
 * @author gvSIG Team
31
 */
32
public interface VCSGisRowCreateRequest extends VCSGisRequest {
33

  
34
    // in
35
    public String getEntityName();
36
    public String getLocalRevisionCode();
37

  
38
    public Timestamp getEfectiveDate();
39
    public void setEfectiveDate(Timestamp efectiveDate);
40
    public void setEfectiveDate(String efectiveDate);
41

  
42
    public String getComment();
43
    public void setComment(String comment);
44
    
45
    public String getData();
46
    public void setData(String data);
47
    
48
    // out
49
    public String getEntityCode();
50
    public String getEntityRevisionCode();
51
    
52
    public String getRelatedFeatureCode();
53
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/repository/requests/VCSGisAuthenticateRequest.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. 
18
 * 
19
 * For any additional information, do not hesitate to contact us
20
 * at info AT gvsig.com, or visit our website www.gvsig.com.
21
 */
22
package org.gvsig.vcsgis.lib.repository.requests;
23

  
24
/**
25
 *
26
 * @author gvSIG Team
27
 */
28
public interface VCSGisAuthenticateRequest extends VCSGisRequest {
29

  
30
    public String getUserId();
31
    
32
    public String getPassword();
33
    
34
    public void setUserId(String id);
35
    
36
    public void setPassword(String password);
37
    
38
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.45/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/repository/requests/VCSGisRowIsOutofdateRequest.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2020 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, see <https://www.gnu.org/licenses/>. 
18
 * 
19
 * For any additional information, do not hesitate to contact us
20
 * at info AT gvsig.com, or visit our website www.gvsig.com.
21
 */
22

  
23
package org.gvsig.vcsgis.lib.repository.requests;
24

  
25
/**
26
 *
27
 * @author gvSIG Team
28
 */
29
public interface VCSGisRowIsOutofdateRequest extends VCSGisRequest {
30

  
31
    // in
32
    public String getEntityName();
33
    public String getLocalRevisionCode();
34
    public String getRecordCode();
35
    
36
    // out
37
    public boolean isOutdated();
38
}
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff