| 1 | <?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 | <!-- |
|---|
| 3 | Copyright (c) 2006-2009 by Topaz, Inc. |
|---|
| 4 | http://topazproject.org |
|---|
| 5 | |
|---|
| 6 | Licensed under the Apache License, Version 2.0 (the "License"); |
|---|
| 7 | you may not use this file except in compliance with the License. |
|---|
| 8 | You may obtain a copy of the License at |
|---|
| 9 | |
|---|
| 10 | http://www.apache.org/licenses/LICENSE-2.0 |
|---|
| 11 | |
|---|
| 12 | Unless required by applicable law or agreed to in writing, software |
|---|
| 13 | distributed under the License is distributed on an "AS IS" BASIS, |
|---|
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|---|
| 15 | See the License for the specific language governing permissions and |
|---|
| 16 | limitations under the License. |
|---|
| 17 | --> |
|---|
| 18 | <beans default-autowire="byName" |
|---|
| 19 | xmlns="http://www.springframework.org/schema/beans" |
|---|
| 20 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|---|
| 21 | xmlns:util="http://www.springframework.org/schema/util" |
|---|
| 22 | xmlns:aop="http://www.springframework.org/schema/aop" |
|---|
| 23 | xmlns:tx="http://www.springframework.org/schema/tx" |
|---|
| 24 | xsi:schemaLocation=" |
|---|
| 25 | http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd |
|---|
| 26 | http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd |
|---|
| 27 | http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd |
|---|
| 28 | http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"> |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | <!-- XACML PDPs --> |
|---|
| 32 | <bean id="pdpFactory" class="org.topazproject.ambra.xacml.PDPFactory"/> |
|---|
| 33 | |
|---|
| 34 | <bean id="permissionsPdp" factory-bean="pdpFactory" factory-method="getPDP"> |
|---|
| 35 | <constructor-arg index="0" value="${ambra.services.xacml.permissions.pdpName}"/> |
|---|
| 36 | </bean> |
|---|
| 37 | |
|---|
| 38 | <bean id="repliesPdp" factory-bean="pdpFactory" factory-method="getPDP"> |
|---|
| 39 | <constructor-arg index="0" value="${ambra.services.xacml.replies.pdpName}"/> |
|---|
| 40 | </bean> |
|---|
| 41 | |
|---|
| 42 | <bean id="annotationsPdp" factory-bean="pdpFactory" factory-method="getPDP"> |
|---|
| 43 | <constructor-arg index="0" value="${ambra.services.xacml.annotations.pdpName}"/> |
|---|
| 44 | </bean> |
|---|
| 45 | |
|---|
| 46 | <bean id="articlesPdp" factory-bean="pdpFactory" factory-method="getPDP"> |
|---|
| 47 | <constructor-arg value="${ambra.services.xacml.articles.pdpName}"/> |
|---|
| 48 | </bean> |
|---|
| 49 | |
|---|
| 50 | <bean id="ratingsPdp" factory-bean="pdpFactory" factory-method="getPDP"> |
|---|
| 51 | <constructor-arg value="${ambra.services.xacml.ratings.pdpName}"/> |
|---|
| 52 | </bean> |
|---|
| 53 | |
|---|
| 54 | <bean id="usersPdp" factory-bean="pdpFactory" factory-method="getPDP"> |
|---|
| 55 | <constructor-arg value="${ambra.services.xacml.users.pdpName}"/> |
|---|
| 56 | </bean> |
|---|
| 57 | |
|---|
| 58 | <!--Ambra developer beans here --> |
|---|
| 59 | <bean id="configurationStore" class="org.topazproject.ambra.configuration.ConfigurationStore" factory-method="getInstance"/> |
|---|
| 60 | <bean id="ambraConfiguration" factory-bean="configurationStore" factory-method="getConfiguration"/> |
|---|
| 61 | |
|---|
| 62 | <bean id="fetchArticleService" class="org.topazproject.ambra.article.service.FetchArticleService"> |
|---|
| 63 | <property name="articleService" ref="articleOtmService"/> |
|---|
| 64 | </bean> |
|---|
| 65 | |
|---|
| 66 | <bean id="trackBackService" class="org.topazproject.ambra.article.service.TrackbackService" /> |
|---|
| 67 | |
|---|
| 68 | <bean id="articleXmlUtils" class="org.topazproject.ambra.util.ArticleXMLUtils" init-method="init"> |
|---|
| 69 | <property name="articleRep" value="XML"/> |
|---|
| 70 | <property name="xslTemplate" value="/viewnlm-v2.xsl"/> |
|---|
| 71 | <property name="xmlFactoryProperty" ref="xmlFactoryProperties"/> |
|---|
| 72 | <property name="articleService" ref="articleOtmService"/> |
|---|
| 73 | </bean> |
|---|
| 74 | |
|---|
| 75 | <bean id="secondaryObjectService" class="org.topazproject.ambra.util.ArticleXMLUtils" init-method="init"> |
|---|
| 76 | <property name="articleRep" value="XML"/> |
|---|
| 77 | <property name="xslTemplate" value="/objInfo.xsl"/> |
|---|
| 78 | <property name="xmlFactoryProperty" ref="xmlFactoryProperties"/> |
|---|
| 79 | <property name="articleService" ref="articleOtmService"/> |
|---|
| 80 | </bean> |
|---|
| 81 | |
|---|
| 82 | <util:map id="xmlFactoryProperties"> |
|---|
| 83 | <entry key="javax.xml.transform.TransformerFactory" |
|---|
| 84 | value="net.sf.saxon.TransformerFactoryImpl"/> |
|---|
| 85 | <entry key="javax.xml.transform.Transformer" |
|---|
| 86 | value="net.sf.saxon.Controller"/> |
|---|
| 87 | </util:map> |
|---|
| 88 | |
|---|
| 89 | <!-- TODO: Update the servicePort url's automatically using maven build process itself--> |
|---|
| 90 | <bean id="articleOtmService" class="org.topazproject.ambra.article.service.ArticleOtmService"> |
|---|
| 91 | <property name="smallImageRep" value="PNG_S"/> |
|---|
| 92 | <property name="mediumImageRep" value="PNG_M"/> |
|---|
| 93 | <property name="largeImageRep" value="PNG_L"/> |
|---|
| 94 | </bean> |
|---|
| 95 | |
|---|
| 96 | <bean id="feedService" class="org.topazproject.ambra.feed.service.FeedService"> |
|---|
| 97 | <property name="articleOtmService" ref="articleOtmService"/> |
|---|
| 98 | <property name="annotationService" ref="annotationService"/> |
|---|
| 99 | <property name="journalService" ref="journalService"/> |
|---|
| 100 | <property name="feedCache" ref="feedCache"/> |
|---|
| 101 | <property name="otmSession" ref="otmSession"/> |
|---|
| 102 | <property name="browseService" ref="browseService"/> |
|---|
| 103 | </bean> |
|---|
| 104 | |
|---|
| 105 | <bean id="adminService" class="org.topazproject.ambra.admin.service.AdminService"> |
|---|
| 106 | <property name="journalService" ref="journalService"/> |
|---|
| 107 | <property name="otmSession" ref="otmSession"/> |
|---|
| 108 | </bean> |
|---|
| 109 | |
|---|
| 110 | <bean id="crossRefPosterService" class="org.topazproject.ambra.admin.service.CrossRefPosterService"> |
|---|
| 111 | <!-- following is the URL for the CrossRef service. The three parameters which should be set are |
|---|
| 112 | * area= test or live. Decides if the cross ref is actually 'posted'. area=test for testing, area=live for deployment |
|---|
| 113 | * login_id=crossref user name |
|---|
| 114 | * login_passwd=crossref user password |
|---|
| 115 | --> |
|---|
| 116 | <property name="doiXrefUrl" value="${ambra.services.crossref.post.url}"/> |
|---|
| 117 | </bean> |
|---|
| 118 | |
|---|
| 119 | <bean id="flagManagementService" class="org.topazproject.ambra.admin.service.FlagManagementService"/> |
|---|
| 120 | |
|---|
| 121 | <bean id="documentManagementService" class="org.topazproject.ambra.admin.service.DocumentManagementService"> |
|---|
| 122 | <!-- These pathnames are absolute --> |
|---|
| 123 | <property name="documentDirectory" value="${ambra.services.documentManagement.ingestSourceDir}"/> |
|---|
| 124 | <property name="ingestedDocumentDirectory" value="${ambra.services.documentManagement.ingestDestinationDir}"/> |
|---|
| 125 | <property name="documentPrefix" value="${ambra.services.documentManagement.documentPrefix}"/> |
|---|
| 126 | <!-- Whereas this is relative to webapp/src/main/resources --> |
|---|
| 127 | <property name="xslTemplate" value="/crossref.xsl"/> |
|---|
| 128 | <property name="plosDoiUrl" value="${ambra.services.crossref.plos.doiurl}"/> |
|---|
| 129 | <property name="plosEmail" value="${ambra.services.crossref.plos.email}"/> |
|---|
| 130 | <property name="sendToXref" value="${ambra.services.crossref.sendToXref}"/> |
|---|
| 131 | </bean> |
|---|
| 132 | |
|---|
| 133 | <!-- Warning. Spring does not autowire 'simple' properties like primitives, Strings and Classes --> |
|---|
| 134 | <bean id="defaultEncodingCharset" class="java.lang.String"> |
|---|
| 135 | <constructor-arg value="UTF-8"/> |
|---|
| 136 | </bean> |
|---|
| 137 | |
|---|
| 138 | <bean id="applicationId" class="java.lang.String"> |
|---|
| 139 | <constructor-arg value="topaz-ambra"/> |
|---|
| 140 | </bean> |
|---|
| 141 | |
|---|
| 142 | <bean id="impliedPermissionsLoader" init-method="load" |
|---|
| 143 | class="org.topazproject.ambra.permission.service.ImpliedPermissionsLoader"/> |
|---|
| 144 | |
|---|
| 145 | <bean id="permissionsService" depends-on="impliedPermissionsLoader" |
|---|
| 146 | class="org.topazproject.ambra.permission.service.PermissionsService"/> |
|---|
| 147 | |
|---|
| 148 | <bean id="annotationConverter" class="org.topazproject.ambra.annotation.service.AnnotationConverter"/> |
|---|
| 149 | |
|---|
| 150 | <bean id="replyService" class="org.topazproject.ambra.annotation.service.ReplyService"> |
|---|
| 151 | <property name="encodingCharset" ref="defaultEncodingCharset"/> |
|---|
| 152 | <property name="defaultType" value="http://www.w3.org/2001/12/replyType#Comment"/> |
|---|
| 153 | <property name="applicationId" ref="applicationId"/> |
|---|
| 154 | </bean> |
|---|
| 155 | |
|---|
| 156 | <bean id="annotationService" class="org.topazproject.ambra.annotation.service.AnnotationService"> |
|---|
| 157 | <property name="encodingCharset" ref="defaultEncodingCharset"/> |
|---|
| 158 | <property name="applicationId" ref="applicationId"/> |
|---|
| 159 | </bean> |
|---|
| 160 | |
|---|
| 161 | <bean id="ratingsService" class="org.topazproject.ambra.rating.service.RatingsService"> |
|---|
| 162 | <property name="applicationId" ref="applicationId"/> |
|---|
| 163 | </bean> |
|---|
| 164 | |
|---|
| 165 | <bean id="userService" class="org.topazproject.ambra.user.service.UserService"> |
|---|
| 166 | <property name="emailAddressUrl" value="${ambra.services.cas.url.base}/email?guid="/> |
|---|
| 167 | <property name="applicationId" ref="applicationId"/> |
|---|
| 168 | </bean> |
|---|
| 169 | |
|---|
| 170 | <bean id="profanityCheckingService" class="org.topazproject.ambra.util.ProfanityCheckingService"/> |
|---|
| 171 | |
|---|
| 172 | <bean id="browseService" class="org.topazproject.ambra.article.service.BrowseService"> |
|---|
| 173 | <property name="journalService" ref="journalService"/> |
|---|
| 174 | <property name="browseCache" ref="browseCache"/> |
|---|
| 175 | <property name="otmSession" ref="otmSession"/> |
|---|
| 176 | </bean> |
|---|
| 177 | |
|---|
| 178 | <bean id="smallBlobService" class="org.topazproject.ambra.article.service.SmallBlobService"/> |
|---|
| 179 | |
|---|
| 180 | <!-- Add all your constants to the map with a key and a value/ref --> |
|---|
| 181 | <util:map id="otherConstants" map-class="java.util.HashMap"> |
|---|
| 182 | <entry key="countries" value-ref="countries"/> |
|---|
| 183 | </util:map> |
|---|
| 184 | |
|---|
| 185 | <bean id="searchService" class="org.topazproject.ambra.search.service.SearchService"/> |
|---|
| 186 | |
|---|
| 187 | <bean id="journalCreator" class="org.topazproject.ambra.journal.JournalCreator" |
|---|
| 188 | init-method="createJournals"/> |
|---|
| 189 | |
|---|
| 190 | <bean id="journalService" class="org.topazproject.ambra.journal.JournalService" |
|---|
| 191 | depends-on="journalCreator" init-method="init"/> |
|---|
| 192 | |
|---|
| 193 | <bean id="bootstrapMigrator" class="org.topazproject.ambra.migration.BootstrapMigrator" |
|---|
| 194 | init-method="migrate"/> |
|---|
| 195 | |
|---|
| 196 | <bean id="citationMigrator" class="org.topazproject.ambra.migration.CitationMigrator" |
|---|
| 197 | init-method="init"> |
|---|
| 198 | <!-- background: set to true to allow web-traffic during migrations --> |
|---|
| 199 | <property name="background" value="true"/> |
|---|
| 200 | <!-- txnTimeout: the txn timeout in seconds --> |
|---|
| 201 | <property name="txnTimeout" value="600"/> |
|---|
| 202 | <!-- blobThrottle: number of articles to migrate per transaction --> |
|---|
| 203 | <property name="blobThrottle" value="20"/> |
|---|
| 204 | </bean> |
|---|
| 205 | |
|---|
| 206 | <bean id="searchMigrator" class="org.topazproject.ambra.migration.SearchMigrator" |
|---|
| 207 | init-method="init"> |
|---|
| 208 | <!-- reIndex: set to true to re-build search-index. Will re-build all indexes even if |
|---|
| 209 | all search-migrations were completed and 'finalized'. --> |
|---|
| 210 | <property name="reIndex" value="false"/> |
|---|
| 211 | <!-- finalize: set to 'true' to write a marker on success to denote completion of all migrations. |
|---|
| 212 | Setting to 'false' is really for running a migration elsewhere and copy the data to a |
|---|
| 213 | real instance. For everywhere else the recommendation is to set this to 'true'. |
|---|
| 214 | --> |
|---|
| 215 | <property name="finalize" value="true"/> |
|---|
| 216 | <!-- background: set to true to allow web-traffic during migrations --> |
|---|
| 217 | <property name="background" value="true"/> |
|---|
| 218 | <!-- txnTimeout: the txn timeout in seconds --> |
|---|
| 219 | <property name="txnTimeout" value="1800"/> |
|---|
| 220 | <!-- blobThrottle: number of blobs to index per transaction --> |
|---|
| 221 | <property name="blobThrottle" value="20"/> |
|---|
| 222 | <!-- rdfThrottle: number of mulgara only entity instances (eg. Citation) to index per transaction --> |
|---|
| 223 | <property name="rdfThrottle" value="3000"/> |
|---|
| 224 | </bean> |
|---|
| 225 | |
|---|
| 226 | <!-- OTM setups --> |
|---|
| 227 | <bean name="fedoraBlobStore" class="org.topazproject.fedora.otm.FedoraBlobStore" lazy-init="true"> |
|---|
| 228 | <constructor-arg index="0" value="${ambra.topaz.blobStore.fedora.uri}"/> |
|---|
| 229 | <constructor-arg index="1" value="${ambra.topaz.blobStore.fedora.userName}"/> |
|---|
| 230 | <constructor-arg index="2" value="${ambra.topaz.blobStore.fedora.password}"/> |
|---|
| 231 | </bean> |
|---|
| 232 | <bean name="simpleBlobStore" class="org.topazproject.otm.stores.SimpleBlobStore" lazy-init="true"> |
|---|
| 233 | <constructor-arg index="0" value="${ambra.topaz.blobStore.simple.directory}"/> |
|---|
| 234 | </bean> |
|---|
| 235 | |
|---|
| 236 | <bean id="jtaTransactionManager" class="org.topazproject.otm.impl.btm.TransactionManagerHelper" |
|---|
| 237 | factory-method="getTransactionManager"/> |
|---|
| 238 | |
|---|
| 239 | <bean id="otmFactory" class="org.topazproject.ambra.configuration.OtmConfiguration" |
|---|
| 240 | destroy-method="close" depends-on="bootstrapMigrator"> |
|---|
| 241 | <constructor-arg index="0" value="${ambra.topaz.tripleStore.mulgara.itql.uri}"/> |
|---|
| 242 | <!-- must be one of fedoraBlobStore or simpleBlobStore --> |
|---|
| 243 | <constructor-arg index="1" ref="${ambra.topaz.blobStore.beanName}"/> |
|---|
| 244 | <property name="fedoraBlobFactories"> |
|---|
| 245 | <list> |
|---|
| 246 | <bean name="annotationFedoraBlobFactory" |
|---|
| 247 | class="org.topazproject.ambra.models.support.fedora.AnnotationFedoraBlobFactory"> |
|---|
| 248 | <constructor-arg index="0" value="${ambra.topaz.blobStore.fedora.blobTypes.annotation.pidNs}"/> |
|---|
| 249 | <constructor-arg index="1" value="${ambra.topaz.blobStore.fedora.blobTypes.annotation.uriPrefix}"/> |
|---|
| 250 | </bean> |
|---|
| 251 | <bean name="representationFedoraBlobFactory" |
|---|
| 252 | class="org.topazproject.ambra.models.support.fedora.RepresentationFedoraBlobFactory"> |
|---|
| 253 | <constructor-arg index="0" value="${ambra.topaz.blobStore.fedora.blobTypes.representation.pidNs}"/> |
|---|
| 254 | <constructor-arg index="1" value="${ambra.topaz.blobStore.fedora.blobTypes.representation.uriPrefix}"/> |
|---|
| 255 | </bean> |
|---|
| 256 | </list> |
|---|
| 257 | </property> |
|---|
| 258 | |
|---|
| 259 | <property name="aliases"> |
|---|
| 260 | <map> |
|---|
| 261 | <entry key="id" value="${ambra.aliases.id}"/> |
|---|
| 262 | <entry key="annoteaBodyId" value="${ambra.aliases.annoteaBodyId}"/> |
|---|
| 263 | </map> |
|---|
| 264 | </property> |
|---|
| 265 | |
|---|
| 266 | <property name="preloadClasses"> |
|---|
| 267 | <list> |
|---|
| 268 | <value>org.topazproject.ambra.model.article.CitationInfo</value> |
|---|
| 269 | <value>org.topazproject.ambra.model.UserProfileInfo</value> |
|---|
| 270 | <value>org.topazproject.ambra.model.article.ArticleInfo</value> |
|---|
| 271 | <value>org.topazproject.ambra.model.article.NewArtInfo</value> |
|---|
| 272 | <value>org.topazproject.ambra.model.article.RelatedArticleInfo</value> |
|---|
| 273 | </list> |
|---|
| 274 | </property> |
|---|
| 275 | </bean> |
|---|
| 276 | |
|---|
| 277 | <bean id="otmSessionFactory" factory-bean="otmFactory" factory-method="getFactory"/> |
|---|
| 278 | |
|---|
| 279 | <bean id="otmSession" factory-bean="otmSessionFactory" factory-method="openSession" |
|---|
| 280 | destroy-method="close" scope="request"> |
|---|
| 281 | <constructor-arg index="0" ref="otmInterceptor"/> |
|---|
| 282 | <aop:scoped-proxy proxy-target-class="false"/> |
|---|
| 283 | </bean> |
|---|
| 284 | |
|---|
| 285 | <!-- Set up Transaction-Manager stuff --> |
|---|
| 286 | <bean id="txManager" class="org.topazproject.otm.spring.OtmTransactionManager"> |
|---|
| 287 | <property name="defaultTimeout" value="600"/> |
|---|
| 288 | <property name="clearSessionOnRollback" value="true"/> |
|---|
| 289 | <property name="skipFlushOnReadonlyTx" value="true"/> |
|---|
| 290 | </bean> |
|---|
| 291 | |
|---|
| 292 | <tx:annotation-driven transaction-manager="txManager" proxy-target-class="true"/> |
|---|
| 293 | |
|---|
| 294 | <aop:config proxy-target-class="true"> |
|---|
| 295 | <aop:advisor |
|---|
| 296 | pointcut="execution(* org.topazproject.ambra.admin.service.DocumentManagementService.ingest(..))" |
|---|
| 297 | advice-ref="longTxTimeout" order="1"/> |
|---|
| 298 | </aop:config> |
|---|
| 299 | |
|---|
| 300 | <tx:advice id="longTxTimeout" transaction-manager="txManager"> |
|---|
| 301 | <tx:attributes> |
|---|
| 302 | <tx:method name="*" timeout="1800" rollback-for="java.lang.Throwable"/> |
|---|
| 303 | </tx:attributes> |
|---|
| 304 | </tx:advice> |
|---|
| 305 | |
|---|
| 306 | <!-- cache manager configs --> |
|---|
| 307 | <bean id="txCacheManager" class="org.topazproject.ambra.cache.CacheManager"> |
|---|
| 308 | <constructor-arg index="0" ref="jtaTransactionManager"/> |
|---|
| 309 | </bean> |
|---|
| 310 | <bean id="objectCache" class="org.topazproject.ambra.cache.EhcacheProvider"> |
|---|
| 311 | <constructor-arg index="0" ref="txCacheManager"/> |
|---|
| 312 | <constructor-arg index="1" ref="objectEhcache"/> |
|---|
| 313 | </bean> |
|---|
| 314 | <bean id="smallBlobCache" class="org.topazproject.ambra.cache.EhcacheProvider"> |
|---|
| 315 | <constructor-arg index="0" ref="txCacheManager"/> |
|---|
| 316 | <constructor-arg index="1" ref="smallBlobEhcache"/> |
|---|
| 317 | </bean> |
|---|
| 318 | <bean id="otmInterceptor" class="org.topazproject.ambra.cache.OtmInterceptor"> |
|---|
| 319 | <constructor-arg index="0" ref="txCacheManager"/> |
|---|
| 320 | <constructor-arg index="1" ref="objectCache"/> |
|---|
| 321 | <constructor-arg index="2" ref="journalService"/> |
|---|
| 322 | </bean> |
|---|
| 323 | <bean id="browseCache" class="org.topazproject.ambra.cache.EhcacheProvider"> |
|---|
| 324 | <constructor-arg index="0" ref="txCacheManager"/> |
|---|
| 325 | <constructor-arg index="1" ref="browseEhcache"/> |
|---|
| 326 | </bean> |
|---|
| 327 | <bean id="userCache" class="org.topazproject.ambra.cache.EhcacheProvider"> |
|---|
| 328 | <constructor-arg index="0" ref="txCacheManager"/> |
|---|
| 329 | <constructor-arg index="1" ref="userEhcache"/> |
|---|
| 330 | </bean> |
|---|
| 331 | <bean id="feedCache" class="org.topazproject.ambra.cache.EhcacheProvider"> |
|---|
| 332 | <constructor-arg index="0" ref="txCacheManager"/> |
|---|
| 333 | <constructor-arg index="1" ref="feedEhcache"/> |
|---|
| 334 | </bean> |
|---|
| 335 | <bean id="searchCache" class="org.topazproject.ambra.cache.EhcacheProvider"> |
|---|
| 336 | <constructor-arg index="0" ref="txCacheManager"/> |
|---|
| 337 | <constructor-arg index="1" ref="searchEhcache"/> |
|---|
| 338 | </bean> |
|---|
| 339 | <bean id="articleAnnotationCache" class="org.topazproject.ambra.cache.EhcacheProvider"> |
|---|
| 340 | <constructor-arg index="0" ref="txCacheManager"/> |
|---|
| 341 | <constructor-arg index="1" ref="articleAnnotationEhcache"/> |
|---|
| 342 | </bean> |
|---|
| 343 | <bean id="journalCache" class="org.topazproject.ambra.cache.EhcacheProvider"> |
|---|
| 344 | <constructor-arg index="0" ref="txCacheManager"/> |
|---|
| 345 | <constructor-arg index="1" ref="journalEhcache"/> |
|---|
| 346 | </bean> |
|---|
| 347 | <bean id="carrierCache" class="org.topazproject.ambra.cache.EhcacheProvider"> |
|---|
| 348 | <constructor-arg index="0" ref="txCacheManager"/> |
|---|
| 349 | <constructor-arg index="1" ref="carrierEhcache"/> |
|---|
| 350 | </bean> |
|---|
| 351 | |
|---|
| 352 | <!-- freemarker configs --> |
|---|
| 353 | <bean id="ambraFreemarkerManager" class="org.topazproject.ambra.struts2.AmbraFreemarkerManager"> |
|---|
| 354 | <constructor-arg index="0" ref="ambraFreemarkerConfig"/> |
|---|
| 355 | </bean> |
|---|
| 356 | |
|---|
| 357 | <bean id="ambraFreemarkerConfig" class="org.topazproject.ambra.struts2.AmbraFreemarkerConfig"/> |
|---|
| 358 | |
|---|
| 359 | <!-- Caches --> |
|---|
| 360 | <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> |
|---|
| 361 | <property name="configLocation" value="classpath:ehcache.xml"/> |
|---|
| 362 | <property name="shared" value="true"/> |
|---|
| 363 | </bean> |
|---|
| 364 | |
|---|
| 365 | <bean id="journalEhcache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 366 | <property name="cacheName" value="Journals"/> |
|---|
| 367 | </bean> |
|---|
| 368 | |
|---|
| 369 | <bean id="carrierEhcache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 370 | <property name="cacheName" value="ArticleCarriers"/> |
|---|
| 371 | </bean> |
|---|
| 372 | |
|---|
| 373 | <bean id="articleAnnotationEhcache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 374 | <property name="cacheName" value="ArticleAnnotationCache"/> |
|---|
| 375 | </bean> |
|---|
| 376 | |
|---|
| 377 | <bean id="userEhcache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 378 | <property name="cacheName" value="UserCache"/> |
|---|
| 379 | </bean> |
|---|
| 380 | |
|---|
| 381 | <bean id="browseEhcache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 382 | <property name="cacheName" value="BrowseCache"/> |
|---|
| 383 | </bean> |
|---|
| 384 | |
|---|
| 385 | <bean id="feedEhcache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 386 | <property name="cacheName" value="FeedCache"/> |
|---|
| 387 | </bean> |
|---|
| 388 | |
|---|
| 389 | <bean id="searchEhcache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 390 | <property name="cacheName" value="SearchCache"/> |
|---|
| 391 | </bean> |
|---|
| 392 | |
|---|
| 393 | <bean id="objectEhcache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 394 | <property name="cacheName" value="ObjectCache"/> |
|---|
| 395 | </bean> |
|---|
| 396 | |
|---|
| 397 | <bean id="smallBlobEhcache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 398 | <property name="cacheName" value="SmallBlobCache"/> |
|---|
| 399 | </bean> |
|---|
| 400 | |
|---|
| 401 | <bean id="grantsEhcache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 402 | <property name="cacheName" value="permission-grants"/> |
|---|
| 403 | </bean> |
|---|
| 404 | |
|---|
| 405 | <bean id="revokesEhcache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 406 | <property name="cacheName" value="permission-revokes"/> |
|---|
| 407 | </bean> |
|---|
| 408 | |
|---|
| 409 | |
|---|
| 410 | <bean id="virtualJournalMappingFilterCache" |
|---|
| 411 | class="org.springframework.cache.ehcache.EhCacheFactoryBean"> |
|---|
| 412 | <property name="cacheName" value="VirtualJournalMappingFilter"/> |
|---|
| 413 | </bean> |
|---|
| 414 | |
|---|
| 415 | <!-- JMX exporting --> |
|---|
| 416 | <bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"> |
|---|
| 417 | <property name="locateExistingServerIfPossible" value="true"/> |
|---|
| 418 | </bean> |
|---|
| 419 | |
|---|
| 420 | <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> |
|---|
| 421 | <property name="staticMethod" |
|---|
| 422 | value="net.sf.ehcache.management.ManagementService.registerMBeans"/> |
|---|
| 423 | <property name="arguments"> |
|---|
| 424 | <list> |
|---|
| 425 | <ref bean="cacheManager"/> |
|---|
| 426 | <ref bean="mbeanServer"/> |
|---|
| 427 | <value>true</value> |
|---|
| 428 | <value>true</value> |
|---|
| 429 | <value>true</value> |
|---|
| 430 | <value>true</value> |
|---|
| 431 | </list> |
|---|
| 432 | </property> |
|---|
| 433 | </bean> |
|---|
| 434 | |
|---|
| 435 | <bean class="org.springframework.jmx.export.MBeanExporter" lazy-init="false"> |
|---|
| 436 | <property name="autodetect" value="true"/> |
|---|
| 437 | </bean> |
|---|
| 438 | |
|---|
| 439 | <bean name="org.topazproject.ambra.logging:name=log4j" class="org.apache.log4j.jmx.HierarchyDynamicMBean"/> |
|---|
| 440 | |
|---|
| 441 | <!-- email configuration --> |
|---|
| 442 | <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> |
|---|
| 443 | <property name="host" value="${ambra.network.hosts.mailhost}"/> |
|---|
| 444 | </bean> |
|---|
| 445 | |
|---|
| 446 | <bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"> |
|---|
| 447 | <property name="templateLoaderPath" value="/WEB-INF/emailTemplates/"/> |
|---|
| 448 | <property name="defaultEncoding" ref="defaultEncodingCharset"/> |
|---|
| 449 | </bean> |
|---|
| 450 | |
|---|
| 451 | <bean id="ambraMailer" class="org.topazproject.ambra.service.AmbraMailer"> |
|---|
| 452 | <property name="fromEmailAddress" value="application@plosone.org"/> |
|---|
| 453 | <property name="feedbackEmailMap"> |
|---|
| 454 | <map> |
|---|
| 455 | <entry key="text" value="feedback-text.ftl"/> |
|---|
| 456 | <entry key="html" value="feedback-html.ftl"/> |
|---|
| 457 | <entry key="subject" value="My feedback for PLoS ONE"/> |
|---|
| 458 | <entry key="toEmailAddress" value="${ambra.platform.email.feedback}"/> |
|---|
| 459 | </map> |
|---|
| 460 | </property> |
|---|
| 461 | <property name="emailThisArticleMap"> |
|---|
| 462 | <map> |
|---|
| 463 | <entry key="text" value="emailThisArticle-text.ftl"/> |
|---|
| 464 | <entry key="html" value="emailThisArticle-html.ftl"/> |
|---|
| 465 | <entry key="url" value="${ambra.services.crossref.plos.doiurl}"/> |
|---|
| 466 | <entry key="subject" value="An Article from "/> |
|---|
| 467 | </map> |
|---|
| 468 | </property> |
|---|
| 469 | </bean> |
|---|
| 470 | |
|---|
| 471 | </beans> |
|---|