Revision a27635bd
Added by Andreas Müller almost 2 years ago
src/main/java/eu/etaxonomy/cdm/addon/config/CdmVaadinConfiguration.java | ||
---|---|---|
14 | 14 |
|
15 | 15 |
import javax.servlet.annotation.WebServlet; |
16 | 16 |
|
17 |
import org.apache.log4j.Logger; |
|
17 |
import org.apache.logging.log4j.LogManager; |
|
18 |
import org.apache.logging.log4j.Logger; |
|
18 | 19 |
import org.hibernate.SessionFactory; |
19 | 20 |
import org.hibernate.event.service.spi.EventListenerRegistry; |
20 | 21 |
import org.hibernate.event.spi.EventType; |
... | ... | |
90 | 91 |
@CdmHibernateListener // enable the configuration which activates the TaxonGraphHibernateListener bean |
91 | 92 |
public class CdmVaadinConfiguration implements ApplicationContextAware { |
92 | 93 |
|
94 |
private final static Logger logger = LogManager.getLogger(); |
|
95 |
|
|
93 | 96 |
public static final String CDM_VAADIN_UI_ACTIVATED = "cdm-vaadin.ui.activated"; |
94 | 97 |
public static final String CDM_SERVICE_MINTER_REGSTRATION_MINID = "cdm.service.minter.registration.minLocalId"; |
95 | 98 |
public static final String CDM_SERVICE_MINTER_REGSTRATION_MAXID = "cdm.service.minter.registration.maxLocalId"; |
96 | 99 |
public static final String CDM_SERVICE_MINTER_REGSTRATION_IDFORMAT = "cdm.service.minter.registration.identifierFormatString"; |
97 | 100 |
|
98 |
public static final Logger logger = Logger.getLogger(CdmVaadinConfiguration.class); |
|
99 | 101 |
|
100 | 102 |
@Autowired |
101 | 103 |
private Environment env; |
src/main/java/eu/etaxonomy/cdm/cache/CdmEntityCache.java | ||
---|---|---|
23 | 23 |
import org.apache.commons.beanutils.PropertyUtils; |
24 | 24 |
import org.apache.commons.beanutils.PropertyUtilsBean; |
25 | 25 |
import org.apache.commons.lang.builder.HashCodeBuilder; |
26 |
import org.apache.log4j.Logger; |
|
26 |
import org.apache.logging.log4j.LogManager; |
|
27 |
import org.apache.logging.log4j.Logger; |
|
27 | 28 |
import org.hibernate.Hibernate; |
28 | 29 |
import org.hibernate.collection.internal.AbstractPersistentCollection; |
29 | 30 |
import org.hibernate.envers.internal.entities.mapper.relation.lazy.proxy.CollectionProxy; |
... | ... | |
39 | 40 |
/** |
40 | 41 |
* @author a.kohlbecker |
41 | 42 |
* @since 08.11.2017 |
42 |
* |
|
43 | 43 |
*/ |
44 | 44 |
public class CdmEntityCache implements EntityCache { |
45 | 45 |
|
46 |
private final static Logger logger = LogManager.getLogger(); |
|
46 | 47 |
|
47 |
private final static Logger logger = Logger.getLogger(CdmEntityCache.class); |
|
48 | 48 |
|
49 | 49 |
protected static final String COPY_ENTITY = "!"; |
50 | 50 |
|
src/main/java/eu/etaxonomy/cdm/dataInserter/RegistrationRequiredDataInserter.java | ||
---|---|---|
17 | 17 |
import java.util.Set; |
18 | 18 |
import java.util.UUID; |
19 | 19 |
|
20 |
import org.apache.log4j.Level; |
|
21 |
import org.apache.log4j.Logger; |
|
20 |
import org.apache.logging.log4j.Level; |
|
21 |
import org.apache.logging.log4j.LogManager; |
|
22 |
import org.apache.logging.log4j.Logger; |
|
22 | 23 |
import org.hibernate.Session; |
23 | 24 |
import org.springframework.context.event.ContextRefreshedEvent; |
24 | 25 |
import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException; |
... | ... | |
29 | 30 |
import eu.etaxonomy.cdm.api.application.AbstractDataInserter; |
30 | 31 |
import eu.etaxonomy.cdm.api.application.CdmRepository; |
31 | 32 |
import eu.etaxonomy.cdm.api.service.pager.Pager; |
33 |
import eu.etaxonomy.cdm.common.LogUtils; |
|
32 | 34 |
import eu.etaxonomy.cdm.model.agent.Institution; |
33 | 35 |
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus; |
34 | 36 |
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType; |
... | ... | |
73 | 75 |
*/ |
74 | 76 |
public class RegistrationRequiredDataInserter extends AbstractDataInserter { |
75 | 77 |
|
78 |
private final static Logger logger = LogManager.getLogger(); |
|
79 |
|
|
76 | 80 |
// protected static final String PARAM_NAME_CREATE = "registrationCreate"; |
77 | 81 |
// |
78 | 82 |
// protected static final String PARAM_NAME_WIPEOUT = "registrationWipeout"; |
... | ... | |
86 | 90 |
private static final EnumSet<CRUD> CREATE_READ = EnumSet.of(CRUD.CREATE, CRUD.READ); |
87 | 91 |
private static final EnumSet<CRUD> CREATE_READ_UPDATE_DELETE = EnumSet.of(CRUD.CREATE, CRUD.READ, CRUD.UPDATE, CRUD.DELETE); |
88 | 92 |
|
89 |
private static final Logger logger = Logger.getLogger(RegistrationRequiredDataInserter.class); |
|
90 | 93 |
|
91 | 94 |
// private ExtensionType extensionTypeIAPTRegData; |
92 | 95 |
|
... | ... | |
230 | 233 |
return repo.getSession(); |
231 | 234 |
} |
232 | 235 |
}; |
233 |
logger.setLevel(Level.DEBUG);
|
|
236 |
LogUtils.setLevel(logger, Level.DEBUG);
|
|
234 | 237 |
int chunksize = 1000; |
235 | 238 |
int pageIndex = 0; |
236 | 239 |
TransactionStatus tx; |
src/main/java/eu/etaxonomy/cdm/debug/PersistentContextAnalyzer.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
import java.io.PrintStream; |
12 | 12 |
|
13 |
import org.apache.log4j.Logger; |
|
13 |
import org.apache.logging.log4j.LogManager; |
|
14 |
import org.apache.logging.log4j.Logger; |
|
14 | 15 |
import org.hibernate.Session; |
15 | 16 |
|
16 | 17 |
import eu.etaxonomy.cdm.cache.CdmEntityCache; |
... | ... | |
19 | 20 |
/** |
20 | 21 |
* @author a.kohlbecker |
21 | 22 |
* @since 08.11.2017 |
22 |
* |
|
23 | 23 |
*/ |
24 | 24 |
public class PersistentContextAnalyzer extends CdmEntityCache { |
25 | 25 |
|
26 |
@SuppressWarnings("unused") |
|
27 |
private final static Logger logger = LogManager.getLogger(); |
|
26 | 28 |
|
27 | 29 |
private static final char HASH_SEPARATOR = '.'; |
28 | 30 |
|
29 | 31 |
private static final String IN_PERSITENT_CONTEXT = "*"; |
30 | 32 |
|
31 |
private final static Logger logger = Logger.getLogger(PersistentContextAnalyzer.class); |
|
32 |
|
|
33 | 33 |
private Session session; |
34 | 34 |
|
35 | 35 |
private boolean showHashCodes = false; |
36 | 36 |
|
37 |
/** |
|
38 |
* @param entity |
|
39 |
* @param session |
|
40 |
*/ |
|
41 | 37 |
public PersistentContextAnalyzer(CdmBase entity, Session session){ |
42 | 38 |
this.session = session; |
43 | 39 |
this.entities.add(entity); |
src/main/java/eu/etaxonomy/cdm/service/CdmFilterablePagingProvider.java | ||
---|---|---|
12 | 12 |
import java.util.Arrays; |
13 | 13 |
import java.util.List; |
14 | 14 |
|
15 |
import org.apache.log4j.Logger; |
|
15 |
import org.apache.logging.log4j.LogManager; |
|
16 |
import org.apache.logging.log4j.Logger; |
|
16 | 17 |
import org.hibernate.Session; |
17 | 18 |
import org.hibernate.criterion.Criterion; |
18 | 19 |
import org.vaadin.viritin.fields.LazyComboBox.FilterableCountProvider; |
... | ... | |
28 | 29 |
/** |
29 | 30 |
* @author a.kohlbecker |
30 | 31 |
* @since Jun 7, 2017 |
31 |
* |
|
32 | 32 |
*/ |
33 | 33 |
public class CdmFilterablePagingProvider<T extends IdentifiableEntity, V extends T> implements FilterablePagingProvider<V>, FilterableCountProvider { |
34 | 34 |
|
35 |
private final static Logger logger = LogManager.getLogger(); |
|
35 | 36 |
|
36 | 37 |
private static final List<String> DEFAULT_INIT_STRATEGY = Arrays.asList("$"); |
37 | 38 |
|
38 | 39 |
public static final String QUERY_STRING_PLACEHOLDER = "{query-string}"; |
39 | 40 |
|
40 |
private static final Logger logger = Logger.getLogger(CdmFilterablePagingProvider.class); |
|
41 | 41 |
|
42 | 42 |
private int pageSize = 20; |
43 | 43 |
|
src/main/java/eu/etaxonomy/cdm/service/CdmStore.java | ||
---|---|---|
8 | 8 |
*/ |
9 | 9 |
package eu.etaxonomy.cdm.service; |
10 | 10 |
|
11 |
import org.apache.log4j.Logger; |
|
11 |
import org.apache.logging.log4j.LogManager; |
|
12 |
import org.apache.logging.log4j.Logger; |
|
12 | 13 |
import org.hibernate.Session; |
13 | 14 |
import org.springframework.beans.factory.annotation.Autowired; |
14 | 15 |
import org.springframework.beans.factory.annotation.Qualifier; |
... | ... | |
46 | 47 |
@ViewScope |
47 | 48 |
public class CdmStore { |
48 | 49 |
|
49 |
private static final Logger logger = Logger.getLogger(CdmStore.class);
|
|
50 |
private final static Logger logger = LogManager.getLogger();
|
|
50 | 51 |
|
51 | 52 |
@Autowired |
52 | 53 |
@Qualifier("cdmRepository") |
src/main/java/eu/etaxonomy/cdm/service/RegistrationWorkflowService.java | ||
---|---|---|
12 | 12 |
import java.util.List; |
13 | 13 |
import java.util.UUID; |
14 | 14 |
|
15 |
import org.apache.log4j.Logger; |
|
15 |
import org.apache.logging.log4j.LogManager; |
|
16 |
import org.apache.logging.log4j.Logger; |
|
16 | 17 |
import org.springframework.beans.factory.annotation.Autowired; |
17 | 18 |
import org.springframework.beans.factory.annotation.Qualifier; |
18 | 19 |
import org.springframework.stereotype.Service; |
... | ... | |
30 | 31 |
/** |
31 | 32 |
* @author a.kohlbecker |
32 | 33 |
* @since Mar 25, 2019 |
33 |
* |
|
34 | 34 |
*/ |
35 | 35 |
@Service("registrationWorkflowService") |
36 | 36 |
public class RegistrationWorkflowService implements IRegistrationWorkflowService { |
37 | 37 |
|
38 |
private static Logger logger = Logger.getLogger(RegistrationWorkflowService.class);
|
|
38 |
private final static Logger logger = LogManager.getLogger();
|
|
39 | 39 |
|
40 | 40 |
@Autowired |
41 | 41 |
@Qualifier("cdmRepository") |
src/main/java/eu/etaxonomy/cdm/service/TaxonNameStringFilterablePagingProvider.java | ||
---|---|---|
15 | 15 |
import java.util.Map; |
16 | 16 |
import java.util.UUID; |
17 | 17 |
|
18 |
import org.apache.log4j.Logger; |
|
18 |
import org.apache.logging.log4j.LogManager; |
|
19 |
import org.apache.logging.log4j.Logger; |
|
19 | 20 |
import org.vaadin.viritin.fields.LazyComboBox.FilterableCountProvider; |
20 | 21 |
|
21 | 22 |
import com.vaadin.data.Property.ValueChangeListener; |
... | ... | |
43 | 44 |
*/ |
44 | 45 |
public class TaxonNameStringFilterablePagingProvider implements FilterableStringRepresentationPagingProvider<UUID>, FilterableCountProvider { |
45 | 46 |
|
46 |
private static final List<String> DEFAULT_INIT_STRATEGY = Arrays.asList("$");
|
|
47 |
private final static Logger logger = LogManager.getLogger();
|
|
47 | 48 |
|
48 |
private static final Logger logger = Logger.getLogger(TaxonNameStringFilterablePagingProvider.class);
|
|
49 |
private static final List<String> DEFAULT_INIT_STRATEGY = Arrays.asList("$");
|
|
49 | 50 |
|
50 | 51 |
private int pageSize = 20; |
51 | 52 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/component/common/GeoLocationField.java | ||
---|---|---|
11 | 11 |
import java.util.Optional; |
12 | 12 |
|
13 | 13 |
import org.apache.commons.lang3.StringUtils; |
14 |
import org.apache.log4j.Logger; |
|
14 |
import org.apache.logging.log4j.LogManager; |
|
15 |
import org.apache.logging.log4j.Logger; |
|
15 | 16 |
import org.vaadin.addon.leaflet.LCircle; |
16 | 17 |
import org.vaadin.addon.leaflet.LMap; |
17 | 18 |
import org.vaadin.addon.leaflet.LMarker; |
... | ... | |
40 | 41 |
/** |
41 | 42 |
* @author a.kohlbecker |
42 | 43 |
* @since Jun 22, 2017 |
43 |
* |
|
44 | 44 |
*/ |
45 | 45 |
public class GeoLocationField extends CompositeCustomField<Point> { |
46 | 46 |
|
47 |
private static final Logger logger = Logger.getLogger(GeoLocationField.class); |
|
48 |
|
|
49 | 47 |
private static final long serialVersionUID = 1122123034547920390L; |
48 |
private final static Logger logger = LogManager.getLogger(); |
|
50 | 49 |
|
51 | 50 |
private static final String PRIMARY_STYLE = "v-geolocation-field"; |
52 | 51 |
|
... | ... | |
65 | 64 |
private CssLayout mapWrapper; |
66 | 65 |
|
67 | 66 |
|
68 |
/** |
|
69 |
* |
|
70 |
*/ |
|
71 | 67 |
public GeoLocationField() { |
72 | 68 |
super(); |
73 | 69 |
} |
... | ... | |
77 | 73 |
setCaption(caption); |
78 | 74 |
} |
79 | 75 |
|
80 |
/** |
|
81 |
* {@inheritDoc} |
|
82 |
*/ |
|
83 | 76 |
@Override |
84 | 77 |
protected Component initContent() { |
85 | 78 |
super.setPrimaryStyleName(PRIMARY_STYLE); |
... | ... | |
139 | 132 |
return root; |
140 | 133 |
} |
141 | 134 |
|
142 |
/** |
|
143 |
* |
|
144 |
*/ |
|
145 | 135 |
protected void updateMap() { |
146 | 136 |
|
147 | 137 |
Double longitude = null; |
src/main/java/eu/etaxonomy/cdm/vaadin/component/common/TeamOrPersonField.java | ||
---|---|---|
13 | 13 |
import java.util.List; |
14 | 14 |
import java.util.Optional; |
15 | 15 |
|
16 |
import org.apache.log4j.Logger; |
|
16 |
import org.apache.logging.log4j.LogManager; |
|
17 |
import org.apache.logging.log4j.Logger; |
|
17 | 18 |
import org.vaadin.viritin.fields.LazyComboBox; |
18 | 19 |
|
19 | 20 |
import com.vaadin.data.Validator.InvalidValueException; |
... | ... | |
52 | 53 |
/** |
53 | 54 |
* @author a.kohlbecker |
54 | 55 |
* @since May 11, 2017 |
55 |
* |
|
56 | 56 |
*/ |
57 | 57 |
public class TeamOrPersonField extends CompositeCustomField<TeamOrPersonBase<?>> { |
58 | 58 |
|
59 | 59 |
private static final long serialVersionUID = 660806402243118112L; |
60 | 60 |
|
61 |
private static final Logger logger = Logger.getLogger(TeamOrPersonField.class);
|
|
61 |
private final static Logger logger = LogManager.getLogger();
|
|
62 | 62 |
|
63 | 63 |
private static final String PRIMARY_STYLE = "v-team-or-person-field"; |
64 | 64 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItemNameAndTypeButtons.java | ||
---|---|---|
16 | 16 |
import java.util.Map; |
17 | 17 |
import java.util.UUID; |
18 | 18 |
|
19 |
import org.apache.log4j.Logger; |
|
19 |
import org.apache.logging.log4j.LogManager; |
|
20 |
import org.apache.logging.log4j.Logger; |
|
20 | 21 |
|
21 | 22 |
import com.vaadin.server.ExternalResource; |
22 | 23 |
import com.vaadin.server.FontAwesome; |
... | ... | |
53 | 54 |
*/ |
54 | 55 |
public class RegistrationItemNameAndTypeButtons extends CompositeStyledComponent { |
55 | 56 |
|
56 |
private final static Logger logger = Logger.getLogger(RegistrationItemNameAndTypeButtons.class); |
|
57 |
|
|
57 |
private final static Logger logger = LogManager.getLogger(); |
|
58 | 58 |
|
59 | 59 |
private static final String DEFAULT_BUTTON_STYLES = ""; |
60 | 60 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/component/taxon/NewTaxonBaseComposite.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
import java.util.Arrays; |
12 | 12 |
|
13 |
import org.apache.log4j.Logger; |
|
13 |
import org.apache.logging.log4j.LogManager; |
|
14 |
import org.apache.logging.log4j.Logger; |
|
14 | 15 |
|
15 | 16 |
import com.vaadin.annotations.AutoGenerated; |
16 | 17 |
import com.vaadin.data.Validator.EmptyValueException; |
... | ... | |
42 | 43 |
/** |
43 | 44 |
* @author cmathew |
44 | 45 |
* @since 2 Apr 2015 |
45 |
* |
|
46 | 46 |
*/ |
47 | 47 |
public class NewTaxonBaseComposite extends CustomComponent implements INewTaxonBaseComposite { |
48 | 48 |
|
49 |
@SuppressWarnings("unused") |
|
50 |
private final static Logger logger = LogManager.getLogger(); |
|
51 |
|
|
49 | 52 |
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */ |
50 | 53 |
|
51 | 54 |
@AutoGenerated |
... | ... | |
82 | 85 |
private final Window dialog; |
83 | 86 |
private final IdUuidName accTaxonIun; |
84 | 87 |
private final IdUuidName classificationIun; |
85 |
|
|
86 |
private static final Logger logger = Logger.getLogger(NewTaxonBaseComposite.class); |
|
87 |
|
|
88 | 88 |
private static final String CHOOSE_SECUNDUM_PROMPT = "Choose Secundum ...."; |
89 | 89 |
|
90 | 90 |
/** |
src/main/java/eu/etaxonomy/cdm/vaadin/component/taxon/StatusComposite.java | ||
---|---|---|
12 | 12 |
import java.util.Arrays; |
13 | 13 |
import java.util.UUID; |
14 | 14 |
|
15 |
import org.apache.log4j.Logger; |
|
16 | 15 |
import org.vaadin.peter.contextmenu.ContextMenu; |
17 | 16 |
import org.vaadin.peter.contextmenu.ContextMenu.ContextMenuItem; |
18 | 17 |
import org.vaadin.peter.contextmenu.ContextMenu.ContextMenuItemClickEvent; |
... | ... | |
69 | 68 |
/** |
70 | 69 |
* @author cmathew |
71 | 70 |
* @since 11 Mar 2015 |
72 |
* |
|
73 | 71 |
*/ |
74 | 72 |
public class StatusComposite extends CustomComponent implements View, IStatusComposite, ICdmChangeListener { |
75 | 73 |
|
74 |
private static final long serialVersionUID = -5646451944552543147L; |
|
75 |
|
|
76 | 76 |
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */ |
77 | 77 |
|
78 |
@AutoGenerated |
|
79 | 78 |
private GridLayout mainLayout; |
80 | 79 |
@AutoGenerated |
81 | 80 |
private Label inViewLabel; |
... | ... | |
95 | 94 |
private Label filterLabel; |
96 | 95 |
@AutoGenerated |
97 | 96 |
private ComboBox classificationComboBox; |
98 |
private static final Logger logger = Logger.getLogger(StatusComposite.class); |
|
99 | 97 |
private StatusComponentListener listener; |
100 | 98 |
|
101 | 99 |
private TreeTable mainTaxaTreeTable, excludedTaxaTreeTable; |
src/main/java/eu/etaxonomy/cdm/vaadin/container/CdmSQLContainer.java | ||
---|---|---|
4 | 4 |
import java.sql.SQLException; |
5 | 5 |
import java.util.UUID; |
6 | 6 |
|
7 |
import org.apache.log4j.Logger; |
|
7 |
import org.apache.logging.log4j.LogManager; |
|
8 |
import org.apache.logging.log4j.Logger; |
|
8 | 9 |
|
9 | 10 |
import com.vaadin.data.Property; |
10 | 11 |
import com.vaadin.data.util.sqlcontainer.SQLContainer; |
... | ... | |
18 | 19 |
|
19 | 20 |
private static final long serialVersionUID = 2828992538007070061L; |
20 | 21 |
|
21 |
private static final Logger logger = Logger.getLogger(CdmSQLContainer.class);
|
|
22 |
private final static Logger logger = LogManager.getLogger();
|
|
22 | 23 |
|
23 | 24 |
private DatabaseMetaData databaseMetaData; |
24 | 25 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/container/LeafNodeTaxonContainer.java | ||
---|---|---|
17 | 17 |
import java.util.Map; |
18 | 18 |
import java.util.Set; |
19 | 19 |
|
20 |
import org.apache.log4j.Logger; |
|
21 |
|
|
22 | 20 |
import com.vaadin.data.Container; |
23 | 21 |
import com.vaadin.data.Item; |
24 | 22 |
import com.vaadin.data.Property; |
... | ... | |
36 | 34 |
/** |
37 | 35 |
* @author cmathew |
38 | 36 |
* @since 10 Mar 2015 |
39 |
* |
|
40 | 37 |
*/ |
41 | 38 |
public class LeafNodeTaxonContainer extends CdmSQLContainer implements Container.Hierarchical { |
42 | 39 |
|
43 |
private static final Logger logger = Logger.getLogger(LeafNodeTaxonContainer.class); |
|
44 |
|
|
40 |
private static final long serialVersionUID = -1339368783995155526L; |
|
45 | 41 |
|
46 | 42 |
public static final String NAME_ID = "NAME"; |
47 | 43 |
public static final String ACCTAXON_ID = "ACCTAXON"; |
src/main/java/eu/etaxonomy/cdm/vaadin/debug/EntityCacheDebugger.java | ||
---|---|---|
12 | 12 |
import java.lang.reflect.Method; |
13 | 13 |
import java.util.Optional; |
14 | 14 |
|
15 |
import org.apache.log4j.Logger; |
|
15 |
import org.apache.logging.log4j.LogManager; |
|
16 |
import org.apache.logging.log4j.Logger; |
|
16 | 17 |
import org.springframework.beans.factory.annotation.Autowired; |
17 | 18 |
import org.springframework.context.annotation.Profile; |
18 | 19 |
import org.springframework.stereotype.Component; |
... | ... | |
40 | 41 |
/** |
41 | 42 |
* @author a.kohlbecker |
42 | 43 |
* @since Jan 22, 2018 |
43 |
* |
|
44 | 44 |
*/ |
45 | 45 |
@Component |
46 | 46 |
@UIScope |
47 | 47 |
@Profile("debug") |
48 | 48 |
public class EntityCacheDebugger implements ViewChangeListener, EventBusListener<PopEditorOpenedEvent> { |
49 | 49 |
|
50 |
Logger logger = Logger.getLogger(EntityCacheDebugger.class);
|
|
50 |
private final static Logger logger = LogManager.getLogger();
|
|
51 | 51 |
|
52 | 52 |
private UIEventBus uiEventBus; |
53 | 53 |
|
... | ... | |
71 | 71 |
if(view != null){ |
72 | 72 |
|
73 | 73 |
try { |
74 |
AbstractPresenter presenter; |
|
74 |
AbstractPresenter<?> presenter;
|
|
75 | 75 |
Method getPresenterMethod = AbstractView.class.getDeclaredMethod("getPresenter"); |
76 | 76 |
getPresenterMethod.setAccessible(true); |
77 |
presenter = (AbstractPresenter) getPresenterMethod.invoke(view); |
|
77 |
presenter = (AbstractPresenter<?>) getPresenterMethod.invoke(view);
|
|
78 | 78 |
if(CachingPresenter.class.isAssignableFrom(presenter.getClass())){ |
79 | 79 |
open(view, (CachingPresenter)presenter); |
80 | 80 |
} else { |
... | ... | |
91 | 91 |
|
92 | 92 |
} |
93 | 93 |
|
94 |
/** |
|
95 |
* @param view |
|
96 |
* @param presenter |
|
97 |
*/ |
|
98 | 94 |
private void open(AbstractView view, CachingPresenter presenter) { |
99 | 95 |
|
100 | 96 |
EntityCacheDebuggerComponent content = new EntityCacheDebuggerComponent(presenter); |
src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionContextFormatter.java | ||
---|---|---|
18 | 18 |
|
19 | 19 |
import org.apache.commons.beanutils.BeanUtilsBean; |
20 | 20 |
import org.apache.commons.lang3.StringUtils; |
21 |
import org.apache.log4j.Logger; |
|
21 |
import org.apache.logging.log4j.LogManager; |
|
22 |
import org.apache.logging.log4j.Logger; |
|
22 | 23 |
|
23 | 24 |
import com.vaadin.ui.Component; |
24 | 25 |
|
... | ... | |
32 | 33 |
/** |
33 | 34 |
* @author a.kohlbecker |
34 | 35 |
* @since Oct 29, 2018 |
35 |
* |
|
36 | 36 |
*/ |
37 | 37 |
public class EditorActionContextFormatter { |
38 | 38 |
|
39 |
public static final Logger logger = Logger.getLogger(EditorActionContextFormatter.class);
|
|
39 |
private final static Logger logger = LogManager.getLogger();
|
|
40 | 40 |
|
41 | 41 |
private static final String NEW = "New"; |
42 | 42 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/event/error/DelegatingErrorHandler.java | ||
---|---|---|
12 | 12 |
import java.util.ArrayList; |
13 | 13 |
import java.util.List; |
14 | 14 |
|
15 |
import org.apache.log4j.Logger; |
|
15 |
import org.apache.logging.log4j.LogManager; |
|
16 |
import org.apache.logging.log4j.Logger; |
|
16 | 17 |
|
17 | 18 |
import com.vaadin.event.ListenerMethod; |
18 | 19 |
import com.vaadin.server.ErrorEvent; |
... | ... | |
35 | 36 |
|
36 | 37 |
private static final long serialVersionUID = 3378605204517477112L; |
37 | 38 |
|
39 |
private final static Logger logger = LogManager.getLogger(); |
|
40 |
|
|
38 | 41 |
List<ErrorTypeHandler<? extends Throwable>> handlers = new ArrayList<>(); |
39 | 42 |
|
40 | 43 |
public <E extends Throwable> void registerHandler(ErrorTypeHandler<E> handler) { |
... | ... | |
88 | 91 |
private <E extends Throwable> boolean delegate(ErrorEvent event, E throwable){ |
89 | 92 |
|
90 | 93 |
Class<E> errorClass = (Class<E>) throwable.getClass(); |
91 |
Logger.getLogger(this.getClass()).debug(errorClass);
|
|
94 |
logger.debug(errorClass);
|
|
92 | 95 |
ErrorTypeHandler<E> handler = findHandler(errorClass); |
93 | 96 |
if(handler != null){ |
94 | 97 |
handler.handleError(event, throwable); |
src/main/java/eu/etaxonomy/cdm/vaadin/jscomponent/D3ConceptRelationshipTree.java | ||
---|---|---|
15 | 15 |
import java.util.Set; |
16 | 16 |
import java.util.UUID; |
17 | 17 |
|
18 |
import org.apache.log4j.Logger; |
|
18 |
import org.apache.logging.log4j.LogManager; |
|
19 |
import org.apache.logging.log4j.Logger; |
|
19 | 20 |
import org.json.JSONArray; |
20 | 21 |
import org.json.JSONException; |
21 | 22 |
import org.json.JSONObject; |
... | ... | |
37 | 38 |
/** |
38 | 39 |
* @author cmathew |
39 | 40 |
* @since 8 Apr 2015 |
40 |
* |
|
41 | 41 |
*/ |
42 | 42 |
@StyleSheet({"css/d3.conceptrelationshiptree.css"}) |
43 | 43 |
@JavaScript({"extlib/d3.min.js", "lib/d3.conceptrelationshiptree_connector.js"}) |
44 | 44 |
public class D3ConceptRelationshipTree extends AbstractJavaScriptComponent { |
45 | 45 |
|
46 |
private static final Logger logger = Logger.getLogger(D3ConceptRelationshipTree.class); |
|
46 |
private static final long serialVersionUID = 8355509734431610167L; |
|
47 |
private final static Logger logger = LogManager.getLogger(); |
|
47 | 48 |
|
48 | 49 |
public enum Mode { |
49 | 50 |
OneToOne, |
src/main/java/eu/etaxonomy/cdm/vaadin/permission/AccessRestrictedViewControlBean.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
import java.io.Serializable; |
12 | 12 |
|
13 |
import org.apache.log4j.Logger; |
|
13 |
import org.apache.logging.log4j.LogManager; |
|
14 |
import org.apache.logging.log4j.Logger; |
|
14 | 15 |
|
15 | 16 |
import com.vaadin.navigator.View; |
16 | 17 |
import com.vaadin.spring.access.ViewInstanceAccessControl; |
... | ... | |
25 | 26 |
|
26 | 27 |
private static final long serialVersionUID = -5192116600545639108L; |
27 | 28 |
|
28 |
private final static Logger logger = Logger.getLogger(AccessRestrictedViewControlBean.class);
|
|
29 |
private final static Logger logger = LogManager.getLogger();
|
|
29 | 30 |
|
30 |
/** |
|
31 |
* {@inheritDoc} |
|
32 |
*/ |
|
33 | 31 |
@Override |
34 | 32 |
public boolean isAccessGranted(UI ui, String beanName, View view) { |
35 | 33 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/permission/AnnotationBasedAccessControlBean.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
import java.io.Serializable; |
12 | 12 |
|
13 |
import org.apache.log4j.Logger; |
|
13 |
import org.apache.logging.log4j.LogManager; |
|
14 |
import org.apache.logging.log4j.Logger; |
|
14 | 15 |
import org.springframework.security.authentication.AnonymousAuthenticationToken; |
15 | 16 |
import org.springframework.security.core.Authentication; |
16 | 17 |
import org.springframework.security.core.context.SecurityContext; |
... | ... | |
34 | 35 |
|
35 | 36 |
private static final long serialVersionUID = -4232241572782673248L; |
36 | 37 |
|
37 |
private final static Logger logger = Logger.getLogger(AnnotationBasedAccessControlBean.class); |
|
38 |
private final static Logger logger = LogManager.getLogger(); |
|
39 |
|
|
38 | 40 |
|
39 |
/** |
|
40 |
* {@inheritDoc} |
|
41 |
*/ |
|
42 | 41 |
@Override |
43 | 42 |
public boolean isAccessGranted(UI ui, String beanName, View view) { |
44 | 43 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/ui/AbstractUI.java | ||
---|---|---|
9 | 9 |
package eu.etaxonomy.cdm.vaadin.ui; |
10 | 10 |
|
11 | 11 |
|
12 |
import org.apache.log4j.Logger; |
|
12 |
import org.apache.logging.log4j.LogManager; |
|
13 |
import org.apache.logging.log4j.Logger; |
|
13 | 14 |
import org.springframework.beans.factory.annotation.Autowired; |
14 | 15 |
import org.vaadin.spring.events.EventBus.UIEventBus; |
15 | 16 |
|
... | ... | |
46 | 47 |
|
47 | 48 |
private static final long serialVersionUID = 7430086500775997281L; |
48 | 49 |
|
49 |
private static Logger logger = Logger.getLogger(AbstractUI.class);
|
|
50 |
private final static Logger logger = LogManager.getLogger();
|
|
50 | 51 |
|
51 | 52 |
abstract protected ViewDisplay getViewDisplay(); |
52 | 53 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/ui/ConceptRelationshipUI.java | ||
---|---|---|
9 | 9 |
package eu.etaxonomy.cdm.vaadin.ui; |
10 | 10 |
|
11 | 11 |
|
12 |
import org.apache.log4j.Logger; |
|
12 |
import org.apache.logging.log4j.LogManager; |
|
13 |
import org.apache.logging.log4j.Logger; |
|
13 | 14 |
|
14 | 15 |
import com.vaadin.annotations.Theme; |
15 | 16 |
import com.vaadin.annotations.Widgetset; |
... | ... | |
30 | 31 |
@Widgetset("eu.etaxonomy.cdm.vaadin.AppWidgetSet") |
31 | 32 |
public class ConceptRelationshipUI extends AbstractAuthenticatedUI { |
32 | 33 |
|
33 |
Navigator navigator; |
|
34 |
private static final long serialVersionUID = 7356721273326682601L; |
|
35 |
|
|
36 |
private final static Logger logger = LogManager.getLogger(); |
|
34 | 37 |
|
35 | 38 |
public static final String NAME = "concept"; |
36 | 39 |
|
37 | 40 |
private static final String FIRST_VIEW = "editcr"; |
38 | 41 |
|
39 |
private final static Logger logger = Logger.getLogger(ConceptRelationshipUI.class);
|
|
42 |
Navigator navigator;
|
|
40 | 43 |
|
41 | 44 |
@Override |
42 | 45 |
protected void doInit(VaadinRequest request) { |
src/main/java/eu/etaxonomy/cdm/vaadin/ui/ConceptRelationshipUIRedirect.java | ||
---|---|---|
9 | 9 |
package eu.etaxonomy.cdm.vaadin.ui; |
10 | 10 |
|
11 | 11 |
|
12 |
import org.apache.log4j.Logger; |
|
12 |
import org.apache.logging.log4j.LogManager; |
|
13 |
import org.apache.logging.log4j.Logger; |
|
13 | 14 |
|
14 | 15 |
import com.vaadin.annotations.Theme; |
15 | 16 |
import com.vaadin.annotations.Widgetset; |
... | ... | |
29 | 30 |
@Widgetset("eu.etaxonomy.cdm.vaadin.AppWidgetSet") |
30 | 31 |
public class ConceptRelationshipUIRedirect extends AbstractAuthenticatedUI { |
31 | 32 |
|
32 |
Navigator navigator; |
|
33 |
private static final long serialVersionUID = -3709422890864662383L; |
|
34 |
|
|
35 |
private final static Logger logger = LogManager.getLogger(); |
|
33 | 36 |
|
34 | 37 |
private static final String FIRST_VIEW = "editcr"; |
35 | 38 |
|
36 |
private final static Logger logger = Logger.getLogger(ConceptRelationshipUIRedirect.class);
|
|
39 |
Navigator navigator;
|
|
37 | 40 |
|
38 | 41 |
@Override |
39 | 42 |
protected void doInit(VaadinRequest request) { |
src/main/java/eu/etaxonomy/cdm/vaadin/ui/DistributionStatusUI.java | ||
---|---|---|
1 | 1 |
package eu.etaxonomy.cdm.vaadin.ui; |
2 | 2 |
|
3 |
import org.apache.log4j.Logger; |
|
4 | 3 |
import org.springframework.beans.factory.annotation.Autowired; |
5 | 4 |
import org.vaadin.spring.events.EventBus.UIEventBus; |
6 | 5 |
|
... | ... | |
30 | 29 |
@SuppressWarnings("serial") |
31 | 30 |
public class DistributionStatusUI extends UI{ |
32 | 31 |
|
33 |
@SuppressWarnings("unused") |
|
34 |
private final static Logger logger = Logger.getLogger(DistributionStatusUI.class); |
|
35 |
|
|
36 | 32 |
public static final String NAME = "distribution"; |
37 | 33 |
|
38 | 34 |
private ViewDisplay viewDisplay; |
src/main/java/eu/etaxonomy/cdm/vaadin/util/CdmVaadinAuthentication.java | ||
---|---|---|
11 | 11 |
import java.util.HashMap; |
12 | 12 |
import java.util.Map; |
13 | 13 |
|
14 |
import org.apache.log4j.Logger; |
|
14 |
import org.apache.logging.log4j.LogManager; |
|
15 |
import org.apache.logging.log4j.Logger; |
|
15 | 16 |
import org.springframework.security.core.Authentication; |
16 | 17 |
import org.springframework.security.core.context.SecurityContextHolder; |
17 | 18 |
|
... | ... | |
23 | 24 |
*/ |
24 | 25 |
public class CdmVaadinAuthentication { |
25 | 26 |
|
26 |
private final static Logger logger = Logger.getLogger(CdmVaadinAuthentication.class);
|
|
27 |
private final static Logger logger = LogManager.getLogger();
|
|
27 | 28 |
|
28 | 29 |
public static final String KEY = "key_authentication"; |
29 | 30 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/util/CdmVaadinOperation.java | ||
---|---|---|
12 | 12 |
import java.util.Date; |
13 | 13 |
import java.util.List; |
14 | 14 |
|
15 |
import org.apache.log4j.Logger; |
|
16 |
|
|
17 | 15 |
import com.vaadin.server.Page; |
18 | 16 |
import com.vaadin.ui.Notification; |
19 | 17 |
import com.vaadin.ui.Notification.Type; |
... | ... | |
25 | 23 |
/** |
26 | 24 |
* @author cmathew |
27 | 25 |
* @since 14 Apr 2015 |
28 |
* |
|
29 | 26 |
*/ |
30 | 27 |
public abstract class CdmVaadinOperation implements Runnable { |
31 |
private static final Logger logger = Logger.getLogger(CdmVaadinOperation.class); |
|
32 | 28 |
|
33 | 29 |
private int pollInterval = -1; |
34 | 30 |
private CdmProgressComponent progressComponent; |
src/main/java/eu/etaxonomy/cdm/vaadin/util/CdmVaadinSessionUtilities.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
import java.util.concurrent.locks.Lock; |
12 | 12 |
|
13 |
import org.apache.log4j.Logger; |
|
14 |
|
|
15 | 13 |
import com.vaadin.server.VaadinSession; |
16 | 14 |
|
17 | 15 |
import eu.etaxonomy.cdm.vaadin.session.BasicEventService; |
... | ... | |
21 | 19 |
/** |
22 | 20 |
* @author cmathew |
23 | 21 |
* @since 7 Apr 2015 |
24 |
* |
|
25 | 22 |
*/ |
26 | 23 |
public class CdmVaadinSessionUtilities { |
27 | 24 |
|
28 |
private static final Logger logger = Logger.getLogger(CdmVaadinSessionUtilities.class); |
|
29 |
|
|
30 | 25 |
public static void setCurrentAttribute(String name, Object value) { |
31 | 26 |
Lock sessionLock = VaadinSession.getCurrent().getLockInstance(); |
32 | 27 |
try { |
src/main/java/eu/etaxonomy/cdm/vaadin/util/SQLUtils.java | ||
---|---|---|
12 | 12 |
import java.sql.SQLException; |
13 | 13 |
import java.util.Locale; |
14 | 14 |
|
15 |
import org.apache.log4j.Logger; |
|
16 |
|
|
17 | 15 |
/** |
18 | 16 |
* |
19 | 17 |
* The methods correctCase and isEscaped have been inspired from the |
... | ... | |
25 | 23 |
*/ |
26 | 24 |
public class SQLUtils { |
27 | 25 |
|
28 |
@SuppressWarnings("unused") |
|
29 |
private static final Logger logger = Logger.getLogger(SQLUtils.class); |
|
30 |
|
|
31 | 26 |
public static String correctCase(final String databaseIdentifier, DatabaseMetaData databaseMetaData) throws SQLException |
32 | 27 |
{ |
33 | 28 |
String resultIdentifier = databaseIdentifier; |
src/main/java/eu/etaxonomy/cdm/vaadin/util/converter/GeoLocationConverterValidator.java | ||
---|---|---|
11 | 11 |
import java.text.ParseException; |
12 | 12 |
import java.util.Locale; |
13 | 13 |
|
14 |
import org.apache.log4j.Logger;
|
|
14 |
import org.apache.logging.log4j.LogManager;
|
|
15 | 15 |
|
16 | 16 |
import com.vaadin.data.Validator; |
17 | 17 |
import com.vaadin.data.util.converter.Converter; |
... | ... | |
55 | 55 |
return Point.parseLatitude(value); |
56 | 56 |
} |
57 | 57 |
} catch (ParseException e) { |
58 |
Logger.getLogger(GeoLocationConverterValidator.class).error(e);
|
|
58 |
LogManager.getLogger(getClass()).error(e);
|
|
59 | 59 |
throw new ConversionException(e); |
60 | 60 |
} |
61 | 61 |
} |
src/main/java/eu/etaxonomy/cdm/vaadin/view/LoginPresenter.java | ||
---|---|---|
19 | 19 |
import javax.mail.internet.AddressException; |
20 | 20 |
|
21 | 21 |
import org.apache.commons.lang.StringUtils; |
22 |
import org.apache.log4j.Logger; |
|
22 |
import org.apache.logging.log4j.LogManager; |
|
23 |
import org.apache.logging.log4j.Logger; |
|
23 | 24 |
import org.springframework.beans.factory.annotation.Autowired; |
24 | 25 |
import org.springframework.beans.factory.annotation.Qualifier; |
25 | 26 |
import org.springframework.core.env.Environment; |
... | ... | |
74 | 75 |
|
75 | 76 |
private static final long serialVersionUID = 4020699735656994791L; |
76 | 77 |
|
77 |
private static final Logger log = Logger.getLogger(LoginPresenter.class);
|
|
78 |
private final static Logger logger = LogManager.getLogger();
|
|
78 | 79 |
|
79 | 80 |
private final static String PROPNAME_USER = "cdm-vaadin.login.usr"; |
80 | 81 |
|
... | ... | |
111 | 112 |
try { |
112 | 113 |
Authentication authentication = authenticationManager.authenticate(token); |
113 | 114 |
if(authentication != null && authentication.isAuthenticated()) { |
114 |
log.debug("user '" + userName + "' authenticated"); |
|
115 |
logger.debug("user '" + userName + "' authenticated");
|
|
115 | 116 |
currentSecurityContext().setAuthentication(authentication); |
116 | 117 |
if(NavigationManager.class.isAssignableFrom(getNavigationManager().getClass())){ |
117 | 118 |
uiEventBus.publish(this, new AuthenticationSuccessEvent(userName)); |
118 |
log.debug("redirecting to " + redirectToState); |
|
119 |
logger.debug("redirecting to " + redirectToState);
|
|
119 | 120 |
uiEventBus.publish(this, new NavigationEvent(redirectToState)); |
120 | 121 |
} |
121 | 122 |
} |
... | ... | |
151 | 152 |
|
152 | 153 |
// attempt to auto login |
153 | 154 |
if(StringUtils.isNotEmpty(System.getProperty(PROPNAME_USER)) && StringUtils.isNotEmpty(System.getProperty(PROPNAME_PASSWORD))){ |
154 |
log.warn("Performing autologin with user " + System.getProperty(PROPNAME_USER)); |
|
155 |
logger.warn("Performing autologin with user " + System.getProperty(PROPNAME_USER));
|
|
155 | 156 |
authenticate(System.getProperty(PROPNAME_USER), System.getProperty(PROPNAME_PASSWORD)); |
156 | 157 |
} |
157 | 158 |
|
... | ... | |
162 | 163 |
if(getView()!= null){ |
163 | 164 |
authenticate(event.getPayload().getUserName(), getView().getLoginDialog().getPassword().getValue()); |
164 | 165 |
} else { |
165 |
log.info("view is NULL, not yet disposed LoginPresenter?"); |
|
166 |
logger.info("view is NULL, not yet disposed LoginPresenter?");
|
|
166 | 167 |
} |
167 | 168 |
} |
168 | 169 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/view/distributionStatus/DistributionTableViewBean.java | ||
---|---|---|
15 | 15 |
import java.util.List; |
16 | 16 |
import java.util.UUID; |
17 | 17 |
|
18 |
import org.apache.logging.log4j.LogManager; |
|
19 |
import org.apache.logging.log4j.Logger; |
|
18 | 20 |
import org.springframework.beans.factory.annotation.Autowired; |
19 | 21 |
import org.springframework.security.core.GrantedAuthority; |
20 | 22 |
import org.vaadin.addons.lazyquerycontainer.LazyQueryContainer; |
... | ... | |
64 | 66 |
* |
65 | 67 |
* @author freimeier |
66 | 68 |
* @since 18.10.2017 |
67 |
* |
|
68 | 69 |
*/ |
69 | 70 |
@ViewScope |
70 | 71 |
@SpringView(name=DistributionTableViewBean.NAME) |
71 | 72 |
public class DistributionTableViewBean extends AbstractPageView<DistributionTablePresenter> |
72 | 73 |
implements IDistributionTableView, AccessRestrictedView { |
73 | 74 |
|
74 |
private static final long serialVersionUID = 1L; |
|
75 |
private static final long serialVersionUID = 3495626893961744083L; |
|
76 |
|
|
77 |
private final static Logger logger = LogManager.getLogger(); |
|
78 |
|
|
75 | 79 |
public static final String NAME = "distGrid"; //$NON-NLS-1$ |
76 | 80 |
|
77 | 81 |
@Autowired |
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/NameTypeDesignationPresenter.java | ||
---|---|---|
17 | 17 |
import java.util.UUID; |
18 | 18 |
import java.util.stream.Collectors; |
19 | 19 |
|
20 |
import org.apache.log4j.Logger; |
|
20 |
import org.apache.logging.log4j.LogManager; |
|
21 |
import org.apache.logging.log4j.Logger; |
|
21 | 22 |
import org.hibernate.criterion.Restrictions; |
22 | 23 |
import org.springframework.context.annotation.Scope; |
23 | 24 |
import org.vaadin.spring.events.annotation.EventBusListenerMethod; |
... | ... | |
66 | 67 |
/** |
67 | 68 |
* @author a.kohlbecker |
68 | 69 |
* @since Jan 26, 2018 |
69 |
* |
|
70 | 70 |
*/ |
71 | 71 |
@SpringComponent |
72 | 72 |
@Scope("prototype") |
... | ... | |
75 | 75 |
|
76 | 76 |
private static final long serialVersionUID = 896305051895903033L; |
77 | 77 |
|
78 |
public static final Logger logger = Logger.getLogger(NameTypeDesignationPresenter.class);
|
|
78 |
private final static Logger logger = LogManager.getLogger();
|
|
79 | 79 |
|
80 | 80 |
private HashSet<TaxonName> typifiedNamesAsLoaded; |
81 | 81 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/SpecimenTypeDesignationSetEditorPresenter.java | ||
---|---|---|
19 | 19 |
import java.util.Stack; |
20 | 20 |
import java.util.stream.Collectors; |
21 | 21 |
|
22 |
import org.apache.log4j.Logger; |
|
22 |
import org.apache.logging.log4j.LogManager; |
|
23 |
import org.apache.logging.log4j.Logger; |
|
23 | 24 |
import org.hibernate.criterion.Restrictions; |
24 | 25 |
import org.springframework.beans.factory.annotation.Autowired; |
25 | 26 |
import org.springframework.context.annotation.Scope; |
... | ... | |
98 | 99 |
|
99 | 100 |
private static final long serialVersionUID = 4255636253714476918L; |
100 | 101 |
|
101 |
public static final Logger logger = Logger.getLogger(SpecimenTypeDesignationSetEditorPresenter.class);
|
|
102 |
private final static Logger logger = LogManager.getLogger();
|
|
102 | 103 |
|
103 | 104 |
private static final EnumSet<CRUD> COLLECTION_EDITOR_CRUD = EnumSet.of(CRUD.UPDATE, CRUD.DELETE); |
104 | 105 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java | ||
---|---|---|
19 | 19 |
import java.util.UUID; |
20 | 20 |
|
21 | 21 |
import org.apache.commons.lang.StringUtils; |
22 |
import org.apache.log4j.Logger; |
|
22 |
import org.apache.logging.log4j.LogManager; |
|
23 |
import org.apache.logging.log4j.Logger; |
|
23 | 24 |
import org.hibernate.criterion.Restrictions; |
24 | 25 |
import org.springframework.context.annotation.Scope; |
25 | 26 |
import org.vaadin.spring.events.annotation.EventBusListenerMethod; |
... | ... | |
92 | 93 |
/** |
93 | 94 |
* @author a.kohlbecker |
94 | 95 |
* @since May 22, 2017 |
95 |
* |
|
96 | 96 |
*/ |
97 | 97 |
@SpringComponent |
98 | 98 |
@Scope("prototype") |
... | ... | |
101 | 101 |
|
102 | 102 |
private static final long serialVersionUID = -3538980627079389221L; |
103 | 103 |
|
104 |
private final static Logger logger = LogManager.getLogger(); |
|
105 |
|
|
104 | 106 |
private static final EnumSet<CRUD> SUB_EDITOR_CRUD = EnumSet.of(CRUD.UPDATE, CRUD.DELETE); |
105 | 107 |
|
106 | 108 |
private static final List<String> RELATED_NAME_INIT_STRATEGY = Arrays.asList("$", "nomenclaturalSource.annotations", |
... | ... | |
108 | 110 |
|
109 | 111 |
public static List<String> REFERENCE_INIT_STRATEGY = ReferenceEllypsisFormatter.INIT_STRATEGY; |
110 | 112 |
|
111 |
private static final Logger logger = Logger.getLogger(TaxonNameEditorPresenter.class); |
|
112 |
|
|
113 | 113 |
private CdmFilterablePagingProvider<Reference, Reference> nomReferencePagingProvider; |
114 | 114 |
|
115 | 115 |
private Reference publishedUnit; |
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditor.java | ||
---|---|---|
16 | 16 |
import java.util.UUID; |
17 | 17 |
|
18 | 18 |
import org.apache.commons.lang3.BooleanUtils; |
19 |
import org.apache.logging.log4j.LogManager; |
|
20 |
import org.apache.logging.log4j.Logger; |
|
19 | 21 |
import org.springframework.context.annotation.Scope; |
20 | 22 |
import org.vaadin.viritin.fields.AbstractElementCollection.Instantiator; |
21 | 23 |
import org.vaadin.viritin.fields.ElementCollectionField; |
... | ... | |
85 | 87 |
|
86 | 88 |
private static final long serialVersionUID = -7037436241474466359L; |
87 | 89 |
|
90 |
private final static Logger logger = LogManager.getLogger(); |
|
91 |
|
|
88 | 92 |
private final static int GRID_COLS = 4; |
89 | 93 |
|
90 | 94 |
private final static int GRID_ROWS = 21; |
src/main/java/eu/etaxonomy/cdm/vaadin/view/reference/ReferenceEditorPresenter.java | ||
---|---|---|
14 | 14 |
import java.util.List; |
15 | 15 |
import java.util.UUID; |
16 | 16 |
|
17 |
import org.apache.log4j.Logger; |
|
18 | 17 |
import org.springframework.context.annotation.Scope; |
19 | 18 |
import org.vaadin.spring.events.annotation.EventBusListenerMethod; |
20 | 19 |
import org.vaadin.viritin.fields.CaptionGenerator; |
... | ... | |
56 | 55 |
/** |
57 | 56 |
* @author a.kohlbecker |
58 | 57 |
* @since Apr 5, 2017 |
59 |
* |
|
60 | 58 |
*/ |
61 | 59 |
@SpringComponent |
62 | 60 |
@Scope("prototype") |
... | ... | |
64 | 62 |
|
65 | 63 |
private static final long serialVersionUID = -7926116447719010837L; |
66 | 64 |
|
67 |
private static final Logger logger = Logger.getLogger(ReferenceEditorPresenter.class); |
|
68 |
|
|
69 | 65 |
ReferencePopupEditor inReferencePopup = null; |
70 | 66 |
|
71 | 67 |
CdmFilterablePagingProvider<Reference, Reference> inReferencePagingProvider; |
... | ... | |
76 | 72 |
|
77 | 73 |
} |
78 | 74 |
|
79 |
|
|
80 |
/** |
|
81 |
* {@inheritDoc} |
|
82 |
*/ |
|
83 | 75 |
@Override |
84 | 76 |
public void handleViewEntered() { |
85 | 77 |
super.handleViewEntered(); |
... | ... | |
116 | 108 |
AnnotationType.EDITORIAL().getUuid(), AnnotationType.TECHNICAL().getUuid())); |
117 | 109 |
} |
118 | 110 |
|
119 |
|
|
120 |
/** |
|
121 |
* @param inReferencePagingProvider |
|
122 |
*/ |
|
123 | 111 |
public void updateInReferencePageProvider() { |
124 | 112 |
|
125 | 113 |
inReferencePagingProvider = pagingProviderFactory.inReferencePagingProvider((ReferenceType) getView().getTypeSelect().getValue(), false); |
... | ... | |
137 | 125 |
getView().getInReferenceCombobox().loadFrom(inReferencePagingProvider, inReferencePagingProvider, inReferencePagingProvider.getPageSize()); |
138 | 126 |
} |
139 | 127 |
|
140 |
|
|
141 |
|
|
142 | 128 |
protected static BeanInstantiator<Reference> defaultBeanInstantiator = new BeanInstantiator<Reference>() { |
143 | 129 |
|
144 | 130 |
@Override |
src/main/java/eu/etaxonomy/cdm/vaadin/view/reference/ReferencePopupEditor.java | ||
---|---|---|
15 | 15 |
import java.util.Map; |
16 | 16 |
import java.util.Set; |
17 | 17 |
|
18 |
import org.apache.log4j.Logger; |
|
18 |
import org.apache.logging.log4j.LogManager; |
|
19 |
import org.apache.logging.log4j.Logger; |
|
19 | 20 |
import org.springframework.context.annotation.Scope; |
20 | 21 |
|
21 | 22 |
import com.vaadin.spring.annotation.SpringComponent; |
... | ... | |
67 | 68 |
|
68 | 69 |
private static final long serialVersionUID = -4347633563800758815L; |
69 | 70 |
|
70 |
private static final Logger logger = Logger.getLogger(ReferencePopupEditor.class);
|
|
71 |
private final static Logger logger = LogManager.getLogger();
|
|
71 | 72 |
|
72 | 73 |
private TextField titleField; |
73 | 74 |
|
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/ListPresenter.java | ||
---|---|---|
18 | 18 |
import java.util.UUID; |
19 | 19 |
|
20 | 20 |
import org.apache.commons.lang3.StringUtils; |
21 |
import org.apache.logging.log4j.LogManager; |
|
22 |
import org.apache.logging.log4j.Logger; |
|
21 | 23 |
import org.springframework.beans.factory.annotation.Autowired; |
22 | 24 |
import org.springframework.security.core.Authentication; |
23 | 25 |
import org.vaadin.spring.events.EventScope; |
... | ... | |
58 | 60 |
@ViewScope |
59 | 61 |
public class ListPresenter extends AbstractPresenter<ListView> { |
60 | 62 |
|
63 |
private final static Logger logger = LogManager.getLogger(); |
|
64 |
|
|
61 | 65 |
private static final String REGISTRATION_LIST_PRESENTER_SEARCH_FILTER = "registration.listPresenter.searchFilter"; |
62 | 66 |
|
63 | 67 |
private static final EnumSet<RegistrationStatus> inProgressStatus = EnumSet.of( |
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java | ||
---|---|---|
22 | 22 |
import java.util.Stack; |
23 | 23 |
import java.util.UUID; |
24 | 24 |
|
25 |
import org.apache.log4j.Logger; |
|
25 |
import org.apache.logging.log4j.LogManager; |
|
26 |
import org.apache.logging.log4j.Logger; |
|
26 | 27 |
import org.springframework.beans.factory.annotation.Autowired; |
27 | 28 |
import org.vaadin.spring.events.EventScope; |
28 | 29 |
import org.vaadin.spring.events.annotation.EventBusListenerMethod; |
... | ... | |
101 | 102 |
/** |
102 | 103 |
* @author a.kohlbecker |
103 | 104 |
* @since Mar 3, 2017 |
104 |
* |
|
105 | 105 |
*/ |
106 | 106 |
@SpringComponent |
107 | 107 |
@ViewScope |
108 | 108 |
public class RegistrationWorkingsetPresenter extends AbstractPresenter<RegistrationWorkingsetView> implements CachingPresenter { |
109 | 109 |
|
110 |
private static final Logger logger = Logger.getLogger(RegistrationWorkingsetPresenter.class);
|
|
110 |
private static final long serialVersionUID = 2618456456539802265L;
|
|
111 | 111 |
|
112 |
private static final long serialVersionUID = 1L;
|
|
112 |
private final static Logger logger = LogManager.getLogger();
|
|
113 | 113 |
|
114 | 114 |
@Autowired |
115 | 115 |
private IRegistrationWorkingSetService regWorkingSetService; |
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/StartRegistrationPresenter.java | ||
---|---|---|
14 | 14 |
import java.util.UUID; |
15 | 15 |
import java.util.stream.Collectors; |
16 | 16 |
|
17 |
import org.apache.logging.log4j.LogManager; |
|
18 |
import org.apache.logging.log4j.Logger; |
|
17 | 19 |
import org.hibernate.criterion.Criterion; |
18 | 20 |
import org.hibernate.criterion.Restrictions; |
19 | 21 |
import org.joda.time.DateTime; |
... | ... | |
61 | 63 |
|
62 | 64 |
private static final long serialVersionUID = 2283189121081612574L; |
63 | 65 |
|
66 |
private final static Logger logger = LogManager.getLogger(); |
|
67 |
|
|
64 | 68 |
private ReferencePopupEditor newReferencePopup; |
65 | 69 |
|
66 | 70 |
private Reference newReference; |
... | ... | |
76 | 80 |
super(); |
77 | 81 |
} |
78 | 82 |
|
79 |
|
|
80 |
/** |
|
81 |
* {@inheritDoc} |
|
82 |
*/ |
|
83 | 83 |
@Override |
84 | 84 |
public void handleViewEntered() { |
85 | 85 |
|
... | ... | |
121 | 121 |
getView().getReferenceCombobox().loadFrom(referencePagingProvider, referencePagingProvider, referencePagingProvider.getPageSize()); |
122 | 122 |
} |
123 | 123 |
|
124 |
/** |
|
125 |
* @param value |
|
126 |
* @return |
|
127 |
*/ |
|
128 | 124 |
public void updateReferenceSearchMode(MatchMode value) { |
129 | 125 |
if(referencePagingProvider != null && value != null){ |
130 | 126 |
referencePagingProvider.setMatchMode(value); |
... | ... | |
132 | 128 |
} |
133 | 129 |
} |
134 | 130 |
|
135 |
/** |
|
136 |
* {@inheritDoc} |
|
137 |
*/ |
|
138 | 131 |
@Override |
139 | 132 |
public void handleViewExit() { |
140 | 133 |
if(!registrationInProgress && newReference != null){ |
src/main/java/eu/etaxonomy/vaadin/component/ToManyRelatedEntitiesListSelect.java | ||
---|---|---|
16 | 16 |
import java.util.Optional; |
17 | 17 |
import java.util.Set; |
18 | 18 |
|
19 |
import org.apache.log4j.Logger; |
|
19 |
import org.apache.logging.log4j.LogManager; |
|
20 |
import org.apache.logging.log4j.Logger; |
|
21 |
import org.osgi.dto.DTO; |
|
20 | 22 |
|
21 | 23 |
import com.vaadin.data.Property; |
22 | 24 |
import com.vaadin.data.Validator; |
... | ... | |
35 | 37 |
import eu.etaxonomy.vaadin.event.EditorActionType; |
36 | 38 |
import eu.etaxonomy.vaadin.event.EntityEditorActionEvent; |
37 | 39 |
import eu.etaxonomy.vaadin.event.EntityEditorActionListener; |
40 |
import eu.etaxonomy.vaadin.mvp.AbstractCdmEditorPresenter; |
|
38 | 41 |
import eu.etaxonomy.vaadin.permission.EditPermissionTester; |
39 | 42 |
|
40 | 43 |
/** |
... | ... | |
51 | 54 |
|
52 | 55 |
private static final long serialVersionUID = 4670707714503199599L; |
53 | 56 |
|
54 |
private static final Logger logger = Logger.getLogger(ToManyRelatedEntitiesListSelect.class);
|
|
57 |
private final static Logger logger = LogManager.getLogger();
|
|
55 | 58 |
|
56 | 59 |
protected Class<F> fieldType; |
57 | 60 |
|
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java | ||
---|---|---|
17 | 17 |
import java.util.Set; |
18 | 18 |
import java.util.Stack; |
19 | 19 |
|
20 |
import org.apache.log4j.Level; |
|
21 |
import org.apache.log4j.Logger; |
|
20 |
import org.apache.logging.log4j.Level; |
|
21 |
import org.apache.logging.log4j.LogManager; |
|
22 |
import org.apache.logging.log4j.Logger; |
|
22 | 23 |
import org.vaadin.spring.events.EventScope; |
23 | 24 |
|
24 | 25 |
import com.vaadin.data.Validator.InvalidValueException; |
... | ... | |
60 | 61 |
import com.vaadin.ui.VerticalLayout; |
61 | 62 |
import com.vaadin.ui.themes.ValoTheme; |
62 | 63 |
|
64 |
import eu.etaxonomy.cdm.common.LogUtils; |
|
63 | 65 |
import eu.etaxonomy.cdm.database.PermissionDeniedException; |
64 | 66 |
import eu.etaxonomy.cdm.vaadin.component.TextFieldNFix; |
65 | 67 |
import eu.etaxonomy.cdm.vaadin.component.dialog.ContinueAlternativeCancelDialog; |
... | ... | |
88 | 90 |
public abstract class AbstractPopupEditor<DTO extends Object, P extends AbstractEditorPresenter<DTO, ? extends ApplicationView>> |
89 | 91 |
extends AbstractPopupView<P> { |
90 | 92 |
|
91 |
private static final String READ_ONLY_MESSAGE_TEXT = "The editor is in read-only mode. Your authorities are not sufficient to edit this data.";
|
|
93 |
private final static Logger logger = LogManager.getLogger();
|
|
92 | 94 |
|
93 |
public static final Logger logger = Logger.getLogger(AbstractPopupEditor.class);
|
|
95 |
private static final String READ_ONLY_MESSAGE_TEXT = "The editor is in read-only mode. Your authorities are not sufficient to edit this data.";
|
|
94 | 96 |
|
95 | 97 |
private BeanFieldGroup<DTO> fieldGroup; |
96 | 98 |
|
... | ... | |
611 | 613 |
if(propertyId == null){ |
612 | 614 |
// not found in the editor field group. Maybe the field is bound to a nested fieldgroup? |
613 | 615 |
// 1. find the NestedFieldGroup implementations from the field up to the editor |
614 |
logger.setLevel(Level.DEBUG);
|
|
616 |
LogUtils.setLevel(logger, Level.DEBUG);
|
|
615 | 617 |
PropertyIdPath nestedPropertyIds = new PropertyIdPath(); |
616 | 618 |
Field parentField = field; |
617 | 619 |
HasComponents parentComponent = parentField.getParent(); |
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPresenter.java | ||
---|---|---|
3 | 3 |
import java.io.Serializable; |
4 | 4 |
import java.util.Stack; |
5 | 5 |
|
6 |
import org.apache.log4j.Logger; |
|
6 |
import org.apache.logging.log4j.LogManager; |
|
7 |
import org.apache.logging.log4j.Logger; |
|
7 | 8 |
import org.springframework.beans.factory.DisposableBean; |
8 | 9 |
import org.springframework.beans.factory.annotation.Autowired; |
9 | 10 |
import org.springframework.beans.factory.annotation.Qualifier; |
... | ... | |
18 | 19 |
import eu.etaxonomy.cdm.vaadin.event.EditorActionContext; |
19 | 20 |
import eu.etaxonomy.cdm.vaadin.event.EntityChangeEvent; |
20 | 21 |
import eu.etaxonomy.vaadin.ui.navigation.NavigationManager; |
22 |
import eu.etaxonomy.vaadin.ui.navigation.NavigationManagerBean; |
|
21 | 23 |
import eu.etaxonomy.vaadin.ui.view.DoneWithPopupEvent; |
22 | 24 |
import eu.etaxonomy.vaadin.ui.view.PopupView; |
23 | 25 |
|
... | ... | |
33 | 35 |
*/ |
34 | 36 |
public abstract class AbstractPresenter<V extends ApplicationView> implements Serializable, DisposableBean { |
35 | 37 |
|
38 |
private final static Logger logger = LogManager.getLogger(); |
|
36 | 39 |
|
37 | 40 |
private static final long serialVersionUID = 5260910510283481832L; |
38 | 41 |
|
39 |
public static final Logger logger = Logger.getLogger(AbstractPresenter.class); |
|
40 |
|
|
41 | 42 |
private V view; |
42 | 43 |
|
43 | 44 |
protected V getView() { |
44 | 45 |
if(view == null){ |
45 |
Logger.getLogger(this.getClass()).warn("CDM-VAADIN#6562: presenter " + toString() + " without view.");
|
|
46 |
logger.warn("CDM-VAADIN#6562: presenter " + toString() + " without view.");
|
|
46 | 47 |
} |
47 | 48 |
return view; |
48 | 49 |
} |
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractView.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import javax.annotation.PostConstruct; |
4 | 4 |
|
5 |
import org.apache.log4j.Logger; |
|
5 |
import org.apache.logging.log4j.LogManager; |
|
6 |
import org.apache.logging.log4j.Logger; |
|
6 | 7 |
import org.springframework.beans.BeansException; |
7 | 8 |
import org.springframework.beans.factory.DisposableBean; |
8 | 9 |
import org.springframework.beans.factory.annotation.Autowired; |
... | ... | |
26 | 27 |
public abstract class AbstractView<P extends AbstractPresenter> extends CustomComponent |
27 | 28 |
implements ApplicationContextAware, ReleasableResourcesView, DisposableBean { |
28 | 29 |
|
29 |
|
|
30 |
public static final Logger logger = Logger.getLogger(AbstractView.class); |
|
30 |
private final static Logger logger = LogManager.getLogger(); |
|
31 | 31 |
|
32 | 32 |
private P presenter; |
33 | 33 |
|
... | ... | |
39 | 39 |
@SuppressWarnings("unchecked") |
40 | 40 |
@PostConstruct |
41 | 41 |
protected final void init() { |
42 |
Logger.getLogger(getClass().getSimpleName()).info("View init"); |
|
42 |
LogManager.getLogger(getClass().getSimpleName()).info("View init");
|
|
43 | 43 |
if(!ApplicationView.class.isAssignableFrom(this.getClass())){ |
44 | 44 |
throw new RuntimeException("Any view bean must implement the ApplicationView interface: ViewBean ---> ViewInterface ---> ApplicationView"); |
45 | 45 |
} |
... | ... | |
98 | 98 |
getPresenter().onViewExit(); |
99 | 99 |
} |
100 | 100 |
|
101 |
/** |
|
102 |
* {@inheritDoc} |
|
103 |
*/ |
|
104 | 101 |
@Override |
105 | 102 |
public void destroy() throws Exception { |
106 | 103 |
if(presenter != null){ |
src/main/java/eu/etaxonomy/vaadin/mvp/CdmEditorPresenterBase.java | ||
---|---|---|
13 | 13 |
import java.util.HashSet; |
14 | 14 |
import java.util.UUID; |
15 | 15 |
|
16 |
import org.apache.log4j.Logger; |
|
16 |
import org.apache.logging.log4j.LogManager; |
|
17 |
import org.apache.logging.log4j.Logger; |
|
17 | 18 |
import org.hibernate.HibernateException; |
18 | 19 |
import org.springframework.beans.factory.annotation.Autowired; |
19 | 20 |
|
... | ... | |
45 | 46 |
|
46 | 47 |
private static final long serialVersionUID = 2218185546277084261L; |
47 | 48 |
|
48 |
private static final Logger logger = Logger.getLogger(CdmEditorPresenterBase.class);
|
|
49 |
private final static Logger logger = LogManager.getLogger();
|
|
49 | 50 |
|
50 | 51 |
protected BeanInstantiator<DTO> beanInstantiator = null; |
51 | 52 |
|
Also available in: Unified diff
ref #10072 adapt vaadin to log4j2 and cleanup