mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 05:23:14 +00:00
Merge branch 'master' into configurable_entities
This commit is contained in:
@@ -366,7 +366,6 @@ https://wiki.duraspace.org/display/DSPACE/Code+Contribution+Guidelines
|
||||
* FindBugs-Annotations (com.google.code.findbugs:annotations:3.0.1u2 - http://findbugs.sourceforge.net/)
|
||||
* MaxMind GeoIP Legacy API (com.maxmind.geoip:geoip-api:1.3.0 - https://github.com/maxmind/geoip-api-java)
|
||||
* JHighlight (com.uwyn:jhighlight:1.0 - https://jhighlight.dev.java.net/)
|
||||
* DSpace TM-Extractors Dependency (org.dspace.dependencies:dspace-tm-extractors:1.0.1 - http://projects.dspace.org/dspace-pom/dspace-tm-extractors)
|
||||
* A Hibernate O/RM Module (org.hibernate:hibernate-core:4.2.21.Final - http://hibernate.org)
|
||||
* A Hibernate O/RM Module (org.hibernate:hibernate-ehcache:4.2.21.Final - http://hibernate.org)
|
||||
* Hibernate Commons Annotations (org.hibernate.common:hibernate-commons-annotations:4.0.2.Final - http://hibernate.org)
|
||||
|
@@ -343,14 +343,28 @@
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>mets</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dspace.dependencies</groupId>
|
||||
<artifactId>dspace-tm-extractors</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.jena</groupId>
|
||||
<artifactId>apache-jena-libs</artifactId>
|
||||
<type>pom</type>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-cli</groupId>
|
||||
@@ -364,10 +378,6 @@
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-dbcp2</artifactId>
|
||||
@@ -382,8 +392,8 @@
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
@@ -399,7 +409,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -417,8 +427,16 @@
|
||||
<artifactId>jdom</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-1.2-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>oro</groupId>
|
||||
@@ -531,6 +549,10 @@
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -548,6 +570,10 @@
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -575,8 +601,8 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-configuration</groupId>
|
||||
<artifactId>commons-configuration</artifactId>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-configuration2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.maxmind.geoip2</groupId>
|
||||
@@ -615,7 +641,6 @@
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>19.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
@@ -15,7 +15,7 @@ import org.apache.commons.cli.CommandLine;
|
||||
import org.apache.commons.cli.CommandLineParser;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.PosixParser;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.I18nUtil;
|
||||
|
@@ -17,7 +17,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.transform.TransformerException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.xpath.XPathAPI;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.BitstreamFormat;
|
||||
@@ -47,7 +47,7 @@ public class RegistryLoader {
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(RegistryLoader.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(RegistryLoader.class);
|
||||
|
||||
protected static BitstreamFormatService bitstreamFormatService = ContentServiceFactory.getInstance()
|
||||
.getBitstreamFormatService();
|
||||
|
@@ -26,8 +26,8 @@ import org.apache.commons.cli.HelpFormatter;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.ParseException;
|
||||
import org.apache.commons.cli.PosixParser;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authority.AuthorityValue;
|
||||
import org.dspace.authority.factory.AuthorityServiceFactory;
|
||||
import org.dspace.authority.service.AuthorityValueService;
|
||||
@@ -103,7 +103,7 @@ public class MetadataImport {
|
||||
/**
|
||||
* Logger
|
||||
*/
|
||||
protected static final Logger log = Logger.getLogger(MetadataImport.class);
|
||||
protected static final Logger log = org.apache.logging.log4j.LogManager.getLogger(MetadataImport.class);
|
||||
|
||||
protected final AuthorityValueService authorityValueService;
|
||||
|
||||
|
@@ -23,7 +23,8 @@ import org.apache.commons.cli.OptionBuilder;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.ParseException;
|
||||
import org.apache.commons.cli.PosixParser;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.checker.BitstreamDispatcher;
|
||||
import org.dspace.checker.CheckerCommand;
|
||||
import org.dspace.checker.HandleDispatcher;
|
||||
@@ -48,7 +49,7 @@ import org.dspace.core.Utils;
|
||||
* @author Nathan Sarr
|
||||
*/
|
||||
public final class ChecksumChecker {
|
||||
private static final Logger LOG = Logger.getLogger(ChecksumChecker.class);
|
||||
private static final Logger LOG = LogManager.getLogger(ChecksumChecker.class);
|
||||
|
||||
private static final BitstreamService bitstreamService = ContentServiceFactory.getInstance().getBitstreamService();
|
||||
|
||||
|
@@ -32,8 +32,8 @@ import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
import javax.mail.MessagingException;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.itemexport.service.ItemExportService;
|
||||
import org.dspace.content.Bitstream;
|
||||
import org.dspace.content.Bundle;
|
||||
@@ -98,7 +98,7 @@ public class ItemExportServiceImpl implements ItemExportService {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private Logger log = Logger.getLogger(ItemExportServiceImpl.class);
|
||||
private Logger log = org.apache.logging.log4j.LogManager.getLogger(ItemExportServiceImpl.class);
|
||||
|
||||
protected ItemExportServiceImpl() {
|
||||
|
||||
|
@@ -55,10 +55,10 @@ import gr.ekt.bteio.loaders.OAIPMHDataLoader;
|
||||
import org.apache.commons.collections4.ComparatorUtils;
|
||||
import org.apache.commons.io.FileDeleteStrategy;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang.RandomStringUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.xpath.XPathAPI;
|
||||
import org.dspace.app.itemimport.service.ItemImportService;
|
||||
import org.dspace.app.util.LocalSchemaFilenameFilter;
|
||||
@@ -125,7 +125,7 @@ import org.xml.sax.SAXException;
|
||||
* allow the registration of files (bitstreams) into DSpace.
|
||||
*/
|
||||
public class ItemImportServiceImpl implements ItemImportService, InitializingBean {
|
||||
private final Logger log = Logger.getLogger(ItemImportServiceImpl.class);
|
||||
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(ItemImportServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected AuthorizeService authorizeService;
|
||||
|
@@ -30,7 +30,7 @@ import javax.xml.transform.TransformerConfigurationException;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.LocalSchemaFilenameFilter;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
@@ -47,7 +47,7 @@ import org.w3c.dom.Document;
|
||||
* Encapsulates the Item in the context of the DSpace Archive Format
|
||||
*/
|
||||
public class ItemArchive {
|
||||
private static final Logger log = Logger.getLogger(ItemArchive.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(ItemArchive.class);
|
||||
|
||||
public static final String DUBLIN_CORE_XML = "dublin_core.xml";
|
||||
|
||||
|
@@ -28,7 +28,7 @@ import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.xpath.XPathAPI;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.Item;
|
||||
|
@@ -11,7 +11,7 @@ import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.poi.POITextExtractor;
|
||||
import org.apache.poi.extractor.ExtractorFactory;
|
||||
import org.apache.poi.hssf.extractor.ExcelExtractor;
|
||||
@@ -36,7 +36,7 @@ import org.dspace.content.Item;
|
||||
*/
|
||||
public class ExcelFilter extends MediaFilter {
|
||||
|
||||
private static Logger log = Logger.getLogger(ExcelFilter.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(ExcelFilter.class);
|
||||
|
||||
public String getFilteredName(String oldFilename) {
|
||||
return oldFilename + ".txt";
|
||||
|
@@ -22,7 +22,7 @@ import org.apache.commons.cli.Option;
|
||||
import org.apache.commons.cli.OptionBuilder;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.PosixParser;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.dspace.app.mediafilter.factory.MediaFilterServiceFactory;
|
||||
import org.dspace.app.mediafilter.service.MediaFilterService;
|
||||
import org.dspace.content.Collection;
|
||||
|
@@ -16,7 +16,7 @@ import java.io.InputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.text.PDFTextStripper;
|
||||
import org.dspace.content.Item;
|
||||
@@ -30,7 +30,7 @@ import org.dspace.core.ConfigurationManager;
|
||||
*/
|
||||
public class PDFFilter extends MediaFilter {
|
||||
|
||||
private static Logger log = Logger.getLogger(PDFFilter.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(PDFFilter.class);
|
||||
|
||||
@Override
|
||||
public String getFilteredName(String oldFilename) {
|
||||
|
@@ -10,7 +10,7 @@ package org.dspace.app.mediafilter;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.poi.POITextExtractor;
|
||||
import org.apache.poi.extractor.ExtractorFactory;
|
||||
import org.apache.poi.hslf.extractor.PowerPointExtractor;
|
||||
@@ -23,7 +23,7 @@ import org.dspace.content.Item;
|
||||
*/
|
||||
public class PowerPointFilter extends MediaFilter {
|
||||
|
||||
private static Logger log = Logger.getLogger(PowerPointFilter.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(PowerPointFilter.class);
|
||||
|
||||
@Override
|
||||
public String getFilteredName(String oldFilename) {
|
||||
|
@@ -1,93 +0,0 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.app.mediafilter;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.dspace.content.Item;
|
||||
import org.textmining.extraction.TextExtractor;
|
||||
import org.textmining.extraction.word.WordTextExtractorFactory;
|
||||
|
||||
/*
|
||||
*
|
||||
* to do: helpful error messages - can't find mediafilter.cfg - can't
|
||||
* instantiate filter - bitstream format doesn't exist.
|
||||
*
|
||||
*/
|
||||
public class WordFilter extends MediaFilter {
|
||||
|
||||
private static Logger log = Logger.getLogger(WordFilter.class);
|
||||
|
||||
@Override
|
||||
public String getFilteredName(String oldFilename) {
|
||||
return oldFilename + ".txt";
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String bundle name
|
||||
*/
|
||||
@Override
|
||||
public String getBundleName() {
|
||||
return "TEXT";
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String bitstreamformat
|
||||
*/
|
||||
@Override
|
||||
public String getFormatString() {
|
||||
return "Text";
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String description
|
||||
*/
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Extracted text";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param currentItem item
|
||||
* @param source source input stream
|
||||
* @param verbose verbose mode
|
||||
* @return InputStream the resulting input stream
|
||||
* @throws Exception if error
|
||||
*/
|
||||
@Override
|
||||
public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose)
|
||||
throws Exception {
|
||||
// get input stream from bitstream
|
||||
// pass to filter, get string back
|
||||
try {
|
||||
WordTextExtractorFactory factory = new WordTextExtractorFactory();
|
||||
TextExtractor e = factory.textExtractor(source);
|
||||
String extractedText = e.getText();
|
||||
|
||||
// if verbose flag is set, print out extracted text
|
||||
// to STDOUT
|
||||
if (verbose) {
|
||||
System.out.println(extractedText);
|
||||
}
|
||||
|
||||
// generate an input stream with the extracted text
|
||||
byte[] textBytes = extractedText.getBytes();
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(textBytes);
|
||||
|
||||
return bais; // will this work? or will the byte array be out of scope?
|
||||
} catch (IOException ioe) {
|
||||
System.out.println("Invalid Word Format");
|
||||
log.error("Error detected - Word File format not recognized: "
|
||||
+ ioe.getMessage(), ioe);
|
||||
throw ioe;
|
||||
}
|
||||
}
|
||||
}
|
@@ -9,8 +9,8 @@ package org.dspace.app.requestitem;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Item;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.dspace.core.Context;
|
||||
@@ -31,7 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
*/
|
||||
public class RequestItemHelpdeskStrategy extends RequestItemSubmitterStrategy {
|
||||
|
||||
private Logger log = Logger.getLogger(RequestItemHelpdeskStrategy.class);
|
||||
private Logger log = org.apache.logging.log4j.LogManager.getLogger(RequestItemHelpdeskStrategy.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected EPersonService ePersonService;
|
||||
|
@@ -10,7 +10,7 @@ package org.dspace.app.requestitem;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.dspace.content.Item;
|
||||
import org.dspace.content.MetadataValue;
|
||||
import org.dspace.content.service.ItemService;
|
||||
|
@@ -10,7 +10,7 @@ package org.dspace.app.requestitem;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.requestitem.dao.RequestItemDAO;
|
||||
import org.dspace.app.requestitem.service.RequestItemService;
|
||||
import org.dspace.content.Bitstream;
|
||||
@@ -28,7 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
*/
|
||||
public class RequestItemServiceImpl implements RequestItemService {
|
||||
|
||||
private final Logger log = Logger.getLogger(RequestItemServiceImpl.class);
|
||||
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(RequestItemServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected RequestItemDAO requestItemDAO;
|
||||
|
@@ -15,8 +15,8 @@ import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.sfx.service.SFXFileReaderService;
|
||||
import org.dspace.content.DCPersonName;
|
||||
import org.dspace.content.Item;
|
||||
@@ -58,7 +58,7 @@ public class SFXFileReaderServiceImpl implements SFXFileReaderService {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private final Logger log = Logger.getLogger(SFXFileReaderServiceImpl.class);
|
||||
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(SFXFileReaderServiceImpl.class);
|
||||
|
||||
protected SFXFileReaderServiceImpl() {
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.dspace.app.util.XMLUtils;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
package org.dspace.app.sherpa;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.HttpStatus;
|
||||
@@ -16,7 +16,7 @@ import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
|
||||
public class SHERPAService {
|
||||
@@ -29,7 +29,7 @@ public class SHERPAService {
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static final Logger log = Logger.getLogger(SHERPAService.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(SHERPAService.class);
|
||||
|
||||
public SHERPAService() {
|
||||
HttpClientBuilder builder = HttpClientBuilder.create();
|
||||
|
@@ -11,8 +11,8 @@ import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.sherpa.SHERPAResponse;
|
||||
import org.dspace.app.sherpa.SHERPAService;
|
||||
import org.dspace.content.Item;
|
||||
@@ -27,7 +27,7 @@ public class SHERPASubmitService {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(SHERPASubmitService.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(SHERPASubmitService.class);
|
||||
|
||||
public void setConfiguration(SHERPASubmitConfigurationService configuration) {
|
||||
this.configuration = configuration;
|
||||
|
@@ -27,9 +27,9 @@ import org.apache.commons.cli.HelpFormatter;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.ParseException;
|
||||
import org.apache.commons.cli.PosixParser;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.Community;
|
||||
import org.dspace.content.Item;
|
||||
@@ -52,7 +52,7 @@ public class GenerateSitemaps {
|
||||
/**
|
||||
* Logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(GenerateSitemaps.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(GenerateSitemaps.class);
|
||||
|
||||
private static final CommunityService communityService = ContentServiceFactory.getInstance().getCommunityService();
|
||||
private static final CollectionService collectionService =
|
||||
|
@@ -21,7 +21,7 @@ import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang.time.DateUtils;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
|
||||
/**
|
||||
|
@@ -13,7 +13,7 @@ import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.dspace.content.MetadataSchemaEnum;
|
||||
import org.dspace.core.Utils;
|
||||
import org.slf4j.Logger;
|
||||
|
@@ -16,14 +16,14 @@ import java.util.Enumeration;
|
||||
import javax.servlet.ServletContextEvent;
|
||||
import javax.servlet.ServletContextListener;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Class to initialize / cleanup resources used by DSpace when the web application
|
||||
* is started or stopped.
|
||||
*/
|
||||
public class DSpaceContextListener implements ServletContextListener {
|
||||
private static Logger log = Logger.getLogger(DSpaceContextListener.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(DSpaceContextListener.class);
|
||||
|
||||
/**
|
||||
* Initialize any resources required by the application.
|
||||
|
@@ -1,299 +0,0 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.app.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.lang.time.DateUtils;
|
||||
import org.apache.log4j.FileAppender;
|
||||
import org.apache.log4j.helpers.LogLog;
|
||||
import org.apache.log4j.spi.LoggingEvent;
|
||||
|
||||
/**
|
||||
* Special log appender for log4j. Adds the current date (ie. year-mon) to
|
||||
* the end of the file name, so that rolling on to the next log is simply
|
||||
* a case of starting a new one - no renaming of old logs.
|
||||
*
|
||||
* This is advisable if you are using Windows, and have multiple applications
|
||||
* (ie. dspace, dspace-oai, dspace-sword) that all want to write to the same log file,
|
||||
* as each would otherwise try to rename the old files during rollover.
|
||||
*
|
||||
* An example log4j.properties (one log per month, retains three months of logs)
|
||||
*
|
||||
* log4j.rootCategory=INFO, A1
|
||||
* log4j.appender.A1=org.dspace.app.util.DailyFileAppender
|
||||
* log4j.appender.A1.File=@@log.dir@@/dspace.log
|
||||
* log4j.appender.A1.DatePattern=yyyy-MM
|
||||
* log4j.appender.A1.MaxLogs=3
|
||||
* log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||
* log4j.appender.A1.layout.ConversionPattern=%d %-5p %c @ %m%n
|
||||
*/
|
||||
public class DailyFileAppender extends FileAppender {
|
||||
/**
|
||||
* The fixed date pattern to be used if one is not specified.
|
||||
*/
|
||||
private static final String DATE_PATTERN = "yyyy-MM-dd";
|
||||
|
||||
/**
|
||||
* The folder under which daily folders are created. This can be a absolute path
|
||||
* or relative path also.
|
||||
* e.g. JavaLogs/CPRILog or F:/LogFiles/CPRILog
|
||||
*/
|
||||
private String mstrFileName;
|
||||
|
||||
/**
|
||||
* Used internally and contains the name of the date derived from current system date.
|
||||
*/
|
||||
private Date mstrDate = new Date(System.currentTimeMillis());
|
||||
|
||||
/**
|
||||
* Holds the user specified DatePattern,
|
||||
*/
|
||||
private String mstrDatePattern = DATE_PATTERN;
|
||||
|
||||
private boolean mMonthOnly = false;
|
||||
|
||||
/**
|
||||
* The date formatter object used for parsing the user specified DatePattern.
|
||||
*/
|
||||
private SimpleDateFormat mobjSDF;
|
||||
|
||||
private boolean mWithHostName = false;
|
||||
|
||||
private int mMaxLogs = 0;
|
||||
|
||||
/**
|
||||
* Default constructor. This is required as the appender class is dynamically
|
||||
* loaded.
|
||||
*/
|
||||
public DailyFileAppender() {
|
||||
super();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.apache.log4j.FileAppender#activateOptions()
|
||||
*/
|
||||
@Override
|
||||
public void activateOptions() {
|
||||
setFileName();
|
||||
cleanupOldFiles();
|
||||
super.activateOptions();
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Getters
|
||||
*----------------------------------------------------------------------------*/
|
||||
public String getDatePattern() {
|
||||
return this.mstrDatePattern;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFile() {
|
||||
return this.mstrFileName;
|
||||
}
|
||||
|
||||
public boolean getWithHost() {
|
||||
return mWithHostName;
|
||||
}
|
||||
|
||||
public int getMaxLogs() {
|
||||
return mMaxLogs;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Setters
|
||||
*----------------------------------------------------------------------------*/
|
||||
public void setDatePattern(String pstrPattern) {
|
||||
this.mstrDatePattern = checkPattern(pstrPattern);
|
||||
if (mstrDatePattern.contains("dd") || mstrDatePattern.contains("DD")) {
|
||||
mMonthOnly = false;
|
||||
} else {
|
||||
mMonthOnly = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFile(String file) {
|
||||
// Trim spaces from both ends. The users probably does not want
|
||||
// trailing spaces in file names.
|
||||
String val = file.trim();
|
||||
mstrFileName = val;
|
||||
}
|
||||
|
||||
public void setWithHost(boolean wh) {
|
||||
mWithHostName = wh;
|
||||
}
|
||||
|
||||
public void setMaxLogs(int ml) {
|
||||
mMaxLogs = ml;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Methods
|
||||
*----------------------------------------------------------------------------*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.apache.log4j.WriterAppender#subAppend(org.apache.log4j.spi.LoggingEvent)
|
||||
*/
|
||||
@Override
|
||||
protected void subAppend(LoggingEvent pobjEvent) {
|
||||
Date dtNow = new Date(System.currentTimeMillis());
|
||||
|
||||
boolean rollover = false;
|
||||
|
||||
if (mMonthOnly) {
|
||||
Calendar now = Calendar.getInstance();
|
||||
Calendar cur = Calendar.getInstance();
|
||||
now.setTime(dtNow);
|
||||
cur.setTime(mstrDate);
|
||||
rollover = !(now.get(Calendar.YEAR) == cur.get(Calendar.YEAR) && now.get(Calendar.MONTH) == cur
|
||||
.get(Calendar.MONTH));
|
||||
} else {
|
||||
rollover = !(DateUtils.isSameDay(dtNow, mstrDate));
|
||||
}
|
||||
|
||||
if (rollover) {
|
||||
try {
|
||||
rollOver(dtNow);
|
||||
} catch (IOException IOEx) {
|
||||
LogLog.error("rollOver() failed!", IOEx);
|
||||
}
|
||||
}
|
||||
|
||||
super.subAppend(pobjEvent);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Helpers
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The helper function to validate the DatePattern.
|
||||
*
|
||||
* @param pstrPattern The DatePattern to be validated.
|
||||
* @return The validated date pattern or defautlt DATE_PATTERN
|
||||
*/
|
||||
private String checkPattern(String pstrPattern) {
|
||||
String strRet = null;
|
||||
SimpleDateFormat objFmt = new SimpleDateFormat(DATE_PATTERN);
|
||||
|
||||
try {
|
||||
this.mobjSDF = new SimpleDateFormat(pstrPattern);
|
||||
strRet = pstrPattern;
|
||||
} catch (NullPointerException NPExIgnore) {
|
||||
LogLog.error("Invalid DatePattern " + pstrPattern, NPExIgnore);
|
||||
this.mobjSDF = objFmt;
|
||||
strRet = DATE_PATTERN;
|
||||
} catch (IllegalArgumentException IlArgExIgnore) {
|
||||
LogLog.error("Invalid DatePattern " + pstrPattern, IlArgExIgnore);
|
||||
this.mobjSDF = objFmt;
|
||||
strRet = DATE_PATTERN;
|
||||
} finally {
|
||||
objFmt = null;
|
||||
}
|
||||
return strRet;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is responsible for performing the actual file rollover.
|
||||
*
|
||||
* @param pstrName The name of the new folder based on current system date.
|
||||
* @throws IOException if IO error
|
||||
*/
|
||||
private static boolean deletingFiles = false;
|
||||
|
||||
private void cleanupOldFiles() {
|
||||
// If we need to delete log files
|
||||
if (mMaxLogs > 0 && !deletingFiles) {
|
||||
deletingFiles = true;
|
||||
|
||||
// Determine the final file extension with the hostname
|
||||
String hostFileExt = null;
|
||||
try {
|
||||
hostFileExt = "." + java.net.InetAddress.getLocalHost().getHostName();
|
||||
} catch (UnknownHostException e) {
|
||||
LogLog.error("Unable to retrieve host name");
|
||||
}
|
||||
|
||||
try {
|
||||
// Array to hold the logs we are going to keep
|
||||
File[] logsToKeep = new File[mMaxLogs];
|
||||
|
||||
// Get a 'master' file handle, and the parent directory from it
|
||||
File logMaster = new File(mstrFileName);
|
||||
File logDir = logMaster.getParentFile();
|
||||
if (logDir.isDirectory()) {
|
||||
// Iterate all the files in that directory
|
||||
File[] logArr = logDir.listFiles();
|
||||
for (File curLog : logArr) {
|
||||
LogLog.debug("Comparing '" + curLog.getAbsolutePath() + "' to '" + mstrFileName + "'");
|
||||
String name = curLog.getAbsolutePath();
|
||||
|
||||
// First, see if we are not using hostname, or the log file ends with this host
|
||||
if (!mWithHostName || (hostFileExt != null && name.endsWith(hostFileExt))) {
|
||||
// Check that the file is indeed one we want (contains the master file name)
|
||||
if (name.contains(mstrFileName)) {
|
||||
// Iterate through the array of logs we are keeping
|
||||
for (int i = 0; curLog != null && i < logsToKeep.length; i++) {
|
||||
// Have we exhausted the 'to keep' array?
|
||||
if (logsToKeep[i] == null) {
|
||||
// Empty space, retain this log file
|
||||
logsToKeep[i] = curLog;
|
||||
curLog = null;
|
||||
} else if (logsToKeep[i].getName().compareTo(curLog.getName()) < 0) {
|
||||
// If the 'kept' file is older than the current one
|
||||
// Replace tested entry with current file
|
||||
File temp = logsToKeep[i];
|
||||
logsToKeep[i] = curLog;
|
||||
curLog = temp;
|
||||
}
|
||||
}
|
||||
|
||||
// If we have a 'current' entry at this point, it's a log we don't want
|
||||
if (curLog != null) {
|
||||
LogLog.debug("Deleting log " + curLog.getName());
|
||||
if (!curLog.delete()) {
|
||||
LogLog.error("Unable to delete log file");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// Don't worry about exceptions
|
||||
} finally {
|
||||
deletingFiles = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void rollOver(Date dtNow) throws IOException {
|
||||
mstrDate = dtNow;
|
||||
setFileName();
|
||||
this.setFile(fileName, true, bufferedIO, bufferSize);
|
||||
|
||||
cleanupOldFiles();
|
||||
}
|
||||
|
||||
private void setFileName() {
|
||||
fileName = mstrFileName + "." + mobjSDF.format(mstrDate);
|
||||
|
||||
if (mWithHostName) {
|
||||
try {
|
||||
fileName += "." + java.net.InetAddress.getLocalHost().getHostName();
|
||||
} catch (UnknownHostException e) {
|
||||
LogLog.error("Unable to retrieve host name");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -12,7 +12,7 @@ import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Bitstream;
|
||||
import org.dspace.content.BitstreamFormat;
|
||||
import org.dspace.content.factory.ContentServiceFactory;
|
||||
@@ -24,7 +24,7 @@ import org.dspace.core.Context;
|
||||
*/
|
||||
public class GoogleBitstreamComparator implements Comparator<Bitstream> {
|
||||
|
||||
private final static Logger log = Logger.getLogger(GoogleBitstreamComparator.class);
|
||||
private final static Logger log = org.apache.logging.log4j.LogManager.getLogger(GoogleBitstreamComparator.class);
|
||||
|
||||
HashMap<String, Integer> priorityMap = new HashMap<>();
|
||||
|
||||
|
@@ -26,7 +26,7 @@ import java.util.Properties;
|
||||
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.ListMultimap;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authorize.factory.AuthorizeServiceFactory;
|
||||
import org.dspace.content.Bitstream;
|
||||
import org.dspace.content.Bundle;
|
||||
@@ -51,7 +51,7 @@ import org.jdom.Element;
|
||||
@SuppressWarnings("deprecation")
|
||||
public class GoogleMetadata {
|
||||
|
||||
private final static Logger log = Logger.getLogger(GoogleMetadata.class);
|
||||
private final static Logger log = org.apache.logging.log4j.LogManager.getLogger(GoogleMetadata.class);
|
||||
|
||||
protected static final String GOOGLE_PREFIX = "google.";
|
||||
|
||||
|
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.service.MetadataExposureService;
|
||||
import org.dspace.authorize.service.AuthorizeService;
|
||||
import org.dspace.core.Context;
|
||||
@@ -58,7 +58,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
* @version $Revision: 3734 $
|
||||
*/
|
||||
public class MetadataExposureServiceImpl implements MetadataExposureService {
|
||||
protected Logger log = Logger.getLogger(MetadataExposureServiceImpl.class);
|
||||
protected Logger log = org.apache.logging.log4j.LogManager.getLogger(MetadataExposureServiceImpl.class);
|
||||
|
||||
protected Map<String, Set<String>> hiddenElementSets = null;
|
||||
protected Map<String, Map<String, Set<String>>> hiddenElementMaps = null;
|
||||
|
@@ -20,7 +20,7 @@ import com.sun.syndication.feed.module.opensearch.OpenSearchModule;
|
||||
import com.sun.syndication.feed.module.opensearch.entity.OSQuery;
|
||||
import com.sun.syndication.feed.module.opensearch.impl.OpenSearchModuleImpl;
|
||||
import com.sun.syndication.io.FeedException;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.service.OpenSearchService;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.core.Constants;
|
||||
@@ -54,7 +54,7 @@ import org.w3c.dom.Document;
|
||||
* @author Richard Rodgers
|
||||
*/
|
||||
public class OpenSearchServiceImpl implements OpenSearchService, InitializingBean {
|
||||
private static final Logger log = Logger.getLogger(OpenSearchServiceImpl.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(OpenSearchServiceImpl.class);
|
||||
|
||||
// are open search queries enabled?
|
||||
protected boolean enabled = false;
|
||||
|
@@ -11,7 +11,7 @@ import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.factory.ContentServiceFactory;
|
||||
import org.dspace.content.service.CollectionService;
|
||||
@@ -28,7 +28,7 @@ import org.springframework.util.StopWatch;
|
||||
* Invocation: dsrun org.dspace.app.util.OptimizeSelectCollection
|
||||
*/
|
||||
public class OptimizeSelectCollection {
|
||||
private static final Logger log = Logger.getLogger(OptimizeSelectCollection.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(OptimizeSelectCollection.class);
|
||||
private static Context context;
|
||||
|
||||
private static ArrayList<EPerson> brokenPeople;
|
||||
|
@@ -12,7 +12,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Class representing a single Item Submission config definition, organized into
|
||||
@@ -44,7 +44,7 @@ public class SubmissionConfig implements Serializable {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(SubmissionConfig.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(SubmissionConfig.class);
|
||||
|
||||
/**
|
||||
* Constructs a new Submission Configuration object, based on the XML
|
||||
|
@@ -19,7 +19,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.FactoryConfigurationError;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.core.Context;
|
||||
@@ -71,7 +71,7 @@ public class SubmissionConfigReader {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(SubmissionConfigReader.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(SubmissionConfigReader.class);
|
||||
|
||||
/**
|
||||
* The fully qualified pathname of the directory containing the Item Submission Configuration file
|
||||
|
@@ -34,9 +34,9 @@ import com.sun.syndication.feed.synd.SyndPerson;
|
||||
import com.sun.syndication.feed.synd.SyndPersonImpl;
|
||||
import com.sun.syndication.io.FeedException;
|
||||
import com.sun.syndication.io.SyndFeedOutput;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Bitstream;
|
||||
import org.dspace.content.Bundle;
|
||||
import org.dspace.content.Collection;
|
||||
@@ -69,7 +69,7 @@ import org.w3c.dom.Document;
|
||||
* @author Larry Stone
|
||||
*/
|
||||
public class SyndicationFeed {
|
||||
protected final Logger log = Logger.getLogger(SyndicationFeed.class);
|
||||
protected final Logger log = org.apache.logging.log4j.LogManager.getLogger(SyndicationFeed.class);
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -23,8 +23,8 @@ import java.util.UUID;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.Item;
|
||||
import org.dspace.content.MetadataValue;
|
||||
@@ -44,7 +44,7 @@ public class Util {
|
||||
// cache for source version result
|
||||
private static String sourceVersion = null;
|
||||
|
||||
private static Logger log = Logger.getLogger(Util.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(Util.class);
|
||||
|
||||
/**
|
||||
* Default constructor. Must be protected as org.dspace.xmlworkflow.WorkflowUtils extends it
|
||||
|
@@ -18,7 +18,7 @@ import org.apache.http.HttpStatus;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpHead;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.dao.WebAppDAO;
|
||||
import org.dspace.app.util.service.WebAppService;
|
||||
import org.dspace.core.Context;
|
||||
@@ -33,7 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
*/
|
||||
public class WebAppServiceImpl implements WebAppService {
|
||||
|
||||
private final Logger log = Logger.getLogger(WebAppServiceImpl.class);
|
||||
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(WebAppServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected WebAppDAO webAppDAO;
|
||||
|
@@ -11,7 +11,7 @@ import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
|
@@ -17,14 +17,15 @@ import java.util.UUID;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.LogManager;
|
||||
import org.dspace.core.factory.CoreServiceFactory;
|
||||
import org.dspace.eperson.EPerson;
|
||||
import org.dspace.eperson.Group;
|
||||
import org.dspace.eperson.factory.EPersonServiceFactory;
|
||||
import org.dspace.eperson.service.GroupService;
|
||||
import org.dspace.service.ClientInfoService;
|
||||
import org.dspace.services.factory.DSpaceServicesFactory;
|
||||
|
||||
/**
|
||||
@@ -49,7 +50,7 @@ public class IPAuthentication implements AuthenticationMethod {
|
||||
/**
|
||||
* Our logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(IPAuthentication.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(IPAuthentication.class);
|
||||
|
||||
/**
|
||||
* Whether to look for x-forwarded headers for logging IP addresses
|
||||
@@ -67,6 +68,7 @@ public class IPAuthentication implements AuthenticationMethod {
|
||||
protected List<IPMatcher> ipNegativeMatchers;
|
||||
|
||||
protected GroupService groupService;
|
||||
protected ClientInfoService clientInfoService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -91,6 +93,7 @@ public class IPAuthentication implements AuthenticationMethod {
|
||||
ipMatcherGroupIDs = new HashMap<>();
|
||||
ipMatcherGroupNames = new HashMap<>();
|
||||
groupService = EPersonServiceFactory.getInstance().getGroupService();
|
||||
clientInfoService = CoreServiceFactory.getInstance().getClientInfoService();
|
||||
|
||||
List<String> propNames = DSpaceServicesFactory.getInstance().getConfigurationService()
|
||||
.getPropertyKeys("authentication-ip");
|
||||
@@ -169,18 +172,7 @@ public class IPAuthentication implements AuthenticationMethod {
|
||||
List<Group> groups = new ArrayList<Group>();
|
||||
|
||||
// Get the user's IP address
|
||||
String addr = request.getRemoteAddr();
|
||||
if (useProxies == null) {
|
||||
useProxies = ConfigurationManager.getBooleanProperty("useProxies", false);
|
||||
}
|
||||
if (useProxies && request.getHeader("X-Forwarded-For") != null) {
|
||||
/* This header is a comma delimited list */
|
||||
for (String xfip : request.getHeader("X-Forwarded-For").split(",")) {
|
||||
if (!request.getHeader("X-Forwarded-For").contains(addr)) {
|
||||
addr = xfip.trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
String addr = clientInfoService.getClientIp(request);
|
||||
|
||||
for (IPMatcher ipm : ipMatchers) {
|
||||
try {
|
||||
|
@@ -10,7 +10,7 @@ package org.dspace.authenticate;
|
||||
import java.net.Inet6Address;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -38,7 +38,7 @@ import org.apache.log4j.Logger;
|
||||
* @version $Revision$
|
||||
*/
|
||||
public class IPMatcher {
|
||||
private static Logger log = Logger.getLogger(IPMatcher.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(IPMatcher.class);
|
||||
|
||||
/**
|
||||
* Network to match
|
||||
|
@@ -28,8 +28,8 @@ import javax.naming.ldap.StartTlsResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authenticate.factory.AuthenticateServiceFactory;
|
||||
import org.dspace.authenticate.service.AuthenticationService;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
@@ -61,7 +61,7 @@ public class LDAPAuthentication
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(LDAPAuthentication.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(LDAPAuthentication.class);
|
||||
|
||||
protected AuthenticationService authenticationService = AuthenticateServiceFactory.getInstance()
|
||||
.getAuthenticationService();
|
||||
|
@@ -15,7 +15,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.LogManager;
|
||||
import org.dspace.eperson.EPerson;
|
||||
@@ -49,7 +49,7 @@ public class PasswordAuthentication
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(PasswordAuthentication.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(PasswordAuthentication.class);
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -23,8 +23,8 @@ import java.util.UUID;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authenticate.factory.AuthenticateServiceFactory;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.MetadataField;
|
||||
@@ -70,7 +70,7 @@ public class ShibAuthentication implements AuthenticationMethod {
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(ShibAuthentication.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(ShibAuthentication.class);
|
||||
|
||||
/**
|
||||
* Additional metadata mappings
|
||||
|
@@ -29,8 +29,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authenticate.factory.AuthenticateServiceFactory;
|
||||
import org.dspace.authenticate.service.AuthenticationService;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
@@ -105,7 +105,7 @@ public class X509Authentication implements AuthenticationMethod {
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(X509Authentication.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(X509Authentication.class);
|
||||
|
||||
/**
|
||||
* public key of CA to check client certs against.
|
||||
|
@@ -12,7 +12,7 @@ import java.net.MalformedURLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.solr.client.solrj.SolrQuery;
|
||||
import org.apache.solr.client.solrj.SolrServerException;
|
||||
import org.apache.solr.client.solrj.impl.HttpSolrServer;
|
||||
@@ -30,7 +30,7 @@ import org.dspace.core.ConfigurationManager;
|
||||
*/
|
||||
public class AuthoritySolrServiceImpl implements AuthorityIndexingService, AuthoritySearchService {
|
||||
|
||||
private static final Logger log = Logger.getLogger(AuthoritySolrServiceImpl.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthoritySolrServiceImpl.class);
|
||||
|
||||
protected AuthoritySolrServiceImpl() {
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* This class contains a list of active authority types.
|
||||
@@ -32,7 +32,7 @@ public class AuthorityTypes {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(AuthorityTypes.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthorityTypes.class);
|
||||
|
||||
protected List<AuthorityValue> types = new ArrayList<AuthorityValue>();
|
||||
|
||||
|
@@ -14,8 +14,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.solr.common.SolrDocument;
|
||||
import org.apache.solr.common.SolrInputDocument;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
@@ -234,7 +234,7 @@ public class AuthorityValue {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(AuthorityValue.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthorityValue.class);
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
@@ -13,8 +13,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.solr.client.solrj.SolrQuery;
|
||||
import org.apache.solr.client.solrj.response.QueryResponse;
|
||||
import org.apache.solr.common.SolrDocument;
|
||||
@@ -34,7 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
*/
|
||||
public class AuthorityValueServiceImpl implements AuthorityValueService {
|
||||
|
||||
private final Logger log = Logger.getLogger(AuthorityValueServiceImpl.class);
|
||||
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthorityValueServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected AuthorityTypes authorityTypes;
|
||||
|
@@ -12,8 +12,8 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.ObjectUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.solr.common.SolrDocument;
|
||||
import org.apache.solr.common.SolrInputDocument;
|
||||
|
||||
|
@@ -19,7 +19,7 @@ import org.apache.commons.cli.HelpFormatter;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.ParseException;
|
||||
import org.apache.commons.cli.PosixParser;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authority.factory.AuthorityServiceFactory;
|
||||
import org.dspace.authority.service.AuthorityValueService;
|
||||
import org.dspace.content.Item;
|
||||
@@ -40,7 +40,7 @@ public class UpdateAuthorities {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(UpdateAuthorities.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(UpdateAuthorities.class);
|
||||
|
||||
protected PrintWriter print = null;
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authority.factory.AuthorityServiceFactory;
|
||||
import org.dspace.authority.service.AuthorityService;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
@@ -33,7 +33,7 @@ import org.dspace.event.Event;
|
||||
*/
|
||||
public class AuthorityConsumer implements Consumer {
|
||||
|
||||
private final Logger log = Logger.getLogger(AuthorityConsumer.class);
|
||||
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthorityConsumer.class);
|
||||
|
||||
/**
|
||||
* A set of all item IDs installed which need their authority updated
|
||||
|
@@ -12,7 +12,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authority.AuthorityValue;
|
||||
import org.dspace.authority.factory.AuthorityServiceFactory;
|
||||
import org.dspace.authority.service.AuthorityService;
|
||||
@@ -29,7 +29,7 @@ import org.dspace.core.Context;
|
||||
*/
|
||||
public class AuthorityIndexClient {
|
||||
|
||||
private static Logger log = Logger.getLogger(AuthorityIndexClient.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthorityIndexClient.class);
|
||||
|
||||
protected static final AuthorityService authorityService =
|
||||
AuthorityServiceFactory.getInstance().getAuthorityService();
|
||||
|
@@ -13,8 +13,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authority.AuthorityValue;
|
||||
import org.dspace.authority.service.AuthorityValueService;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
@@ -45,7 +45,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
*/
|
||||
public class DSpaceAuthorityIndexer implements AuthorityIndexerInterface, InitializingBean {
|
||||
|
||||
private static final Logger log = Logger.getLogger(DSpaceAuthorityIndexer.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(DSpaceAuthorityIndexer.class);
|
||||
|
||||
/**
|
||||
* The list of metadata fields which are to be indexed *
|
||||
|
@@ -15,12 +15,13 @@ import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authority.AuthorityValue;
|
||||
import org.dspace.authority.SolrAuthorityInterface;
|
||||
import org.dspace.authority.orcid.xml.XMLtoBio;
|
||||
@@ -35,7 +36,7 @@ import org.orcid.jaxb.model.record_v2.Person;
|
||||
*/
|
||||
public class Orcidv2 implements SolrAuthorityInterface {
|
||||
|
||||
private static Logger log = Logger.getLogger(Orcidv2.class);
|
||||
private static Logger log = LogManager.getLogger(Orcidv2.class);
|
||||
|
||||
public RESTConnector restConnector;
|
||||
private String OAUTHUrl;
|
||||
@@ -46,7 +47,9 @@ public class Orcidv2 implements SolrAuthorityInterface {
|
||||
private String accessToken;
|
||||
|
||||
/**
|
||||
* Initialize the accessToken that is required for all subsequent calls to ORCID
|
||||
* Initialize the accessToken that is required for all subsequent calls to ORCID.
|
||||
*
|
||||
* @throws java.io.IOException passed through from HTTPclient.
|
||||
*/
|
||||
public void init() throws IOException {
|
||||
if (StringUtils.isNotBlank(accessToken) && StringUtils.isNotBlank(clientSecret)) {
|
||||
|
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.solr.common.SolrDocument;
|
||||
import org.apache.solr.common.SolrInputDocument;
|
||||
import org.dspace.authority.AuthorityValue;
|
||||
|
@@ -14,10 +14,9 @@ import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
|
||||
/**
|
||||
* @param <T> type
|
||||
* @author Antoine Snyers (antoine at atmire.com)
|
||||
@@ -30,7 +29,7 @@ public abstract class Converter<T> {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(Converter.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(Converter.class);
|
||||
|
||||
public abstract T convert(InputStream document);
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import java.net.URISyntaxException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authority.orcid.Orcidv2;
|
||||
import org.dspace.utils.DSpace;
|
||||
import org.orcid.jaxb.model.common_v2.OrcidId;
|
||||
@@ -21,8 +21,6 @@ import org.orcid.jaxb.model.search_v2.Result;
|
||||
import org.orcid.jaxb.model.search_v2.Search;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author Antoine Snyers (antoine at atmire.com)
|
||||
* @author Kevin Van de Velde (kevin at atmire dot com)
|
||||
@@ -34,7 +32,7 @@ public class XMLtoBio extends Converter {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(XMLtoBio.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(XMLtoBio.class);
|
||||
|
||||
@Override
|
||||
public List<Person> convert(InputStream xml) {
|
||||
|
@@ -15,7 +15,7 @@ import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @author Antoine Snyers (antoine at atmire.com)
|
||||
@@ -28,7 +28,7 @@ public class RESTConnector {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(RESTConnector.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(RESTConnector.class);
|
||||
|
||||
private String url;
|
||||
|
||||
|
@@ -7,8 +7,8 @@
|
||||
*/
|
||||
package org.dspace.authority.util;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @author Antoine Snyers (antoine at atmire.com)
|
||||
@@ -21,7 +21,7 @@ public class EnumUtils {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(EnumUtils.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(EnumUtils.class);
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
|
@@ -17,7 +17,7 @@ import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.xpath.XPathExpressionException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.xpath.XPathAPI;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
@@ -36,7 +36,7 @@ public class XMLUtils {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(XMLUtils.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(XMLUtils.class);
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
|
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.dspace.authorize.service.AuthorizeService;
|
||||
import org.dspace.authorize.service.ResourcePolicyService;
|
||||
import org.dspace.content.Bitstream;
|
||||
|
@@ -23,7 +23,7 @@ import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
import org.apache.commons.lang.ObjectUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.ReloadableEntity;
|
||||
|
@@ -15,8 +15,8 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.ObjectUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authorize.dao.ResourcePolicyDAO;
|
||||
import org.dspace.authorize.service.ResourcePolicyService;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
@@ -38,7 +38,7 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(ResourcePolicyServiceImpl.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(ResourcePolicyServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected ContentServiceFactory contentServiceFactory;
|
||||
|
@@ -12,7 +12,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.Community;
|
||||
import org.dspace.content.Item;
|
||||
@@ -34,7 +34,7 @@ public class BrowseEngine {
|
||||
/**
|
||||
* the logger for this class
|
||||
*/
|
||||
private static final Logger log = Logger.getLogger(BrowseEngine.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(BrowseEngine.class);
|
||||
|
||||
/**
|
||||
* the browse scope which is the basis for our browse
|
||||
|
@@ -11,7 +11,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.Community;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
@@ -36,7 +36,7 @@ public class ItemCountDAOSolr implements ItemCountDAO {
|
||||
/**
|
||||
* Log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(ItemCountDAOSolr.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(ItemCountDAOSolr.class);
|
||||
|
||||
/**
|
||||
* DSpace context
|
||||
|
@@ -9,7 +9,7 @@ package org.dspace.browse;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.Community;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
@@ -37,7 +37,7 @@ public class ItemCounter {
|
||||
/**
|
||||
* Log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(ItemCounter.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(ItemCounter.class);
|
||||
|
||||
/**
|
||||
* DAO to use to store and retrieve data
|
||||
|
@@ -12,7 +12,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
import org.dspace.services.factory.DSpaceServicesFactory;
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import java.util.Locale;
|
||||
import com.ibm.icu.text.CollationElementIterator;
|
||||
import com.ibm.icu.text.Collator;
|
||||
import com.ibm.icu.text.RuleBasedCollator;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.dspace.text.filter.TextFilter;
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.dspace.text.filter.TextFilter;
|
||||
* @author Graham Triggs
|
||||
*/
|
||||
public class LocaleOrderingFilter implements TextFilter {
|
||||
private static Logger log = Logger.getLogger(LocaleOrderingFilter.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(LocaleOrderingFilter.class);
|
||||
|
||||
/**
|
||||
* Uses a Locale dependent Collator to generate a sort string
|
||||
|
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authorize.factory.AuthorizeServiceFactory;
|
||||
import org.dspace.authorize.service.AuthorizeService;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
@@ -68,7 +68,7 @@ public class SolrBrowseDAO implements BrowseDAO {
|
||||
/**
|
||||
* Log4j log
|
||||
*/
|
||||
private static final Logger log = Logger.getLogger(SolrBrowseDAO.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(SolrBrowseDAO.class);
|
||||
|
||||
/**
|
||||
* The DSpace context
|
||||
|
@@ -13,7 +13,7 @@ import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.checker.factory.CheckerServiceFactory;
|
||||
import org.dspace.checker.service.ChecksumHistoryService;
|
||||
import org.dspace.checker.service.ChecksumResultService;
|
||||
@@ -42,7 +42,7 @@ public final class CheckerCommand {
|
||||
/**
|
||||
* Usual Log4J logger.
|
||||
*/
|
||||
private static final Logger LOG = Logger.getLogger(CheckerCommand.class);
|
||||
private static final Logger LOG = org.apache.logging.log4j.LogManager.getLogger(CheckerCommand.class);
|
||||
|
||||
private Context context;
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
package org.dspace.checker;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.checker.factory.CheckerServiceFactory;
|
||||
import org.dspace.checker.service.ChecksumHistoryService;
|
||||
import org.dspace.content.Bitstream;
|
||||
@@ -26,7 +26,7 @@ public class CheckerConsumer implements Consumer {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(CheckerConsumer.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(CheckerConsumer.class);
|
||||
|
||||
protected ChecksumHistoryService checksumHistoryService = CheckerServiceFactory.getInstance()
|
||||
.getChecksumHistoryService();
|
||||
|
@@ -21,7 +21,7 @@ import org.apache.commons.cli.HelpFormatter;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.ParseException;
|
||||
import org.apache.commons.cli.PosixParser;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.checker.factory.CheckerServiceFactory;
|
||||
import org.dspace.checker.service.SimpleReporterService;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
@@ -43,7 +43,7 @@ public class DailyReportEmailer {
|
||||
/**
|
||||
* log4j logger.
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(DailyReportEmailer.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(DailyReportEmailer.class);
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
|
@@ -12,7 +12,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Bitstream;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.content.factory.ContentServiceFactory;
|
||||
@@ -35,7 +35,7 @@ public class HandleDispatcher implements BitstreamDispatcher {
|
||||
/**
|
||||
* Log 4j logger.
|
||||
*/
|
||||
private static final Logger LOG = Logger.getLogger(HandleDispatcher.class);
|
||||
private static final Logger LOG = org.apache.logging.log4j.LogManager.getLogger(HandleDispatcher.class);
|
||||
|
||||
protected Context context;
|
||||
|
||||
|
@@ -19,8 +19,8 @@ import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
import org.apache.commons.lang.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.dspace.content.Bitstream;
|
||||
|
||||
/**
|
||||
|
@@ -11,7 +11,7 @@ import java.sql.SQLException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.checker.dao.MostRecentChecksumDAO;
|
||||
import org.dspace.checker.service.ChecksumResultService;
|
||||
import org.dspace.checker.service.MostRecentChecksumService;
|
||||
@@ -28,7 +28,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
* @author kevinvandevelde at atmire.com
|
||||
*/
|
||||
public class MostRecentChecksumServiceImpl implements MostRecentChecksumService {
|
||||
private static final Logger log = Logger.getLogger(MostRecentChecksumServiceImpl.class);
|
||||
private static final Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(MostRecentChecksumServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected MostRecentChecksumDAO mostRecentChecksumDAO;
|
||||
|
@@ -12,7 +12,7 @@ import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Bitstream;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.I18nUtil;
|
||||
@@ -30,7 +30,7 @@ public class ResultsLogger implements ChecksumResultsCollector {
|
||||
/**
|
||||
* Usual Log4J logger.
|
||||
*/
|
||||
private static final Logger LOG = Logger.getLogger(ResultsLogger.class);
|
||||
private static final Logger LOG = org.apache.logging.log4j.LogManager.getLogger(ResultsLogger.class);
|
||||
|
||||
/**
|
||||
* Utility date format.
|
||||
|
@@ -19,7 +19,7 @@ import java.util.Properties;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.checker.factory.CheckerServiceFactory;
|
||||
import org.dspace.checker.service.ChecksumHistoryService;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
@@ -40,7 +40,7 @@ public final class ResultsPruner {
|
||||
/**
|
||||
* Default logger.
|
||||
*/
|
||||
private static final Logger LOG = Logger.getLogger(ResultsPruner.class);
|
||||
private static final Logger LOG = org.apache.logging.log4j.LogManager.getLogger(ResultsPruner.class);
|
||||
|
||||
/**
|
||||
* Factory method for the default results pruner configuration using
|
||||
|
@@ -12,7 +12,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.authorize.service.AuthorizeService;
|
||||
import org.dspace.content.dao.BitstreamFormatDAO;
|
||||
@@ -33,7 +33,7 @@ public class BitstreamFormatServiceImpl implements BitstreamFormatService {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(BitstreamFormat.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(BitstreamFormat.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected BitstreamFormatDAO bitstreamFormatDAO;
|
||||
|
@@ -15,8 +15,8 @@ import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.authorize.service.AuthorizeService;
|
||||
import org.dspace.content.dao.BitstreamDAO;
|
||||
@@ -43,7 +43,7 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(BitstreamServiceImpl.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(BitstreamServiceImpl.class);
|
||||
|
||||
|
||||
@Autowired(required = true)
|
||||
@@ -103,6 +103,8 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
|
||||
clonedBitstream.setSizeBytes(bitstream.getSizeBytes());
|
||||
clonedBitstream.setChecksum(bitstream.getChecksum());
|
||||
clonedBitstream.setChecksumAlgorithm(bitstream.getChecksumAlgorithm());
|
||||
clonedBitstream.setFormat(bitstream.getBitstreamFormat());
|
||||
|
||||
try {
|
||||
//Update our bitstream but turn off the authorization system since permissions
|
||||
//haven't been set at this point in time.
|
||||
|
@@ -16,8 +16,8 @@ import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeConfiguration;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.authorize.ResourcePolicy;
|
||||
@@ -45,7 +45,7 @@ public class BundleServiceImpl extends DSpaceObjectServiceImpl<Bundle> implement
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(Bundle.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(Bundle.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected BundleDAO bundleDAO;
|
||||
|
@@ -20,8 +20,8 @@ import java.util.MissingResourceException;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.AuthorizeUtil;
|
||||
import org.dspace.authorize.AuthorizeConfiguration;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
@@ -61,7 +61,7 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static final Logger log = Logger.getLogger(CollectionServiceImpl.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(CollectionServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected CollectionDAO collectionDAO;
|
||||
|
@@ -23,8 +23,8 @@ import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.comparator.NameAscendingComparator;
|
||||
import org.dspace.content.factory.ContentServiceFactory;
|
||||
import org.dspace.content.service.CommunityService;
|
||||
@@ -52,7 +52,7 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static final Logger log = Logger.getLogger(Community.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(Community.class);
|
||||
|
||||
@Column(name = "community_id", insertable = false, updatable = false)
|
||||
private Integer legacyId;
|
||||
|
@@ -17,8 +17,8 @@ import java.util.MissingResourceException;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.AuthorizeUtil;
|
||||
import org.dspace.authorize.AuthorizeConfiguration;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
@@ -51,7 +51,7 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(CommunityServiceImpl.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(CommunityServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected CommunityDAO communityDAO;
|
||||
|
@@ -18,7 +18,7 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
// FIXME: Not very robust - assumes dates will always be valid
|
||||
|
||||
@@ -45,7 +45,7 @@ public class DCDate {
|
||||
/**
|
||||
* Logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(DCDate.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(DCDate.class);
|
||||
|
||||
// UTC timezone
|
||||
private static final TimeZone utcZone = TimeZone.getTimeZone("UTC");
|
||||
|
@@ -17,9 +17,9 @@ import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.authority.Choices;
|
||||
import org.dspace.content.authority.service.ChoiceAuthorityService;
|
||||
@@ -48,7 +48,7 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static final Logger log = Logger.getLogger(DSpaceObjectServiceImpl.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(DSpaceObjectServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected ChoiceAuthorityService choiceAuthorityService;
|
||||
|
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.dspace.content.factory.ContentServiceFactory;
|
||||
import org.dspace.content.service.ItemService;
|
||||
import org.dspace.sort.OrderFormat;
|
||||
|
@@ -20,8 +20,8 @@ import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.AuthorizeUtil;
|
||||
import org.dspace.authorize.AuthorizeConfiguration;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
@@ -68,7 +68,7 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static final Logger log = Logger.getLogger(Item.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(Item.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected ItemDAO itemDAO;
|
||||
|
@@ -12,7 +12,7 @@ import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.authorize.service.AuthorizeService;
|
||||
import org.dspace.content.dao.MetadataFieldDAO;
|
||||
@@ -33,7 +33,7 @@ public class MetadataFieldServiceImpl implements MetadataFieldService {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(MetadataFieldServiceImpl.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(MetadataFieldServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected MetadataFieldDAO metadataFieldDAO;
|
||||
|
@@ -10,7 +10,7 @@ package org.dspace.content;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.authorize.service.AuthorizeService;
|
||||
import org.dspace.content.dao.MetadataSchemaDAO;
|
||||
@@ -31,7 +31,7 @@ public class MetadataSchemaServiceImpl implements MetadataSchemaService {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(MetadataSchemaServiceImpl.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(MetadataSchemaServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected AuthorizeService authorizeService;
|
||||
|
@@ -12,7 +12,7 @@ import java.sql.SQLException;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.authorize.service.AuthorizeService;
|
||||
import org.dspace.content.dao.MetadataValueDAO;
|
||||
@@ -33,7 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
*/
|
||||
public class MetadataValueServiceImpl implements MetadataValueService {
|
||||
|
||||
private static final Logger log = Logger.getLogger(MetadataValueServiceImpl.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(MetadataValueServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected AuthorizeService authorizeService;
|
||||
|
@@ -25,7 +25,7 @@ import javax.persistence.OneToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.ReloadableEntity;
|
||||
import org.dspace.eperson.EPerson;
|
||||
|
@@ -13,7 +13,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.DCInputsReaderException;
|
||||
import org.dspace.app.util.Util;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
@@ -40,7 +40,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
*/
|
||||
public class WorkspaceItemServiceImpl implements WorkspaceItemService {
|
||||
|
||||
private static final Logger log = Logger.getLogger(WorkspaceItemServiceImpl.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(WorkspaceItemServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected WorkspaceItemDAO workspaceItemDAO;
|
||||
|
@@ -14,7 +14,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.DCInput;
|
||||
import org.dspace.app.util.DCInputSet;
|
||||
import org.dspace.app.util.DCInputsReader;
|
||||
@@ -49,7 +49,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
* @see ChoiceAuthority
|
||||
*/
|
||||
public final class ChoiceAuthorityServiceImpl implements ChoiceAuthorityService {
|
||||
private Logger log = Logger.getLogger(ChoiceAuthorityServiceImpl.class);
|
||||
private Logger log = org.apache.logging.log4j.LogManager.getLogger(ChoiceAuthorityServiceImpl.class);
|
||||
|
||||
// map of field key to authority plugin
|
||||
protected Map<String, ChoiceAuthority> controller = new HashMap<String, ChoiceAuthority>();
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
package org.dspace.content.authority;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
/**
|
||||
* Record class to hold a set of Choices returned by an authority in response
|
||||
|
@@ -12,8 +12,8 @@ import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.DCInputsReader;
|
||||
import org.dspace.app.util.DCInputsReaderException;
|
||||
import org.dspace.content.Collection;
|
||||
@@ -42,7 +42,7 @@ import org.dspace.core.SelfNamedPlugin;
|
||||
* fields.
|
||||
*/
|
||||
public class DCInputAuthority extends SelfNamedPlugin implements ChoiceAuthority {
|
||||
private static Logger log = Logger.getLogger(DCInputAuthority.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(DCInputAuthority.class);
|
||||
|
||||
private String values[] = null;
|
||||
private String labels[] = null;
|
||||
|
@@ -16,9 +16,9 @@ import javax.xml.xpath.XPathConstants;
|
||||
import javax.xml.xpath.XPathExpressionException;
|
||||
import javax.xml.xpath.XPathFactory;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.core.SelfNamedPlugin;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
@@ -56,7 +56,7 @@ import org.xml.sax.InputSource;
|
||||
|
||||
public class DSpaceControlledVocabulary extends SelfNamedPlugin implements ChoiceAuthority {
|
||||
|
||||
private static Logger log = Logger.getLogger(DSpaceControlledVocabulary.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(DSpaceControlledVocabulary.class);
|
||||
protected static String xpathTemplate = "//node[contains(translate(@label,'ABCDEFGHIJKLMNOPQRSTUVWXYZ'," +
|
||||
"'abcdefghijklmnopqrstuvwxyz'),'%s')]";
|
||||
protected static String idTemplate = "//node[@id = '%s']";
|
||||
|
@@ -13,8 +13,8 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.DCInputsReader;
|
||||
import org.dspace.app.util.DCInputsReaderException;
|
||||
import org.dspace.content.Collection;
|
||||
@@ -32,7 +32,8 @@ import org.dspace.content.Collection;
|
||||
*/
|
||||
public class InputFormSelfRegisterWrapperAuthority implements ChoiceAuthority {
|
||||
|
||||
private static Logger log = Logger.getLogger(InputFormSelfRegisterWrapperAuthority.class);
|
||||
private static Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(InputFormSelfRegisterWrapperAuthority.class);
|
||||
|
||||
private Map<String, ChoiceAuthority> delegates = new HashMap<String, ChoiceAuthority>();
|
||||
|
||||
|
@@ -22,7 +22,7 @@ import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.DCPersonName;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
@@ -57,7 +57,7 @@ import org.xml.sax.helpers.DefaultHandler;
|
||||
* @version $Revision $
|
||||
*/
|
||||
public class LCNameAuthority implements ChoiceAuthority {
|
||||
private static final Logger log = Logger.getLogger(LCNameAuthority.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(LCNameAuthority.class);
|
||||
|
||||
// get these from configuration
|
||||
protected static String url = null;
|
||||
|
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.DCInput;
|
||||
import org.dspace.app.util.DCInputSet;
|
||||
import org.dspace.app.util.DCInputsReader;
|
||||
@@ -57,7 +57,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
* @see Choices
|
||||
*/
|
||||
public class MetadataAuthorityServiceImpl implements MetadataAuthorityService {
|
||||
private static Logger log = Logger.getLogger(MetadataAuthorityServiceImpl.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(MetadataAuthorityServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected MetadataFieldService metadataFieldService;
|
||||
|
@@ -19,7 +19,7 @@ import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.utils.URLEncodedUtils;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.xml.sax.Attributes;
|
||||
@@ -50,7 +50,7 @@ import org.xml.sax.helpers.DefaultHandler;
|
||||
* @see SHERPARoMEOJournalTitle
|
||||
*/
|
||||
public abstract class SHERPARoMEOProtocol implements ChoiceAuthority {
|
||||
private static final Logger log = Logger.getLogger(SHERPARoMEOProtocol.class);
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(SHERPARoMEOProtocol.class);
|
||||
|
||||
// contact URL from configuration
|
||||
private static String url = null;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user