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