sync trunk
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / facade / DerivedUnitFacadeConfigurator.java
1 /**
2 * Copyright (C) 2007 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.facade;
11
12 import java.util.List;
13
14 import org.apache.log4j.Logger;
15
16 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
17
18 /**
19 * @author a.mueller
20 *
21 */
22 public class DerivedUnitFacadeConfigurator {
23 @SuppressWarnings("unused")
24 private static final Logger logger = Logger.getLogger(DerivedUnitFacadeConfigurator.class);
25
26
27 public static DerivedUnitFacadeConfigurator NewInstance(){
28 return new DerivedUnitFacadeConfigurator();
29 }
30
31
32 private boolean moveFieldObjectMediaToGallery = false;
33
34 private boolean moveDerivedUnitMediaToGallery = false;
35
36 private boolean throwExceptionForNonSpecimenPreservationMethodRequest = true;
37
38 private boolean firePropertyChangeEvents = true;
39
40
41 //needed if inititialization via property paths is required
42 private IOccurrenceService occurrenceService;
43
44 //for object initialization
45 private List<String> propertyPaths;
46
47
48 private DerivedUnitFacadeConfigurator(){
49 //
50 }
51
52 // ************************ GETTER / SETTER **********************************
53
54 public void setMoveFieldObjectMediaToGallery(
55 boolean moveFieldObjectMediaToGallery) {
56 this.moveFieldObjectMediaToGallery = moveFieldObjectMediaToGallery;
57 }
58
59 public boolean isMoveFieldObjectMediaToGallery() {
60 return moveFieldObjectMediaToGallery;
61 }
62
63 public void setMoveDerivedUnitMediaToGallery(
64 boolean moveDerivedUnitMediaToGallery) {
65 this.moveDerivedUnitMediaToGallery = moveDerivedUnitMediaToGallery;
66 }
67
68 public boolean isMoveDerivedUnitMediaToGallery() {
69 return moveDerivedUnitMediaToGallery;
70 }
71
72 public void setOccurrenceService(IOccurrenceService occurrenceService) {
73 this.occurrenceService = occurrenceService;
74 }
75
76
77 /**
78 * Needed for object initialization.
79 * @see #getPropertyPaths()
80 * @return
81 */
82 public IOccurrenceService getOccurrenceService() {
83 return occurrenceService;
84 }
85
86 public void setPropertyPaths(List<String> propertyPaths) {
87 this.propertyPaths = propertyPaths;
88 }
89
90 /**
91 * Needed for object initialization.
92 * Also requires to set occurrence service
93 * @see #getOccurrenceService()
94 * @return
95 */
96 public List<String> getPropertyPaths() {
97 return propertyPaths;
98 }
99
100 /**
101 * @param throwExceptionForNonSpecimenPreservationMethodRequest the throwExceptionForNonSpecimenPreservationMethodRequest to set
102 */
103 public void setThrowExceptionForNonSpecimenPreservationMethodRequest(
104 boolean throwExceptionForNonSpecimenPreservationMethodRequest) {
105 this.throwExceptionForNonSpecimenPreservationMethodRequest = throwExceptionForNonSpecimenPreservationMethodRequest;
106 }
107
108 /**
109 * @return the throwExceptionForNonSpecimenPreservationMethodRequest
110 */
111 public boolean isThrowExceptionForNonSpecimenPreservationMethodRequest() {
112 return throwExceptionForNonSpecimenPreservationMethodRequest;
113 }
114
115 public void setFirePropertyChangeEvents(boolean firePropertyChangeEvents) {
116 this.firePropertyChangeEvents = firePropertyChangeEvents;
117 }
118
119 public boolean isFirePropertyChangeEvents() {
120 return firePropertyChangeEvents;
121 }
122
123
124 }