Revision 3692 org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/VCSGisWorkspaceDescriptorImpl.java
VCSGisWorkspaceDescriptorImpl.java | ||
---|---|---|
27 | 27 |
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
28 | 28 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer; |
29 | 29 |
import org.gvsig.tools.ToolsLocator; |
30 |
import org.gvsig.tools.dispose.DisposeUtils; |
|
31 |
import org.gvsig.tools.dispose.impl.AbstractDisposable; |
|
32 | 30 |
import org.gvsig.tools.dynobject.DynStruct; |
33 |
import org.gvsig.tools.exception.BaseException; |
|
34 | 31 |
import org.gvsig.tools.persistence.PersistenceManager; |
35 | 32 |
import org.gvsig.tools.persistence.PersistentState; |
36 | 33 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
... | ... | |
43 | 40 |
*/ |
44 | 41 |
@SuppressWarnings("UseSpecificCatch") |
45 | 42 |
public class VCSGisWorkspaceDescriptorImpl |
46 |
extends AbstractDisposable |
|
47 | 43 |
implements VCSGisWorkspaceDescriptor |
48 | 44 |
{ |
49 | 45 |
|
... | ... | |
55 | 51 |
private VCSGisWorkspace workspace; |
56 | 52 |
|
57 | 53 |
public VCSGisWorkspaceDescriptorImpl() { |
58 |
super(); |
|
54 |
|
|
59 | 55 |
} |
60 | 56 |
|
61 | 57 |
public VCSGisWorkspaceDescriptorImpl(VCSGisWorkspace workspace) { |
62 |
this(); |
|
63 | 58 |
this.workspace = workspace; |
64 | 59 |
this.explorerParameters = workspace.getExplorerParameters(); |
65 | 60 |
this.explorer = workspace.getExplorer(); |
... | ... | |
83 | 78 |
VCSGisManager manager = VCSGisLocator.getVCSGisManager(); |
84 | 79 |
this.workspace = manager.openWorkspace(this.getExplorer()); |
85 | 80 |
} |
86 |
DisposeUtils.bind(this.workspace); |
|
87 | 81 |
return this.workspace; |
88 | 82 |
} |
89 | 83 |
|
... | ... | |
162 | 156 |
*/ |
163 | 157 |
public void setWorkspace(VCSGisWorkspace workspace) { |
164 | 158 |
this.workspace = workspace; |
165 |
DisposeUtils.bind(this.workspace); |
|
166 | 159 |
} |
167 |
|
|
168 |
@Override |
|
169 |
protected void doDispose() throws BaseException { |
|
170 |
this.label = null; |
|
171 |
this.code = null; |
|
172 |
this.explorerParameters = null; |
|
173 |
DisposeUtils.disposeQuietly(this.explorer); |
|
174 |
this.explorer = null; |
|
175 |
DisposeUtils.disposeQuietly(this.workspace); |
|
176 |
this.workspace = null; |
|
177 |
|
|
178 |
|
|
179 |
|
|
180 |
} |
|
181 | 160 |
|
182 | 161 |
|
183 | 162 |
|
Also available in: Unified diff