Revision b51ccdd4
Added by Katja Luther almost 6 years ago
eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF | ||
---|---|---|
18 | 18 |
eu.etaxonomy.cdm.api.cache, |
19 | 19 |
eu.etaxonomy.cdm.api.conversation, |
20 | 20 |
eu.etaxonomy.cdm.api.facade, |
21 |
eu.etaxonomy.cdm.api.longrunningService, |
|
21 | 22 |
eu.etaxonomy.cdm.api.service, |
22 | 23 |
eu.etaxonomy.cdm.api.service.config, |
23 | 24 |
eu.etaxonomy.cdm.api.service.description, |
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java | ||
---|---|---|
37 | 37 |
|
38 | 38 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
39 | 39 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock; |
40 |
import eu.etaxonomy.cdm.api.longrunningService.ILongRunningTasksService; |
|
40 | 41 |
import eu.etaxonomy.cdm.api.service.IAgentService; |
41 | 42 |
import eu.etaxonomy.cdm.api.service.IAnnotationService; |
42 | 43 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
... | ... | |
423 | 424 |
@Override |
424 | 425 |
public IRegistrationService getRegistrationService() { |
425 | 426 |
return (IRegistrationService) getService(IRegistrationService.class, "/remoting/registration.service", new CdmServiceRequestExecutor()); |
426 |
|
|
427 |
|
|
427 | 428 |
} |
428 | 429 |
|
429 | 430 |
@Override |
... | ... | |
497 | 498 |
return (IIOService) getService(IIOService.class, "/remoting/io.service", new CdmServiceRequestExecutor()); |
498 | 499 |
} |
499 | 500 |
|
501 |
public ILongRunningTasksService getLongRunningTasksService() { |
|
502 |
return (ILongRunningTasksService) getService(ILongRunningTasksService.class, "/remoting/longrunningtasks.service", new CdmServiceRequestExecutor()); |
|
503 |
} |
|
504 |
|
|
500 | 505 |
public ITestService getTestService() { |
501 | 506 |
return (ITestService) getService(ITestService.class, "/remoting/test.service", new CdmServiceRequestExecutor()); |
502 | 507 |
} |
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteController.java | ||
---|---|---|
19 | 19 |
import org.springframework.core.io.ClassPathResource; |
20 | 20 |
import org.springframework.core.io.Resource; |
21 | 21 |
|
22 |
import eu.etaxonomy.cdm.api.longrunningService.ILongRunningTasksService; |
|
22 | 23 |
import eu.etaxonomy.cdm.api.service.ITestService; |
23 | 24 |
import eu.etaxonomy.cdm.cache.CdmRemoteCacheManager; |
24 | 25 |
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor; |
... | ... | |
181 | 182 |
return ((CdmApplicationRemoteConfiguration)configuration).getIOService(); |
182 | 183 |
} |
183 | 184 |
|
185 |
public ILongRunningTasksService getLongRunningTasksService(){ |
|
186 |
return ((CdmApplicationRemoteConfiguration)configuration).getLongRunningTasksService(); |
|
187 |
} |
|
188 |
|
|
184 | 189 |
public ITestService getTestService(){ |
185 | 190 |
return ((CdmApplicationRemoteConfiguration)configuration).getTestService(); |
186 | 191 |
} |
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationState.java | ||
---|---|---|
30 | 30 |
import org.springframework.security.core.context.SecurityContext; |
31 | 31 |
|
32 | 32 |
import eu.etaxonomy.cdm.api.cache.CdmServiceCacher; |
33 |
import eu.etaxonomy.cdm.api.longrunningService.ILongRunningTasksService; |
|
33 | 34 |
import eu.etaxonomy.cdm.api.service.ICommonService; |
34 | 35 |
import eu.etaxonomy.cdm.api.service.IService; |
35 | 36 |
import eu.etaxonomy.cdm.api.service.ITestService; |
... | ... | |
206 | 207 |
|
207 | 208 |
} |
208 | 209 |
|
210 |
public static ILongRunningTasksService getLongRunningTasksService() { |
|
211 |
ICdmRepository configuration = getCurrentAppConfig(); |
|
212 |
|
|
213 |
return ((CdmApplicationRemoteController)configuration).getLongRunningTasksService(); |
|
214 |
|
|
215 |
} |
|
216 |
|
|
217 |
|
|
209 | 218 |
|
210 | 219 |
public static ITestService getTestService() { |
211 | 220 |
ICdmRepository configuration = getCurrentAppConfig(); |
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/httpInvokerServiceClients.xml | ||
---|---|---|
629 | 629 |
</bean> |
630 | 630 |
</property> |
631 | 631 |
</bean> |
632 |
|
|
633 |
<bean id="longRunningTasksService" lazy-init="true" |
|
634 |
class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean"> |
|
635 |
<property name="serviceUrl"> |
|
636 |
<value>http://${remoteServer}:${remotePort}/${remoteContext}/remoting/longrunningtasks.service |
|
637 |
</value> |
|
638 |
</property> |
|
639 |
<property name="serviceInterface"> |
|
640 |
<value>eu.etaxonomy.cdm.api.longrunningService.ILongRunningTasksService |
|
641 |
</value> |
|
642 |
</property> |
|
643 |
<property name="httpInvokerRequestExecutor"> |
|
644 |
<bean class="eu.etaxonomy.taxeditor.service.CdmAuthenticatedHttpInvokerRequestExecutor"> |
|
645 |
<property name="readTimeout" value="0" /> |
|
646 |
</bean> |
|
647 |
</property> |
|
648 |
</bean> |
|
632 | 649 |
|
633 | 650 |
<bean id="testService" lazy-init="true" |
634 | 651 |
class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean"> |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/SetSecundumForSubtreeOperation.java | ||
---|---|---|
25 | 25 |
import org.eclipse.e4.ui.workbench.modeling.EModelService; |
26 | 26 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
27 | 27 |
import org.eclipse.swt.widgets.Display; |
28 |
import org.eclipse.ui.progress.IProgressConstants; |
|
29 | 28 |
|
30 |
import eu.etaxonomy.cdm.api.application.CdmApplicationException; |
|
31 |
import eu.etaxonomy.cdm.api.application.CdmApplicationState; |
|
32 | 29 |
import eu.etaxonomy.cdm.api.service.ITaxonNodeService; |
33 | 30 |
import eu.etaxonomy.cdm.api.service.UpdateResult; |
34 | 31 |
import eu.etaxonomy.cdm.api.service.config.SecundumForSubtreeConfigurator; |
... | ... | |
63 | 60 |
*/ |
64 | 61 |
@Override |
65 | 62 |
protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception { |
66 |
// runMoniteredOperation();
|
|
67 |
|
|
68 |
Job job = createJob(monitor); |
|
69 |
// configure the job |
|
70 |
job.setProperty(IProgressConstants.KEEP_PROPERTY, true); |
|
71 |
job.setUser(true); |
|
72 |
// schedule job |
|
73 |
job.schedule(); |
|
74 |
|
|
63 |
runMoniteredOperation(); |
|
64 |
updateNameEditors(); |
|
65 |
// Job job = createJob(monitor);
|
|
66 |
// // configure the job
|
|
67 |
// job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
|
|
68 |
// job.setUser(true);
|
|
69 |
// // schedule job
|
|
70 |
// job.schedule();
|
|
71 |
// |
|
75 | 72 |
return updateResult; |
76 | 73 |
|
77 | 74 |
|
... | ... | |
102 | 99 |
|
103 | 100 |
public void runMoniteredOperation() { |
104 | 101 |
ITaxonNodeService nodeService; |
105 |
try { |
|
106 |
nodeService = CdmApplicationState.getService(ITaxonNodeService.class); |
|
102 |
// try {
|
|
103 |
// nodeService = CdmApplicationState.getService(ITaxonNodeService.class);
|
|
107 | 104 |
|
108 |
final UUID uuid = nodeService.monitSetSecundum((SecundumForSubtreeConfigurator)config);
|
|
105 |
final UUID uuid = longRunningTaskService.monitLongRunningTask((SecundumForSubtreeConfigurator)config);
|
|
109 | 106 |
Display.getDefault().asyncExec(new Runnable() { |
110 | 107 |
@Override |
111 | 108 |
public void run() { |
... | ... | |
117 | 114 |
null); |
118 | 115 |
} |
119 | 116 |
}); |
120 |
} catch (CdmApplicationException e) { |
|
121 |
// TODO Auto-generated catch block |
|
122 |
e.printStackTrace(); |
|
123 |
} |
|
117 |
// } catch (CdmApplicationException e) {
|
|
118 |
// // TODO Auto-generated catch block
|
|
119 |
// e.printStackTrace();
|
|
120 |
// }
|
|
124 | 121 |
|
125 | 122 |
} |
126 | 123 |
|
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/UpdateSubtreeOperation.java | ||
---|---|---|
11 | 11 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
12 | 12 |
import org.eclipse.swt.widgets.Display; |
13 | 13 |
|
14 |
import eu.etaxonomy.cdm.api.application.CdmApplicationState; |
|
14 | 15 |
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action; |
16 |
import eu.etaxonomy.cdm.api.longrunningService.ILongRunningTasksService; |
|
15 | 17 |
import eu.etaxonomy.cdm.api.service.ITaxonNodeService; |
16 | 18 |
import eu.etaxonomy.cdm.api.service.UpdateResult; |
17 | 19 |
import eu.etaxonomy.cdm.api.service.config.ForSubtreeConfiguratorBase; |
... | ... | |
33 | 35 |
|
34 | 36 |
TaxonNode subtreeNode; |
35 | 37 |
ITaxonNodeService taxonNodeService; |
38 |
ILongRunningTasksService longRunningTaskService; |
|
39 |
|
|
36 | 40 |
protected EModelService modelService = null; |
37 | 41 |
|
38 | 42 |
public UpdateSubtreeOperation(Object source, |
... | ... | |
49 | 53 |
this.config = config; |
50 | 54 |
this.updateResult = new UpdateResult(); |
51 | 55 |
this.modelService = modelService; |
52 |
taxonNodeService = CdmStore.getService(ITaxonNodeService.class);
|
|
53 |
subtreeNode = taxonNodeService.load(config.getSubtreeUuid());
|
|
56 |
longRunningTaskService = CdmApplicationState.getLongRunningTasksService();
|
|
57 |
subtreeNode = CdmStore.getService(ITaxonNodeService.class).load(config.getSubtreeUuid());
|
|
54 | 58 |
} |
55 | 59 |
public void updateNameEditors(){ |
56 | 60 |
List<TaxonNode> nodesToUpdate = new ArrayList(); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabaseRepairWizard.java | ||
---|---|---|
12 | 12 |
import org.eclipse.jface.wizard.Wizard; |
13 | 13 |
|
14 | 14 |
import eu.etaxonomy.cdm.config.ICdmSource; |
15 |
import eu.etaxonomy.cdm.io.operation.config.CacheUpdaterConfigurator; |
|
16 | 15 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator.CHECK; |
16 |
import eu.etaxonomy.cdm.io.operation.config.CacheUpdaterConfigurator; |
|
17 | 17 |
import eu.etaxonomy.cdm.io.operation.config.SortIndexUpdaterConfigurator; |
18 |
import eu.etaxonomy.cdm.model.agent.AgentBase; |
|
19 | 18 |
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase; |
20 | 19 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
21 | 20 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase; |
... | ... | |
56 | 55 |
config = SortIndexUpdaterConfigurator.NewInstance(null); |
57 | 56 |
config.setDoFeatureNode(false); |
58 | 57 |
config.setDoPolytomousKeyNode(false); |
59 |
|
|
58 |
|
|
60 | 59 |
|
61 | 60 |
} |
62 | 61 |
if (config.isDoFeatureNode() || config.isDoPolytomousKeyNode() || config.isDoTaxonNode()){ |
Also available in: Unified diff
use longRunningTasksService for setSecundumReference