2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.cdm
.api
.facade
;
11 import java
.util
.List
;
13 import org
.apache
.logging
.log4j
.LogManager
;
14 import org
.apache
.logging
.log4j
.Logger
;
16 import eu
.etaxonomy
.cdm
.api
.service
.IOccurrenceService
;
21 public class DerivedUnitFacadeConfigurator
{
23 @SuppressWarnings("unused")
24 private static final Logger logger
= LogManager
.getLogger();
26 public static DerivedUnitFacadeConfigurator
NewInstance(){
27 return new DerivedUnitFacadeConfigurator();
30 private boolean moveFieldObjectMediaToGallery
= false;
32 private boolean moveDerivedUnitMediaToGallery
= false;
34 private boolean throwExceptionForNonSpecimenPreservationMethodRequest
= true;
36 private boolean firePropertyChangeEvents
= true;
39 //needed if inititialization via property paths is required
40 private IOccurrenceService occurrenceService
;
42 //for object initialization
43 private List
<String
> propertyPaths
;
45 private DerivedUnitFacadeConfigurator(){}
47 // ************************ GETTER / SETTER **********************************
49 public void setMoveFieldObjectMediaToGallery(
50 boolean moveFieldObjectMediaToGallery
) {
51 this.moveFieldObjectMediaToGallery
= moveFieldObjectMediaToGallery
;
54 public boolean isMoveFieldObjectMediaToGallery() {
55 return moveFieldObjectMediaToGallery
;
58 public void setMoveDerivedUnitMediaToGallery(
59 boolean moveDerivedUnitMediaToGallery
) {
60 this.moveDerivedUnitMediaToGallery
= moveDerivedUnitMediaToGallery
;
63 public boolean isMoveDerivedUnitMediaToGallery() {
64 return moveDerivedUnitMediaToGallery
;
67 public void setOccurrenceService(IOccurrenceService occurrenceService
) {
68 this.occurrenceService
= occurrenceService
;
72 * Needed for object initialization.
73 * @see #getPropertyPaths()
75 public IOccurrenceService
getOccurrenceService() {
76 return occurrenceService
;
79 public void setPropertyPaths(List
<String
> propertyPaths
) {
80 this.propertyPaths
= propertyPaths
;
84 * Needed for object initialization.
85 * Also requires to set occurrence service
86 * @see #getOccurrenceService()
88 public List
<String
> getPropertyPaths() {
93 * @param throwExceptionForNonSpecimenPreservationMethodRequest the throwExceptionForNonSpecimenPreservationMethodRequest to set
95 public void setThrowExceptionForNonSpecimenPreservationMethodRequest(
96 boolean throwExceptionForNonSpecimenPreservationMethodRequest
) {
97 this.throwExceptionForNonSpecimenPreservationMethodRequest
= throwExceptionForNonSpecimenPreservationMethodRequest
;
101 * @return the throwExceptionForNonSpecimenPreservationMethodRequest
103 public boolean isThrowExceptionForNonSpecimenPreservationMethodRequest() {
104 return throwExceptionForNonSpecimenPreservationMethodRequest
;
107 public void setFirePropertyChangeEvents(boolean firePropertyChangeEvents
) {
108 this.firePropertyChangeEvents
= firePropertyChangeEvents
;
111 public boolean isFirePropertyChangeEvents() {
112 return firePropertyChangeEvents
;