Project

General

Profile

Revision 38ff1a2b

ID38ff1a2b0fc7acaf871cfd371cfb8d665afa7227
Parent fc61b3eb
Child 5ebb8944

Added by Cherian Mathew almost 7 years ago

PolytomousKey, PolytomousKeyNode : Added merge to cascade annotation
cdmlib-remote-servlet.xml, ConcurrentSessionTest.java : spelling checks
CdmCacher : made cache lement getter methods public
remoting-services.xml, httpInvokerServices : added new services

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/PolytomousKey.java
105 105
    @ManyToMany(fetch = FetchType.LAZY)
106 106
    @JoinTable(name = "PolytomousKey_NamedArea")
107 107
    @NotNull
108
    @Cascade({CascadeType.MERGE})
108 109
    private Set<NamedArea> geographicalScope = new HashSet<NamedArea>();
109 110

  
110 111
    @XmlElementWrapper(name = "ScopeRestrictions")
......
114 115
    @ManyToMany(fetch = FetchType.LAZY)
115 116
    @JoinTable(name = "PolytomousKey_Scope")
116 117
    @NotNull
118
    @Cascade({CascadeType.MERGE})
117 119
    private Set<DefinedTerm> scopeRestrictions = new HashSet<DefinedTerm>();
118 120

  
119 121
    @XmlElement(name = "Root")
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/PolytomousKeyNode.java
1 1
/**
2
 * European Distributed Institute of Taxonomy 
2
 * European Distributed Institute of Taxonomy
3 3
 * http://www.e-taxonomy.eu
4
 * 
4
 *
5 5
 * The contents of this file are subject to the Mozilla Public License Version 1.1
6 6
 * See LICENSE.TXT at the top of this package for the full license terms.
7 7
 */
