Project

General

Profile

« Previous | Next » 

Revision a269a040

Added by Alexander Oppermann over 11 years ago

ExportManager.java: surrounded statement with try-catch block

JaxbExportWizard.java: Fixed savePath as File representation and converted it then toURI().

plugin.xml: Commented out the JaxbWizard-Menu see also #3077

View differences:

eu.etaxonomy.taxeditor.cdmlib/.classpath
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<classpath>
3
	<classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/>
4
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.13-SNAPSHOT-sources.jar"/>
5
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.13-SNAPSHOT.jar"/>
6
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.13-SNAPSHOT-sources.jar"/>
7
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.13-SNAPSHOT.jar"/>
8
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.13-SNAPSHOT-sources.jar"/>
9
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.13-SNAPSHOT.jar"/>
10
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.13-SNAPSHOT-sources.jar"/>
11
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.13-SNAPSHOT.jar"/>
12
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.13-SNAPSHOT-sources.jar"/>
13
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.13-SNAPSHOT.jar"/>
14
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.13-SNAPSHOT-sources.jar"/>
15
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.13-SNAPSHOT.jar"/>
16
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.13-SNAPSHOT-sources.jar"/>
17
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.13-SNAPSHOT.jar"/>
18
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.13-SNAPSHOT-sources.jar"/>
19
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.13-SNAPSHOT.jar" sourcepath="lib/cdmlib-services-3.0.13-SNAPSHOT-sources.jar"/>
20 3
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
21 4
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
22 5
	<classpathentry exported="true" kind="lib" path="lib/activation-1.1.jar" sourcepath="lib/activation-1.1src.zip"/>
......
124 107
	<classpathentry exported="true" kind="lib" path="lib/xstream-1.3.1.jar" sourcepath="lib/xstream-1.3.1src.zip"/>
125 108
	<classpathentry exported="true" kind="lib" path="lib/hibernate-envers-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-envers-3.4.0-SNAPSHOTsrc.zip"/>
126 109
	<classpathentry exported="true" kind="lib" path="lib/spring-xml-1.5.6.jar"/>
110
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.13-SNAPSHOT-sources.jar"/>
111
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.13-SNAPSHOT.jar"/>
112
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.13-SNAPSHOT-sources.jar"/>
113
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.13-SNAPSHOT.jar"/>
114
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.13-SNAPSHOT-sources.jar"/>
115
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.13-SNAPSHOT.jar"/>
116
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.13-SNAPSHOT-sources.jar"/>
117
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.13-SNAPSHOT.jar"/>
118
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.13-SNAPSHOT-sources.jar"/>
119
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.13-SNAPSHOT.jar"/>
120
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.13-SNAPSHOT-sources.jar"/>
121
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.13-SNAPSHOT.jar"/>
122
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.13-SNAPSHOT-sources.jar"/>
123
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.13-SNAPSHOT.jar"/>
124
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.13-SNAPSHOT-sources.jar"/>
125
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.13-SNAPSHOT.jar" sourcepath="lib/cdmlib-services-3.0.13-SNAPSHOT-sources.jar"/>
126
	<classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/>
127 127
	<classpathentry kind="output" path="target/classes"/>
128 128
</classpath>
eu.etaxonomy.taxeditor.store/plugin.xml
588 588
            id="eu.etaxonomy.taxeditor.io.import.tcs"
589 589
            name="TCS">
590 590
      </wizard>
591
      <wizard
591
<!--      <wizard
592 592
            category="eu.etaxonomy.taxeditor.import.category.cdm"
593 593
            class="eu.etaxonomy.taxeditor.io.wizard.JaxbImportWizard"
594 594
            id="eu.etaxonomy.taxeditor.io.import.jaxb"
595 595
            name="JAXB">
596
      </wizard>
596
      </wizard> -->
597 597
      <wizard
598 598
            category="eu.etaxonomy.taxeditor.import.category.cdm"
599 599
            class="eu.etaxonomy.taxeditor.io.wizard.BerlinModelImportWizard"
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ExportManager.java
131 131
							// trigger
132 132
							// change listener
133 133
							// TODO verify correct behaviour
134
							conversationEnabled.getConversationHolder()
134
							
135
							try{
136
								conversationEnabled.getConversationHolder()
135 137
									.startTransaction();
136
							conversationEnabled.getConversationHolder()
138
							
139
								conversationEnabled.getConversationHolder()
137 140
									.commit();
141
							}catch(RuntimeException e){
142
								StoreUtil.errorDialog("Error starting conversation handling", this, "" +
143
										"Conversation Error: "+ e);
144
							}
138 145
						}
139 146
					}
140 147
				});
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/JaxbExportWizard.java
49 49
	/** {@inheritDoc} */
50 50
	@Override
51 51
	public boolean performFinish() {
52
		try {
53
			URI urlString = new URI(page.getFolderText() + File.separator + page.getExportFileName());
54
			configurator.setDestination(urlString);
55
			CdmStore.getExportManager().run(configurator);
56
			return true;
57
		} catch (URISyntaxException e) {
58
			StoreUtil.error(getClass(), "Could not run JAXB export", e);
59
		}
60
		
61
		return false;
62
		
52
		boolean performFinish = false;
53
		URI urlString;
54
		File savePath = new File(page.getFolderText() + File.separator + page.getExportFileName());
55
		urlString = savePath.toURI();
56
		//orig: urlString = new URI(page.getFolderText() + File.separator + page.getExportFileName());
57
		configurator.setDestination(urlString);
58
		CdmStore.getExportManager().run(configurator);
59
		performFinish = true;
60
		return performFinish;
63 61
	}
64 62

  
65 63
	/* (non-Javadoc)

Also available in: Unified diff