Revision 3308
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test02Initws.java | ||
---|---|---|
27 | 27 |
import org.gvsig.vcsgis.lib.VCSGisLocator; |
28 | 28 |
import org.gvsig.vcsgis.lib.VCSGisManager; |
29 | 29 |
import org.gvsig.vcsgis.lib.repository.VCSGisRepository; |
30 |
import org.gvsig.vcsgis.lib.repository.localdb.tables.TopologyplanRepoTable; |
|
30 | 31 |
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace; |
31 | 32 |
import org.gvsig.vcsgis.lib.workspace.tables.EntitiesTable; |
32 | 33 |
import org.gvsig.vcsgis.lib.workspace.tables.LocalRevisionsTable; |
33 | 34 |
import org.gvsig.vcsgis.lib.workspace.tables.WorkspaceChangesTable; |
34 | 35 |
import org.gvsig.vcsgis.lib.workspace.tables.RemoteChangesTable; |
36 |
import org.gvsig.vcsgis.lib.workspace.tables.TopologyplanTable; |
|
35 | 37 |
import org.gvsig.vcsgis.lib.workspace.tables.UsersTable; |
36 | 38 |
import org.gvsig.vcsgis.lib.workspace.tables.VarsTable; |
37 | 39 |
import org.slf4j.Logger; |
... | ... | |
98 | 100 |
.add(RemoteChangesTable.TABLE_NAME,RemoteChangesTable.featureType()) |
99 | 101 |
.add(LocalRevisionsTable.TABLE_NAME,LocalRevisionsTable.featureType()) |
100 | 102 |
.add(UsersTable.TABLE_NAME,UsersTable.featureType()) |
103 |
.add(TopologyplanTable.TABLE_NAME,TopologyplanTable.featureType()) |
|
101 | 104 |
.add(TABLE_CONFIGURATION_NAME,null) |
102 | 105 |
// .add(TABLE_REPOSITORY_NAME,null) |
103 | 106 |
.add(TABLE_RESOURCES_NAME,null) |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/test/java/org/gvsig/vcsgis/lib/impl/Test01InitRepo.java | ||
---|---|---|
30 | 30 |
import org.gvsig.vcsgis.lib.repository.localdb.tables.ConfigRepoTable; |
31 | 31 |
import org.gvsig.vcsgis.lib.repository.localdb.tables.TopologyplanRepoTable; |
32 | 32 |
import org.gvsig.vcsgis.lib.repository.localdb.tables.UsersRepoTable; |
33 |
import org.gvsig.vcsgis.lib.workspace.tables.TopologyplanTable; |
|
33 | 34 |
import org.slf4j.Logger; |
34 | 35 |
import org.slf4j.LoggerFactory; |
35 | 36 |
|
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/remoteclient/VCSGisRepositoryClient.java | ||
---|---|---|
43 | 43 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisCheckoutRequest; |
44 | 44 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisCommitRequest; |
45 | 45 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisEntitiesRequest; |
46 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisExportRequest; |
|
47 | 46 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisRowCreateRequest; |
48 | 47 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisRowDeleteRequest; |
49 | 48 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisRowUpdateRequest; |
... | ... | |
217 | 216 |
return null; // TODO: Implements remote request Authenticate |
218 | 217 |
} |
219 | 218 |
|
220 |
@Override |
|
221 |
public VCSGisExportRequest createExportRequest(String entityName) { |
|
222 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
|
223 |
} |
|
224 | 219 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/localdb/VCSGisRepositoryLocaldb.java | ||
---|---|---|
64 | 64 |
import org.gvsig.vcsgis.lib.repository.localdb.requests.CheckoutRequestLocaldb; |
65 | 65 |
import org.gvsig.vcsgis.lib.repository.localdb.requests.CommitRequestLocaldb; |
66 | 66 |
import org.gvsig.vcsgis.lib.repository.localdb.requests.EntitiesRequestLocaldb; |
67 |
import org.gvsig.vcsgis.lib.repository.localdb.requests.ExportRequestLocaldb; |
|
68 | 67 |
import org.gvsig.vcsgis.lib.repository.localdb.requests.HistoryRequestLocaldb; |
69 | 68 |
import org.gvsig.vcsgis.lib.repository.localdb.requests.RowCreateRequestLocaldb; |
70 | 69 |
import org.gvsig.vcsgis.lib.repository.localdb.requests.RowDeleteRequestLocaldb; |
... | ... | |
81 | 80 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisCheckoutRequest; |
82 | 81 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisCommitRequest; |
83 | 82 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisEntitiesRequest; |
84 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisExportRequest; |
|
85 | 83 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisRequest; |
86 | 84 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisRowCreateRequest; |
87 | 85 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisRowDeleteRequest; |
... | ... | |
138 | 136 |
EntitiesRepoTable.featureType(), |
139 | 137 |
RevisionsRepoTable.featureType(), |
140 | 138 |
DataRepoTable.featureType(), |
139 |
TopologyplanRepoTable.featureType(), |
|
141 | 140 |
HooksRepoTable.featureType(), |
142 | 141 |
}; |
143 | 142 |
r = 4; |
... | ... | |
500 | 499 |
return request; |
501 | 500 |
} |
502 | 501 |
|
503 |
@Override |
|
504 |
public VCSGisExportRequest createExportRequest(String entityName) { |
|
505 |
return new ExportRequestLocaldb(this, entityName); |
|
506 |
} |
|
507 | 502 |
|
508 | 503 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/localdb/tables/RevisionsRepoTable.java | ||
---|---|---|
17 | 17 |
import org.gvsig.tools.dataTypes.DataTypes; |
18 | 18 |
import org.gvsig.tools.dispose.DisposableIterable; |
19 | 19 |
import org.gvsig.tools.dispose.DisposeUtils; |
20 |
import org.gvsig.tools.dynobject.DynObjectValueItem; |
|
21 |
import static org.gvsig.vcsgis.lib.VCSGisManager.TOPOLOGYPLAN_NOTPASSED; |
|
22 |
import static org.gvsig.vcsgis.lib.VCSGisManager.TOPOLOGYPLAN_PASSED; |
|
23 |
import static org.gvsig.vcsgis.lib.VCSGisManager.TOPOLOGYPLAN_UNKNOWN; |
|
20 | 24 |
import org.gvsig.vcsgis.lib.VCSGisRevision; |
21 | 25 |
import org.gvsig.vcsgis.lib.VCSGisRevisionImpl; |
22 | 26 |
import org.gvsig.vcsgis.lib.repository.VCSGisRepositoryRevision; |
... | ... | |
38 | 42 |
private static final String REVISION_EFECTIVEDATE = "REV_EFECTIVEDATE"; |
39 | 43 |
private static final String REVISION_OPERATIONDATE = "REV_OPERATIONDATE"; |
40 | 44 |
private static final String REVISION_TAGS = "REV_TAGS"; |
45 |
private static final String REVISION_TOPOLOGYPLAN = "REV_TOPPLAN"; |
|
41 | 46 |
|
42 | 47 |
public static class RevisionRepoRow extends AbstractRow implements VCSGisRepositoryRevision{ |
43 | 48 |
|
... | ... | |
85 | 90 |
} |
86 | 91 |
|
87 | 92 |
@Override |
93 |
public int getTopologyPlan() { |
|
94 |
return this.feature.getInt(REVISION_TOPOLOGYPLAN); |
|
95 |
} |
|
96 |
|
|
97 |
@Override |
|
88 | 98 |
public String getComment() { |
89 | 99 |
return this.feature.getString(REVISION_COMMENT); |
90 | 100 |
} |
... | ... | |
109 | 119 |
this.feature.set(REVISION_EFECTIVEDATE, toTimestamp(date)); |
110 | 120 |
} |
111 | 121 |
|
122 |
public void setTopologyPlan(int topologyPlan) { |
|
123 |
this.feature.set(REVISION_TOPOLOGYPLAN,topologyPlan); |
|
124 |
} |
|
125 |
|
|
112 | 126 |
public void setTags(String tags) { |
113 | 127 |
this.feature.set(REVISION_TAGS,tags); |
114 | 128 |
} |
... | ... | |
241 | 255 |
.setIsIndexed(true) |
242 | 256 |
.setAllowIndexDuplicateds(true) |
243 | 257 |
.setLabel("Revision number"); |
258 |
ft.add(REVISION_TOPOLOGYPLAN, DataTypes.INT) |
|
259 |
.setIsIndexed(false) |
|
260 |
.setLabel("Topology plan") |
|
261 |
.setAvailableValues(new DynObjectValueItem[] { |
|
262 |
new DynObjectValueItem(TOPOLOGYPLAN_UNKNOWN, "Unknown"), |
|
263 |
new DynObjectValueItem(TOPOLOGYPLAN_PASSED, "Passed"), |
|
264 |
new DynObjectValueItem(TOPOLOGYPLAN_NOTPASSED, "Not passed"), |
|
265 |
}); |
|
244 | 266 |
ft.add(REVISION_TAGS, DataTypes.STRING) |
245 | 267 |
.setSize(200) |
246 | 268 |
.setLabel("Tags"); |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/localdb/tables/AbstractRepoTable.java | ||
---|---|---|
22 | 22 |
|
23 | 23 |
package org.gvsig.vcsgis.lib.repository.localdb.tables; |
24 | 24 |
|
25 |
import java.sql.Timestamp; |
|
25 | 26 |
import org.gvsig.vcsgis.lib.repository.localdb.VCSGisRepositoryLocaldb; |
26 | 27 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
27 | 28 |
import org.gvsig.fmap.dal.feature.Feature; |
29 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
28 | 30 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
29 | 31 |
import org.gvsig.fmap.dal.feature.FeatureType; |
30 | 32 |
import org.gvsig.tools.dispose.DisposeUtils; |
... | ... | |
77 | 79 |
} |
78 | 80 |
} |
79 | 81 |
|
82 |
protected String getString(String attrname) { |
|
83 |
return this.feature.getString(attrname); |
|
84 |
} |
|
85 |
|
|
86 |
protected Timestamp getTimestamp(String attrname) { |
|
87 |
return this.feature.getTimestamp(attrname); |
|
88 |
} |
|
89 |
|
|
90 |
protected int getInt(String attrname) { |
|
91 |
return this.feature.getIntOrDefault(attrname, -1); |
|
92 |
} |
|
93 |
|
|
94 |
protected int getInt(String attrname, int defaultValue) { |
|
95 |
return this.feature.getIntOrDefault(attrname, defaultValue); |
|
96 |
} |
|
97 |
|
|
98 |
protected long getLong(String attrname) { |
|
99 |
return this.feature.getLongOrDefault(attrname, -1); |
|
100 |
} |
|
101 |
|
|
102 |
protected long getLong(String attrname, long defaultValue) { |
|
103 |
return this.feature.getLongOrDefault(attrname, defaultValue); |
|
104 |
} |
|
105 |
|
|
106 |
protected boolean getBoolean(String attrname) { |
|
107 |
return this.feature.getBooleanOrDefault(attrname, false); |
|
108 |
} |
|
109 |
|
|
110 |
protected boolean getBoolean(String attrname, boolean defaultValue) { |
|
111 |
return this.feature.getBooleanOrDefault(attrname, defaultValue); |
|
112 |
} |
|
113 |
|
|
114 |
protected void set(String attrname, String value) { |
|
115 |
this.feature.set(attrname, value); |
|
116 |
} |
|
117 |
|
|
118 |
protected void set(String attrname, int value) { |
|
119 |
this.feature.set(attrname, value); |
|
120 |
} |
|
121 |
|
|
122 |
protected void set(String attrname, long value) { |
|
123 |
this.feature.set(attrname, value); |
|
124 |
} |
|
125 |
|
|
126 |
protected void set(String attrname, boolean value) { |
|
127 |
this.feature.set(attrname, value); |
|
128 |
} |
|
129 |
|
|
130 |
protected void set(String attrname, Timestamp value) { |
|
131 |
this.feature.set(attrname, value); |
|
132 |
} |
|
133 |
|
|
80 | 134 |
public void insert() { |
81 | 135 |
FeatureStore store = null; |
82 | 136 |
try { |
... | ... | |
144 | 198 |
this.feature.set(this.codeName, code); |
145 | 199 |
} |
146 | 200 |
|
147 |
protected String getString(String name) { |
|
148 |
return this.feature.getString(name); |
|
149 |
} |
|
150 |
|
|
151 |
protected void set(String name, Object value) { |
|
152 |
this.feature.set(name, value); |
|
153 |
} |
|
154 | 201 |
} |
155 | 202 |
|
156 | 203 |
private final String tableName; |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/localdb/tables/EntitiesRepoTable.java | ||
---|---|---|
42 | 42 |
private static final String FIELD_FOR_LABEL = "ENT_FIELDFORLABEL"; |
43 | 43 |
private static final String CATEGORY = "ENT_CATEGORY"; |
44 | 44 |
private static final String LABEL = "ENT_LABEL"; |
45 |
private static final String AUTHORIZATIONS = "ENT_AUTORIZATIONS"; |
|
46 |
private static final String TOPOLOGYPLAN_MODE = "ENT_TOPOLOGYPLAN_MODE"; |
|
45 | 47 |
|
46 | 48 |
public static class EntityRepoRow extends AbstractRow implements VCSGisEntityEditable { |
47 | 49 |
|
... | ... | |
80 | 82 |
public String getTopologyPlanCode() { |
81 | 83 |
return this.feature.getString(COD_TOPOLOGYPLAN); |
82 | 84 |
} |
83 |
|
|
85 |
|
|
84 | 86 |
@Override |
85 | 87 |
public String getUserCode() { |
86 | 88 |
return this.feature.getString(COD_USER); |
... | ... | |
117 | 119 |
} |
118 | 120 |
|
119 | 121 |
@Override |
122 |
public String getAuthorizations() { |
|
123 |
return this.feature.getString(AUTHORIZATIONS); |
|
124 |
} |
|
125 |
|
|
126 |
@Override |
|
127 |
public int getTopologyPlanMode() { |
|
128 |
return this.feature.getInt(TOPOLOGYPLAN_MODE); |
|
129 |
} |
|
130 |
|
|
131 |
@Override |
|
120 | 132 |
public String getLabel() { |
121 | 133 |
return this.feature.getString(LABEL); |
122 | 134 |
} |
... | ... | |
211 | 223 |
} |
212 | 224 |
|
213 | 225 |
@Override |
226 |
public VCSGisEntityEditable setAuthorizations(String authorizations) { |
|
227 |
this.feature.set(AUTHORIZATIONS, authorizations); |
|
228 |
return this; |
|
229 |
} |
|
230 |
|
|
231 |
@Override |
|
232 |
public VCSGisEntityEditable setTopologyPlanMode(int topologyPlanMode) { |
|
233 |
this.feature.set(TOPOLOGYPLAN_MODE, topologyPlanMode); |
|
234 |
return this; |
|
235 |
} |
|
236 |
|
|
237 |
@Override |
|
214 | 238 |
public VCSGisEntityEditable setLabel(String label) { |
215 | 239 |
this.feature.set(LABEL, label); |
216 | 240 |
return this; |
... | ... | |
253 | 277 |
} |
254 | 278 |
return this.getLabel(); |
255 | 279 |
} |
256 |
|
|
280 |
|
|
281 |
@Override |
|
282 |
public boolean isAuthorized(String userName, String operation) { |
|
283 |
return VCSGisUtils.isAuthoriced(this, operation, userName); |
|
284 |
} |
|
285 |
|
|
257 | 286 |
} |
258 | 287 |
|
259 | 288 |
public EntitiesRepoTable() { |
... | ... | |
369 | 398 |
ft.add(LABEL, DataTypes.STRING) |
370 | 399 |
.setSize(200) |
371 | 400 |
.setLabel("Label"); |
401 |
ft.add(AUTHORIZATIONS, DataTypes.STRING) |
|
402 |
.setSize(10240) |
|
403 |
.setLabel("Authorizations"); |
|
372 | 404 |
ft.add(DESCRIPTION, DataTypes.STRING) |
373 | 405 |
.setSize(10240) |
374 | 406 |
.setLabel("Description"); |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/localdb/tables/TopologyplanRepoTable.java | ||
---|---|---|
3 | 3 |
import org.gvsig.fmap.dal.DALLocator; |
4 | 4 |
import org.gvsig.fmap.dal.DataManager; |
5 | 5 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
6 |
import org.gvsig.fmap.dal.feature.Feature; |
|
7 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
6 | 8 |
import org.gvsig.fmap.dal.feature.FeatureType; |
7 | 9 |
import org.gvsig.tools.dataTypes.DataTypes; |
10 |
import org.gvsig.tools.dispose.DisposeUtils; |
|
11 |
import org.gvsig.vcsgis.lib.repository.localdb.VCSGisRepositoryLocaldb; |
|
8 | 12 |
|
9 | 13 |
/** |
10 | 14 |
* |
11 | 15 |
* @author gvSIG Team |
12 | 16 |
*/ |
13 |
public class TopologyplanRepoTable { |
|
17 |
@SuppressWarnings("UseSpecificCatch") |
|
18 |
public class TopologyplanRepoTable extends AbstractRepoTable { |
|
14 | 19 |
|
15 | 20 |
public static final String TABLE_NAME = "VCSGISREPO_TOPOLOGYPLANS"; |
16 | 21 |
|
22 |
private static final String COD_TOPOLOGYPLAN = "COD_TOPOLOGYPLAN"; |
|
23 |
private static final String TOPPLAN_NAME = "TOPP_NAME"; |
|
24 |
private static final String TOPPLAN_DESCRIPTION = "TOPP_DESCRIPTION"; |
|
25 |
private static final String TOPPLAN_DATA = "TOPP_DATA"; |
|
26 |
|
|
17 | 27 |
public static final FeatureType featureType() { |
18 | 28 |
DataManager dataManager = DALLocator.getDataManager(); |
19 | 29 |
EditableFeatureType ft = dataManager.createFeatureType(); |
20 | 30 |
ft.setLabel("VCSGIS TopologyPlans"); |
21 | 31 |
ft.getTags().set("ID", TABLE_NAME); |
22 |
ft.add("cod_topologyplan", DataTypes.STRING)
|
|
32 |
ft.add(COD_TOPOLOGYPLAN, DataTypes.STRING)
|
|
23 | 33 |
.setSize(40) |
24 | 34 |
.setIsPrimaryKey(true) |
25 | 35 |
.setLabel("Code") |
26 | 36 |
.setReadOnly(true); |
27 |
ft.add("topp_name", DataTypes.STRING)
|
|
37 |
ft.add(TOPPLAN_NAME, DataTypes.STRING)
|
|
28 | 38 |
.setIsIndexed(true) |
29 | 39 |
.setAllowIndexDuplicateds(true) |
30 | 40 |
.setSize(50) |
31 | 41 |
.setLabel("Name"); |
32 |
ft.add("topp_description", DataTypes.STRING)
|
|
42 |
ft.add(TOPPLAN_DESCRIPTION, DataTypes.STRING)
|
|
33 | 43 |
.setSize(10240) |
34 | 44 |
.setLabel("Description"); |
35 |
ft.add("topp_data", DataTypes.STRING)
|
|
45 |
ft.add(TOPPLAN_DATA, DataTypes.STRING)
|
|
36 | 46 |
.setSize(10240) |
37 | 47 |
.setLabel("Serialized topology plan in json."); |
38 | 48 |
|
39 | 49 |
return ft.getNotEditableCopy(); |
40 | 50 |
} |
41 | 51 |
|
52 |
public TopologyplanRepoTable() { |
|
53 |
super(TABLE_NAME, featureType()); |
|
54 |
} |
|
55 |
|
|
56 |
public String getByCode(VCSGisRepositoryLocaldb repository, String topologyPlanCode) { |
|
57 |
FeatureStore store = null; |
|
58 |
try { |
|
59 |
store = repository.getFeatureStore(TABLE_NAME); |
|
60 |
Feature f = store.findFirst("\""+COD_TOPOLOGYPLAN+"\"='"+topologyPlanCode+"'"); |
|
61 |
if( f==null ) { |
|
62 |
return null; |
|
63 |
} |
|
64 |
return f.getString(TOPPLAN_DATA); |
|
65 |
} catch (Exception ex) { |
|
66 |
throw new RuntimeException("Can't retrieve topology plan '"+topologyPlanCode+"'.", ex); |
|
67 |
} finally { |
|
68 |
DisposeUtils.disposeQuietly(store); |
|
69 |
} |
|
70 |
} |
|
71 |
|
|
42 | 72 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/localdb/requests/ExportRequestLocaldb.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.localdb.requests; |
|
23 |
|
|
24 |
import java.sql.Timestamp; |
|
25 |
import org.apache.commons.lang3.StringUtils; |
|
26 |
import org.gvsig.fmap.dal.feature.Feature; |
|
27 |
import org.gvsig.tools.dispose.DisposableIterable; |
|
28 |
import org.gvsig.vcsgis.lib.DisposableIterableAdapter; |
|
29 |
import org.gvsig.vcsgis.lib.EntityEditableImpl; |
|
30 |
import org.gvsig.vcsgis.lib.VCSGisEntity; |
|
31 |
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_ENTITY_NOT_EXISTS; |
|
32 |
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_OK; |
|
33 |
import org.gvsig.vcsgis.lib.repository.VCSGisRepositoryData; |
|
34 |
import org.gvsig.vcsgis.lib.repository.localdb.VCSGisRepositoryLocaldb; |
|
35 |
import org.gvsig.vcsgis.lib.repository.localdb.tables.DataRepoTable; |
|
36 |
import org.gvsig.vcsgis.lib.repository.localdb.tables.EntitiesRepoTable; |
|
37 |
import org.gvsig.vcsgis.lib.repository.localdb.tables.EntitiesRepoTable.EntityRepoRow; |
|
38 |
import org.gvsig.vcsgis.lib.repository.localdb.tables.RevisionsRepoTable; |
|
39 |
import org.gvsig.vcsgis.lib.repository.localdb.tables.RevisionsRepoTable.RevisionRepoRow; |
|
40 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisCheckoutRequest; |
|
41 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisExportRequest; |
|
42 |
import org.gvsig.vcsgis.lib.requests.CheckoutRequestHelper; |
|
43 |
|
|
44 |
/** |
|
45 |
* |
|
46 |
* @author gvSIG Team |
|
47 |
*/ |
|
48 |
public class ExportRequestLocaldb extends AbstractRequestLocaldb implements VCSGisExportRequest { |
|
49 |
|
|
50 |
public ExportRequestLocaldb(VCSGisRepositoryLocaldb repository, String entityName) { |
|
51 |
super(new CheckoutRequestHelper(repository, entityName)); |
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
public CheckoutRequestHelper helper() { |
|
56 |
return (CheckoutRequestHelper) super.helper(); |
|
57 |
} |
|
58 |
|
|
59 |
@Override |
|
60 |
public String getEntityName() { |
|
61 |
return this.helper().getEntityName(); |
|
62 |
} |
|
63 |
|
|
64 |
@Override |
|
65 |
public Timestamp getEfectiveDate() { |
|
66 |
return this.helper().getEfectiveDate(); |
|
67 |
} |
|
68 |
|
|
69 |
@Override |
|
70 |
public void setEfectiveDate(Timestamp efectiveDate) { |
|
71 |
this.helper().setEfectiveDate(efectiveDate); |
|
72 |
} |
|
73 |
|
|
74 |
@Override |
|
75 |
public void setEfectiveDate(String efectiveDate) { |
|
76 |
this.helper().setEfectiveDate(efectiveDate); |
|
77 |
} |
|
78 |
|
|
79 |
@Override |
|
80 |
public String getRevisionCode() { |
|
81 |
return this.helper().getRevisionCode(); |
|
82 |
} |
|
83 |
|
|
84 |
@Override |
|
85 |
public void setRevisionCode(String revisionCode) { |
|
86 |
this.helper().setRevisionCode(revisionCode); |
|
87 |
} |
|
88 |
|
|
89 |
@Override |
|
90 |
public VCSGisEntity getEntity() { |
|
91 |
return this.helper().getEntity(); |
|
92 |
} |
|
93 |
|
|
94 |
@Override |
|
95 |
public DisposableIterable<VCSGisRepositoryData> getData() { |
|
96 |
return this.helper().getData(); |
|
97 |
} |
|
98 |
|
|
99 |
@Override |
|
100 |
public int execute() { |
|
101 |
if( !this.isAuthorized() ) { |
|
102 |
return this.getLastErrorCode(); |
|
103 |
} |
|
104 |
EntitiesRepoTable entitiesTable = new EntitiesRepoTable(); |
|
105 |
EntityRepoRow entityRow = entitiesTable.getByEntityName( |
|
106 |
this.getRepository(), |
|
107 |
helper().entityName |
|
108 |
); |
|
109 |
if (entityRow == null) { |
|
110 |
return error(ERR_ENTITY_NOT_EXISTS,"Entity '"+helper().entityName+"' not exists."); |
|
111 |
} |
|
112 |
helper().entity = new EntityEditableImpl(); |
|
113 |
helper().entity.copyfrom(entityRow); |
|
114 |
|
|
115 |
long revisionNumber = Long.MAX_VALUE; |
|
116 |
if(StringUtils.isNotBlank(helper().repositoryRevisionCode)){ |
|
117 |
RevisionsRepoTable revisionsTable = new RevisionsRepoTable(); |
|
118 |
RevisionRepoRow revisionRow = revisionsTable.getByRevisionCode(this.getRepository(), helper().repositoryRevisionCode); |
|
119 |
revisionNumber = revisionRow.getNumber(); |
|
120 |
} |
|
121 |
|
|
122 |
DataRepoTable dataTable = new DataRepoTable(); |
|
123 |
final DisposableIterable<Feature> features = dataTable.getDataOfEntityToRevisionNumber( |
|
124 |
this.getRepository(), |
|
125 |
helper().entity.getEntityCode(), |
|
126 |
revisionNumber |
|
127 |
); |
|
128 |
helper().data = new DisposableIterableAdapter<>( |
|
129 |
features, |
|
130 |
(Feature f) -> new DataRepoTable.DataRepoRow(this.getRepository(),f) |
|
131 |
); |
|
132 |
return error(ERR_OK); |
|
133 |
} |
|
134 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/VCSGisRevisionImpl.java | ||
---|---|---|
28 | 28 |
import org.gvsig.json.Json; |
29 | 29 |
import org.gvsig.json.JsonObjectBuilder; |
30 | 30 |
import org.gvsig.tools.dataTypes.DataTypeUtils; |
31 |
import org.gvsig.vcsgis.lib.repository.VCSGisRepositoryData; |
|
32 | 31 |
|
33 | 32 |
/** |
34 | 33 |
* |
... | ... | |
48 | 47 |
private String comment; |
49 | 48 |
private long number; |
50 | 49 |
private String tags; |
50 |
private int topologyPlan; |
|
51 | 51 |
|
52 | 52 |
public VCSGisRevisionImpl(JsonObject jsonData) { |
53 | 53 |
this.entityCode = jsonData.getString("EntityCode", null); |
... | ... | |
64 | 64 |
this.comment = jsonData.getString("Comment", null); |
65 | 65 |
this.tags = jsonData.getString("Tags", null); |
66 | 66 |
this.number = jsonData.getInt("Number", -1); |
67 |
this.topologyPlan = jsonData.getInt("TopologyPlan", -1); |
|
67 | 68 |
} |
68 | 69 |
|
69 | 70 |
@Override |
... | ... | |
102 | 103 |
} |
103 | 104 |
|
104 | 105 |
@Override |
106 |
public int getTopologyPlan() { |
|
107 |
return this.topologyPlan; |
|
108 |
} |
|
109 |
|
|
110 |
@Override |
|
105 | 111 |
public String getTags() { |
106 | 112 |
return this.tags; |
107 | 113 |
} |
... | ... | |
126 | 132 |
this.comment = other.getComment(); |
127 | 133 |
this.tags = other.getTags(); |
128 | 134 |
this.number = other.getNumber(); |
135 |
this.topologyPlan = other.getTopologyPlan(); |
|
129 | 136 |
} |
130 | 137 |
|
131 | 138 |
@Override |
... | ... | |
154 | 161 |
builder.add("Comment", revision.getComment()); |
155 | 162 |
builder.add("Tags", revision.getTags()); |
156 | 163 |
builder.add("Number", revision.getNumber()); |
164 |
builder.add("TopologyPlan", revision.getTopologyPlan()); |
|
157 | 165 |
return builder; |
158 | 166 |
} |
159 | 167 |
|
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/VCSGisManagerImpl.java | ||
---|---|---|
67 | 67 |
import org.gvsig.vcsgis.lib.workspace.tables.EntitiesTable.EntityRow; |
68 | 68 |
import org.gvsig.vcsgis.lib.workspace.tables.LocalRevisionsTable; |
69 | 69 |
import org.gvsig.vcsgis.lib.workspace.tables.RemoteChangesTable; |
70 |
import org.gvsig.vcsgis.lib.workspace.tables.TopologyplanTable; |
|
70 | 71 |
import org.gvsig.vcsgis.lib.workspace.tables.UsersTable; |
71 | 72 |
import org.gvsig.vcsgis.lib.workspace.tables.VarsTable; |
72 | 73 |
import org.gvsig.vcsgis.lib.workspace.tables.WorkspaceChangesTable; |
... | ... | |
188 | 189 |
WorkspaceChangesTable.featureType(), |
189 | 190 |
RemoteChangesTable.featureType(), |
190 | 191 |
LocalRevisionsTable.featureType(), |
191 |
UsersTable.featureType() |
|
192 |
UsersTable.featureType(), |
|
193 |
TopologyplanTable.featureType() |
|
192 | 194 |
}; |
193 | 195 |
status.setRangeOfValues(0, tables.length); |
194 | 196 |
int step = 1; |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/VCSGisWorkspaceImpl.java | ||
---|---|---|
133 | 133 |
import org.slf4j.LoggerFactory; |
134 | 134 |
import org.gvsig.vcsgis.lib.VCSGisUserIdentificationRequester; |
135 | 135 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisAuthenticateRequest; |
136 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisExportRequest; |
|
137 | 136 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisRequest; |
137 |
import org.gvsig.vcsgis.lib.workspace.tables.TopologyplanTable; |
|
138 | 138 |
|
139 | 139 |
/** |
140 | 140 |
* |
... | ... | |
1381 | 1381 |
return Timestamp.from(LocalDateTime.now().toInstant(ZoneOffset.UTC)); |
1382 | 1382 |
} |
1383 | 1383 |
|
1384 |
public List<VCSGisEntity> getEntitiesOfLocalChanges() { |
|
1385 |
WorkspaceChangesTable changesTable = new WorkspaceChangesTable(); |
|
1386 |
List<VCSGisEntity> entities = new ArrayList<>(); |
|
1387 |
|
|
1388 |
DisposableFeatureSetIterable changesGroupedByEntity = changesTable.getGroupedByEntity(this); |
|
1389 |
|
|
1390 |
for (Feature fchange : changesGroupedByEntity) { |
|
1391 |
WorkspaceChangeRow change = new WorkspaceChangeRow(this, fchange); |
|
1392 |
VCSGisEntity localEntity = change.getEntity(); |
|
1393 |
if (change.isSelected()) { |
|
1394 |
entities.add(localEntity); |
|
1395 |
} |
|
1396 |
} |
|
1397 |
return entities; |
|
1398 |
} |
|
1399 |
|
|
1384 | 1400 |
@SuppressWarnings("Convert2Lambda") |
1385 | 1401 |
public boolean prepareCommitRequest(VCSGisCommitRequest request, Timestamp revisiondate, Timestamp efectivedate, String comment, SimpleTaskStatus status) { |
1386 | 1402 |
boolean isMyStatus = false; |
... | ... | |
3151 | 3167 |
} |
3152 | 3168 |
|
3153 | 3169 |
@Override |
3170 |
public String getTopologyPlan(String topologyPlanCode) { |
|
3171 |
if( StringUtils.isBlank(topologyPlanCode) ) { |
|
3172 |
return null; |
|
3173 |
} |
|
3174 |
TopologyplanTable topologyplanTable = new TopologyplanTable(); |
|
3175 |
return topologyplanTable.getByCode(this, topologyPlanCode); |
|
3176 |
} |
|
3177 |
|
|
3178 |
@Override |
|
3154 | 3179 |
public int importHistory(FeatureStore sourceStore, |
3155 | 3180 |
String name, |
3156 | 3181 |
String label, |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/tables/TopologyplanTable.java | ||
---|---|---|
1 |
package org.gvsig.vcsgis.lib.workspace.tables; |
|
2 |
|
|
3 |
import org.gvsig.vcsgis.lib.repository.localdb.tables.*; |
|
4 |
import org.gvsig.fmap.dal.DALLocator; |
|
5 |
import org.gvsig.fmap.dal.DataManager; |
|
6 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
|
7 |
import org.gvsig.fmap.dal.feature.Feature; |
|
8 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
9 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
10 |
import org.gvsig.tools.dataTypes.DataTypes; |
|
11 |
import org.gvsig.tools.dispose.DisposeUtils; |
|
12 |
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace; |
|
13 |
|
|
14 |
/** |
|
15 |
* |
|
16 |
* @author gvSIG Team |
|
17 |
*/ |
|
18 |
@SuppressWarnings("UseSpecificCatch") |
|
19 |
public class TopologyplanTable extends AbstractRepoTable { |
|
20 |
|
|
21 |
public static final String TABLE_NAME = "VCSGISREPO_TOPOLOGYPLANS"; |
|
22 |
|
|
23 |
private static final String COD_TOPOLOGYPLAN = "COD_TOPOLOGYPLAN"; |
|
24 |
private static final String TOPPLAN_NAME = "TOPP_NAME"; |
|
25 |
private static final String TOPPLAN_DESCRIPTION = "TOPP_DESCRIPTION"; |
|
26 |
private static final String TOPPLAN_DATA = "TOPP_DATA"; |
|
27 |
|
|
28 |
public static final FeatureType featureType() { |
|
29 |
DataManager dataManager = DALLocator.getDataManager(); |
|
30 |
EditableFeatureType ft = dataManager.createFeatureType(); |
|
31 |
ft.setLabel("VCSGIS TopologyPlans"); |
|
32 |
ft.getTags().set("ID", TABLE_NAME); |
|
33 |
ft.add(COD_TOPOLOGYPLAN, DataTypes.STRING) |
|
34 |
.setSize(40) |
|
35 |
.setIsPrimaryKey(true) |
|
36 |
.setLabel("Code") |
|
37 |
.setReadOnly(true); |
|
38 |
ft.add(TOPPLAN_NAME, DataTypes.STRING) |
|
39 |
.setIsIndexed(true) |
|
40 |
.setAllowIndexDuplicateds(true) |
|
41 |
.setSize(50) |
|
42 |
.setLabel("Name"); |
|
43 |
ft.add(TOPPLAN_DESCRIPTION, DataTypes.STRING) |
|
44 |
.setSize(10240) |
|
45 |
.setLabel("Description"); |
|
46 |
ft.add(TOPPLAN_DATA, DataTypes.STRING) |
|
47 |
.setSize(10240) |
|
48 |
.setLabel("Serialized topology plan in json."); |
|
49 |
|
|
50 |
return ft.getNotEditableCopy(); |
|
51 |
} |
|
52 |
|
|
53 |
public TopologyplanTable() { |
|
54 |
super(TABLE_NAME, featureType()); |
|
55 |
} |
|
56 |
|
|
57 |
public String getByCode(VCSGisWorkspace workspace, String topologyPlanCode) { |
|
58 |
FeatureStore store = null; |
|
59 |
try { |
|
60 |
store = workspace.getFeatureStore(TABLE_NAME); |
|
61 |
Feature f = store.findFirst("\""+COD_TOPOLOGYPLAN+"\"='"+topologyPlanCode+"'"); |
|
62 |
if( f==null ) { |
|
63 |
return null; |
|
64 |
} |
|
65 |
return f.getString(TOPPLAN_DATA); |
|
66 |
} catch (Exception ex) { |
|
67 |
throw new RuntimeException("Can't retrieve topology plan '"+topologyPlanCode+"'.", ex); |
|
68 |
} finally { |
|
69 |
DisposeUtils.disposeQuietly(store); |
|
70 |
} |
|
71 |
} |
|
72 |
|
|
73 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/tables/LocalRevisionsTable.java | ||
---|---|---|
11 | 11 |
import org.gvsig.json.JsonObjectBuilder; |
12 | 12 |
import org.gvsig.tools.dataTypes.DataTypes; |
13 | 13 |
import org.gvsig.tools.dispose.DisposeUtils; |
14 |
import org.gvsig.tools.dynobject.DynObjectValueItem; |
|
14 | 15 |
import org.gvsig.tools.util.GetItemWithSizeAndIterator64; |
16 |
import static org.gvsig.vcsgis.lib.VCSGisManager.TOPOLOGYPLAN_NOTPASSED; |
|
17 |
import static org.gvsig.vcsgis.lib.VCSGisManager.TOPOLOGYPLAN_PASSED; |
|
18 |
import static org.gvsig.vcsgis.lib.VCSGisManager.TOPOLOGYPLAN_UNKNOWN; |
|
15 | 19 |
import org.gvsig.vcsgis.lib.VCSGisRevision; |
16 | 20 |
import org.gvsig.vcsgis.lib.VCSGisRevisionImpl; |
17 | 21 |
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace; |
... | ... | |
34 | 38 |
private static final String REVISION_DATE = "REV_OPERATIONDATE"; |
35 | 39 |
private static final String REVISION_TAGS = "REV_TAGS"; |
36 | 40 |
private static final String REVISION_GROUP = "REV_IDENTIFIER"; |
41 |
private static final String REVISION_TOPOLOGYPLAN = "REV_TOPPLAN"; |
|
37 | 42 |
|
38 | 43 |
public static class LocalRevisionRow extends AbstractRow implements VCSGisRevision { |
39 | 44 |
|
... | ... | |
70 | 75 |
} |
71 | 76 |
|
72 | 77 |
@Override |
78 |
public int getTopologyPlan() { |
|
79 |
return this.getInt(REVISION_TOPOLOGYPLAN); |
|
80 |
} |
|
81 |
|
|
82 |
@Override |
|
73 | 83 |
public String getTags() { |
74 | 84 |
return this.getString(REVISION_TAGS); |
75 | 85 |
} |
... | ... | |
115 | 125 |
this.set(REVISION_EFECTIVEDATE, tm); |
116 | 126 |
} |
117 | 127 |
|
128 |
public void setTopologyPlan(int topologyPlan) { |
|
129 |
this.set(REVISION_TOPOLOGYPLAN,topologyPlan); |
|
130 |
} |
|
131 |
|
|
118 | 132 |
public void setTags(String tags) { |
119 | 133 |
this.set(REVISION_TAGS,tags); |
120 | 134 |
} |
... | ... | |
143 | 157 |
this.setTags(other.getTags()); |
144 | 158 |
this.setUserCode(other.getUserCode()); |
145 | 159 |
this.setNumber(other.getNumber()); |
160 |
this.setTopologyPlan(other.getTopologyPlan()); |
|
146 | 161 |
} |
147 | 162 |
|
148 | 163 |
@Override |
... | ... | |
221 | 236 |
.setIsIndexed(true) |
222 | 237 |
.setAllowIndexDuplicateds(true) |
223 | 238 |
.setLabel("Revision number"); |
239 |
ft.add(REVISION_TOPOLOGYPLAN, DataTypes.INT) |
|
240 |
.setIsIndexed(false) |
|
241 |
.setLabel("Topology plan") |
|
242 |
.setAvailableValues(new DynObjectValueItem[] { |
|
243 |
new DynObjectValueItem(TOPOLOGYPLAN_UNKNOWN, "Unknown"), |
|
244 |
new DynObjectValueItem(TOPOLOGYPLAN_PASSED, "Passed"), |
|
245 |
new DynObjectValueItem(TOPOLOGYPLAN_NOTPASSED, "Not passed"), |
|
246 |
}); |
|
224 | 247 |
ft.add(REVISION_TAGS, DataTypes.STRING) |
225 | 248 |
.setSize(200) |
226 | 249 |
.setLabel("Tags"); |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/tables/EntitiesTable.java | ||
---|---|---|
50 | 50 |
private static final String COD_TOPOLOGYPLAN = "COD_TOPOLOGYPLAN"; |
51 | 51 |
private static final String CATEGORY = "ENT_CATEGORY"; |
52 | 52 |
private static final String LABEL = "ENT_LABEL"; |
53 |
private static final String AUTHORIZATIONS = "ENT_AUTORIZATIONS"; |
|
54 |
private static final String TOPOLOGYPLAN_MODE = "ENT_TOPOLOGYPLAN_MODE"; |
|
53 | 55 |
|
54 | 56 |
public static class EntityRow extends AbstractRow implements VCSGisWorkspaceEntity { |
55 | 57 |
|
... | ... | |
125 | 127 |
} |
126 | 128 |
|
127 | 129 |
@Override |
130 |
public String getAuthorizations() { |
|
131 |
return this.getString(AUTHORIZATIONS); |
|
132 |
} |
|
133 |
|
|
134 |
@Override |
|
135 |
public int getTopologyPlanMode() { |
|
136 |
return this.getInt(TOPOLOGYPLAN_MODE); |
|
137 |
} |
|
138 |
|
|
139 |
@Override |
|
128 | 140 |
public String getLabel() { |
129 | 141 |
return this.getString(LABEL); |
130 | 142 |
} |
... | ... | |
227 | 239 |
} |
228 | 240 |
|
229 | 241 |
@Override |
242 |
public VCSGisEntityEditable setAuthorizations(String authorizations) { |
|
243 |
this.set(AUTHORIZATIONS, authorizations); |
|
244 |
return this; |
|
245 |
} |
|
246 |
|
|
247 |
@Override |
|
248 |
public VCSGisEntityEditable setTopologyPlanMode(int topologyPlanMode) { |
|
249 |
this.set(TOPOLOGYPLAN_MODE, topologyPlanMode); |
|
250 |
return this; |
|
251 |
} |
|
252 |
|
|
253 |
@Override |
|
230 | 254 |
public VCSGisEntityEditable setLabel(String label) { |
231 | 255 |
if(label != null){ |
232 | 256 |
this.set(LABEL, label); |
... | ... | |
413 | 437 |
VCSGisUtils.fromJson(this, json); |
414 | 438 |
} |
415 | 439 |
|
440 |
@Override |
|
441 |
public boolean isAuthorized(String userName, String operation) { |
|
442 |
return VCSGisUtils.isAuthoriced(this, operation, userName); |
|
443 |
} |
|
416 | 444 |
} |
417 | 445 |
|
418 | 446 |
|
... | ... | |
523 | 551 |
ft.add(LABEL, DataTypes.STRING) |
524 | 552 |
.setSize(200) |
525 | 553 |
.setLabel("Label"); |
554 |
ft.add(AUTHORIZATIONS, DataTypes.STRING) |
|
555 |
.setSize(10240) |
|
556 |
.setLabel("Authorizations"); |
|
526 | 557 |
ft.add(DESCRIPTION, DataTypes.STRING) |
527 | 558 |
.setSize(10240) |
528 | 559 |
.setLabel("Description"); |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/VCSGisUtils.java | ||
---|---|---|
28 | 28 |
import java.util.List; |
29 | 29 |
import java.util.Map; |
30 | 30 |
import java.util.function.Predicate; |
31 |
import javax.json.JsonArray; |
|
31 | 32 |
import javax.json.JsonObject; |
32 | 33 |
import org.apache.commons.io.IOUtils; |
33 | 34 |
import org.apache.commons.lang3.StringUtils; |
... | ... | |
92 | 93 |
import static org.gvsig.vcsgis.lib.VCSGisManager.STATE_LOCAL_OUTDATED; |
93 | 94 |
import static org.gvsig.vcsgis.lib.VCSGisManager.STATE_LOCAL_OUTDATED_AND_MODIFIED; |
94 | 95 |
import static org.gvsig.vcsgis.lib.VCSGisManager.STATE_LOCAL_UNMODIFIED; |
96 |
import static org.gvsig.vcsgis.lib.VCSGisManager.TOPOLOGYPLAN_MODE_RECOMMENDED; |
|
95 | 97 |
|
96 | 98 |
/** |
97 | 99 |
* |
... | ... | |
112 | 114 |
public static final String ENTITY_USERCODE = "UserCode"; |
113 | 115 |
public static final String ENTITY_CATEGORY = "Category"; |
114 | 116 |
public static final String ENTITY_LABEL = "Label"; |
117 |
public static final String ENTITY_AUTHORIZATIONS = "Autorizations"; |
|
118 |
public static final String ENTITY_TOPOLOGYPLANMODE = "TopologyPlanMode"; |
|
115 | 119 |
|
116 | 120 |
// private static final String[] JSONENTITY_ATTRNAMES = new String[] { |
117 | 121 |
// ENTITY_DATATABLENAME, |
... | ... | |
217 | 221 |
target.setUserCode(source.getUserCode()); |
218 | 222 |
target.setCategory(source.getCategory()); |
219 | 223 |
target.setLabel(source.getLabel()); |
224 |
target.setAuthorizations(source.getAuthorizations()); |
|
225 |
target.setTopologyPlanMode(source.getTopologyPlanMode()); |
|
220 | 226 |
} |
221 | 227 |
public static JsonObjectBuilder toJsonBuilder(VCSGisEntity entity, Predicate<String> excludes) { |
222 | 228 |
JsonObjectBuilder jsonEntity = Json.createObjectBuilder(); |
... | ... | |
259 | 265 |
if( excludes==null || !excludes.test(ENTITY_LABEL) ) { |
260 | 266 |
jsonEntity.add(ENTITY_LABEL, entity.getLabel()); |
261 | 267 |
} |
268 |
if( excludes==null || !excludes.test(ENTITY_AUTHORIZATIONS) ) { |
|
269 |
jsonEntity.add(ENTITY_AUTHORIZATIONS, entity.getAuthorizations()); |
|
270 |
} |
|
271 |
if( excludes==null || !excludes.test(ENTITY_TOPOLOGYPLANMODE) ) { |
|
272 |
jsonEntity.add(ENTITY_TOPOLOGYPLANMODE, entity.getTopologyPlanMode()); |
|
273 |
} |
|
262 | 274 |
|
263 | 275 |
return jsonEntity; |
264 | 276 |
} |
... | ... | |
303 | 315 |
if( jsonEntity.containsKey(ENTITY_LABEL) ) { |
304 | 316 |
entity.setLabel(jsonEntity.getString(ENTITY_LABEL, null)); |
305 | 317 |
} |
318 |
if( jsonEntity.containsKey(ENTITY_AUTHORIZATIONS) ) { |
|
319 |
entity.setAuthorizations(jsonEntity.getString(ENTITY_AUTHORIZATIONS, null)); |
|
320 |
} |
|
321 |
if( jsonEntity.containsKey(ENTITY_TOPOLOGYPLANMODE) ) { |
|
322 |
entity.setTopologyPlanMode(jsonEntity.getInt(ENTITY_TOPOLOGYPLANMODE, TOPOLOGYPLAN_MODE_RECOMMENDED)); |
|
323 |
} |
|
306 | 324 |
} |
325 |
|
|
326 |
public static boolean isAuthoriced(VCSGisEntity entity, String operation, String userid) { |
|
327 |
String s = entity.getAuthorizations(); |
|
328 |
if( StringUtils.isBlank(s) ) { |
|
329 |
return true; |
|
330 |
} |
|
331 |
JsonObject authorizations = Json.createObject(s); |
|
332 |
if( authorizations==null ) { |
|
333 |
return false; |
|
334 |
} |
|
335 |
if( StringUtils.isBlank(userid) || StringUtils.isBlank(operation)) { |
|
336 |
return false; |
|
337 |
} |
|
338 |
JsonArray op = authorizations.getJsonArray(operation); |
|
339 |
if( op == null ) { |
|
340 |
return false; |
|
341 |
} |
|
342 |
userid = userid.toLowerCase(); |
|
343 |
if( op.contains(userid) ) { |
|
344 |
return true; |
|
345 |
} |
|
346 |
return false; |
|
347 |
} |
|
307 | 348 |
|
308 | 349 |
public static String getOperationLabel(int operation) { |
309 | 350 |
return OPERATION_LABELS.getOrDefault(operation, "unknown"); |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/EntityEditableImpl.java | ||
---|---|---|
47 | 47 |
String fieldForLabel; |
48 | 48 |
String category; |
49 | 49 |
String label; |
50 |
String authorizations; |
|
51 |
int topologyPlanMode; |
|
50 | 52 |
FeatureType featureType; |
51 | 53 |
|
52 | 54 |
public EntityEditableImpl() { |
... | ... | |
97 | 99 |
} |
98 | 100 |
|
99 | 101 |
@Override |
102 |
public int getTopologyPlanMode() { |
|
103 |
return this.topologyPlanMode; |
|
104 |
} |
|
105 |
|
|
106 |
@Override |
|
100 | 107 |
public String getEntityName() { |
101 | 108 |
return this.entityName; |
102 | 109 |
} |
... | ... | |
146 | 153 |
} |
147 | 154 |
|
148 | 155 |
@Override |
156 |
public String getAuthorizations() { |
|
157 |
return this.authorizations; |
|
158 |
} |
|
159 |
|
|
160 |
@Override |
|
149 | 161 |
public String getLabel() { |
150 | 162 |
return this.label; |
151 | 163 |
} |
... | ... | |
217 | 229 |
} |
218 | 230 |
|
219 | 231 |
@Override |
232 |
public VCSGisEntityEditable setAuthorizations(String authorizations) { |
|
233 |
this.authorizations = authorizations; |
|
234 |
return this; |
|
235 |
} |
|
236 |
|
|
237 |
@Override |
|
238 |
public VCSGisEntityEditable setTopologyPlanMode(int topologyPlanMode) { |
|
239 |
this.topologyPlanMode = topologyPlanMode; |
|
240 |
return this; |
|
241 |
} |
|
242 |
|
|
243 |
@Override |
|
220 | 244 |
public VCSGisEntityEditable setLabel(String label) { |
221 | 245 |
this.label = label; |
222 | 246 |
return this; |
... | ... | |
253 | 277 |
public String toString() { |
254 | 278 |
return this.getEntityName(); |
255 | 279 |
} |
280 |
|
|
281 |
@Override |
|
282 |
public boolean isAuthorized(String userName, String operation) { |
|
283 |
return VCSGisUtils.isAuthoriced(this, operation, userName); |
|
284 |
} |
|
256 | 285 |
|
257 | 286 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/VCSGisTopologyPlanImpl.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; |
|
24 |
|
|
25 |
import javax.json.JsonObject; |
|
26 |
import org.gvsig.json.Json; |
|
27 |
import org.gvsig.json.JsonObjectBuilder; |
|
28 |
|
|
29 |
/** |
|
30 |
* |
|
31 |
* @author gvSIG Team |
|
32 |
*/ |
|
33 |
public class VCSGisTopologyPlanImpl implements VCSGisTopologyPlan { |
|
34 |
|
|
35 |
private String topologyPlanCode; |
|
36 |
private String name; |
|
37 |
private String description; |
|
38 |
private String data; |
|
39 |
|
|
40 |
public VCSGisTopologyPlanImpl(JsonObject jsonData) { |
|
41 |
this.topologyPlanCode = jsonData.getString("TopologyPlanCode", null); |
|
42 |
this.name = jsonData.getString("Name", null); |
|
43 |
this.description = jsonData.getString("Description", null); |
|
44 |
this.data = jsonData.getString("Data", null); |
|
45 |
} |
|
46 |
|
|
47 |
|
|
48 |
@Override |
|
49 |
public String getTopologyPlanCode() { |
|
50 |
return this.topologyPlanCode; |
|
51 |
} |
|
52 |
|
|
53 |
@Override |
|
54 |
public String getName() { |
|
55 |
return this.name; |
|
56 |
} |
|
57 |
|
|
58 |
@Override |
|
59 |
public String getDescription() { |
|
60 |
return this.description; |
|
61 |
} |
|
62 |
|
|
63 |
@Override |
|
64 |
public String getData() { |
|
65 |
return this.data; |
|
66 |
} |
|
67 |
|
|
68 |
@Override |
|
69 |
public String getLabel() { |
|
70 |
return this.getName(); |
|
71 |
} |
|
72 |
|
|
73 |
@Override |
|
74 |
public VCSGisTopologyPlan getValue() { |
|
75 |
return this; |
|
76 |
} |
|
77 |
|
|
78 |
@Override |
|
79 |
public void copyFrom(VCSGisTopologyPlan other) { |
|
80 |
this.topologyPlanCode = other.getTopologyPlanCode(); |
|
81 |
this.name = other.getName(); |
|
82 |
this.description = other.getDescription(); |
|
83 |
this.data = other.getData(); |
|
84 |
} |
|
85 |
|
|
86 |
@Override |
|
87 |
public JsonObject toJson() { |
|
88 |
return this.toJsonBuilder().build(); |
|
89 |
} |
|
90 |
|
|
91 |
@Override |
|
92 |
public JsonObjectBuilder toJsonBuilder() { |
|
93 |
return VCSGisTopologyPlanImpl.toJsonBuilder(this); |
|
94 |
} |
|
95 |
|
|
96 |
|
|
97 |
@Override |
|
98 |
public String toString() { |
|
99 |
return VCSGisTopologyPlanImpl.toString(this); |
|
100 |
} |
|
101 |
|
|
102 |
public static JsonObjectBuilder toJsonBuilder(VCSGisTopologyPlan topologyPlan) { |
|
103 |
JsonObjectBuilder builder = Json.createObjectBuilder(); |
|
104 |
builder.add("TopologyPlanCode", topologyPlan.getTopologyPlanCode()); |
|
105 |
builder.add("Name", topologyPlan.getName()); |
|
106 |
builder.add("Description", topologyPlan.getDescription()); |
|
107 |
builder.add("Data", topologyPlan.getData()); |
|
108 |
return builder; |
|
109 |
} |
|
110 |
|
|
111 |
public static String getLabel(VCSGisTopologyPlan topologyPlan) { |
|
112 |
return topologyPlan.getName(); |
|
113 |
} |
|
114 |
|
|
115 |
public static String toString(VCSGisTopologyPlan topologyPlan) { |
|
116 |
return topologyPlan.getName(); |
|
117 |
} |
|
118 |
|
|
119 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/workspace/VCSGisWorkspace.java | ||
---|---|---|
171 | 171 |
|
172 | 172 |
public List<VCSGisEntity> getEntitiesOfRemoteChanges(); |
173 | 173 |
|
174 |
public List<VCSGisEntity> getEntitiesOfLocalChanges(); |
|
175 |
|
|
174 | 176 |
public void addToConnectionPool(); |
175 | 177 |
|
176 | 178 |
public int history(String entityName, String group, Timestamp minDate, Timestamp maxDate, int maxNumberOfRevisions, SimpleTaskStatus status); |
... | ... | |
194 | 196 |
public void setUserIdentificationRequester(VCSGisUserIdentificationRequester userIdentificationRequester); |
195 | 197 |
|
196 | 198 |
public Collection<String> getEntityCategories(); |
197 |
|
|
199 |
|
|
200 |
public String getTopologyPlan(String topologyPlanCode); |
|
201 |
|
|
198 | 202 |
public int importHistory( FeatureStore sourceStore, |
199 | 203 |
String name, |
200 | 204 |
String label, |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/repository/requests/VCSGisExportRequest.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 |
import java.sql.Timestamp; |
|
25 |
import org.gvsig.tools.dispose.DisposableIterable; |
|
26 |
import org.gvsig.vcsgis.lib.VCSGisEntity; |
|
27 |
import org.gvsig.vcsgis.lib.repository.VCSGisRepositoryData; |
|
28 |
|
|
29 |
/** |
|
30 |
* |
|
31 |
* @author gvSIG Team |
|
32 |
*/ |
|
33 |
public interface VCSGisExportRequest extends VCSGisRequest { |
|
34 |
|
|
35 |
// in |
|
36 |
public String getEntityName(); |
|
37 |
|
|
38 |
public Timestamp getEfectiveDate(); |
|
39 |
|
|
40 |
public void setEfectiveDate(Timestamp efectiveDate); |
|
41 |
|
|
42 |
public void setEfectiveDate(String efectiveDate); |
|
43 |
|
|
44 |
public String getRevisionCode(); |
|
45 |
|
|
46 |
public void setRevisionCode(String revisionCode); |
|
47 |
|
|
48 |
// out |
|
49 |
public VCSGisEntity getEntity(); |
|
50 |
|
|
51 |
public DisposableIterable<VCSGisRepositoryData> getData(); |
|
52 |
|
|
53 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/repository/requests/VCSGisTopologyPlansRequest.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 |
import java.util.List; |
|
25 |
import org.gvsig.vcsgis.lib.VCSGisTopologyPlan; |
|
26 |
|
|
27 |
/** |
|
28 |
* |
|
29 |
* @author gvSIG Team |
|
30 |
*/ |
|
31 |
public interface VCSGisTopologyPlansRequest extends VCSGisRequest { |
|
32 |
|
|
33 |
public List<VCSGisTopologyPlan> getTopologyPlans(); |
|
34 |
|
|
35 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/repository/VCSGisRepository.java | ||
---|---|---|
29 | 29 |
import org.gvsig.tools.dispose.Disposable; |
30 | 30 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisAuthenticateRequest; |
31 | 31 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisEntitiesRequest; |
32 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisExportRequest; |
|
33 | 32 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisRowCreateRequest; |
34 | 33 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisRowDeleteRequest; |
35 | 34 |
import org.gvsig.vcsgis.lib.repository.requests.VCSGisRowUpdateRequest; |
... | ... | |
73 | 72 |
public void addObserver(String tableName, String type, String operation, String command); |
74 | 73 |
|
75 | 74 |
public VCSGisAuthenticateRequest createAuthenticateRequest(String userId, String password); |
76 |
|
|
77 |
public VCSGisExportRequest createExportRequest(String entityName); |
|
78 |
|
|
79 | 75 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/VCSGisEntityEditable.java | ||
---|---|---|
53 | 53 |
|
54 | 54 |
public VCSGisEntityEditable setCategory(String category); |
55 | 55 |
|
56 |
public VCSGisEntityEditable setTopologyPlanMode(int topologyPlanMode); |
|
57 |
|
|
56 | 58 |
public void copyfrom(VCSGisEntity entity); |
57 | 59 |
|
58 | 60 |
public VCSGisEntityEditable setLabel(String label); |
59 | 61 |
|
62 |
public VCSGisEntityEditable setAuthorizations(String authorizations); |
|
63 |
|
|
60 | 64 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/VCSGisTopologyPlan.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.sql.Timestamp; |
|
25 |
import org.gvsig.json.SupportToJson; |
|
26 |
import org.gvsig.tools.util.LabeledValue; |
|
27 |
|
|
28 |
/** |
|
29 |
* |
|
30 |
* @author gvSIG Team |
|
31 |
*/ |
|
32 |
public interface VCSGisTopologyPlan extends LabeledValue<VCSGisTopologyPlan>, SupportToJson { |
|
33 |
|
|
34 |
public String getTopologyPlanCode(); |
|
35 |
|
|
36 |
public String getName(); |
|
37 |
|
|
38 |
public String getDescription(); |
|
39 |
|
|
40 |
public String getData(); |
|
41 |
|
|
42 |
public void copyFrom(VCSGisTopologyPlan other); |
|
43 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/VCSGisManager.java | ||
---|---|---|
29 | 29 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
30 | 30 |
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
31 | 31 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer; |
32 |
import org.gvsig.tools.dynobject.DynObjectValueItem; |
|
32 | 33 |
import org.gvsig.tools.task.SimpleTaskStatus; |
33 | 34 |
import org.gvsig.vcsgis.lib.repository.VCSGisRepository; |
34 | 35 |
import org.gvsig.vcsgis.lib.server.VCSGisServerController; |
... | ... | |
126 | 127 |
|
127 | 128 |
public static final int OP_ADD_ENTITY = 3; |
128 | 129 |
|
130 |
public static final int TOPOLOGYPLAN_UNKNOWN = 0; |
|
131 |
public static final int TOPOLOGYPLAN_PASSED = 1; |
|
132 |
public static final int TOPOLOGYPLAN_NOTPASSED = 2; |
|
133 |
|
|
134 |
public static final int TOPOLOGYPLAN_MODE_RECOMMENDED = 0; |
|
135 |
public static final int TOPOLOGYPLAN_MODE_MANDATORY = 1; |
|
136 |
|
|
129 | 137 |
public static final String DEFAULT_DATA_TABLE = "VCSGIS_DATA"; |
130 | 138 |
public static final String FEATURECODE_FIELD_NAME = "VCSGISCODE"; |
131 | 139 |
|
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/VCSGisEntity.java | ||
---|---|---|
57 | 57 |
|
58 | 58 |
public String getCategory(); |
59 | 59 |
|
60 |
public String getAuthorizations(); |
|
61 |
|
|
62 |
public int getTopologyPlanMode(); |
|
63 |
|
|
60 | 64 |
public void copyto(VCSGisEntityEditable entity); |
61 | 65 |
|
66 |
@Override |
|
62 | 67 |
public String getLabel(); |
63 | 68 |
|
69 |
public boolean isAuthorized(String userName, String operation); |
|
70 |
|
|
64 | 71 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.api/src/main/java/org/gvsig/vcsgis/lib/VCSGisRevision.java | ||
---|---|---|
45 | 45 |
|
46 | 46 |
public long getNumber(); |
47 | 47 |
|
48 |
public int getTopologyPlan(); |
|
49 |
|
|
48 | 50 |
public String getTags(); |
49 | 51 |
|
50 | 52 |
public void copyFrom(VCSGisRevision other); |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/pom.xml | ||
---|---|---|
11 | 11 |
<dependency> |
12 | 12 |
<groupId>org.gvsig</groupId> |
13 | 13 |
<artifactId>org.gvsig.vcsgis.swing.api</artifactId> |
14 |
<scope>compile</scope> |
|
14 | 15 |
</dependency> |
15 | 16 |
<dependency> |
16 | 17 |
<groupId>org.gvsig</groupId> |
17 | 18 |
<artifactId>org.gvsig.tools.lib</artifactId> |
19 |
<scope>compile</scope> |
|
18 | 20 |
</dependency> |
19 | 21 |
<dependency> |
20 | 22 |
<groupId>com.jgoodies</groupId> |
21 | 23 |
<artifactId>jgoodies-forms</artifactId> |
24 |
<scope>compile</scope> |
|
22 | 25 |
</dependency> |
23 | 26 |
<dependency> |
24 | 27 |
<groupId>org.gvsig</groupId> |
25 | 28 |
<artifactId>org.gvsig.vcsgis.lib.api</artifactId> |
29 |
<scope>compile</scope> |
|
26 | 30 |
</dependency> |
27 | 31 |
<dependency> |
28 | 32 |
<groupId>org.gvsig</groupId> |
29 | 33 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
34 |
<scope>compile</scope> |
|
30 | 35 |
</dependency> |
31 | 36 |
<dependency> |
32 | 37 |
<groupId>org.gvsig</groupId> |
33 | 38 |
<artifactId>org.gvsig.fmap.dal.swing.api</artifactId> |
34 |
<type>jar</type>
|
|
39 |
<scope>compile</scope>
|
|
35 | 40 |
</dependency> |
36 | 41 |
<dependency> |
37 | 42 |
<groupId>org.gvsig</groupId> |
38 | 43 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
44 |
<scope>compile</scope> |
|
45 |
</dependency> |
|
46 |
<dependency> |
|
47 |
<groupId>org.gvsig</groupId> |
|
48 |
<artifactId>org.gvsig.topology.lib.api</artifactId> |
|
49 |
<scope>compile</scope> |
|
50 |
</dependency> |
|
51 |
<dependency> |
|
52 |
<groupId>org.gvsig</groupId> |
|
53 |
<artifactId>org.gvsig.topology.swing.api</artifactId> |
|
54 |
<version>1.0.15-SNAPSHOT</version> |
|
39 | 55 |
<type>jar</type> |
40 | 56 |
</dependency> |
41 | 57 |
</dependencies> |
Also available in: Unified diff