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