Revision 2741

View differences:

org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/vcsgis.java
1
package org.gvsig.vcsgis.lib;
2

  
3
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
4
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
5
import java.io.File;
6
import org.gvsig.tools.task.SimpleTaskStatus;
7
import org.gvsig.vcsgis.lib.VCSGisLocator;
8
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
9

  
10
/**
11
 *
12
 * @author gvSIG Team
13
 */
14
public class vcsgis {
15
    public static int init_workspace(File wsfile,  VCSGisRepository server, String label, SimpleTaskStatus status) {
16
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
17
        return manager.initWorkspace(wsfile, server, label, status);
18
    }
19
    
20
    public static int init_workspace(File wsfile, VCSGisRepository server, String label) {
21
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
22
        return manager.initWorkspace(wsfile, server, label, null);
23
    }
24
    
25
    public static VCSGisWorkspace open_workspace(File wsfile) {
26
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
27
        return manager.openWorkspace(wsfile);
28
    }
29
    
30
}
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test06AddCommit.java
8 8
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
9 9
import org.gvsig.tools.dispose.DisposeUtils;
10 10
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
11
import org.gvsig.vcsgis.lib.workspace.tables.WorkspaceChangesTable;
12
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
13
import org.gvsig.vcsgis.lib.vcsgis;
11
import org.gvsig.vcsgis.lib.VCSGisLocator;
12
import org.gvsig.vcsgis.lib.VCSGisManager;
14 13
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
15
import org.gvsig.vcsgis.lib.vcsgisadmin;
16 14
import org.gvsig.vcsgis.lib.repository.localdb.VCSGisRepositoryLocaldb;
17 15
import org.gvsig.vcsgis.lib.repository.localdb.tables.DataRepoTable;
16
import org.gvsig.vcsgis.lib.vcsgisadmin;
17
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
18
import org.gvsig.vcsgis.lib.workspace.tables.WorkspaceChangesTable;
18 19
import org.slf4j.Logger;
19 20
import org.slf4j.LoggerFactory;
20 21

  
......
54 55
        VCSGisRepository repo = vcsgisadmin.open_repository(server);
55 56
        TestUtils.h2sql_repository(repo);
56 57
        
57
        
58
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
59

  
58 60
        // ---------------------------------------------------------
59 61
        // Creamos un workspace y lo abrimos.
60
        r = vcsgis.init_workspace(wsfile, repo, "Test add and commit");
62
        r = manager.initWorkspace(wsfile, repo, "Test add and commit",null);
61 63
        assertEquals("ws-init status", 0, r);
62 64
        
63
        VCSGisWorkspace ws = vcsgis.open_workspace(wsfile);
65
        VCSGisWorkspace ws = manager.openWorkspace(wsfile);
64 66
        TestUtils.h2sql_workspace(ws);
65 67
        
