95fed9d671bc8f5a32d390b94843c6ba9594cab4
[taxeditor.git] / eu.etaxonomy.taxeditor.cdmlib / src / main / java / eu / etaxonomy / cdm / api / application / CdmApplicationRemoteConfiguration.java
1 /**
2 * Copyright (C) 2014 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
10 package eu.etaxonomy.cdm.api.application;
11
12 import javax.sql.DataSource;
13
14 import org.hibernate.SessionFactory;
15
16 import org.apache.log4j.Logger;
17 import org.springframework.beans.factory.annotation.Autowired;
18 import org.springframework.stereotype.Component;
19 import org.springframework.transaction.PlatformTransactionManager;
20 import org.springframework.transaction.TransactionStatus;
21
22 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
23 import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
24 import eu.etaxonomy.cdm.api.service.IDatabaseService;
25 import eu.etaxonomy.cdm.ext.geo.IEditGeoService;
26
27
28 /**
29 * CDM Application Configuration class which manages the configuration for remoting
30 * clients
31 *
32 */
33 //FIXME:Remoting This bean naming is a hack to make remoting work, in conjunction with the
34 //exclude filter in the application package set in the remotingApplicationContext
35 //@Component("cdmApplicationDefaultConfiguration")
36 public class CdmApplicationRemoteConfiguration extends CdmApplicationDefaultConfiguration {
37
38 @SuppressWarnings("unused")
39 private static final Logger logger = Logger.getLogger(CdmApplicationRemoteConfiguration.class);
40
41 @Autowired
42 IEditGeoService editGeoService;
43
44 public CdmApplicationRemoteConfiguration() {
45 }
46
47 /* (non-Javadoc)
48 * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#getTransactionManager()
49 */
50 @Override
51 public PlatformTransactionManager getTransactionManager() throws UnsupportedOperationException {
52 throw new UnsupportedOperationException("getTransactionManager is not implemented for CdmApplicationRemoteConfiguration");
53 }
54
55
56 /* (non-Javadoc)
57 * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#startTransaction()
58 */
59 @Override
60 public TransactionStatus startTransaction() throws UnsupportedOperationException {
61 throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");
62 }
63
64
65 /* (non-Javadoc)
66 * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#startTransaction()
67 */
68 @Override
69 public TransactionStatus startTransaction(Boolean readOnly) throws UnsupportedOperationException {
70 throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");
71 }
72
73
74 /* (non-Javadoc)
75 * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#commitTransaction(org.springframework.transaction.TransactionStatus)
76 */
77 @Override
78 public void commitTransaction(TransactionStatus txStatus) throws UnsupportedOperationException {
79 throw new UnsupportedOperationException("commitTransaction is not implemented for CdmApplicationRemoteConfiguration");
80 }
81
82 /* (non-Javadoc)
83 * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#NewConversation()
84 */
85 @Override
86 public ConversationHolder NewConversation() {
87 return new ConversationHolderMock();
88 }
89
90 /**
91 * @return
92 */
93 public IEditGeoService getEditGeoService() {
94 return this.editGeoService;
95 }
96
97 /* (non-Javadoc)
98 * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setDataSource(javax.sql.DataSource)
99 */
100 @Override
101 public void setDataSource(DataSource dataSource) {
102 }
103
104 /* (non-Javadoc)
105 * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setTransactionManager(org.springframework.transaction.PlatformTransactionManager)
106 */
107 @Override
108 public void setTransactionManager(PlatformTransactionManager transactionManager) {
109 }
110
111 /* (non-Javadoc)
112 * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setSessionFactory(org.hibernate.SessionFactory)
113 */
114 @Override
115 public void setSessionFactory(SessionFactory sessionFactory) {
116 }
117 }