......
61 61
 * While {@link #getStatement() statements} are required, {@link #getQuestion() questions} and
62 62
 * {@link #getFeature() features} are optional and do typically not exist in classical keys.
63 63
 * Both, {@link #getQuestion() questions} and {@link #getFeature() features}, will be "answered" by the
64
 * {@link #getStatement() statements} of the child nodes, where {@link #getQuestion() questions} 
65
 * are usually free text used in manually created keys while {@link #getFeature() features} are 
66
 * typically used in automatically created keys based on structured descriptive data. 
64
 * {@link #getStatement() statements} of the child nodes, where {@link #getQuestion() questions}
65
 * are usually free text used in manually created keys while {@link #getFeature() features} are
66
 * typically used in automatically created keys based on structured descriptive data.
67 67
 * Only one of them should be defined in a node. However, if both exist the {@link #getQuestion() question}
68 68
 * should always be given <b>priority</b> over the {@link #getFeature() feature}.<br>
69
 * 
69
 *
70 70
 * Typically a node either links to its child nodes (subnodes) or represents a link
71 71
 * to a {@link Taxon taxon}. The later, if taken as part of the tree,  are usually
72
 * the leaves of the represented tree like structure (taxonomically they are the 
72
 * the leaves of the represented tree like structure (taxonomically they are the
73 73
 * end point of the decision process).<br>
74
 * 
74
 *
75 75
 * However, there are exceptions to this simple structure:
76
 * 
76
 *
77 77
 * <li>Subnodes and taxon link<br>
78
 * 
78
 *
79 79
 * In rare cases a node can have both, subnodes and a {@link #getTaxon() link to a taxon}.
80
 * In this case the taxonomic determination process may be either terminated 
80
 * In this case the taxonomic determination process may be either terminated
81 81
 * at the given {@link Taxon taxon} or can proceed with the children if a more accurate
82 82
 * determination is wanted. This may be the case e.g. in a key that generally
83
 * covers all taxa of rank species and at the same time allows identification of 
83
 * covers all taxa of rank species and at the same time allows identification of
84 84
 * subspecies or varieties of these taxa.</li>
85
 * 
85
 *
86 86
 * <li>{@link #getOtherNode() Other nodes}: <br>
87
 * 
87
 *
88 88
 * A node may not only link to its subnodes or to a taxon but it may
89
 * also link to {@link #getOtherNode() another node} (with a different parent) of either the same key  
89
 * also link to {@link #getOtherNode() another node} (with a different parent) of either the same key
90 90
 * or another key.
91 91
 * <br>
92 92
 * <b>NOTE: </b>
......
94 94
 * of the same tree the key does not represent a strict tree structure
95 95
 * anymore. However, as this is a rare case we will still use this term
96 96
 * at some places.</li>
97
 * 
97
 *
98 98
 * <li>{@link #getSubkey() Subkey}:<br>
99
 * 
99
 *
100 100
 * A node may also link to another key ({@link #getSubkey() subkey}) as a whole, which is
101 101
 * equal to an {@link #getOtherNode() otherNode} link to the root node of the other key.
102 102
 * In this case the path in the decision graph spans over multiple keys.</li>
103 103
 * This structure is typically used when a key covers taxa down to a certain rank, whereas
104
 * taxa below this rank are covered by extra keys (e.g. a parent key may cover all taxa 
104
 * taxa below this rank are covered by extra keys (e.g. a parent key may cover all taxa
105 105
 * of rank species while subspecies and varieties are covered by a subkeys for each of these
106 106
 * species.
107 107
 * Another usecase for subkeys is the existence of an alternative key for a certain part
108 108
 * of the decision tree.
109
 *  
109
 *
110 110
 * <li>Multiple taxa<br>
111
 * 
111
 *
112 112
 * Some nodes in legacy keys do link to multiple taxa, meaning that the key ambigous at
113
 * this point. To represent such nodes one must use child nodes with empty 
114
 * {@link #getStatement() statements} for each such taxon (in all other cases - except for 
113
 * this point. To represent such nodes one must use child nodes with empty
114
 * {@link #getStatement() statements} for each such taxon (in all other cases - except for
115 115
 * root nodes - the <code>statement</code> is required).
116 116
 * Applications that do visualize the key should handle such a node-subnode structure as one
117
 * node with multiple taxon links. This complicated data structure has been chosen for 
117
 * node with multiple taxon links. This complicated data structure has been chosen for
118 118
 * this rare to avoid a more complicated <code>List<Taxon></code> structure for the standard
119 119
 * case.</li>
120
 * 
120
 *
121 121
 * The {@link PolytomousKey#getRoot() root node of the key} may represent the entry point
122
 * question or feature but does naturally neither have a statement nor a linked taxon as 
123
 * there is no prior decision yet. 
124
 * 
122
 * question or feature but does naturally neither have a statement nor a linked taxon as
123
 * there is no prior decision yet.
124
 *
125 125
 * <h4>Notes</h4>
126 126
 * <p>
127
 * A polytomous key node can be referenced from multiple other nodes via the 
127
 * A polytomous key node can be referenced from multiple other nodes via the
128 128
 * {@link #getOtherNode() otherNode} attribute of the other nodes. Therefore, though
129 129
 * we speek about a "decision tree" structure a node does not necessarily have only
130 130
 * one parent.
131 131
 * However, nodes are mainly represented in a tree structure and therefore do have
132
 * a defined {@link #getParent() parent} which is the "main" parent. But when implementing 
133
 * visualizing or editing tools one should keep in mind that this parent may not be 
132
 * a defined {@link #getParent() parent} which is the "main" parent. But when implementing
133
 * visualizing or editing tools one should keep in mind that this parent may not be
134 134
 * the only node linking the child node.
135
 * 
135
 *
136 136
 * @author a.mueller
137 137
 * @created 13-Oct-2010
138
 * 
138
 *
139 139
 */
140 140
@SuppressWarnings("serial")
141 141
@XmlAccessorType(XmlAccessType.FIELD)
......
183 183
	@XmlElement(name = "Parent")
184 184
	@XmlIDREF
185 185
	@XmlSchemaType(name = "IDREF")
186
	@Cascade(CascadeType.SAVE_UPDATE)
186
	@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE})
187 187
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = PolytomousKeyNode.class)
188 188
	@JoinColumn(name = "parent_id" /*
189 189
									 * , insertable=false, updatable=false,
......
198 198
	@XmlIDREF
199 199
	@XmlSchemaType(name = "IDREF")
200 200
	@ManyToOne(fetch = FetchType.LAZY)
201
	@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.DELETE })
201
	@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
202 202
	private KeyStatement statement;
203 203

  
204 204
	@XmlElement(name = "Question")
205 205
	@XmlIDREF
206 206
	@XmlSchemaType(name = "IDREF")
207 207
	@ManyToOne(fetch = FetchType.LAZY)
208
	@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.DELETE })
208
	@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE})
209 209
	private KeyStatement question;
210 210

  
211 211
	@XmlElement(name = "Feature")
212 212
	@XmlIDREF
213 213
	@XmlSchemaType(name = "IDREF")
214 214
	@ManyToOne(fetch = FetchType.LAZY)
215
    @Cascade({CascadeType.SAVE_UPDATE, CascadeType.MERGE})
215 216
	private Feature feature;
216 217

  
217 218
	@XmlElement(name = "Taxon")
218 219
	@XmlIDREF
219 220
	@XmlSchemaType(name = "IDREF")
220 221
	@ManyToOne(fetch = FetchType.LAZY)
221
	@Cascade(CascadeType.SAVE_UPDATE)
222
	@Cascade({CascadeType.SAVE_UPDATE, CascadeType.MERGE})
222 223
	private Taxon taxon;
223 224

  
224 225
	// Refers to an entire key
......
227 228
	@XmlIDREF
228 229
	@XmlSchemaType(name = "IDREF")
229 230
	@ManyToOne(fetch = FetchType.LAZY)
230
	@Cascade(CascadeType.SAVE_UPDATE)
231
	@Cascade({CascadeType.SAVE_UPDATE, CascadeType.MERGE})
231 232
	private PolytomousKey subkey;
232 233

  
233 234
	// Refers to an other node within this key or an other key
......
235 236
	@XmlIDREF
236 237
	@XmlSchemaType(name = "IDREF")
237 238
	@ManyToOne(fetch = FetchType.LAZY)
239
    @Cascade({CascadeType.MERGE})
238 240
	private PolytomousKeyNode otherNode;
239 241

  
240 242
	private Integer nodeNumber = null;
......
248 250
    @Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE })
249 251
	private Map<Language, LanguageString> modifyingText = new HashMap<Language, LanguageString>();
250 252

  
251
// ************************** FACTORY ********************************/	
253
// ************************** FACTORY ********************************/
252 254

  
253 255
	/**
254 256
	 * Creates a new empty polytomous key node instance.
......
259 261

  
260 262
	/**
261 263
	 * Creates a new polytomous key node instance.
262
	 * 
264
	 *
263 265
	 */
264 266
	public static PolytomousKeyNode NewInstance(String statement) {
265 267
		PolytomousKeyNode result = new PolytomousKeyNode();
......
269 271

  
270 272
	/**
271 273
	 * Creates a new polytomous key node instance.
272
	 * 
274
	 *
273 275
	 */
274 276
	public static PolytomousKeyNode NewInstance(String statement,
275 277
			String question, Taxon taxon, Feature feature) {
......
280 282
		result.setFeature(feature);
281 283
		return result;
282 284
	}
283
	
284
// ************************** CONSTRUCTOR *****************************/	
285
		
285

  
286
// ************************** CONSTRUCTOR *****************************/
287

  
286 288
	/**
287 289
	 * Class constructor: creates a new empty feature node instance.
288 290
	 */
......
297 299
	protected void setSortIndex(Integer sortIndex) {
298 300
		this.sortIndex = sortIndex;
299 301
	}
300
	
302

  
301 303
	/**
302 304
	 * @return
303 305
	 */
......
330 332
	/**
331 333
	 * Returns the taxon this node links to. This is usually the case when this
332 334
	 * node is a leaf.
333
	 * 
335
	 *
334 336
	 * @return
335 337
	 * @see #setTaxon(Taxon)
336 338
	 * @see #getSubkey()
......
344 346
	/**
345 347
	 * Sets the taxon this node links to. <BR>
346 348
	 * If a tax
347
	 * 
349
	 *
348 350
	 * @param taxon
349 351
	 * @see #getTaxon()
350 352
	 */
......
401 403

  
402 404
	/**
403 405
	 * Returns the parent node of <code>this</code> child.
404
	 * 
406
	 *
405 407
	 * @return
406 408
	 */
407 409
	public PolytomousKeyNode getParent() {
......
410 412

  
411 413
	/**
412 414
	 * For bidirectional use only !
413
	 * 
415
	 *
414 416
	 * @param parent
415 417
	 */
416 418
	protected void setParent(PolytomousKeyNode parent) {
......
428 430
	/**
429 431
	 * Adds the given polytomous key node at the end of the list of children of
430 432
	 * <i>this</i> polytomous key node.
431
	 * 
433
	 *
432 434
	 * @param child
433 435
	 *            the feature node to be added
434 436
	 * @see #getChildren()
......
445 447
	 * Inserts the given child node in the list of children of <i>this</i>
446 448
	 * polytomous key node at the given (index + 1) position. If the given index
447 449
	 * is out of bounds an exception will be thrown.<BR>
448
	 * 
450
	 *
449 451
	 * @param child
450 452
	 *            the polytomous key node to be added
451 453
	 * @param index
......
461 463
		if (index < 0 || index > children.size() + 1) {
462 464
			throw new IndexOutOfBoundsException("Wrong index: " + index);
463 465
		}
464
	
465
		if(nodeNumber == null) {			
466
			nodeNumber = getMaxNodeNumberFromRoot() + 1;			
466

  
467
		if(nodeNumber == null) {
468
			nodeNumber = getMaxNodeNumberFromRoot() + 1;
467 469
		}
468
		
470

  
469 471
		children.add(index, child);
470 472
		child.setKey(this.getKey());
471
		
473

  
472 474
		// TODO workaround (see sortIndex doc)
473 475
		for (int i = 0; i < children.size(); i++) {
474
			children.get(i).setSortIndex(i);			
476
			children.get(i).setSortIndex(i);
475 477
		}
476
		child.setSortIndex(index);		
478
		child.setSortIndex(index);
477 479
		child.setParent(this);
478 480
	}
479
	
481

  
480 482

  
481 483

  
482 484
	/**
483 485
	 * Removes the given polytomous key node from the list of
484 486
	 * {@link #getChildren() children} of <i>this</i> polytomous key node.
485
	 * 
487
	 *
486 488
	 * @param child
487 489
	 *            the feature node which should be removed
488 490
	 * @see #getChildren()
......
501 503
	 * Removes the feature node placed at the given (index + 1) position from
502 504
	 * the list of {@link #getChildren() children} of <i>this</i> feature node.
503 505
	 * If the given index is out of bounds no child will be removed.
504
	 * 
506
	 *
505 507
	 * @param index
506 508
	 *            the integer indicating the position of the feature node to be
507 509
	 *            removed
......
525 527
		}
526 528
		refreshNodeNumbering();
527 529
	}
528
	
529
// **************************** METHODS ************************************/	
530

  
531
// **************************** METHODS ************************************/
530 532

  
531 533
	/**
532 534
	 * Returns the current maximum value of the node number in the entire key
533 535
	 * starting from the root.
534
	 * 
535
	 * @return 
536
	 *
537
	 * @return
536 538
	 */
537 539
	private int getMaxNodeNumberFromRoot() {
538
		PolytomousKeyNode rootKeyNode = this.getKey().getRoot();	
540
		PolytomousKeyNode rootKeyNode = this.getKey().getRoot();
539 541
		int rootNumber = this.getKey().getStartNumber();
540
		return getMaxNodeNumber(rootNumber, rootKeyNode);		
542
		return getMaxNodeNumber(rootNumber, rootKeyNode);
541 543
	}
542
	
544

  
543 545
	/**
544 546
	 * Returns the current maximum value of the node number in the entire key
545 547
	 * starting from the given key node, comparing with a given max value as input.
546
	 * 
547
	 * @return 
548
	 *
549
	 * @return
548 550
	 */
549 551
	private int getMaxNodeNumber(int maxNumber, PolytomousKeyNode parent) {
550
		if (parent.getNodeNumber() != null) {		
552
		if (parent.getNodeNumber() != null) {
551 553
			maxNumber = (maxNumber < parent.getNodeNumber()) ? parent.getNodeNumber() : maxNumber;
552
			for (PolytomousKeyNode child : parent.getChildren()) {				
554
			for (PolytomousKeyNode child : parent.getChildren()) {
553 555
				if (parent == child){
554 556
					throw new RuntimeException("Parent and child are the same for the given key node. This will lead to an infinite loop when updating the max node number.");
555 557
				}else{
......
559 561
		}
560 562
		return maxNumber;
561 563
	}
562
	
564

  
563 565
	/**
564 566
	 * Refresh numbering of key nodes starting from root.
565
	 * 	 
567
	 *
566 568
	 */
567
	public void refreshNodeNumbering() {				
569
	public void refreshNodeNumbering() {
568 570
		updateNodeNumbering(getKey().getRoot(), getKey().getStartNumber());
569 571
	}
570
	
572

  
571 573
	/**
572
	 * Recursively (depth-first) refresh numbering of key nodes starting from the given key node, 
574
	 * Recursively (depth-first) refresh numbering of key nodes starting from the given key node,
573 575
	 * starting with a given node number.
574
	 * 
576
	 *
575 577
	 * @return new starting node number value
576 578
	 */
577 579
	private int updateNodeNumbering(PolytomousKeyNode node,int nodeN) {
578 580
		int newNodeN = nodeN;
579
		if (node.isLeaf()) {			
581
		if (node.isLeaf()) {
580 582
			node.setNodeNumber(null);
581
		} else {		
582
			node.setNodeNumber(nodeN);			
583
		} else {
584
			node.setNodeNumber(nodeN);
583 585
			newNodeN++;
584
			for (PolytomousKeyNode child : node.getChildren()) {												
586
			for (PolytomousKeyNode child : node.getChildren()) {
585 587
				if (node == child){
586 588
					throw new RuntimeException("Parent and child are the same for the given key node. This will lead to an infinite loop when updating node numbers.");
587 589
				}else{
588
					newNodeN = updateNodeNumbering(child, newNodeN);				
590
					newNodeN = updateNodeNumbering(child, newNodeN);
589 591
				}
590 592
			}
591
		}		
593
		}
592 594
		return newNodeN;
593 595
	}
594
	
595 596

  
596
	
597

  
598

  
597 599

  
598 600
	/**
599 601
	 * Returns the feature node placed at the given (childIndex + 1) position
600 602
	 * within the list of {@link #getChildren() children} of <i>this</i> feature
601 603
	 * node. If the given index is out of bounds no child will be returned.
602
	 * 
604
	 *
603 605
	 * @param childIndex
604 606
	 *            the integer indicating the position of the feature node
605 607
	 * @see #getChildren()
......
612 614

  
613 615
	/**
614 616
	 * Returns the number of children nodes of <i>this</i> feature node.
615
	 * 
617
	 *
616 618
	 * @see #getChildren()
617 619
	 */
618 620
	@Transient
......
624 626
	 * Returns the integer indicating the position of the given feature node
625 627
	 * within the list of {@link #getChildren() children} of <i>this</i> feature
626 628
	 * node. If the list does not contain this node then -1 will be returned.
627
	 * 
629
	 *
628 630
	 * @param node
629 631
	 *            the feature node the position of which is being searched
630 632
	 * @see #addChild(PolytomousKeyNode, int)
......
642 644
	 * Returns the boolean value indicating if <i>this</i> feature node has
643 645
	 * children (false) or not (true). A node without children is at the
644 646
	 * bottommost level of a tree and is called a leaf.
645
	 * 
647
	 *
646 648
	 * @see #getChildren()
647 649
	 * @see #getChildCount()
648 650
	 */
......
657 659
	 * Returns the statement for <code>this</code> PolytomousKeyNode. When coming
658 660
	 * from the parent node the user needs to agree with the statement (and disagree
659 661
	 * with all statements of sibling nodes) to follow <code>this</code> node.<BR>
660
	 * The statement may stand alone (standard in classical keys) or it may be 
661
	 * either the answer to the {@link #getQuestion() question} or the 
662
	 * The statement may stand alone (standard in classical keys) or it may be
663
	 * either the answer to the {@link #getQuestion() question} or the
662 664
	 * value for the {@link #getFeature() feature} of the parent node.
663
	 * 
665
	 *
664 666
	 * @return the statement
665 667
	 * @see #getQuestion()
666 668
	 */
......
675 677
	 * If a statement text in the given language exists already it is
676 678
	 * overwritten and the old text is returned. If language is
677 679
	 * <code>null</code> the default language is used instead.
678
	 * 
680
	 *
679 681
	 * @param text
680 682
	 *            the statement text
681 683
	 * @param language
......
704 706
	 * Returns the question for <code>this</code> PolytomousKeyNode. <BR>
705 707
	 * A question is answered by statements in leads below this tree node.
706 708
	 * Questions are optional and are usually empty in traditional keys.
707
	 * 
709
	 *
708 710
	 * @return the question
709 711
	 * @see #getStatement()
710 712
	 */
......
719 721
	 * If a question text in the given language exists already it is overwritten
720 722
	 * and the old text is returned. If language is <code>null</code> the
721 723
	 * default language is used instead.
722
	 * 
724
	 *
723 725
	 * @param text
724 726
	 * @param language
725 727
	 * @return
......
759 761

  
760 762
	/**
761 763
	 * See {@link #getModifyingText}
762
	 * 
764
	 *
763 765
	 * @param description
764 766
	 *            the language string describing the validity in a particular
765 767
	 *            language
......
777 779

  
778 780
	/**
779 781
	 * See {@link #getModifyingText}
780
	 * 
782
	 *
781 783
	 * @param description
782 784
	 *            the language string describing the validity in a particular
783 785
	 *            language
......
790 792

  
791 793
	/**
792 794
	 * See {@link #getModifyingText}
793
	 * 
795
	 *
794 796
	 * @param text
795 797
	 *            the string describing the validity in a particular language
796 798
	 * @param language
......
809 811

  
810 812
	/**
811 813
	 * See {@link #getModifyingText}
812
	 * 
814
	 *
813 815
	 * @param text
814 816
	 *            the string describing the validity in a particular language
815 817
	 * @param language
......
824 826

  
825 827
	/**
826 828
	 * See {@link #getModifyingText}
827
	 * 
829
	 *
828 830
	 * @param language
829 831
	 *            the language in which the language string to be removed has
830 832
	 *            been formulated
......
843 845
	 * PolytomousKeyNode by modifying only some of the attributes. The parent,
844 846
	 * the feature and the key are the are the same as for the original feature
845 847
	 * node the children are removed.
846
	 * 
848
	 *
847 849
	 * @see eu.etaxonomy.cdm.model.common.VersionableEntity#clone()
848 850
	 * @see java.lang.Object#clone()
849 851
	 */
cdmlib-remote-webapp/src/main/webapp/WEB-INF/cdmlib-remote-servlet.xml
14 14

  
15 15
  <!-- FIXME:Remoting Expose remoting services currently only for testing -->
16 16
  <!-- Using Spring Beans Profile (>3.1) http://spring.io/blog/2011/02/11/spring-framework-3-1-m1-released/ 
17
    only valid if it is at the end acivated by the option -Dspring.profiles.active=remoting 
17
    only valid if it is at the end activated by the option -Dspring.profiles.active=remoting 
18 18
    with maven -->
19 19
  <beans profile="remoting">
20 20
    <import resource="classpath:/eu/etaxonomy/cdm/remoting-services.xml" />
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/cache/CdmCacher.java
39 39
	 *
40 40
	 */
41 41
	private void init() {
42
		// Remove all caches
43
		getDefaultCacheManager().removalAll();
44
		// Create default cache
45
		getDefaultCacheManager().addCache(new Cache(getDefaultCacheConfiguration()));
46

  
42
		if(getDefaultCache() == null) {
43
			// Create default cache
44
			getDefaultCacheManager().addCache(new Cache(getDefaultCacheConfiguration()));
45
		}
47 46
		setup();
48 47
	}
49 48

  
......
83 82
	 *
84 83
	 * @return
85 84
	 */
86
	private static Cache getDefaultCache() {
85
	public static Cache getDefaultCache() {
87 86
		return getDefaultCacheManager().getCache(DEFAULT_CACHE_NAME);
88 87
	}
89 88

  
......
94 93
	 * @param uuid
95 94
	 * @return
96 95
	 */
97
	protected Element getCacheElement(UUID uuid) {
96
	public Element getCacheElement(UUID uuid) {
98 97
		return getDefaultCache().get(uuid);
99 98
	}
100 99

  
cdmlib-services/src/main/resources/eu/etaxonomy/cdm/httpInvokerServices.xml
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<beans xmlns="http://www.springframework.org/schema/beans"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
4
	xmlns:tx="http://www.springframework.org/schema/tx"
5
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
3
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
4
  xmlns:tx="http://www.springframework.org/schema/tx"
5
  xsi:schemaLocation="http://www.springframework.org/schema/beans 
6 6
    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
7 7
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
8 8
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
9 9
    ">
10 10

  
11
	<!-- 
12
		The beans for the implementation classes are declared with the @Service annotation.
13
		See ClassificationServiceImpl for an example.
14
	-->
15

  
16
	<bean id="httpAgentService"
17
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
18
		<property name="service">
19
			<ref bean="agentServiceImpl" />
20
		</property>
21
		<property name="serviceInterface">
22
			<value>eu.etaxonomy.cdm.api.service.IAgentService</value>
23
		</property>
24
	</bean>
25

  
26
	<bean id="httpAnnotationService"
27
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
28
		<property name="service">
29
			<ref bean="annotationService" />
30
		</property>
31
		<property name="serviceInterface">
32
			<value>eu.etaxonomy.cdm.api.service.IAnnotationService</value>
33
		</property>
34
	</bean>
35

  
36
	<bean id="httpAuditEventService"
37
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
38
		<property name="service">
39
			<ref bean="auditEventService" />
40
		</property>
41
		<property name="serviceInterface">
42
			<value>eu.etaxonomy.cdm.api.service.IAuditEventService</value>
43
		</property>
44
	</bean>
45

  
46
	<bean id="httpClassificationService"
47
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
48
		<property name="service">
49
			<ref bean="classificationServiceImpl" />
50
		</property>
51
		<property name="serviceInterface">
52
			<value>eu.etaxonomy.cdm.api.service.IClassificationService</value>
53
		</property>
54
	</bean>
55

  
56
	<bean id="httpCollectionService"
57
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
58
		<property name="service">
59
			<ref bean="collectionServiceImpl" />
60
		</property>
61
		<property name="serviceInterface">
62
			<value>eu.etaxonomy.cdm.api.service.ICollectionService</value>
63
		</property>
64
	</bean>
65

  
66
	<bean id="httpCommonService"
67
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
68
		<property name="service">
69
			<ref bean="commonServiceImpl" />
70
		</property>
71
		<property name="serviceInterface">
72
			<value>eu.etaxonomy.cdm.api.service.ICommonService</value>
73
		</property>
74
	</bean>
75

  
76
	<bean id="httpDescriptionService"
77
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
78
		<property name="service">
79
			<ref bean="descriptionServiceImpl" />
80
		</property>
81
		<property name="serviceInterface">
82
			<value>eu.etaxonomy.cdm.api.service.IDescriptionService</value>
83
		</property>
84
	</bean>
85

  
86
	<bean id="httpFeatureNodeService"
87
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
88
		<property name="service">
89
			<ref bean="featureNodeServiceImpl" />
90
		</property>
91
		<property name="serviceInterface">
92
			<value>eu.etaxonomy.cdm.api.service.IFeatureNodeService</value>
93
		</property>
94
	</bean>
95

  
96
	<bean id="httpFeatureTreeService"
97
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
98
		<property name="service">
99
			<ref bean="featureTreeServiceImpl" />
100
		</property>
101
		<property name="serviceInterface">
102
			<value>eu.etaxonomy.cdm.api.service.IFeatureTreeService</value>
103
		</property>
104
	</bean>
105

  
106
	<bean id="httpGroupService"
107
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
108
		<property name="service">
109
			<ref bean="groupServiceImpl" />
110
		</property>
111
		<property name="serviceInterface">
112
			<value>eu.etaxonomy.cdm.api.service.IGroupService</value>
113
		</property>
114
	</bean>
115

  
116
	<bean id="httpIdentificationKeyService"
117
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
118
		<property name="service">
119
			<ref bean="identificationKeyServiceImpl" />
120
		</property>
121
		<property name="serviceInterface">
122
			<value>eu.etaxonomy.cdm.api.service.IIdentificationKeyService</value>
123
		</property>
124
	</bean>
125

  
126
	<bean id="httpLocationService"
127
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
128
		<property name="service">
129
			<ref bean="locationServiceImpl" />
130
		</property>
131
		<property name="serviceInterface">
132
			<value>eu.etaxonomy.cdm.api.service.ILocationService</value>
133
		</property>
134
	</bean>
135

  
136
	<bean id="httpMarkerService"
137
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
138
		<property name="service">
139
			<ref bean="markerServiceImpl" />
140
		</property>
141
		<property name="serviceInterface">
142
			<value>eu.etaxonomy.cdm.api.service.IMarkerService</value>
143
		</property>
144
	</bean>
145

  
146
	<bean id="httpMediaService"
147
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
148
		<property name="service">
149
			<ref bean="mediaServiceImpl" />
150
		</property>
151
		<property name="serviceInterface">
152
			<value>eu.etaxonomy.cdm.api.service.IMediaService</value>
153
		</property>
154
	</bean>
155

  
156
	<bean id="httpNameService"
157
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
158
		<property name="service">
159
			<ref bean="nameServiceImpl" />
160
		</property>
161
		<property name="serviceInterface">
162
			<value>eu.etaxonomy.cdm.api.service.INameService</value>
163
		</property>
164
	</bean>
165

  
166
	<bean id="httpOccurrenceService"
167
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
168
		<property name="service">
169
			<ref bean="occurrenceServiceImpl" />
170
		</property>
171
		<property name="serviceInterface">
172
			<value>eu.etaxonomy.cdm.api.service.IOccurrenceService</value>
173
		</property>
174
	</bean>
175

  
176
	<bean id="httpPolytomousKeyNodeService"
177
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
178
		<property name="service">
179
			<ref bean="polytomousKeyNodeServiceImpl" />
180
		</property>
181
		<property name="serviceInterface">
182
			<value>eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService</value>
183
		</property>
184
	</bean>
185

  
186
	<bean id="httpPolytomousKeyService"
187
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
188
		<property name="service">
189
			<ref bean="polytomousKeyServiceImpl" />
190
		</property>
191
		<property name="serviceInterface">
192
			<value>eu.etaxonomy.cdm.api.service.IPolytomousKeyService</value>
193
		</property>
194
	</bean>
195

  
196
	<bean id="httpReferenceService"
197
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
198
		<property name="service">
199
			<ref bean="referenceServiceImpl" />
200
		</property>
201
		<property name="serviceInterface">
202
			<value>eu.etaxonomy.cdm.api.service.IReferenceService</value>
203
		</property>
204
	</bean>
205

  
206
	<bean id="httpServiceService"
207
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
208
		<property name="service">
209
			<ref bean="serviceImpl" />
210
		</property>
211
		<property name="serviceInterface">
212
			<value>eu.etaxonomy.cdm.api.service.IService</value>
213
		</property>
214
	</bean>
215

  
216
	<bean id="httpTaxonNodeService"
217
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
218
		<property name="service">
219
			<ref bean="taxonNodeServiceImpl" />
220
		</property>
221
		<property name="serviceInterface">
222
			<value>eu.etaxonomy.cdm.api.service.ITaxonNodeService</value>
223
		</property>
224
	</bean>
225

  
226
	<bean id="httpTaxonService"
227
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
228
		<property name="service">
229
			<ref bean="taxonServiceImpl" />
230
		</property>
231
		<property name="serviceInterface">
232
			<value>eu.etaxonomy.cdm.api.service.ITaxonService</value>
233
		</property>
234
	</bean>
235

  
236
	<bean id="httpTermService"
237
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
238
		<property name="service">
239
			<ref bean="termServiceImpl" />
240
		</property>
241
		<property name="serviceInterface">
242
			<value>eu.etaxonomy.cdm.api.service.ITermService</value>
243
		</property>
244
	</bean>
245

  
246
	<bean id="httpEntityValidationResultService"
247
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
248
		<property name="service">
249
			<ref bean="entityValidationResultServiceImpl" />
250
		</property>
251
		<property name="serviceInterface">
252
			<value>eu.etaxonomy.cdm.api.service.IEntityValidationResultService</value>
253
		</property>
254
	</bean>
255

  
256
	<bean id="httpEntityConstraintViolationService"
257
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
258
		<property name="service">
259
			<ref bean="entityConstraintViolationServiceImpl" />
260
		</property>
261
		<property name="serviceInterface">
262
			<value>eu.etaxonomy.cdm.api.service.IEntityConstraintViolationService</value>
263
		</property>
264
	</bean>
265

  
266
	<bean id="httpUserService"
267
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
268
		<property name="service">
269
			<ref bean="userService" />
270
		</property>
271
		<property name="serviceInterface">
272
			<value>eu.etaxonomy.cdm.api.service.IUserService</value>
273
		</property>
274
	</bean>
275

  
276
	<bean id="httpVocabularyService"
277
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
278
		<property name="service">
279
			<ref bean="vocabularyServiceImpl" />
280
		</property>
281
		<property name="serviceInterface">
282
			<value>eu.etaxonomy.cdm.api.service.IVocabularyService</value>
283
		</property>
284
	</bean>
285

  
286
	<bean id="httpWorkingService"
287
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
288
		<property name="service">
289
			<ref bean="workingSetService" />
290
		</property>
291
		<property name="serviceInterface">
292
			<value>eu.etaxonomy.cdm.api.service.IWorkingSetService</value>
293
		</property>
294
	</bean>
295

  
296
 	<bean id="httpGrantedAuthorityService"
297
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
298
		<property name="service">
299
			<ref bean="grantedAuthorityServiceImpl" />
300
		</property>
301
		<property name="serviceInterface">
302
			<value>eu.etaxonomy.cdm.api.service.IGrantedAuthorityService</value>
303
		</property>
304
	</bean>
305
	
306
 	<bean id="httpDatabaseService"
307
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
308
		<property name="service">
309
			<ref bean="databaseServiceHibernateImpl" />
310
		</property>
311
		<property name="serviceInterface">
312
			<value>eu.etaxonomy.cdm.api.service.IDatabaseService</value>
313
		</property>
314
	</bean>
315
	
316
	 <bean id="httpLsidAuthorityService"
317
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
318
		<property name="service">
319
			<ref bean="lsidAuthorityService" />
320
		</property>
321
		<property name="serviceInterface">
322
			<value>eu.etaxonomy.cdm.api.service.lsid.LSIDAuthorityService</value>
323
		</property>
324
	</bean>
325
	
326
	 <bean id="httpLsidMetadataService"
327
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
328
		<property name="service">
329
			<ref bean="lsidMetadataService" />
330
		</property>
331
		<property name="serviceInterface">
332
			<value>eu.etaxonomy.cdm.api.service.lsid.LSIDMetadataService</value>
333
		</property>
334
	</bean>
335
	
336
	 <bean id="httpLsidDataService"
337
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
338
		<property name="service">
339
			<ref bean="lsidDataService" />
340
		</property>
341
		<property name="serviceInterface">
342
			<value>eu.etaxonomy.cdm.api.service.lsid.LSIDDataService</value>
343
		</property>
344
	</bean>
345
	
346
 	<bean id="httpAuthenticationManager"
347
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
348
		<property name="service">
349
			<ref bean="authenticationManager" />
350
		</property>
351
		<property name="serviceInterface">
352
			<value>org.springframework.security.authentication.AuthenticationManager</value>
353
		</property>
354
	</bean>
355
	
356
	<bean id="httpPrimerService"
357
		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
358
		<property name="service">
359
			<ref bean="primerServiceImpl" />
360
		</property>
361
		<property name="serviceInterface">
362
			<value>eu.etaxonomy.cdm.api.service.molecular.IPrimerService</value>
363
		</property>
364
	</bean>
365
 
11
  <!-- The beans for the implementation classes are declared with the @Service 
12
    annotation. See ClassificationServiceImpl for an example. -->
13

  
14
  <bean id="httpAgentService"
15
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
16
    <property name="service">
17
      <ref bean="agentServiceImpl" />
18
    </property>
19
    <property name="serviceInterface">
20
      <value>eu.etaxonomy.cdm.api.service.IAgentService</value>
21
    </property>
22
  </bean>
23

  
24
  <bean id="httpAnnotationService"
25
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
26
    <property name="service">
27
      <ref bean="annotationService" />
28
    </property>
29
    <property name="serviceInterface">
30
      <value>eu.etaxonomy.cdm.api.service.IAnnotationService</value>
31
    </property>
32
  </bean>
33

  
34
  <bean id="httpAuditEventService"
35
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
36
    <property name="service">
37
      <ref bean="auditEventService" />
38
    </property>
39
    <property name="serviceInterface">
40
      <value>eu.etaxonomy.cdm.api.service.IAuditEventService</value>
41
    </property>
42
  </bean>
43

  
44
  <bean id="httpClassificationService"
45
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
46
    <property name="service">
47
      <ref bean="classificationServiceImpl" />
48
    </property>
49
    <property name="serviceInterface">
50
      <value>eu.etaxonomy.cdm.api.service.IClassificationService</value>
51
    </property>
52
  </bean>
53

  
54
  <bean id="httpCollectionService"
55
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
56
    <property name="service">
57
      <ref bean="collectionServiceImpl" />
58
    </property>
59
    <property name="serviceInterface">
60
      <value>eu.etaxonomy.cdm.api.service.ICollectionService</value>
61
    </property>
62
  </bean>
63

  
64
  <bean id="httpCommonService"
65
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
66
    <property name="service">
67
      <ref bean="commonServiceImpl" />
68
    </property>
69
    <property name="serviceInterface">
70
      <value>eu.etaxonomy.cdm.api.service.ICommonService</value>
71
    </property>
72
  </bean>
73

  
74
  <bean id="httpDescriptionService"
75
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
76
    <property name="service">
77
      <ref bean="descriptionServiceImpl" />
78
    </property>
79
    <property name="serviceInterface">
80
      <value>eu.etaxonomy.cdm.api.service.IDescriptionService</value>
81
    </property>
82
  </bean>
83

  
84
  <bean id="httpFeatureNodeService"
85
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
86
    <property name="service">
87
      <ref bean="featureNodeServiceImpl" />
88
    </property>
89
    <property name="serviceInterface">
90
      <value>eu.etaxonomy.cdm.api.service.IFeatureNodeService</value>
91
    </property>
92
  </bean>
93

  
94
  <bean id="httpFeatureTreeService"
95
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
96
    <property name="service">
97
      <ref bean="featureTreeServiceImpl" />
98
    </property>
99
    <property name="serviceInterface">
100
      <value>eu.etaxonomy.cdm.api.service.IFeatureTreeService</value>
101
    </property>
102
  </bean>
103

  
104
  <bean id="httpGroupService"
105
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
106
    <property name="service">
107
      <ref bean="groupServiceImpl" />
108
    </property>
109
    <property name="serviceInterface">
110
      <value>eu.etaxonomy.cdm.api.service.IGroupService</value>
111
    </property>
112
  </bean>
113

  
114
  <bean id="httpIdentificationKeyService"
115
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
116
    <property name="service">
117
      <ref bean="identificationKeyServiceImpl" />
118
    </property>
119
    <property name="serviceInterface">
120
      <value>eu.etaxonomy.cdm.api.service.IIdentificationKeyService
121
      </value>
122
    </property>
123
  </bean>
124

  
125
  <bean id="httpLocationService"
126
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
127
    <property name="service">
128
      <ref bean="locationServiceImpl" />
129
    </property>
130
    <property name="serviceInterface">
131
      <value>eu.etaxonomy.cdm.api.service.ILocationService</value>
132
    </property>
133
  </bean>
134

  
135
  <bean id="httpMarkerService"
136
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
137
    <property name="service">
138
      <ref bean="markerServiceImpl" />
139
    </property>
140
    <property name="serviceInterface">
141
      <value>eu.etaxonomy.cdm.api.service.IMarkerService</value>
142
    </property>
143
  </bean>
144

  
145
  <bean id="httpMediaService"
146
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
147
    <property name="service">
148
      <ref bean="mediaServiceImpl" />
149
    </property>
150
    <property name="serviceInterface">
151
      <value>eu.etaxonomy.cdm.api.service.IMediaService</value>
152
    </property>
153
  </bean>
154

  
155
  <bean id="httpNameService"
156
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
157
    <property name="service">
158
      <ref bean="nameServiceImpl" />
159
    </property>
160
    <property name="serviceInterface">
161
      <value>eu.etaxonomy.cdm.api.service.INameService</value>
162
    </property>
163
  </bean>
164

  
165
  <bean id="httpOccurrenceService"
166
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
167
    <property name="service">
168
      <ref bean="occurrenceServiceImpl" />
169
    </property>
170
    <property name="serviceInterface">
171
      <value>eu.etaxonomy.cdm.api.service.IOccurrenceService</value>
172
    </property>
173
  </bean>
174

  
175
  <bean id="httpPolytomousKeyNodeService"
176
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
177
    <property name="service">
178
      <ref bean="polytomousKeyNodeServiceImpl" />
179
    </property>
180
    <property name="serviceInterface">
181
      <value>eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService
182
      </value>
183
    </property>
184
  </bean>
185

  
186
  <bean id="httpPolytomousKeyService"
187
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
188
    <property name="service">
189
      <ref bean="polytomousKeyServiceImpl" />
190
    </property>
191
    <property name="serviceInterface">
192
      <value>eu.etaxonomy.cdm.api.service.IPolytomousKeyService</value>
193
    </property>
194
  </bean>
195

  
196
  <bean id="httpReferenceService"
197
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
198
    <property name="service">
199
      <ref bean="referenceServiceImpl" />
200
    </property>
201
    <property name="serviceInterface">
202
      <value>eu.etaxonomy.cdm.api.service.IReferenceService</value>
203
    </property>
204
  </bean>
205

  
206
  <bean id="httpServiceService"
207
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
208
    <property name="service">
209
      <ref bean="serviceImpl" />
210
    </property>
211
    <property name="serviceInterface">
212
      <value>eu.etaxonomy.cdm.api.service.IService</value>
213
    </property>
214
  </bean>
215

  
216
  <bean id="httpTaxonNodeService"
217
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
218
    <property name="service">
219
      <ref bean="taxonNodeServiceImpl" />
220
    </property>
221
    <property name="serviceInterface">
222
      <value>eu.etaxonomy.cdm.api.service.ITaxonNodeService</value>
223
    </property>
224
  </bean>
225

  
226
  <bean id="httpTaxonService"
227
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
228
    <property name="service">
229
      <ref bean="taxonServiceImpl" />
230
    </property>
231
    <property name="serviceInterface">
232
      <value>eu.etaxonomy.cdm.api.service.ITaxonService</value>
233
    </property>
234
  </bean>
235

  
236
  <bean id="httpTermService"
237
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
238
    <property name="service">
239
      <ref bean="termServiceImpl" />
240
    </property>
241
    <property name="serviceInterface">
242
      <value>eu.etaxonomy.cdm.api.service.ITermService</value>
243
    </property>
244
  </bean>
245

  
246
  <bean id="httpEntityValidationResultService"
247
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
248
    <property name="service">
249
      <ref bean="entityValidationResultServiceImpl" />
250
    </property>
251
    <property name="serviceInterface">
252
      <value>eu.etaxonomy.cdm.api.service.IEntityValidationResultService
253
      </value>
254
    </property>
255
  </bean>
256

  
257
  <bean id="httpEntityConstraintViolationService"
258
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
259
    <property name="service">
260
      <ref bean="entityConstraintViolationServiceImpl" />
261
    </property>
262
    <property name="serviceInterface">
263
      <value>eu.etaxonomy.cdm.api.service.IEntityConstraintViolationService
264
      </value>
265
    </property>
266
  </bean>
267

  
268
  <bean id="httpUserService"
269
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
270
    <property name="service">
271
      <ref bean="userService" />
272
    </property>
273
    <property name="serviceInterface">
274
      <value>eu.etaxonomy.cdm.api.service.IUserService</value>
275
    </property>
276
  </bean>
277

  
278
  <bean id="httpVocabularyService"
279
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
280
    <property name="service">
281
      <ref bean="vocabularyServiceImpl" />
282
    </property>
283
    <property name="serviceInterface">
284
      <value>eu.etaxonomy.cdm.api.service.IVocabularyService</value>
285
    </property>
286
  </bean>
287

  
288
  <bean id="httpWorkingService"
289
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
290
    <property name="service">
291
      <ref bean="workingSetService" />
292
    </property>
293
    <property name="serviceInterface">
294
      <value>eu.etaxonomy.cdm.api.service.IWorkingSetService</value>
295
    </property>
296
  </bean>
297

  
298
  <bean id="httpGrantedAuthorityService"
299
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
300
    <property name="service">
301
      <ref bean="grantedAuthorityServiceImpl" />
302
    </property>
303
    <property name="serviceInterface">
304
      <value>eu.etaxonomy.cdm.api.service.IGrantedAuthorityService
305
      </value>
306
    </property>
307
  </bean>
308

  
309
  <bean id="httpDatabaseService"
310
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
311
    <property name="service">
312
      <ref bean="databaseServiceHibernateImpl" />
313
    </property>
314
    <property name="serviceInterface">
315
      <value>eu.etaxonomy.cdm.api.service.IDatabaseService</value>
316
    </property>
317
  </bean>
318

  
319
  <bean id="httpLsidAuthorityService"
320
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
321
    <property name="service">
322
      <ref bean="lsidAuthorityService" />
323
    </property>
324
    <property name="serviceInterface">
325
      <value>eu.etaxonomy.cdm.api.service.lsid.LSIDAuthorityService
326
      </value>
327
    </property>
328
  </bean>
329

  
330
  <bean id="httpLsidMetadataService"
331
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
332
    <property name="service">
333
      <ref bean="lsidMetadataService" />
334
    </property>
335
    <property name="serviceInterface">
336
      <value>eu.etaxonomy.cdm.api.service.lsid.LSIDMetadataService
337
      </value>
338
    </property>
339
  </bean>
340

  
341
  <bean id="httpLsidDataService"
342
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
343
    <property name="service">
344
      <ref bean="lsidDataService" />
345
    </property>
346
    <property name="serviceInterface">
347
      <value>eu.etaxonomy.cdm.api.service.lsid.LSIDDataService</value>
348
    </property>
349
  </bean>
350

  
351
  <bean id="httpAuthenticationManager"
352
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
353
    <property name="service">
354
      <ref bean="authenticationManager" />
355
    </property>
356
    <property name="serviceInterface">
357
      <value>org.springframework.security.authentication.AuthenticationManager
358
      </value>
359
    </property>
360
  </bean>
361

  
362
  <bean id="httpPrimerService"
363
    class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
364
    <property name="service">
365
      <ref bean="primerServiceImpl" />
366
    </property>
367
    <property name="serviceInterface">
368
      <value>eu.etaxonomy.cdm.api.service.molecular.IPrimerService
369
      </value>
370
    </property>
371
  </bean>
372

  
366 373
</beans>
cdmlib-services/src/main/resources/eu/etaxonomy/cdm/remoting-services.xml
8 8
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
9 9
    ">
10 10

  
11
	<import resource="classpath:/eu/etaxonomy/cdm/httpInvokerServices.xml"/>
11
  <import resource="classpath:/eu/etaxonomy/cdm/httpInvokerServices.xml" />
12 12

  
13
	<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
14
		<property name="order" value="0" />
15
		<property name="mappings">
16
	 
17
	 	 <!-- Needed for spring remoting with the http invoker -->
18
	 	 <!-- The configuration of the services is imported from httpInvokerServices.xml --> 
19
			<props>
20
				<prop key="/remoting/agent.service">httpAgentService</prop>
21
				<prop key="/remoting/annotation.service">httpAnnotationService</prop>
22
				<prop key="/remoting/auditevent.service">httpAuditEventService</prop>
23
				<prop key="/remoting/classification.service">httpClassificationService</prop>
24
				<prop key="/remoting/collection.service">httpCollectionService</prop>
25
				<prop key="/remoting/common.service">httpCommonService</prop>
26
				<prop key="/remoting/database.service">httpDatabaseService</prop>
27
				<prop key="/remoting/description.service">httpDescriptionService</prop>
28
				<prop key="/remoting/featurenode.service">httpFeatureNodeService</prop>
29
				<prop key="/remoting/featuretree.service">httpFeatureTreeService</prop>
30
				<prop key="/remoting/grantedauthority.service">httpGrantedAuthorityService</prop>
31
				<prop key="/remoting/group.service">httpGroupService</prop>
32
				<prop key="/remoting/identificationkey.service">httpIdentificationKeyService</prop>
33
				<prop key="/remoting/location.service">httpLocationService</prop>
34
				<prop key="/remoting/lsidauthority.service">httpLsidAuthorityService</prop>		
35
				<prop key="/remoting/lsiddata.service">httpLsidDataService</prop>	
36
				<prop key="/remoting/lsidmetadata.service">httpLsidMetadataService</prop>			
37
				<prop key="/remoting/marker.service">httpMarkerService</prop>
38
				<prop key="/remoting/media.service">httpMediaService</prop>
39
				<prop key="/remoting/name.service">httpNameService</prop>
40
				<prop key="/remoting/occurrence.service">httpOccurrenceService</prop>
41
				<prop key="/remoting/polytomouskeynode.service">httpPolytomousKeyNodeService</prop>
42
				<prop key="/remoting/polytomouskey.service">httpPolytomousKeyService</prop>
43
				<prop key="/remoting/reference.service">httpReferenceService</prop>
44
				<prop key="/remoting/service.service">httpServiceService</prop>
45
				<prop key="/remoting/taxonnode.service">httpTaxonNodeService</prop>
46
				<prop key="/remoting/taxon.service">httpTaxonService</prop>
47
				<prop key="/remoting/term.service">httpTermService</prop>
48
				<prop key="/remoting/entityvalidationresultservice.service">httpEntityValidationResultService</prop>
49
				<prop key="/remoting/entityconstraintviolationservice.service">httpEntityConstraintViolationService</prop>
50
				<prop key="/remoting/user.service">httpUserService</prop>
51
				<prop key="/remoting/vocabulary.service">httpVocabularyService</prop>
52
				<prop key="/remoting/authenticationManager.service">httpAuthenticationManager</prop>
53
			</props>
54
		</property>
55
	</bean>
13
  <bean
14
    class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
15
    <property name="order" value="0" />
16
    <property name="mappings">
56 17

  
57
    
58
     <!-- needed for HTTPInvoker -->  	
59
	<bean class="org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter" />
18
      <!-- Needed for spring remoting with the http invoker -->
19
      <!-- The configuration of the services is imported from httpInvokerServices.xml -->
20
      <props>
21
        <prop key="/remoting/agent.service">httpAgentService</prop>
22
        <prop key="/remoting/annotation.service">httpAnnotationService</prop>
23
        <prop key="/remoting/auditevent.service">httpAuditEventService</prop>
24
        <prop key="/remoting/classification.service">httpClassificationService</prop>
25
        <prop key="/remoting/collection.service">httpCollectionService</prop>
26
        <prop key="/remoting/common.service">httpCommonService</prop>
27
        <prop key="/remoting/database.service">httpDatabaseService</prop>
28
        <prop key="/remoting/description.service">httpDescriptionService</prop>
29
        <prop key="/remoting/featurenode.service">httpFeatureNodeService</prop>
30
        <prop key="/remoting/featuretree.service">httpFeatureTreeService</prop>
31
        <prop key="/remoting/grantedauthority.service">httpGrantedAuthorityService</prop>
32
        <prop key="/remoting/group.service">httpGroupService</prop>
33
        <prop key="/remoting/identificationkey.service">httpIdentificationKeyService</prop>
34
        <prop key="/remoting/location.service">httpLocationService</prop>
35
        <prop key="/remoting/lsidauthority.service">httpLsidAuthorityService</prop>
36
        <prop key="/remoting/lsiddata.service">httpLsidDataService</prop>
37
        <prop key="/remoting/lsidmetadata.service">httpLsidMetadataService</prop>
38
        <prop key="/remoting/marker.service">httpMarkerService</prop>
39
        <prop key="/remoting/media.service">httpMediaService</prop>
40
        <prop key="/remoting/name.service">httpNameService</prop>
41
        <prop key="/remoting/occurrence.service">httpOccurrenceService</prop>
42
        <prop key="/remoting/polytomouskeynode.service">httpPolytomousKeyNodeService</prop>
43
        <prop key="/remoting/polytomouskey.service">httpPolytomousKeyService</prop>
44
        <prop key="/remoting/reference.service">httpReferenceService</prop>
45
        <prop key="/remoting/service.service">httpServiceService</prop>
46
        <prop key="/remoting/taxonnode.service">httpTaxonNodeService</prop>
47
        <prop key="/remoting/taxon.service">httpTaxonService</prop>
48
        <prop key="/remoting/term.service">httpTermService</prop>
49
        <prop key="/remoting/entityvalidationresult.service">httpEntityValidationResultService</prop>
50
        <prop key="/remoting/entityconstraintviolation.service">httpEntityConstraintViolationService</prop>
51
        <prop key="/remoting/user.service">httpUserService</prop>
52
        <prop key="/remoting/vocabulary.service">httpVocabularyService</prop>
53
        <prop key="/remoting/authenticationManager.service">httpAuthenticationManager</prop>
54
      </props>
55
    </property>
56
  </bean>
57

  
58

  
59
  <!-- needed for HTTPInvoker -->
60
  <bean class="org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter" />
60 61

  
61 62
</beans>
cdmlib-services/src/test/java/eu/etaxonomy/cdm/test/function/ConcurrentSessionTest.java
892 892
        // Pre-bound JDBC Connection found! HibernateTransactionManager does
893 893
        // not support running within DataSourceTransactionManager if told to manage
894 894
        // the DataSource itself. It is recommended to use a single HibernateTransactionManager
895
        // for all transactions on a single DataSource, no matter whether Hibernate or JDBC access.
895
        // for all transactions on a single DataSource, no matter whether Hibernate or JDBC access'.
896 896
        TaxonBase taxonBase1updated = taxonService.find(taxonUuid1);
897 897
        logger.info("Title Cache 1 New  Session: " + taxonBase1updated.getTitleCache());
898 898

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)