Revision 892b82f3
Added by Andreas Müller over 3 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java | ||
---|---|---|
75 | 75 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
76 | 76 |
import eu.etaxonomy.taxeditor.store.LoginManager; |
77 | 77 |
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin; |
78 |
import eu.etaxonomy.taxeditor.workbench.datasource.ICDMServerError;
|
|
78 |
import eu.etaxonomy.taxeditor.workbench.datasource.ICdmServerError;
|
|
79 | 79 |
/* |
80 | 80 |
import eu.etaxonomy.taxeditor.webapp.CdmEmbeddedServerException; |
81 | 81 |
import eu.etaxonomy.taxeditor.webapp.CdmServer; |
... | ... | |
85 | 85 |
* @author cmathew |
86 | 86 |
* @date 20 Jan 2015 |
87 | 87 |
*/ |
88 |
public class RemotingLoginDialog extends Dialog implements ICDMServerError {
|
|
88 |
public class RemotingLoginDialog extends Dialog implements ICdmServerError {
|
|
89 | 89 |
|
90 | 90 |
private Logger logger = Logger.getLogger(getClass()); |
91 | 91 |
|
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmServerTest.java | ||
---|---|---|
24 | 24 |
import eu.etaxonomy.taxeditor.remoting.server.CdmServerUtils; |
25 | 25 |
import eu.etaxonomy.taxeditor.webapp.CdmServer; |
26 | 26 |
import eu.etaxonomy.taxeditor.workbench.datasource.CdmEmbeddedServerException; |
27 |
import eu.etaxonomy.taxeditor.workbench.datasource.ICDMServerError;
|
|
27 |
import eu.etaxonomy.taxeditor.workbench.datasource.ICdmServerError;
|
|
28 | 28 |
|
29 | 29 |
|
30 | 30 |
/** |
... | ... | |
53 | 53 |
File mgdDatasourcesConfigFile = new File(FileLocator.resolve(mgdDatasourcesConfigURL).toURI()); |
54 | 54 |
try{ |
55 | 55 |
CdmServer cdmServer = new CdmServer("cdmTest", mgdDatasourcesConfigFile); |
56 |
cdmServer.start(new ICDMServerError() {
|
|
56 |
cdmServer.start(new ICdmServerError() {
|
|
57 | 57 |
@Override |
58 | 58 |
public void handleError(Throwable t) { |
59 | 59 |
Assert.fail("Error starting server. Reason : " + t.getMessage()); |
eu.etaxonomy.taxeditor.webapp/src/main/java/eu/etaxonomy/taxeditor/webapp/CdmServer.java | ||
---|---|---|
34 | 34 |
import org.eclipse.jetty.webapp.WebAppContext; |
35 | 35 |
import org.osgi.framework.Bundle; |
36 | 36 |
|
37 |
import eu.etaxonomy.taxeditor.workbench.datasource.ICDMServerError;
|
|
37 |
import eu.etaxonomy.taxeditor.workbench.datasource.ICdmServerError;
|
|
38 | 38 |
|
39 | 39 |
/** |
40 | 40 |
* (Singleton) Server instance which manages a compatible cdmlib-webapp-war. |
... | ... | |
160 | 160 |
throw new CdmEmbeddedServerException("Could not find a free TCP/IP port to start embedded Jetty HTTP Server on"); |
161 | 161 |
} |
162 | 162 |
|
163 |
public void start(ICDMServerError cdmServerError) throws CdmEmbeddedServerException {
|
|
163 |
public void start(ICdmServerError cdmServerError) throws CdmEmbeddedServerException {
|
|
164 | 164 |
start(true, cdmServerError); |
165 | 165 |
} |
166 | 166 |
|
167 |
public void start(boolean wait, final ICDMServerError remotingLoginDialogLocal) throws CdmEmbeddedServerException {
|
|
167 |
public void start(boolean wait, final ICdmServerError remotingLoginDialogLocal) throws CdmEmbeddedServerException {
|
|
168 | 168 |
|
169 | 169 |
if(server == null) { |
170 | 170 |
throw new CdmEmbeddedServerException("Server is already disposed"); |
eu.etaxonomy.taxeditor.webapp/src/main/java/eu/etaxonomy/taxeditor/webapp/server/RemotingLoginDialogLocal.java | ||
---|---|---|
80 | 80 |
import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog; |
81 | 81 |
import eu.etaxonomy.taxeditor.webapp.CdmEmbeddedServerException; |
82 | 82 |
import eu.etaxonomy.taxeditor.webapp.CdmServer; |
83 |
import eu.etaxonomy.taxeditor.workbench.datasource.ICDMServerError;
|
|
83 |
import eu.etaxonomy.taxeditor.workbench.datasource.ICdmServerError;
|
|
84 | 84 |
|
85 | 85 |
|
86 | 86 |
|
... | ... | |
89 | 89 |
* @author cmathew |
90 | 90 |
* @date 20 Jan 2015 |
91 | 91 |
*/ |
92 |
public class RemotingLoginDialogLocal extends RemotingLoginDialog implements ICDMServerError{
|
|
92 |
public class RemotingLoginDialogLocal extends RemotingLoginDialog implements ICdmServerError{
|
|
93 | 93 |
|
94 | 94 |
private Logger logger = Logger.getLogger(getClass()); |
95 | 95 |
|
eu.etaxonomy.taxeditor.workbench/src/main/java/eu/etaxonomy/taxeditor/workbench/datasource/ICDMServerError.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2015 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
package eu.etaxonomy.taxeditor.workbench.datasource; |
|
10 |
|
|
11 |
/** |
|
12 |
* @author cmathew |
|
13 |
* @date 16 Nov 2015 |
|
14 |
*/ |
|
15 |
public interface ICDMServerError { |
|
16 |
|
|
17 |
public void handleError(Throwable t); |
|
18 |
|
|
19 |
} |
eu.etaxonomy.taxeditor.workbench/src/main/java/eu/etaxonomy/taxeditor/workbench/datasource/ICdmServerError.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2015 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
package eu.etaxonomy.taxeditor.workbench.datasource; |
|
10 |
|
|
11 |
/** |
|
12 |
* @author cmathew |
|
13 |
* @date 16 Nov 2015 |
|
14 |
*/ |
|
15 |
public interface ICdmServerError { |
|
16 |
|
|
17 |
public void handleError(Throwable t); |
|
18 |
|
|
19 |
} |
Also available in: Unified diff
rename ICdmServerError