66 68
        // ---------------------------------------------------------
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test04AddEntity.java
4 4
import junit.framework.TestCase;
5 5
import static junit.framework.TestCase.assertEquals;
6 6
import org.apache.commons.io.FileUtils;
7
import org.gvsig.vcsgis.lib.vcsgis;
8
import org.gvsig.vcsgis.lib.vcsgisadmin;
9 7
import org.gvsig.fmap.dal.feature.FeatureStore;
10 8
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
11 9
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
10
import org.gvsig.vcsgis.lib.VCSGisLocator;
11
import org.gvsig.vcsgis.lib.VCSGisManager;
12
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
13
import org.gvsig.vcsgis.lib.vcsgisadmin;
14
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
12 15
import org.slf4j.Logger;
13 16
import org.slf4j.LoggerFactory;
14
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
15
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
16 17

  
17 18
public class Test04AddEntity extends TestCase {
18 19

  
......
37 38
    // public void testHello() {}
38 39
    
39 40
    public void testAdd_entity1() throws Exception {
41
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
40 42
        JDBCServerExplorer server = TestUtils.openServerExplorer("srv-adde");
41 43
        File wsfile = TestUtils.getFile(FileUtils.getFile("test-dbs","ws-adde")); 
42 44

  
......
46 48
        VCSGisRepository repo = vcsgisadmin.open_repository(server);
47 49
        TestUtils.h2sql_repository(repo);
48 50
        
49
        r = vcsgis.init_workspace(wsfile, repo, "Test add entity");
51
        r = manager.initWorkspace(wsfile, repo, "Test add entity", null);
50 52
        assertEquals("ws-init status", 0, r);
51 53
        
52
        VCSGisWorkspace ws = vcsgis.open_workspace(wsfile);
54
        VCSGisWorkspace ws = manager.openWorkspace(wsfile);
53 55
        TestUtils.h2sql_workspace(ws);
54 56
        
55 57
        FeatureStore sourceStore = TestUtils.openSourceStore1();
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test08Update.java
15 15
import org.gvsig.tools.dispose.DisposeUtils;
16 16
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
17 17
import org.gvsig.vcsgis.lib.VCSGisEntity;
18
import org.gvsig.vcsgis.lib.VCSGisLocator;
19
import org.gvsig.vcsgis.lib.VCSGisManager;
18 20
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_NO_ERROR;
19 21
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
20 22
import org.gvsig.vcsgis.lib.repository.VCSGisRepositoryChange;
21
import org.gvsig.vcsgis.lib.vcsgis;
22 23
import org.gvsig.vcsgis.lib.vcsgisadmin;
23 24
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
24 25
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceChanges;
......
48 49
    // public void testHello() {}
49 50

  
50 51
    public void testUpdate() throws Exception {
52
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
51 53
        JDBCServerExplorer server = TestUtils.openServerExplorer("srv-update");
52 54
        File ws1file = TestUtils.getFile(FileUtils.getFile("test-dbs","ws1-update")); 
53 55
        File ws2file = TestUtils.getFile(FileUtils.getFile("test-dbs","ws2-update")); 
......
69 71

  
70 72
        // ------------------------------------------------------------
71 73
        // Creamos workspace1 y lo abrimos.
72
        r = vcsgis.init_workspace(ws1file, repo, "Test update1");
74
        r = manager.initWorkspace(ws1file, repo, "Test update1",null);
73 75
        assertEquals("init_ws1 status", ERR_NO_ERROR, r);
74 76
        
75
        VCSGisWorkspace ws1 = vcsgis.open_workspace(ws1file);
77
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
76 78
        TestUtils.h2sql_workspace(ws1);
77 79

  
78 80
        // ------------------------------------------------------------
......
88 90
        // ------------------------------------------------------------
89 91
        // Inicializamos el workspace2 asociandolo al mismo repositorio que 
90 92
        // workspace1 y lo abrimos.
91
        r = vcsgis.init_workspace(ws2file, repo, "Test update2");
93
        r = manager.initWorkspace(ws2file, repo, "Test update2",null);
92 94
        assertEquals("init_ws2 status", ERR_NO_ERROR, r);
93
        VCSGisWorkspace ws2 = vcsgis.open_workspace(ws2file);
95
        VCSGisWorkspace ws2 = manager.openWorkspace(ws2file);
94 96
        TestUtils.h2sql_workspace(ws2);
95 97
        
96 98
        // ------------------------------------------------------------
......
304 306
    }
305 307

  
306 308
    public void testUpdate2() throws Exception {
309
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
307 310
        JDBCServerExplorer server = TestUtils.openServerExplorer("srv-update");
308 311
        File ws1file = TestUtils.getFile(FileUtils.getFile("test-dbs","ws1-update")); 
309 312
        File ws2file = TestUtils.getFile(FileUtils.getFile("test-dbs","ws2-update")); 
......
325 328

  
326 329
        // ------------------------------------------------------------
327 330
        // Creamos workspace1 y lo abrimos.
328
        r = vcsgis.init_workspace(ws1file, repo, "Test update1");
331
        r = manager.initWorkspace(ws1file, repo, "Test update1",null);
329 332
        assertEquals("init_ws1 status", ERR_NO_ERROR, r);
330 333
        
331
        VCSGisWorkspace ws1 = vcsgis.open_workspace(ws1file);
334
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
332 335
        TestUtils.h2sql_workspace(ws1);
333 336

  
334 337
        // ------------------------------------------------------------
......
390 393
        // ------------------------------------------------------------
391 394
        // Inicializamos el workspace2 asociandolo al mismo repositorio que 
392 395
        // workspace1 y lo abrimos.
393
        r = vcsgis.init_workspace(ws2file, repo, "Test update2");
396
        r = manager.initWorkspace(ws2file, repo, "Test update2",null);
394 397
        assertEquals("init_ws2 status", ERR_NO_ERROR, r);
395
        VCSGisWorkspace ws2 = vcsgis.open_workspace(ws2file);
398
        VCSGisWorkspace ws2 = manager.openWorkspace(ws2file);
396 399
        TestUtils.h2sql_workspace(ws2);
397 400
        
398 401
        
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test09CommitOutdated.java
18 18
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_CANT_COMMIT_WORKSPACE_OUTDATED;
19 19
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_NO_ERROR;
20 20
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
21
import org.gvsig.vcsgis.lib.vcsgis;
22 21
import org.gvsig.vcsgis.lib.vcsgisadmin;
23 22
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
24 23
import org.slf4j.Logger;
......
72 71

  
73 72
        // ------------------------------------------------------------
74 73
        // Creamos workspace1 y lo abrimos.
75
        r = vcsgis.init_workspace(ws1file, repo, "Test update1");
74
        r = manager.initWorkspace(ws1file, repo, "Test update1",null);
76 75
        assertEquals("init_ws1 status", ERR_NO_ERROR, r);
77 76
        
78
        VCSGisWorkspace ws1 = vcsgis.open_workspace(ws1file);
77
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
79 78
        TestUtils.h2sql_workspace(ws1);
80 79

  
81 80
        // ------------------------------------------------------------
......
91 90
        // ------------------------------------------------------------
92 91
        // Inicializamos el workspace2 asociandolo al mismo repositorio que 
93 92
        // workspace1 y lo abrimos.
94
        r = vcsgis.init_workspace(ws2file, repo, "Test update2");
93
        r = manager.initWorkspace(ws2file, repo, "Test update2",null);
95 94
        assertEquals("init_ws2 status", ERR_NO_ERROR, r);
96
        VCSGisWorkspace ws2 = vcsgis.open_workspace(ws2file);
95
        VCSGisWorkspace ws2 = manager.openWorkspace(ws2file);
97 96
        TestUtils.h2sql_workspace(ws2);
98 97
        
99 98
        // ------------------------------------------------------------
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test12Commit.java
12 12
import org.gvsig.tools.dispose.DisposeUtils;
13 13
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
14 14
import org.gvsig.tools.util.GetItemWithSize64;
15
import org.gvsig.vcsgis.lib.VCSGisLocator;
16
import org.gvsig.vcsgis.lib.VCSGisManager;
15 17
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_NO_ERROR;
16 18
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
17
import org.gvsig.vcsgis.lib.vcsgis;
18 19
import org.gvsig.vcsgis.lib.vcsgisadmin;
19 20
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
20 21
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceChange;
......
44 45
    // public void testHello() {}
45 46

  
46 47
    public void testCommit() throws Exception {
48
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
47 49
        JDBCServerExplorer server = TestUtils.openServerExplorer("srv-update");
48 50
        File ws1file = TestUtils.getFile(FileUtils.getFile("test-dbs","ws1-update")); 
49 51
        
......
63 65

  
64 66
        // ------------------------------------------------------------
65 67
        // Creamos workspace1 y lo abrimos.
66
        r = vcsgis.init_workspace(ws1file, repo, "Test update1");
68
        r = manager.initWorkspace(ws1file, repo, "Test update1",null);
67 69
        assertEquals("init_ws1 status", ERR_NO_ERROR, r);
68 70
        
69
        VCSGisWorkspace ws1 = vcsgis.open_workspace(ws1file);
71
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
70 72
        TestUtils.h2sql_workspace(ws1);
71 73

  
72 74
        // ------------------------------------------------------------
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test07Checkout.java
10 10
import org.gvsig.tools.dispose.DisposeUtils;
11 11
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
12 12
import org.gvsig.vcsgis.lib.VCSGisEntity;
13
import org.gvsig.vcsgis.lib.VCSGisLocator;
14
import org.gvsig.vcsgis.lib.VCSGisManager;
13 15
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_ENTITY_ALREADY_EXISTS;
14 16
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_NO_ERROR;
15 17
import static org.gvsig.vcsgis.lib.VCSGisManager.STATE_UNMODIFIED;
16 18
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
17
import org.gvsig.vcsgis.lib.vcsgis;
18 19
import org.gvsig.vcsgis.lib.vcsgisadmin;
19 20
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
20 21
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceEntity;
......
46 47
    // public void testHello() {}
47 48

  
48 49
    public void testCheckout() throws Exception {
50
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
49 51
        JDBCServerExplorer server = TestUtils.openServerExplorer("srv-checkout");
50 52
        File ws1file = TestUtils.getFile(FileUtils.getFile("test-dbs","ws-addcheckout1")); 
51 53
        File ws2file = TestUtils.getFile(FileUtils.getFile("test-dbs","ws-addcheckout2")); 
......
56 58
        VCSGisRepository repo = vcsgisadmin.open_repository(server);
57 59
        TestUtils.h2sql_repository(repo);
58 60

  
59
        r = vcsgis.init_workspace(ws1file, repo, "Test checkout1");
61
        r = manager.initWorkspace(ws1file, repo, "Test checkout1",null);
60 62
        assertEquals("vcsgis.init_workspace1 status", ERR_NO_ERROR, r);
61 63
        
62
        VCSGisWorkspace ws1 = vcsgis.open_workspace(ws1file);
64
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
63 65
        assertNotNull("vcsgis.open_workspace1 status", ws1);
64 66
        TestUtils.h2sql_workspace(ws1);
65 67

  
......
69 71
        ws1.commit();
70 72
        assertEquals("ws1.commit status", ERR_NO_ERROR, r);
71 73
        
72
        r = vcsgis.init_workspace(ws2file, repo, "Test checkout2");
74
        r = manager.initWorkspace(ws2file, repo, "Test checkout2",null);
73 75
        assertEquals("vcsgis.init_workspace2 status", ERR_NO_ERROR, r);
74
        VCSGisWorkspace ws2 = vcsgis.open_workspace(ws2file);
76
        VCSGisWorkspace ws2 = manager.openWorkspace(ws2file);
75 77
        assertNotNull("vcsgis.open_workspace2 status", ws2);
76 78
        TestUtils.h2sql_workspace(ws2);
77 79
        
......
92 94
    }
93 95

  
94 96
    public void testCheckout2() throws Exception {
97
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
95 98
        JDBCServerExplorer server = TestUtils.openServerExplorer("srv-checkout");
96 99
        File ws1file = TestUtils.getFile(FileUtils.getFile("test-dbs","ws-addcheckout1")); 
97 100
        File ws2file = TestUtils.getFile(FileUtils.getFile("test-dbs","ws-addcheckout2")); 
......
102 105
        VCSGisRepository repo = vcsgisadmin.open_repository(server);
103 106
        TestUtils.h2sql_repository(repo);
104 107

  
105
        r = vcsgis.init_workspace(ws1file, repo, "Test checkout1");
108
        r = manager.initWorkspace(ws1file, repo, "Test checkout1",null);
106 109
        assertEquals("vcsgis.init_workspace1 status", ERR_NO_ERROR, r);
107 110
        
108
        VCSGisWorkspace ws1 = vcsgis.open_workspace(ws1file);
111
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
109 112
        assertNotNull("vcsgis.open_workspace1 status", ws1);
110 113
        TestUtils.h2sql_workspace(ws1);
111 114

  
......
120 123
        r = ws1.commit();
121 124
        assertEquals("ws1.commit status", ERR_NO_ERROR, r);
122 125
        
123
        r = vcsgis.init_workspace(ws2file, repo, "Test checkout2");
126
        r = manager.initWorkspace(ws2file, repo, "Test checkout2",null);
124 127
        assertEquals("vcsgis.init_workspace2 status", ERR_NO_ERROR, r);
125
        VCSGisWorkspace ws2 = vcsgis.open_workspace(ws2file);
128
        VCSGisWorkspace ws2 = manager.openWorkspace(ws2file);
126 129
        assertNotNull("vcsgis.open_workspace2 status", ws2);
127 130
        TestUtils.h2sql_workspace(ws2);
128 131
        
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test05Add.java
4 4
import junit.framework.TestCase;
5 5
import static junit.framework.TestCase.assertEquals;
6 6
import org.apache.commons.io.FileUtils;
7
import org.gvsig.vcsgis.lib.workspace.tables.WorkspaceChangesTable;
8
import org.gvsig.vcsgis.lib.vcsgis;
9 7
import org.gvsig.fmap.dal.feature.FeatureStore;
8
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
10 9
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
10
import org.gvsig.vcsgis.lib.VCSGisLocator;
11
import org.gvsig.vcsgis.lib.VCSGisManager;
12
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
13
import org.gvsig.vcsgis.lib.vcsgisadmin;
14
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
15
import org.gvsig.vcsgis.lib.workspace.tables.WorkspaceChangesTable;
11 16
import org.slf4j.Logger;
12 17
import org.slf4j.LoggerFactory;
13
import org.gvsig.vcsgis.lib.vcsgisadmin;
14
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
15
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
16
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
17 18

  
18 19
public class Test05Add extends TestCase {
19 20

  
......
38 39
    // public void testHello() {}
39 40
    
40 41
    public void testAdd() throws Exception {
42
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
43

  
41 44
        JDBCServerExplorer server = TestUtils.openServerExplorer("srv-add");
42 45
        File wsfile = TestUtils.getFile(FileUtils.getFile("test-dbs","ws-add")); 
43 46

  
......
47 50
        VCSGisRepository repo = vcsgisadmin.open_repository(server);
48 51
        TestUtils.h2sql_repository(repo);
49 52
        
50
        r = vcsgis.init_workspace(wsfile, repo, "Test add");
53
        r = manager.initWorkspace(wsfile, repo, "Test add",null);
51 54
        assertEquals("ws-init status", 0, r);
52 55
        
53
        VCSGisWorkspace ws = vcsgis.open_workspace(wsfile);
56
        VCSGisWorkspace ws = manager.openWorkspace(wsfile);
54 57
        TestUtils.h2sql_workspace(ws);
55 58
        
56 59
        FeatureStore sourceStore = TestUtils.openSourceStore1();
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test10UpdateLocalModified.java
18 18
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_CANT_COMMIT_WORKSPACE_OUTDATED;
19 19
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_NO_ERROR;
20 20
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
21
import org.gvsig.vcsgis.lib.vcsgis;
22 21
import org.gvsig.vcsgis.lib.vcsgisadmin;
23 22
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
24 23
import org.slf4j.Logger;
......
78 77

  
79 78
        // ------------------------------------------------------------
80 79
        // Creamos workspace1 y lo abrimos.
81
        r = vcsgis.init_workspace(ws1file, repo, "Ws1: Test update local modified");
80
        r = manager.initWorkspace(ws1file, repo, "Ws1: Test update local modified", null);
82 81
        assertEquals("init_ws1 status", ERR_NO_ERROR, r);
83 82
        
84
        VCSGisWorkspace ws1 = vcsgis.open_workspace(ws1file);
83
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
85 84
        TestUtils.h2sql_workspace(ws1);
86 85

  
87 86
        // ------------------------------------------------------------
......
97 96
        // ------------------------------------------------------------
98 97
        // Inicializamos el workspace2 asociandolo al mismo repositorio que 
99 98
        // workspace1 y lo abrimos.
100
        r = vcsgis.init_workspace(ws2file, repo, "Ws2: Test update local modified");
99
        r = manager.initWorkspace(ws2file, repo, "Ws2: Test update local modified", null);
101 100
        assertEquals("init_ws2 status", ERR_NO_ERROR, r);
102
        VCSGisWorkspace ws2 = vcsgis.open_workspace(ws2file);
101
        VCSGisWorkspace ws2 = manager.openWorkspace(ws2file);
103 102
        TestUtils.h2sql_workspace(ws2);
104 103
        
105 104
        // ------------------------------------------------------------
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test13Merge.java
24 24
import static org.gvsig.vcsgis.lib.VCSGisManager.OP_INSERT;
25 25
import static org.gvsig.vcsgis.lib.VCSGisManager.OP_UPDATE;
26 26
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
27
import org.gvsig.vcsgis.lib.vcsgis;
28 27
import org.gvsig.vcsgis.lib.vcsgisadmin;
29 28
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
30 29
import org.gvsig.vcsgis.lib.workspace.tables.RemoteChangesTable;
......
143 142

  
144 143
        // ------------------------------------------------------------
145 144
        // Creamos workspace1 y lo abrimos.
146
        r = vcsgis.init_workspace(ws1file, repo, "Test update1");
145
        r = manager.initWorkspace(ws1file, repo, "Test update1", null);
147 146
        assertEquals("init_ws1 status", ERR_NO_ERROR, r);
148 147
        
149
        VCSGisWorkspace ws1 = vcsgis.open_workspace(ws1file);
148
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
150 149
        TestUtils.h2sql_workspace(ws1);
151 150

  
152 151
        // ------------------------------------------------------------
......
171 170
        // ------------------------------------------------------------
172 171
        // Inicializamos el workspace2 asociandolo al mismo repositorio que 
173 172
        // workspace1 y lo abrimos.
174
        r = vcsgis.init_workspace(ws2file, repo, "Test update2");
173
        r = manager.initWorkspace(ws2file, repo, "Test update2",null);
175 174
        assertEquals("init_ws2 status", ERR_NO_ERROR, r);
176
        VCSGisWorkspace ws2 = vcsgis.open_workspace(ws2file);
175
        VCSGisWorkspace ws2 = manager.openWorkspace(ws2file);
177 176
        TestUtils.h2sql_workspace(ws2);
178 177
        
179 178
        ws2.checkout("test");
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test03GetWorkspaces.java
10 10
import org.gvsig.vcsgis.lib.VCSGisLocator;
11 11
import org.gvsig.vcsgis.lib.VCSGisManager;
12 12
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
13
import org.gvsig.vcsgis.lib.vcsgis;
14 13
import org.gvsig.vcsgis.lib.vcsgisadmin;
15 14
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
16 15
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceDescriptor;
......
55 54
        VCSGisRepository repo = vcsgisadmin.open_repository(server);
56 55
        TestUtils.h2sql_repository(repo);
57 56

  
58
        vcsgis.init_workspace(ws1file, repo, "Test getWorkspaces1");
59
        VCSGisWorkspace ws1 = vcsgis.open_workspace(ws1file);
57
        manager.initWorkspace(ws1file, repo, "Test getWorkspaces1",null);
58
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
60 59
        TestUtils.h2sql_workspace(ws1);
61 60
        
62
        vcsgis.init_workspace(ws2file, repo, "Test getWorkspaces2");        
63
        VCSGisWorkspace ws2 = vcsgis.open_workspace(ws2file);
61
        manager.initWorkspace(ws2file, repo, "Test getWorkspaces2",null);        
62
        VCSGisWorkspace ws2 = manager.openWorkspace(ws2file);
64 63
        TestUtils.h2sql_workspace(ws2);
65 64

  
66 65
        workspaces = manager.getWorkspaces();
......
85 84
        VCSGisRepository repo = vcsgisadmin.open_repository(server);
86 85
        TestUtils.h2sql_repository(repo);
87 86

  
88
        vcsgis.init_workspace(ws1file, repo, "Test getWorkspaces1");
89
        VCSGisWorkspace ws1 = vcsgis.open_workspace(ws1file);
87
        manager.initWorkspace(ws1file, repo, "Test getWorkspaces1",null);
88
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
90 89
        TestUtils.h2sql_workspace(ws1);
91 90
        
92 91
        VCSGisWorkspaceDescriptor ws1Descriptor = manager.getWorkspaceDescriptor(ws1.getCode());
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test11GetLocalChanges.java
12 12
import org.gvsig.tools.dispose.DisposeUtils;
13 13
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
14 14
import org.gvsig.tools.util.GetItemWithSize64;
15
import org.gvsig.vcsgis.lib.VCSGisLocator;
15 16
import org.gvsig.vcsgis.lib.VCSGisManager;
16 17
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_NO_ERROR;
17 18
import static org.gvsig.vcsgis.lib.VCSGisManager.OP_DELETE;
18 19
import static org.gvsig.vcsgis.lib.VCSGisManager.OP_INSERT;
19 20
import static org.gvsig.vcsgis.lib.VCSGisManager.OP_UPDATE;
20 21
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
21
import org.gvsig.vcsgis.lib.vcsgis;
22 22
import org.gvsig.vcsgis.lib.vcsgisadmin;
23 23
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
24 24
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceChange;
......
49 49
    // public void testHello() {}
50 50

  
51 51
    public void testUpdate() throws Exception {
52
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
53

  
52 54
        JDBCServerExplorer server = TestUtils.openServerExplorer("srv-update");
53 55
        File ws1file = TestUtils.getFile(FileUtils.getFile("test-dbs","ws1-update")); 
54 56
        
......
68 70

  
69 71
        // ------------------------------------------------------------
70 72
        // Creamos workspace1 y lo abrimos.
71
        r = vcsgis.init_workspace(ws1file, repo, "Test update1");
73
        r = manager.initWorkspace(ws1file, repo, "Test update1",null);
72 74
        assertEquals("init_ws1 status", ERR_NO_ERROR, r);
73 75
        
74
        VCSGisWorkspace ws1 = vcsgis.open_workspace(ws1file);
76
        VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
75 77
        TestUtils.h2sql_workspace(ws1);
76 78

  
77 79
        // ------------------------------------------------------------
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.server/org.gvsig.vcsgis.server.lib/src/test/java/org/gvsig/vcsgis/server/lib/TestSrv01AddCommit.java
8 8
import org.eclipse.jetty.server.Server;
9 9
import org.gvsig.fmap.dal.feature.FeatureStore;
10 10
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
11
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
12 11
import org.gvsig.tools.dispose.DisposeUtils;
13 12
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
14 13
import org.gvsig.vcsgis.lib.VCSGisEntity;
15 14
import org.gvsig.vcsgis.lib.VCSGisLocator;
16 15
import org.gvsig.vcsgis.lib.VCSGisManager;
17
import org.gvsig.vcsgis.lib.workspace.tables.WorkspaceChangesTable;
18
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
19
import org.gvsig.vcsgis.lib.vcsgis;
20 16
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
21
import org.gvsig.vcsgis.lib.vcsgisadmin;
22 17
import org.gvsig.vcsgis.lib.repository.localdb.VCSGisRepositoryLocaldb;
23 18
import org.gvsig.vcsgis.lib.repository.localdb.tables.DataRepoTable;
19
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
24 20
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceEntity;
25
import org.gvsig.vcsgis.server.lib.VCSGisServerUtils;
26 21
import static org.gvsig.vcsgis.server.lib.VCSGisServerUtils.SERVER_PORT;
27 22
import org.slf4j.Logger;
28 23
import org.slf4j.LoggerFactory;
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/initworkspace/VCSGisJInitWorkspaceImpl.java
31 31
import java.net.URL;
32 32
import javax.swing.JComponent;
33 33
import javax.swing.event.ChangeEvent;
34
import javax.swing.event.ChangeListener;
35 34
import org.apache.commons.io.FilenameUtils;
36 35
import org.apache.commons.lang3.StringUtils;
37
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
38
import org.gvsig.vcsgis.lib.vcsgis;
39
import org.gvsig.vcsgis.swing.VCSGisJInitWorkspace;
40 36
import org.gvsig.fmap.dal.DALLocator;
41 37
import org.gvsig.fmap.dal.DataManager;
42 38
import org.gvsig.fmap.dal.exception.InitializeException;
......
56 52
import org.gvsig.tools.swing.api.pickercontroller.PickerController;
57 53
import org.gvsig.tools.swing.api.windowmanager.Dialog;
58 54
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2;
55
import org.gvsig.vcsgis.lib.VCSGisLocator;
56
import org.gvsig.vcsgis.lib.VCSGisManager;
57
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_NO_ERROR;
58
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
59 59
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
60
import org.gvsig.vcsgis.lib.vcsgisadmin;
60
import org.gvsig.vcsgis.swing.VCSGisJInitWorkspace;
61 61
import org.slf4j.LoggerFactory;
62 62

  
63 63
/**
......
74 74
    private PickerController<JDBCServerExplorerParameters> repositoryServerPicker;
75 75
    private JDBCServerExplorer repositoryServer;
76 76
    private VCSGisRepository repository;
77
    private JDBCServerExplorer workspaceServer;
77 78
    
78 79
    private FilePickerController workspaceFilePicker;
79 80
    private PickerController<JDBCServerExplorerParameters> workspaceServerPicker;
......
91 92
                this.cboWorkspaceConnection,
92 93
                this.btnWorkspaceConnection
93 94
        );
95
        this.workspaceServerPicker.addChangeListener((ChangeEvent e) -> {
96
            workspaceServer = null;
97
            
98
            if (StringUtils.isBlank(this.txtName.getText())) {
99
                JDBCServerExplorerParameters server = this.workspaceServerPicker.get();
100
                this.txtName.setText(server.getDBName());
101
            }
102
            doUpdateEnableComponents();
103
        });
94 104
        this.repositoryServerPicker = DALSwingLocator.getSwingManager().createJDBCConnectionPickerController(
95 105
                this.cboRepositoryConnection,
96 106
                this.btnRepositoryConnection
......
128 138
        
129 139
        this.rdbRepositoryDatabaseServer.addActionListener((ActionEvent e) -> {
130 140
            if(rdbRepositoryDatabaseServer.isSelected()){
131
                cboRepositoryConnection.setEnabled(true);
132
                btnRepositoryConnection.setEnabled(true);
141
                repositoryServerPicker.setEnabled(true);
133 142
                txtRepositoryServiceURL.setEnabled(false);
143
                txtRepositoryServiceURL.setEditable(false);
134 144
                doUpdateEnableComponents();
135 145
            }
136 146
        });
137 147
        
138 148
        this.rdbRepositoryService.addActionListener((ActionEvent e) -> {
139 149
            if(rdbRepositoryService.isSelected()){
140
                cboRepositoryConnection.setEnabled(false);
141
                btnRepositoryConnection.setEnabled(false);
142
                //FIXME: Set to true when implemented
143
                txtRepositoryServiceURL.setEnabled(false);
150
                repositoryServerPicker.setEnabled(false);
151
                txtRepositoryServiceURL.setEnabled(true);
152
                txtRepositoryServiceURL.setEditable(true);
144 153
                doUpdateEnableComponents();
145 154
            }
146 155
        });
......
161 170
            }
162 171
        });
163 172

  
173
        this.rdbWorkspacePersonalDatabase.addActionListener((ActionEvent e) -> {
174
            if(rdbWorkspacePersonalDatabase.isSelected()){
175
                workspaceFilePicker.setEnabled(true);
176
                chkCreateConnectionToDatabase.setEnabled(true);
177
                workspaceServerPicker.setEnabled(false);
178
                doUpdateEnableComponents();
179
            }
180
        });
181
        
182
        this.rdbWorkspaceServerDatabase.addActionListener((ActionEvent e) -> {
183
            if(rdbWorkspaceServerDatabase.isSelected()){
184
                workspaceFilePicker.setEnabled(false);
185
                chkCreateConnectionToDatabase.setEnabled(false);
186
                workspaceServerPicker.setEnabled(true);
187
                doUpdateEnableComponents();
188
            }
189
        });
190

  
191

  
164 192
        this.setPreferredSize(
165 193
                new Dimension(520, 320)
166 194
        );
......
178 206
        boolean enableInit = (
179 207
                ((rdbRepositoryDatabaseServer.isSelected() && getRepository() != null) || 
180 208
                 (rdbRepositoryService.isSelected() && this.getRepositoryURL() != null))
181
                && this.getWorkspaceFile() != null
209
                &&
210
                ((rdbWorkspacePersonalDatabase.isSelected() && this.getWorkspaceFile() != null) ||
211
                 (rdbWorkspaceServerDatabase.isSelected() && this.getWorkspaceServer() != null))
182 212
                && StringUtils.isNotBlank(this.txtName.getText()));
183 213
        
184 214
        if (dialog != null) {
......
210 240
        swingManager.translate(this.rdbWorkspaceServerDatabase);
211 241
    }
212 242
    
213
    @Override
214
    public JDBCServerExplorerParameters getRepositoryConnection() {
243
//    @Override
244
    private JDBCServerExplorerParameters getRepositoryConnection() {
215 245
        if(rdbRepositoryDatabaseServer.isEnabled() && repositoryServerPicker.isEnabled()){
216 246
            return this.repositoryServerPicker.get();
217 247
        }
218 248
        return null;
219 249
    }
220 250
    
221
    @Override
222
    public URL getRepositoryURL() {
251
//    @Override
252
    private URL getRepositoryURL() {
223 253
        if(rdbRepositoryService.isEnabled() && txtRepositoryServiceURL.isEnabled()){
224 254
            String value = this.txtRepositoryServiceURL.getText();
225 255

  
......
238 268
        return null;
239 269
    }
240 270

  
241
    @Override
242
    public File getWorkspaceFile() {
271
//    @Override
272
    private File getWorkspaceFile() {
243 273
        File file = this.workspaceFilePicker.get();
244 274
        return file;
245 275
    }
246 276

  
247 277
    @Override
248 278
    public int initializeWorkspace() {
249
        File file = this.getWorkspaceFile();
250
        if (file != null) {
251
            if(rdbRepositoryDatabaseServer.isSelected()){
252
                VCSGisRepository theRepository = getRepository();
253
                if (theRepository != null) {
254
                    return vcsgis.init_workspace(file, theRepository, getName());
279
        VCSGisManager manager = VCSGisLocator.getVCSGisManager();
280
        VCSGisRepository theRepository = getRepository();
281
        int err = ERR_NO_ERROR;
282
        if (theRepository != null) {
283
            if (rdbWorkspacePersonalDatabase.isSelected()) {
284
                File file = this.getWorkspaceFile();
285
                if (file != null) {
286
                    err = manager.initWorkspace(file, theRepository, getWorkspaceName(), null);
287
                    if (err == ERR_NO_ERROR && this.chkCreateConnectionToDatabase.isSelected()) {
288
                        VCSGisWorkspace ws = manager.openWorkspace(file);
289
                        JDBCServerExplorerParameters params = ws.getExplorerParameters();
290
                        DataManager dataManager = DALLocator.getDataManager();
291
                        dataManager.getDataServerExplorerPool().add(this.getName(), params);
292
                    }
255 293
                }
256
                if( this.chkCreateConnectionToDatabase.isSelected() ) {
257
                    VCSGisWorkspace ws = vcsgis.open_workspace(file);
258
                    JDBCServerExplorerParameters params = ws.getExplorerParameters();
259
                    DataManager dataManager = DALLocator.getDataManager();
260
                    dataManager.getDataServerExplorerPool().add(this.getName(), params);
294
            } else if (rdbWorkspaceServerDatabase.isSelected()) {
295
                JDBCServerExplorer workspaceServerExplorer = getWorkspaceServer();
296

  
297
                if (workspaceServerExplorer != null) {
298
                    err = manager.initWorkspace(workspaceServerExplorer, theRepository, getWorkspaceName(), null);
261 299
                }
262
            } else if (rdbRepositoryService.isSelected()) {
263
                URL url = this.getRepositoryURL();
264
                //TODO:
265
                return 0;
266 300
            }
267 301
        }
268
        return -1;
302
        return err;
269 303
    }
270 304

  
271
    @Override
272
    public VCSGisRepository getRepository() {
273
        JDBCServerExplorer server = this.getRepositoryServer();
274
        if (repository == null && server != null){
275
            repository = vcsgisadmin.open_repository(server);
305
//    @Override
306
    private VCSGisRepository getRepository() {
307
        if (repository == null){
308
            VCSGisManager manager = VCSGisLocator.getVCSGisManager();
309
            if(rdbRepositoryDatabaseServer.isSelected()){
310
                JDBCServerExplorer server = this.getRepositoryServer();
311
                if (server != null){
312
                    repository = manager.openRepository(server.getParameters());
313
                }
314
            } else if(rdbRepositoryService.isSelected()){
315
                URL url = getRepositoryURL();
316
                if (url != null){
317
                    repository = manager.openRepository(url);
318
                }
319
            }
276 320
        }
277 321
        return repository;
278 322
    }
279 323

  
280
    @Override
281
    public JDBCServerExplorer getRepositoryServer() {
324
//    @Override
325
    private JDBCServerExplorer getRepositoryServer() {
282 326
        JDBCServerExplorerParameters conn = getRepositoryConnection();
283 327
        if(this.repositoryServer == null && conn != null){
284 328
            try {
......
294 338
        return this.repositoryServer;
295 339
    }
296 340

  
341
//    @Override
342
    private JDBCServerExplorerParameters getWorkspaceConnection() {
343
        if(rdbWorkspaceServerDatabase.isEnabled() && workspaceServerPicker.isEnabled()){
344
            return this.workspaceServerPicker.get();
345
        }
346
        return null;
347
    }
348

  
349
//    @Override
350
    private JDBCServerExplorer getWorkspaceServer() {
351
        JDBCServerExplorerParameters conn = getWorkspaceConnection();
352
        if(this.workspaceServer == null && conn != null){
353
            try {
354
                DataManager dataManager = DALLocator.getDataManager();
355
                this.workspaceServer = (JDBCServerExplorer) dataManager.openServerExplorer(
356
                        conn.getExplorerName(), conn
357
                );
358
            } catch (InitializeException | ProviderNotRegisteredException | ValidateDataParametersException ex) {
359
                LOGGER.warn("Can't open server "+conn.getExplorerName());
360
                this.workspaceServer = null;
361
            }
362
        }
363
        return this.workspaceServer;
364
    }
365

  
366

  
297 367
    @Override
298 368
    public String getWorkspaceName() {
299 369
        return txtName.getText();
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/initworkspace/VCSGisJInitWorkspaceView.xml
24 24
    </at>
25 25
    <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
26 26
   </super>
27
   <at name="id">/home/jjdelcerro/datos/devel/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/initworkspace/VCSGisJInitWorkspaceView.xml</at>
27
   <at name="id">/home/fdiaz/projects/gvSIG/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/initworkspace/VCSGisJInitWorkspaceView.xml</at>
28
   <at name="path">src/main/java/org/gvsig/vcsgis/swing/impl/initworkspace/VCSGisJInitWorkspaceView.xml</at>
28 29
   <at name="rowspecs">CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE</at>
29 30
   <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at>
30 31
   <at name="components">
......
74 75
             </object>
75 76
            </at>
76 77
            <at name="name">txtName</at>
77
            <at name="width">740</at>
78
            <at name="height">19</at>
78
            <at name="width">1171</at>
79
            <at name="height">20</at>
79 80
           </object>
80 81
          </at>
81 82
         </object>
......
133 134
            </at>
134 135
            <at name="actionCommand">...</at>
135 136
            <at name="name">btnWorkspaceFile</at>
136
            <at name="width">19</at>
137
            <at name="width">16</at>
137 138
            <at name="text">...</at>
138
            <at name="height">19</at>
139
            <at name="height">18</at>
139 140
           </object>
140 141
          </at>
141 142
         </object>
......
188 189
             </object>
189 190
            </at>
190 191
            <at name="name">txtWorkspaceFile</at>
191
            <at name="width">708</at>
192
            <at name="height">19</at>
192
            <at name="width">1144</at>
193
            <at name="height">20</at>
193 194
           </object>
194 195
          </at>
195 196
         </object>
......
249 250
             </object>
250 251
            </at>
251 252
            <at name="name">rdbWorkspacePersonalDatabase</at>
252
            <at name="width">823</at>
253
            <at name="width">1240</at>
253 254
            <at name="text">_Personal_database_H2</at>
254 255
            <at name="selected">true</at>
255
            <at name="height">17</at>
256
            <at name="height">16</at>
256 257
           </object>
257 258
          </at>
258 259
         </object>
......
305 306
             </object>
306 307
            </at>
307 308
            <at name="name">lblWorkspaceFile</at>
308
            <at name="width">86</at>
309
            <at name="width">69</at>
309 310
            <at name="text">_File</at>
310 311
            <at name="fill">
311 312
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
312 313
              <at name="name">fill</at>
313 314
             </object>
314 315
            </at>
315
            <at name="height">15</at>
316
            <at name="height">14</at>
316 317
           </object>
317 318
          </at>
318 319
         </object>
......
367 368
            <at name="actionCommand">_Create_conexion_to_database</at>
368 369
            <at name="horizontalAlignment">2</at>
369 370
            <at name="name">chkCreateConnectionToDatabase</at>
370
            <at name="width">237</at>
371
            <at name="width">195</at>
371 372
            <at name="text">_Create_conexion_to_database</at>
372 373
            <at name="selected">true</at>
373
            <at name="height">17</at>
374
            <at name="height">16</at>
374 375
           </object>
375 376
          </at>
376 377
         </object>
......
430 431
             </object>
431 432
            </at>
432 433
            <at name="name">rdbRepositoryDatabaseServer</at>
433
            <at name="width">823</at>
434
            <at name="width">1240</at>
434 435
            <at name="text">_Database_server</at>
435 436
            <at name="selected">true</at>
436
            <at name="height">17</at>
437
            <at name="height">16</at>
437 438
           </object>
438 439
          </at>
439 440
         </object>
......
486 487
             </object>
487 488
            </at>
488 489
            <at name="name">lblRepositoryConnection</at>
489
            <at name="width">86</at>
490
            <at name="width">69</at>
490 491
            <at name="text">_Connection</at>
491 492
            <at name="fill">
492 493
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
493 494
              <at name="name">fill</at>
494 495
             </object>
495 496
            </at>
496
            <at name="height">15</at>
497
            <at name="height">14</at>
497 498
           </object>
498 499
          </at>
499 500
         </object>
......
546 547
             </object>
547 548
            </at>
548 549
            <at name="name">cboRepositoryConnection</at>
549
            <at name="width">708</at>
550
            <at name="width">1144</at>
550 551
            <at name="items">
551 552
             <object classname="com.jeta.forms.store.properties.ItemsProperty">
552 553
              <at name="name">items</at>
553 554
             </object>
554 555
            </at>
555
            <at name="height">24</at>
556
            <at name="height">20</at>
556 557
           </object>
557 558
          </at>
558 559
         </object>
......
610 611
            </at>
611 612
            <at name="actionCommand">...</at>
612 613
            <at name="name">btnRepositoryConnection</at>
613
            <at name="width">19</at>
614
            <at name="width">16</at>
614 615
            <at name="text">...</at>
615
            <at name="height">19</at>
616
            <at name="height">18</at>
616 617
           </object>
617 618
          </at>
618 619
         </object>
......
672 673
             </object>
673 674
            </at>
674 675
            <at name="name">rdbRepositoryService</at>
675
            <at name="width">823</at>
676
            <at name="width">1240</at>
676 677
            <at name="text">_Remote_service</at>
677
            <at name="enabled">false</at>
678
            <at name="height">17</at>
678
            <at name="height">16</at>
679 679
           </object>
680 680
          </at>
681 681
         </object>
......
727 727
              </at>
728 728
             </object>
729 729
            </at>
730
            <at name="width">86</at>
731
            <at name="name"/>
730
            <at name="name"></at>
731
            <at name="width">69</at>
732 732
            <at name="text">_URL</at>
733 733
            <at name="fill">
734 734
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
735 735
              <at name="name">fill</at>
736 736
             </object>
737 737
            </at>
738
            <at name="enabled">false</at>
739
            <at name="height">15</at>
738
            <at name="height">14</at>
740 739
           </object>
741 740
          </at>
742 741
         </object>
......
791 790
            <at name="background" object="color">238,238,238</at>
792 791
            <at name="editable">false</at>
793 792
            <at name="name">txtRepositoryServiceURL</at>
794
            <at name="width">708</at>
795
            <at name="height">19</at>
793
            <at name="width">1144</at>
794
            <at name="enabled">false</at>
795
            <at name="height">20</at>
796 796
           </object>
797 797
          </at>
798 798
         </object>
......
845 845
             </object>
846 846
            </at>
847 847
            <at name="name">lblName</at>
848
            <at name="width">102</at>
848
            <at name="width">85</at>
849 849
            <at name="text">_Name</at>
850 850
            <at name="fill">
851 851
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
852 852
              <at name="name">fill</at>
853 853
             </object>
854 854
            </at>
855
            <at name="height">15</at>
855
            <at name="height">14</at>
856 856
           </object>
857 857
          </at>
858 858
         </object>
......
905 905
             </object>
906 906
            </at>
907 907
            <at name="name">lblRepository</at>
908
            <at name="width">871</at>
908
            <at name="width">1283</at>
909 909
            <at name="text">_VCS_Repository</at>
910 910
            <at name="height">15</at>
911 911
           </object>
......
960 960
             </object>
961 961
            </at>
962 962
            <at name="name">lblWorkspaceVCS</at>
963
            <at name="width">871</at>
963
            <at name="width">1283</at>
964 964
            <at name="text">_Workspace_VCS</at>
965 965
            <at name="height">15</at>
966 966
           </object>
......
1022 1022
             </object>
1023 1023
            </at>
1024 1024
            <at name="name">rdbWorkspaceServerDatabase</at>
1025
            <at name="width">855</at>
1025
            <at name="width">1267</at>
1026 1026
            <at name="text">_Database_server</at>
1027
            <at name="enabled">false</at>
1028
            <at name="height">17</at>
1027
            <at name="height">16</at>
1029 1028
           </object>
1030 1029
          </at>
1031 1030
         </object>
......
1078 1077
             </object>
1079 1078
            </at>
1080 1079
            <at name="name">lblWorkspaceConnection</at>
1081
            <at name="width">86</at>
1080
            <at name="width">69</at>
1082 1081
            <at name="text">_Connection</at>
1083 1082
            <at name="fill">
1084 1083
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
1085 1084
              <at name="name">fill</at>
1086 1085
             </object>
1087 1086
            </at>
1088
            <at name="enabled">false</at>
1089
            <at name="height">15</at>
1087
            <at name="height">14</at>
1090 1088
           </object>
1091 1089
          </at>
1092 1090
         </object>
......
1139 1137
             </object>
1140 1138
            </at>
1141 1139
            <at name="name">cboWorkspaceConnection</at>
1142
            <at name="width">708</at>
1140
            <at name="width">1144</at>
1143 1141
            <at name="items">
1144 1142
             <object classname="com.jeta.forms.store.properties.ItemsProperty">
1145 1143
              <at name="name">items</at>
1146 1144
             </object>
1147 1145
            </at>
1148 1146
            <at name="enabled">false</at>
1149
            <at name="height">24</at>
1147
            <at name="height">20</at>
1150 1148
           </object>
1151 1149
          </at>
1152 1150
         </object>
......
1206 1204
            <at name="opaque">false</at>
1207 1205
            <at name="contentAreaFilled">false</at>
1208 1206
            <at name="name">btnWorkspaceConnection</at>
1209
            <at name="width">19</at>
1207
            <at name="width">16</at>
1210 1208
            <at name="text">...</at>
1211 1209
            <at name="enabled">false</at>
1212
            <at name="height">19</at>
1210
            <at name="height">18</at>
1213 1211
           </object>
1214 1212
          </at>
1215 1213
         </object>
......
1234 1232
         </at>
1235 1233
        </object>
1236 1234
       </at>
1237
       <at name="name"/>
1235
       <at name="name"></at>
1238 1236
       <at name="fill">
1239 1237
        <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
1240 1238
         <at name="name">fill</at>
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/initworkspace/VCSGisJInitWorkspaceView.java
194 194
      jpanel1.add(btnRepositoryConnection,cc.xy(8,6));
195 195

  
196 196
      rdbRepositoryService.setActionCommand("_Database_server");
197
      rdbRepositoryService.setEnabled(false);
198 197
      rdbRepositoryService.setName("rdbRepositoryService");
199 198
      rdbRepositoryService.setText("_Remote_service");
200 199
      buttongroup1.add(rdbRepositoryService);
201 200
      jpanel1.add(rdbRepositoryService,cc.xywh(3,8,4,1));
202 201

  
203 202
      JLabel jlabel1 = new JLabel();
204
      jlabel1.setEnabled(false);
205 203
      jlabel1.setText("_URL");
206 204
      jpanel1.add(jlabel1,cc.xy(4,10));
207 205

  
208 206
      txtRepositoryServiceURL.setBackground(new Color(238,238,238));
209 207
      txtRepositoryServiceURL.setEditable(false);
208
      txtRepositoryServiceURL.setEnabled(false);
210 209
      txtRepositoryServiceURL.setName("txtRepositoryServiceURL");
211 210
      jpanel1.add(txtRepositoryServiceURL,cc.xy(6,10));
212 211

  
......
223 222
      jpanel1.add(lblWorkspaceVCS,cc.xywh(2,12,7,1));
224 223

  
225 224
      rdbWorkspaceServerDatabase.setActionCommand("_Database_server");
226
      rdbWorkspaceServerDatabase.setEnabled(false);
227 225
      rdbWorkspaceServerDatabase.setName("rdbWorkspaceServerDatabase");
228 226
      rdbWorkspaceServerDatabase.setText("_Database_server");
229 227
      buttongroup2.add(rdbWorkspaceServerDatabase);
230 228
      jpanel1.add(rdbWorkspaceServerDatabase,cc.xywh(3,22,6,1));
231 229

  
232
      lblWorkspaceConnection.setEnabled(false);
233 230
      lblWorkspaceConnection.setName("lblWorkspaceConnection");
234 231
      lblWorkspaceConnection.setText("_Connection");
235 232
      jpanel1.add(lblWorkspaceConnection,cc.xy(4,24));
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJInitWorkspace.java
21 21
 */
22 22
package org.gvsig.vcsgis.swing;
23 23

  
24
import java.io.File;
25
import java.net.URL;
26
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
27
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
28
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
29 24
import org.gvsig.tools.swing.api.Component;
30 25
import org.gvsig.tools.swing.api.windowmanager.Dialog;
31 26

  
......
41 36
    
42 37
    public String getWorkspaceName();
43 38

  
44
    public File getWorkspaceFile();
39
//    public File getWorkspaceFile();
40
//
41
//    public JDBCServerExplorerParameters getRepositoryConnection();
42
//    
43
//    public URL getRepositoryURL();
44
//    
45
//    public VCSGisRepository getRepository();
46
//
47
//    public JDBCServerExplorer getRepositoryServer();
48
//    
49
//    public JDBCServerExplorerParameters getWorkspaceConnection();
50
//    
51
//    public JDBCServerExplorer getWorkspaceServer();
45 52

  
46
    public JDBCServerExplorerParameters getRepositoryConnection();
47
    
48
    public URL getRepositoryURL();
49
    
50
    public VCSGisRepository getRepository();
51

  
52
    public JDBCServerExplorer getRepositoryServer();
53

  
54 53
}

Also available in: Unified diff