Commit 6a1e217f authored by Maxym Borodenko's avatar Maxym Borodenko
Browse files

Logging fixed

parent a9a7f62f
......@@ -86,7 +86,7 @@ public class AsAdminAspect {
LOG.warn("Temporary SYS_ADMIN account is being used.");
return new PreAuthenticatedAuthenticationToken("SYS_ADMIN", null, Arrays.asList(new SimpleGrantedAuthority(UserRole.ADMINISTRATOR.getAuthority())));
} else {
LOG.warn("Got SYS_ADMIN account: {} with roles=", sysUser, sysUser.getAuthorities());
LOG.warn("Got SYS_ADMIN account: {} with roles={}", sysUser, sysUser.getAuthorities());
SYS_ADMIN = new PreAuthenticatedAuthenticationToken(sysUser, null, sysUser.getAuthorities());
}
}
......
......@@ -85,7 +85,7 @@ public class CreateContentListener extends RunAsAdminListener {
final Resource[] rs = rpr.getResources(resourcePath);
for (final Resource r : rs) {
final String slug = r.getFilename().substring(0, r.getFilename().lastIndexOf(".json"));
LOG.info("Using " + r.getFilename() + " for article slug=" + slug);
LOG.info("Using {} for article slug={}", r.getFilename(), slug);
final ObjectMapper mapper = new ObjectMapper();
try (InputStream stream = r.getInputStream()) {
......@@ -103,14 +103,14 @@ public class CreateContentListener extends RunAsAdminListener {
if (article == null) {
try {
contentService.createGlobalArticle(slug, locale, entry.getValue().get("title").asText(), entry.getValue().get("body").asText(), null, false);
LOG.info("Created article for slug: " + slug + " lang=" + locale.getLanguage());
LOG.info("Created article for slug: {} lang={}", slug, locale.getLanguage());
} catch (CRMException e) {
LOG.warn("Failed to create global article slug=" + slug + ".", e);
LOG.warn("Failed to create global article slug={}.", slug, e);
}
}
}
} catch (JsonParseException e) {
LOG.error("Could not create global article " + slug + " from " + r.getFilename() + ". JSON is not valid.");
LOG.error("Could not create global article {} from {}. JSON is not valid.", slug, r.getFilename());
}
}
}
......
......@@ -177,7 +177,7 @@ public class FirstRunListener extends RunAsAdminListener {
final Resource[] rs = rpr.getResources(resourcePath);
for (final Resource r : rs) {
final String instCode = r.getFilename().substring(0, r.getFilename().lastIndexOf(".json"));
LOG.info("Using " + r.getFilename() + " for instCode=" + instCode);
LOG.info("Using {} for instCode={}", r.getFilename(), instCode);
final ObjectMapper mapper = new ObjectMapper();
try (InputStream stream = r.getInputStream()) {
......@@ -193,21 +193,21 @@ public class FirstRunListener extends RunAsAdminListener {
try {
batch.put(AccessionHeaderJson.fromJson(node), (ObjectNode) node);
} catch (InvalidDOIException e) {
LOG.warn("Invalid DOI found in accession dummy data: " + r.getFilename(), e);
LOG.warn("Invalid DOI found in accession dummy data: {}", r.getFilename(), e);
}
});
if (batch.size() > 0) {
LOG.warn("Upserting " + batch.size() + " accession records for " + instCode);
LOG.warn("Upserting {} accession records for {}", batch.size(), instCode);
batchService.ensureTaxonomies(institute, batch);
batchService.upsertAccessionData(institute, batch);
genesysService.updateAccessionCount(institute);
}
} catch (JsonParseException e) {
LOG.error("Could not read dummy data for " + instCode + " from " + r.getFilename() + ". JSON is not valid.", e);
LOG.error("Could not read dummy data for {} from {}. JSON is not valid.", instCode, r.getFilename(), e);
} catch (Exception e) {
LOG.error("Could not create dummy data. " + e.getMessage());
LOG.error("Could not create dummy data. {}", e.getMessage());
}
}
}
......
......@@ -9,7 +9,6 @@ import java.util.Set;
import java.util.UUID;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.genesys2.server.model.genesys.AccessionAlias;
import org.genesys2.server.model.genesys.AccessionAlias.AliasType;
import org.genesys2.server.model.genesys.AccessionBreeding;
......@@ -24,6 +23,8 @@ import org.genesys2.server.model.impl.Crop;
import org.genesys2.server.model.impl.Organization;
import org.genesys2.server.service.IndexAliasConstants;
import org.genesys2.util.MCPDUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Version;
import org.springframework.data.elasticsearch.annotations.Document;
......@@ -36,7 +37,7 @@ import org.springframework.data.elasticsearch.annotations.FieldType;
*/
@Document(indexName = IndexAliasConstants.INDEX_PASSPORT, type = IndexAliasConstants.PASSPORT_TYPE, refreshInterval = "60s")
public class AccessionDetails {
private static final Logger LOG = Logger.getLogger(AccessionDetails.class);
private static final Logger LOG = LoggerFactory.getLogger(AccessionDetails.class);
@Version
private Long version;
......@@ -149,7 +150,7 @@ public class AccessionDetails {
ad.acceUrl = accession.getAcceUrl();
if (ad.taxonomy == null) {
LOG.warn("Go check " + ad.id);
LOG.warn("Go check {}", ad.id);
}
return ad;
......
......@@ -7,9 +7,10 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.log4j.Logger;
import org.genesys2.server.model.genesys.ExperimentTrait;
import org.genesys2.server.model.genesys.Method;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Version;
import org.springframework.data.elasticsearch.annotations.Document;
......@@ -20,7 +21,7 @@ import org.springframework.data.elasticsearch.annotations.Parent;
@Document(indexName = "genesys", type = "trait", refreshInterval = "-1")
public class AccessionEsTrait {
private static final Logger LOG = Logger.getLogger(AccessionDetails.class);
private static final Logger LOG = LoggerFactory.getLogger(AccessionEsTrait.class);
@Id
private Long id;
......@@ -81,7 +82,7 @@ public class AccessionEsTrait {
else if (value instanceof BigDecimal)
t.dval.add(((BigDecimal) value).doubleValue());
else
LOG.warn("Unsupported value type " + value.getClass());
LOG.warn("Unsupported value type {}", value.getClass());
}
return t;
......
......@@ -5,11 +5,11 @@ import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SelfCopy {
private static Log LOG = LogFactory.getLog(SelfCopy.class);
private static final Logger LOG = LoggerFactory.getLogger(SelfCopy.class);
private static Map<Method, Method> gettersSetters = new HashMap<Method, Method>();
static {
......@@ -28,14 +28,14 @@ public class SelfCopy {
if (isGet) {
if (LOG.isTraceEnabled()) {
LOG.trace("Finding setter for getter " + getter);
LOG.trace("Finding setter for getter {}", getter);
}
try {
Method setter = AccessionData.class.getMethod("set" + name, getter.getReturnType());
gettersSetters.put(getter, setter);
LOG.debug("Found setter " + setter);
LOG.debug("Found setter {}", setter);
} catch (NoSuchMethodException | SecurityException e) {
LOG.warn("No setter for " + name);
LOG.warn("No setter for {}", name);
}
}
}
......
......@@ -44,11 +44,11 @@ import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.genesys.blocks.security.model.AclAwareModel;
import org.genesys2.server.model.GlobalVersionedAuditedModel;
import org.hibernate.annotations.Type;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Cacheable
@Entity
......@@ -57,7 +57,8 @@ public class Crop extends GlobalVersionedAuditedModel implements AclAwareModel {
private static final long serialVersionUID = -2686341831839109257L;
public static final Log LOG = LogFactory.getLog(Crop.class);
public static final Logger LOG = LoggerFactory.getLogger(Crop.class);
/**
* Crop short name used as short name in URLs
......
......@@ -22,20 +22,20 @@ import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.genesys2.server.model.genesys.Method;
import org.genesys2.server.model.impl.AccessionList;
import org.genesys2.server.service.impl.DirectMysqlQuery;
import org.genesys2.server.service.impl.DirectMysqlQuery.MethodResolver;
import org.genesys2.server.service.impl.FilterHandler.AppliedFilters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Repository;
@Repository
public class AccessionListRepositoryCustomImpl implements AccessionListCustomRepository {
public static final Log LOG = LogFactory.getLog(AccessionListRepositoryCustomImpl.class);
public static final Logger LOG = LoggerFactory.getLogger(AccessionListRepositoryCustomImpl.class);
@PersistenceContext
private EntityManager entityManager;
......@@ -70,7 +70,7 @@ public class AccessionListRepositoryCustomImpl implements AccessionListCustomRep
q.setParameter(1, list.getId());
if (LOG.isDebugEnabled())
LOG.debug("Updating list: " + list.getUuid() + " id=" + list.getId());
LOG.debug("Updating list: {} id={}", list.getUuid(), list.getId());
int param = 2;
for (Object pv : directQuery.getParameters()) {
......
......@@ -96,7 +96,7 @@ public class AccessionRepositoryCustomImpl implements AccessionCustomRepository,
List<Accession> res = em.createQuery(cq).getResultList();
if (LOG.isDebugEnabled())
LOG.debug("*** Loaded accessions " + res.size() + " of " + acceNumbs.size());
LOG.debug("*** Loaded accessions {} of {}", res.size(), acceNumbs.size());
// Check for duplicate names if institute is using unique acceNumbs
if (uniqueAcceNumbs) {
......
......@@ -23,12 +23,12 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.genesys2.server.model.genesys.Method;
import org.genesys2.server.service.impl.DirectMysqlQuery;
import org.genesys2.server.service.impl.DirectMysqlQuery.MethodResolver;
import org.genesys2.server.service.impl.FilterHandler.AppliedFilters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Sort;
......@@ -45,7 +45,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
public class GenesysLowlevelRepositoryCustomImpl implements GenesysLowlevelRepository {
public static final Log LOG = LogFactory.getLog(GenesysLowlevelRepositoryCustomImpl.class);
public static final Logger LOG = LoggerFactory.getLogger(GenesysLowlevelRepositoryCustomImpl.class);
@Autowired
private JdbcTemplate jdbcTemplate;
......@@ -59,12 +59,12 @@ public class GenesysLowlevelRepositoryCustomImpl implements GenesysLowlevelRepos
public void updateFaoInstituteRefs() {
LOG.info("Updating institute references");
int count = this.jdbcTemplate.update("UPDATE `accession` A inner join `faoinstitute` FI on FI.code=A.instCode set A.instituteId=FI.id;");
LOG.info("Institute references updated: " + count);
LOG.info("Institute references updated: {}", count);
LOG.info("Updating institute accession count");
count = this.jdbcTemplate
.update("UPDATE faoinstitute FI inner join (select instituteId, count(*) X from accession group by instituteId) A on A.instituteId=FI.id set FI.accessionCount=A.X;");
LOG.info("Institute accession counts updated: " + count);
LOG.info("Institute accession counts updated: {}", count);
}
// @Override
......@@ -88,7 +88,7 @@ public class GenesysLowlevelRepositoryCustomImpl implements GenesysLowlevelRepos
LOG.info("Updating country references");
final int count = this.jdbcTemplate
.update("UPDATE `accession` A inner join `country` C on C.code3=A.orgCty set A.orgCtyId=C.id WHERE A.orgCty IS NOT NULL;");
LOG.info("Country references updated: " + count);
LOG.info("Country references updated: {}", count);
}
@Override
......@@ -97,19 +97,19 @@ public class GenesysLowlevelRepositoryCustomImpl implements GenesysLowlevelRepos
public void updateFaoInstituteCountries() {
LOG.info("Updating country references");
final int count = this.jdbcTemplate.update("UPDATE `faoinstitute` I inner join `country` C on C.code3=left(I.code, 3) set I.countryId=C.id;");
LOG.info("Country references updated: " + count);
LOG.info("Country references updated: {}", count);
}
@Override
public void ensureMethodTable(final Method method) {
LOG.info("Ensuring method table for " + method);
LOG.info("Ensuring method table for {}", method);
try {
LOG.info("Checking for table with name " + method.getId().toString());
LOG.info("Checking for table with name {}", method.getId().toString());
final DatabaseMetaData databaseMetadata = this.jdbcTemplate.getDataSource().getConnection().getMetaData();
final ResultSet matchingTables = databaseMetadata.getTables(null, null, method.getId().toString(), new String[] { "TABLE" });
if (matchingTables.next()) {
LOG.info("Found existing table: " + matchingTables.getObject(3));
LOG.info("Found existing table: {}", matchingTables.getObject(3));
throw new RuntimeException("Method data table already exists!");
} else {
/*
......@@ -145,12 +145,12 @@ public class GenesysLowlevelRepositoryCustomImpl implements GenesysLowlevelRepos
// createTableSql.append(", KEY `").append(method.getFieldName()).append("` (`").append(method.getFieldName()).append("`)");
createTableSql.append(") ENGINE=InnoDB DEFAULT CHARSET=utf8;");
LOG.warn("Creating method table: " + createTableSql.toString());
LOG.warn("Creating method table: {}", createTableSql.toString());
this.jdbcTemplate.execute(createTableSql.toString());
}
LOG.info("Done");
} catch (final SQLException e) {
LOG.error(e);
LOG.error("Error", e);
}
}
......@@ -173,7 +173,7 @@ public class GenesysLowlevelRepositoryCustomImpl implements GenesysLowlevelRepos
final List<Long> methodIds = this.jdbcTemplate.queryForList("select id from method", Long.class);
for (final long methodId : methodIds) {
LOG.info("Updating metadatamethod for methodId=" + methodId);
LOG.info("Updating metadatamethod for methodId={}", methodId);
// // Delete stuff without Metadata
// int deleted = jdbcTemplate.update("delete from `" + methodId +
......@@ -190,12 +190,12 @@ public class GenesysLowlevelRepositoryCustomImpl implements GenesysLowlevelRepos
final int inserted = this.jdbcTemplate.update("insert into metadatamethod (metadataId, methodId) (select distinct metadataId, " + methodId
+ " from `" + methodId + "`)");
if (inserted == 0) {
LOG.warn("Method " + methodId + " has no entries?");
LOG.warn("Method {} has no entries?", methodId);
} else {
LOG.warn("Inserted " + inserted + " method references for metadata for methodId=" + methodId);
LOG.warn("Inserted {} method references for metadata for methodId={}", inserted, methodId);
}
} catch (final BadSqlGrammarException e) {
LOG.warn(e);
LOG.warn("BadSqlGrammarException", e);
}
try {
......@@ -203,12 +203,12 @@ public class GenesysLowlevelRepositoryCustomImpl implements GenesysLowlevelRepos
.update("insert into accessiontrait (metadataId , accessionId, methodId) (select distinct metadataId, accessionId, " + methodId
+ " from `" + methodId + "`)");
if (inserted2 == 0) {
LOG.warn("Method " + methodId + " has no entries?");
LOG.warn("Method {} has no entries?", methodId);
} else {
LOG.warn("Inserted " + inserted2 + " accession references methodId=" + methodId);
LOG.warn("Inserted {} accession references methodId={}", inserted2, methodId);
}
} catch (final BadSqlGrammarException e) {
LOG.warn(e);
LOG.warn("BadSqlGrammarException", e);
}
}
}
......
......@@ -30,8 +30,6 @@ import java.util.Set;
import javax.sql.DataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.genesys2.server.model.genesys.AccessionData;
import org.genesys2.server.model.genesys.AccessionId;
import org.genesys2.server.model.genesys.AccessionTrait;
......@@ -39,6 +37,8 @@ import org.genesys2.server.model.genesys.ExperimentAccessionTrait;
import org.genesys2.server.model.genesys.ExperimentTrait;
import org.genesys2.server.model.genesys.Metadata;
import org.genesys2.server.model.genesys.Method;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
import org.springframework.jdbc.core.JdbcTemplate;
......@@ -53,7 +53,7 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@Transactional(readOnly = true)
public class TraitValueRepositoryImpl implements TraitValueRepository {
public static final Log LOG = LogFactory.getLog(TraitValueRepository.class);
public static final Logger LOG = LoggerFactory.getLogger(TraitValueRepository.class);
private JdbcTemplate jdbcTemplate;
private NamedParameterJdbcTemplate namedJdbcTemplate;
......@@ -153,7 +153,7 @@ public class TraitValueRepositoryImpl implements TraitValueRepository {
}
if (LOG.isDebugEnabled()) {
LOG.debug("Done! " + methodValues);
LOG.debug("Done! {}", methodValues);
}
return methodValues;
}
......@@ -179,7 +179,7 @@ public class TraitValueRepositoryImpl implements TraitValueRepository {
for (final Method method : methods) {
final long methodId = method.getId();
LOG.debug("MethodID=" + methodId);
LOG.debug("MethodID={}", methodId);
this.namedJdbcTemplate.query("select accessionId, `" + method.getFieldName() + "` as traitvalue from `" + method.getId()
+ "` where metadataId = :metadataId and accessionId in ( :accessionIds )", paramMap, new RowCallbackHandler() {
......@@ -211,7 +211,7 @@ public class TraitValueRepositoryImpl implements TraitValueRepository {
@Transactional
private void delete(final Metadata metadata, final AccessionId accession, Method method) {
LOG.info("Deleting trait values in methodId=" + method.getId() + " for metadataId=" + metadata.getId() + " and accnId=" + accession.getId());
LOG.info("Deleting trait values in methodId={} for metadataId={} and accnId={}", method.getId(), metadata.getId(), accession.getId());
this.jdbcTemplate.update(String.format("DELETE FROM `%s` WHERE accessionId=? AND metadataId=?", method.getId()), new PreparedStatementSetter() {
@Override
public void setValues(PreparedStatement pst) throws SQLException {
......@@ -230,7 +230,7 @@ public class TraitValueRepositoryImpl implements TraitValueRepository {
final List<Object> values = new ArrayList<Object>(accessionValues.size());
for (final Object v : accessionValues) {
if (v != null) {
LOG.debug("Adding value " + v);
LOG.debug("Adding value {}", v);
values.add(v);
} else {
LOG.debug("Skipping value null");
......@@ -250,8 +250,7 @@ public class TraitValueRepositoryImpl implements TraitValueRepository {
pst.setLong(1, accessionId);
pst.setLong(2, metadataId);
pst.setObject(3, values.get(idx));
LOG.info("Inserting trait value in methodId=" + method.getId() + " for metadataId=" + metadataId + " and accnId=" + accessionId
+ " val=" + values.get(idx));
LOG.info("Inserting trait value in methodId={} for metadataId={} and accnId={} val={}", method.getId(), metadataId, accessionId, values.get(idx));
}
@Override
......
......@@ -12,25 +12,25 @@ import javax.persistence.NoResultException;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.genesys2.server.model.dataset.DS;
import org.genesys2.server.model.dataset.DSDescriptor;
import org.genesys2.server.model.dataset.DSQualifier;
import org.genesys2.server.model.dataset.DSRow;
import org.genesys2.server.model.dataset.DSValue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;
@Repository
public class DSRowRepositoryCustomImpl implements DSRowCustomRepository {
public static final Log LOG = LogFactory.getLog(DSRowRepositoryCustomImpl.class);
public static final Logger LOG = LoggerFactory.getLogger(DSRowRepositoryCustomImpl.class);
@PersistenceContext
private EntityManager entityManager;
@Override
public DSRow findRow(DS ds, Object[] qualifiers) {
LOG.info("QUAL: " + Arrays.toString(qualifiers));
LOG.info("QUAL: {}", Arrays.toString(qualifiers));
StringBuilder where = new StringBuilder();
StringBuilder from = new StringBuilder();
......@@ -54,16 +54,16 @@ public class DSRowRepositoryCustomImpl implements DSRowCustomRepository {
where.append(" dsrq" + i + ".value = ?").append(paramIdx++).append(" and dsrq" + i + ".datasetQualifier = ?").append(paramIdx++);
}
LOG.info("select dsrq0.row from " + from + " where " + where.toString());
LOG.info("select dsrq0.row from {} where {}", from, where.toString());
Query q = entityManager.createQuery("select dsrq0.row from " + from + " where " + where.toString() + "");
// q.setParameter(1, ds);
paramIdx = OFFSET;
for (int j = 0; j < qualifiers.length; j++) {
q.setParameter(paramIdx++, qualifiers[j]);
LOG.info("?" + (paramIdx - 1) + ": " + qualifiers[j]);
LOG.info("?{}: {}", (paramIdx - 1), qualifiers[j]);
q.setParameter(paramIdx++, ds.getQualifiers().get(j));
LOG.info("?" + (paramIdx - 1) + ": " + ds.getQualifiers().get(j));
LOG.info("?{}: {}", (paramIdx - 1), ds.getQualifiers().get(j));
}
try {
......@@ -138,7 +138,7 @@ public class DSRowRepositoryCustomImpl implements DSRowCustomRepository {
where.append(" dsrq" + i + ".datasetQualifier = ?").append(paramIdx++);
}
LOG.info("select dsrq0.row from " + from + " where " + where.toString());
LOG.info("select dsrq0.row from {} where {}", from, where.toString());
Query q = entityManager.createQuery("select dsrq0.row.id " + select + " from " + from + " where " + where.toString() + "");
paramIdx = OFFSET;
......
......@@ -23,18 +23,18 @@ import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.genesys2.server.model.kpi.DimensionKey;
import org.genesys2.server.model.kpi.Execution;
import org.genesys2.server.model.kpi.ExecutionRun;
import org.genesys2.server.model.kpi.Observation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;
@Repository
public class ObservationRepositoryCustomImpl implements ObservationCustomRepository {
public static final Log LOG = LogFactory.getLog(ObservationRepositoryCustomImpl.class);
public static final Logger LOG = LoggerFactory.getLogger(ObservationRepositoryCustomImpl.class);
@PersistenceContext
private EntityManager entityManager;
......
......@@ -16,16 +16,16 @@
package org.genesys2.server.service.audit;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.genesys.blocks.security.SecurityContextUtil;
import org.genesys2.server.model.impl.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.AuditorAware;
import org.springframework.stereotype.Component;
@Component("auditorAware")
public class SpringSecurityAuditorAware implements AuditorAware<Long> {
public static final Log LOG = LogFactory.getLog(SpringSecurityAuditorAware.class);
public static final Logger LOG = LoggerFactory.getLogger(SpringSecurityAuditorAware.class);
@Override
public Long getCurrentAuditor() {
......
......@@ -23,7 +23,6 @@ import java.util.UUID;
import org.apache.commons.collections.ListUtils;
import org.apache.commons.lang.ArrayUtils;
import org.apache.log4j.Logger;
import org.genesys.blocks.security.SecurityContextUtil;
import org.genesys2.server.model.genesys.Accession;
import org.genesys2.server.model.genesys.AccessionData;
......@@ -33,6 +32,8 @@ import org.genesys2.server.persistence.domain.AccessionListRepository;
import org.genesys2.server.service.AccessionListService;
import org.genesys2.server.service.impl.FilterHandler.AppliedFilters;
import org.genesys2.server.service.worker.ElasticUpdater;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.security.access.prepost.PostFilter;
......@@ -43,7 +44,7 @@ import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional(readOnly = true)
public class AccessionListServiceImpl implements AccessionListService {