gvsig-projects-pool / 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 @ 3459
History | View | Annotate | Download (8.3 KB)
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.workspace; |
23 |
|
24 |
import java.sql.Timestamp; |
25 |
import java.util.Collection; |
26 |
import java.util.Iterator; |
27 |
import java.util.List; |
28 |
import org.apache.commons.lang3.mutable.MutableLong; |
29 |
import org.apache.commons.lang3.mutable.MutableObject; |
30 |
import org.gvsig.fmap.dal.feature.Feature; |
31 |
import org.gvsig.fmap.dal.feature.FeatureReference; |
32 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
33 |
import org.gvsig.fmap.dal.feature.FeatureType; |
34 |
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
35 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer; |
36 |
import org.gvsig.tools.dispose.Disposable; |
37 |
import org.gvsig.tools.task.SimpleTaskStatus; |
38 |
import org.gvsig.tools.util.GetItemWithSize64; |
39 |
import org.gvsig.vcsgis.lib.VCSGisEntity; |
40 |
import org.gvsig.vcsgis.lib.VCSGisRevision; |
41 |
import org.gvsig.vcsgis.lib.VCSGisUser; |
42 |
import org.gvsig.vcsgis.lib.VCSGisUserIdentificationRequester; |
43 |
import org.gvsig.vcsgis.lib.repository.VCSGisRepository; |
44 |
import org.gvsig.vcsgis.lib.repository.VCSGisRepositoryChange; |
45 |
|
46 |
/**
|
47 |
*
|
48 |
* @author gvSIG Team
|
49 |
*/
|
50 |
public interface VCSGisWorkspace extends Disposable { |
51 |
|
52 |
public static final String ALL_REVISIONS = "ALL"; |
53 |
|
54 |
public String getCode(); |
55 |
|
56 |
public String getLabel(); |
57 |
|
58 |
public String getErrorMessage(int errcode); |
59 |
|
60 |
public JDBCServerExplorer getExplorer();
|
61 |
|
62 |
public JDBCServerExplorerParameters getExplorerParameters();
|
63 |
|
64 |
public FeatureStore getFeatureStore(String tableName); |
65 |
|
66 |
public FeatureStore openFeatureStore(String tableName); |
67 |
|
68 |
public FeatureType getFeatureType(String tableName); |
69 |
|
70 |
public void forceReloadWorkspaceEntities(); |
71 |
|
72 |
public void reloadWorkspaceEntities(); |
73 |
|
74 |
public void create_table(String name); |
75 |
|
76 |
public void create_table(VCSGisEntity entity); |
77 |
|
78 |
public int addEntity(FeatureType featureType, String name, String description, String fieldForLabel); |
79 |
|
80 |
public int addEntity(FeatureType featureType, String name, String description, String fieldForLabel, String category, String label, String pkName); |
81 |
|
82 |
public int add(String name, FeatureStore store, String fieldForLabel); |
83 |
|
84 |
public int add(String name, FeatureStore store, String fieldForLabel, String category, String label); |
85 |
|
86 |
public int add(String name, FeatureStore source, String fieldForLabel, String category, String label, String pkName, SimpleTaskStatus status); |
87 |
|
88 |
public int addChange(int changeCode, FeatureStore store, Feature feature); |
89 |
|
90 |
public int addChanges( |
91 |
FeatureStore store, |
92 |
Iterator<Feature> insertedsFeatures,
|
93 |
Iterator<Feature> updatedsFeatures,
|
94 |
Iterator<FeatureReference> deletedsFeatures
|
95 |
); |
96 |
|
97 |
public boolean canCommit(); |
98 |
|
99 |
public boolean canCommit(MutableObject<String> message); |
100 |
|
101 |
public boolean canCommit(MutableObject<String> message, List<String> entityCodes); |
102 |
|
103 |
public int commit(); |
104 |
|
105 |
public int commit(Timestamp date, String comment, SimpleTaskStatus status); |
106 |
|
107 |
public int commit(Timestamp revisionDate, Timestamp efectiveDate, String comment, SimpleTaskStatus status); |
108 |
|
109 |
public int commit(List<String> entityCodes, Timestamp revisiondate, Timestamp efectivedate, String comment, SimpleTaskStatus status); |
110 |
|
111 |
public int checkout(String tableName); |
112 |
|
113 |
public int checkout(String tableName, String revisionCode); |
114 |
|
115 |
public int checkout(String tableName, String revisionCode, SimpleTaskStatus status); |
116 |
|
117 |
public int checkout(List<String> tableNames, SimpleTaskStatus status); |
118 |
|
119 |
public int updatePrepare(String tableName); |
120 |
|
121 |
public int updatePrepare(String tableName, SimpleTaskStatus status); |
122 |
|
123 |
public int update(String tableName); |
124 |
|
125 |
public int update(String tableName, SimpleTaskStatus status); |
126 |
|
127 |
public int merge(String tableName); |
128 |
|
129 |
public int merge(String tableName, SimpleTaskStatus status); |
130 |
|
131 |
public int merge(String tableName, MutableLong localChangesCreated, SimpleTaskStatus status); |
132 |
|
133 |
public int updateClean(String entityCode); |
134 |
|
135 |
public int updateClean(String entityCode, SimpleTaskStatus status); |
136 |
|
137 |
public boolean updateNeedMerge(String entityName); |
138 |
|
139 |
public int updateEntitiesFromRepository(); |
140 |
|
141 |
public int updateEntitiesFromRepository(SimpleTaskStatus status); |
142 |
|
143 |
public VCSGisWorkspaceChanges<VCSGisRepositoryChange> getRemoteChanges();
|
144 |
|
145 |
public VCSGisWorkspaceChanges<VCSGisRepositoryChange> getRemoteChangesByEntity(String entityName); |
146 |
|
147 |
public VCSGisWorkspaceChanges<VCSGisWorkspaceChange> getLocalChanges();
|
148 |
|
149 |
public VCSGisWorkspaceChanges<VCSGisWorkspaceChange> getLocalChanges(List<VCSGisEntity> entities); |
150 |
|
151 |
public void reloadRepositoryEntities(SimpleTaskStatus status); |
152 |
|
153 |
public List<VCSGisEntity> getRepositoryEntities(); |
154 |
|
155 |
public List<VCSGisWorkspaceEntity> getWorkspaceEntities(); |
156 |
|
157 |
public VCSGisWorkspaceEntity getWorkspaceEntity(String entity); |
158 |
|
159 |
public VCSGisWorkspaceEntity getWorkspaceEntityByName(String entityName); |
160 |
|
161 |
public VCSGisWorkspaceEntity getWorkspaceEntityByCode(String entityCode); |
162 |
|
163 |
public boolean existsInWorkspace(String entity); |
164 |
|
165 |
public boolean existsInWorkspace(VCSGisEntity entity); |
166 |
|
167 |
public VCSGisEntity getRepositoryEntity(String entity); |
168 |
|
169 |
public VCSGisEntity getRepositoryEntityByCode(String entityCode); |
170 |
|
171 |
public VCSGisEntity getRepositoryEntityByName(String entityName); |
172 |
|
173 |
public String createUniqueCode(); |
174 |
|
175 |
public VCSGisEntity getEntity(String entityName); |
176 |
|
177 |
public VCSGisRepository getRepository();
|
178 |
|
179 |
public List<VCSGisEntity> getEntitiesOfRemoteChanges(); |
180 |
|
181 |
public List<VCSGisEntity> getEntitiesOfLocalChanges(); |
182 |
|
183 |
public void addToConnectionPool(); |
184 |
|
185 |
public int history(String entityName, String group, Timestamp minDate, Timestamp maxDate, int maxNumberOfRevisions, SimpleTaskStatus status); |
186 |
|
187 |
public int history(String entityName, String group, int maxNumberOfRevisions, SimpleTaskStatus status); |
188 |
|
189 |
public GetItemWithSize64<VCSGisRevision> getRevisions(String entityName, String group); |
190 |
|
191 |
public String getUserName(String userCode); |
192 |
|
193 |
public VCSGisUser getUser(String userCode); |
194 |
|
195 |
public boolean isInMyDatabase(FeatureStore store); |
196 |
|
197 |
public Feature getRelatedFeature(VCSGisEntity entity, String featureCode); |
198 |
|
199 |
public Feature getRelatedFeature(VCSGisRepositoryChange change);
|
200 |
|
201 |
public int removeEntity(String nameOrCode); |
202 |
|
203 |
public int removeEntities(List<String> namesOrCodes); |
204 |
|
205 |
public VCSGisUserIdentificationRequester getUserIdentificationRequester();
|
206 |
|
207 |
public void setUserIdentificationRequester(VCSGisUserIdentificationRequester userIdentificationRequester); |
208 |
|
209 |
public Collection<String> getEntityCategories(); |
210 |
|
211 |
public String getTopologyPlan(String topologyPlanCode); |
212 |
|
213 |
public int importHistory( FeatureStore sourceStore, |
214 |
String name,
|
215 |
String label,
|
216 |
String category,
|
217 |
String attrNameForLabel,
|
218 |
String fieldCodeName,
|
219 |
String fieldDateName,
|
220 |
String fieldOrderName);
|
221 |
|
222 |
public int revert(String nameOrCode); |
223 |
|
224 |
public int revert(String nameOrCode, SimpleTaskStatus status); |
225 |
|
226 |
public List<VCSGisWorkspaceEntity> getEntitiesWithChanges(); |
227 |
|
228 |
public int export(String entityName, String tableName, String revisionCode, Timestamp efectiveDate, SimpleTaskStatus status); |
229 |
|
230 |
public List<String> getDataModels(); |
231 |
|
232 |
public int authenticate(String userId, String password, SimpleTaskStatus status); |
233 |
|
234 |
public boolean authenticate(SimpleTaskStatus status); |
235 |
} |