diff --git a/src/main/java/eu/dnetlib/repo/manager/config/AaiSecurityConfiguration.java b/src/main/java/eu/dnetlib/repo/manager/config/AaiSecurityConfiguration.java index 495ebcd..0a02ce5 100644 --- a/src/main/java/eu/dnetlib/repo/manager/config/AaiSecurityConfiguration.java +++ b/src/main/java/eu/dnetlib/repo/manager/config/AaiSecurityConfiguration.java @@ -15,7 +15,6 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; -import org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint; import org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter; import java.util.*; diff --git a/src/main/java/eu/dnetlib/repo/manager/controllers/BrokerController.java b/src/main/java/eu/dnetlib/repo/manager/controllers/BrokerController.java index 29392b8..187da9c 100644 --- a/src/main/java/eu/dnetlib/repo/manager/controllers/BrokerController.java +++ b/src/main/java/eu/dnetlib/repo/manager/controllers/BrokerController.java @@ -1,8 +1,8 @@ package eu.dnetlib.repo.manager.controllers; -import eu.dnetlib.repo.manager.exception.BrokerException; import eu.dnetlib.repo.manager.domain.Term; import eu.dnetlib.repo.manager.domain.broker.*; +import eu.dnetlib.repo.manager.exception.BrokerException; import eu.dnetlib.repo.manager.service.BrokerServiceImpl; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; diff --git a/src/main/java/eu/dnetlib/repo/manager/controllers/DashboardController.java b/src/main/java/eu/dnetlib/repo/manager/controllers/DashboardController.java index 6e4c4a5..4dca562 100644 --- a/src/main/java/eu/dnetlib/repo/manager/controllers/DashboardController.java +++ b/src/main/java/eu/dnetlib/repo/manager/controllers/DashboardController.java @@ -1,7 +1,10 @@ package eu.dnetlib.repo.manager.controllers; import eu.dnetlib.enabling.datasources.common.AggregationInfo; -import eu.dnetlib.repo.manager.domain.*; +import eu.dnetlib.repo.manager.domain.BrokerSummary; +import eu.dnetlib.repo.manager.domain.CollectionMonitorSummary; +import eu.dnetlib.repo.manager.domain.RepositorySummaryInfo; +import eu.dnetlib.repo.manager.domain.UsageSummary; import eu.dnetlib.repo.manager.exception.BrokerException; import eu.dnetlib.repo.manager.exception.RepositoryServiceException; import eu.dnetlib.repo.manager.service.BrokerService; diff --git a/src/main/java/eu/dnetlib/repo/manager/controllers/RepositoryController.java b/src/main/java/eu/dnetlib/repo/manager/controllers/RepositoryController.java index 8e4d0ee..9e4690e 100644 --- a/src/main/java/eu/dnetlib/repo/manager/controllers/RepositoryController.java +++ b/src/main/java/eu/dnetlib/repo/manager/controllers/RepositoryController.java @@ -1,8 +1,6 @@ package eu.dnetlib.repo.manager.controllers; import eu.dnetlib.enabling.datasources.common.AggregationInfo; -import eu.dnetlib.repo.manager.domain.Repository; -import eu.dnetlib.repo.manager.domain.RepositoryInterface; import eu.dnetlib.repo.manager.domain.*; import eu.dnetlib.repo.manager.domain.dto.RepositoryTerms; import eu.dnetlib.repo.manager.domain.dto.User; diff --git a/src/main/java/eu/dnetlib/repo/manager/controllers/UserRoleController.java b/src/main/java/eu/dnetlib/repo/manager/controllers/UserRoleController.java index eb8bfcf..d46b1a3 100644 --- a/src/main/java/eu/dnetlib/repo/manager/controllers/UserRoleController.java +++ b/src/main/java/eu/dnetlib/repo/manager/controllers/UserRoleController.java @@ -6,7 +6,6 @@ import eu.dnetlib.repo.manager.service.security.AuthoritiesUpdater; import eu.dnetlib.repo.manager.service.security.AuthorizationService; import eu.dnetlib.repo.manager.service.security.RoleMappingService; import eu.dnetlib.repo.manager.utils.JsonUtils; -import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; diff --git a/src/main/java/eu/dnetlib/repo/manager/controllers/ValidatorController.java b/src/main/java/eu/dnetlib/repo/manager/controllers/ValidatorController.java index 822edc9..17b2c12 100644 --- a/src/main/java/eu/dnetlib/repo/manager/controllers/ValidatorController.java +++ b/src/main/java/eu/dnetlib/repo/manager/controllers/ValidatorController.java @@ -5,8 +5,8 @@ import eu.dnetlib.domain.functionality.validator.JobForValidation; import eu.dnetlib.domain.functionality.validator.RuleSet; import eu.dnetlib.domain.functionality.validator.StoredJob; import eu.dnetlib.repo.manager.domain.InterfaceInformation; -import eu.dnetlib.repo.manager.exception.ValidationServiceException; import eu.dnetlib.repo.manager.exception.ResourceNotFoundException; +import eu.dnetlib.repo.manager.exception.ValidationServiceException; import eu.dnetlib.repo.manager.service.EmailUtils; import eu.dnetlib.repo.manager.service.ValidatorServiceImpl; import io.swagger.annotations.Api; diff --git a/src/main/java/eu/dnetlib/repo/manager/domain/DatasourceDetails.java b/src/main/java/eu/dnetlib/repo/manager/domain/DatasourceDetails.java index 1b0af30..aeaf232 100644 --- a/src/main/java/eu/dnetlib/repo/manager/domain/DatasourceDetails.java +++ b/src/main/java/eu/dnetlib/repo/manager/domain/DatasourceDetails.java @@ -1,8 +1,8 @@ package eu.dnetlib.repo.manager.domain; +import javax.persistence.Transient; import java.util.Date; import java.util.Set; -import javax.persistence.Transient; public class DatasourceDetails { diff --git a/src/main/java/eu/dnetlib/repo/manager/domain/DatasourcesCollection.java b/src/main/java/eu/dnetlib/repo/manager/domain/DatasourcesCollection.java index afe565d..2fffc48 100644 --- a/src/main/java/eu/dnetlib/repo/manager/domain/DatasourcesCollection.java +++ b/src/main/java/eu/dnetlib/repo/manager/domain/DatasourcesCollection.java @@ -1,7 +1,5 @@ package eu.dnetlib.repo.manager.domain; -import eu.dnetlib.repo.manager.domain.Repository; - import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/eu/dnetlib/repo/manager/domain/Repository.java b/src/main/java/eu/dnetlib/repo/manager/domain/Repository.java index c6fcbea..849f233 100644 --- a/src/main/java/eu/dnetlib/repo/manager/domain/Repository.java +++ b/src/main/java/eu/dnetlib/repo/manager/domain/Repository.java @@ -3,7 +3,8 @@ package eu.dnetlib.repo.manager.domain; import eu.dnetlib.domain.data.DataCollectionType; import eu.dnetlib.domain.data.PiwikInfo; -import java.util.*; +import java.util.ArrayList; +import java.util.List; /** * The domain object for the Repository resource data structure diff --git a/src/main/java/eu/dnetlib/repo/manager/service/BrokerService.java b/src/main/java/eu/dnetlib/repo/manager/service/BrokerService.java index 58eef11..3a87bc8 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/BrokerService.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/BrokerService.java @@ -1,8 +1,8 @@ package eu.dnetlib.repo.manager.service; -import eu.dnetlib.repo.manager.exception.BrokerException; import eu.dnetlib.repo.manager.domain.Term; import eu.dnetlib.repo.manager.domain.broker.*; +import eu.dnetlib.repo.manager.exception.BrokerException; import org.json.JSONException; import org.springframework.http.ResponseEntity; diff --git a/src/main/java/eu/dnetlib/repo/manager/service/BrokerServiceImpl.java b/src/main/java/eu/dnetlib/repo/manager/service/BrokerServiceImpl.java index e25273a..e540830 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/BrokerServiceImpl.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/BrokerServiceImpl.java @@ -2,11 +2,11 @@ package eu.dnetlib.repo.manager.service; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import eu.dnetlib.repo.manager.exception.BrokerException; import eu.dnetlib.repo.manager.domain.RepositorySnippet; import eu.dnetlib.repo.manager.domain.Term; import eu.dnetlib.repo.manager.domain.Tuple; import eu.dnetlib.repo.manager.domain.broker.*; +import eu.dnetlib.repo.manager.exception.BrokerException; import org.apache.commons.lang.NotImplementedException; import org.json.JSONException; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/main/java/eu/dnetlib/repo/manager/service/DashboardServiceImpl.java b/src/main/java/eu/dnetlib/repo/manager/service/DashboardServiceImpl.java index 92b9ca1..fe329c2 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/DashboardServiceImpl.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/DashboardServiceImpl.java @@ -1,7 +1,9 @@ package eu.dnetlib.repo.manager.service; import eu.dnetlib.enabling.datasources.common.AggregationInfo; -import eu.dnetlib.repo.manager.domain.*; +import eu.dnetlib.repo.manager.domain.MetricsInfo; +import eu.dnetlib.repo.manager.domain.RepositorySnippet; +import eu.dnetlib.repo.manager.domain.RepositorySummaryInfo; import eu.dnetlib.repo.manager.domain.broker.BrowseEntry; import eu.dnetlib.repo.manager.exception.BrokerException; import eu.dnetlib.repo.manager.exception.RepositoryServiceException; diff --git a/src/main/java/eu/dnetlib/repo/manager/service/EmailUtils.java b/src/main/java/eu/dnetlib/repo/manager/service/EmailUtils.java index 0565387..2fd593f 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/EmailUtils.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/EmailUtils.java @@ -1,9 +1,9 @@ package eu.dnetlib.repo.manager.service; import eu.dnetlib.domain.data.PiwikInfo; +import eu.dnetlib.domain.functionality.validator.JobForValidation; import eu.dnetlib.repo.manager.domain.Repository; import eu.dnetlib.repo.manager.domain.RepositoryInterface; -import eu.dnetlib.domain.functionality.validator.JobForValidation; import org.springframework.scheduling.annotation.Async; import org.springframework.security.core.Authentication; diff --git a/src/main/java/eu/dnetlib/repo/manager/service/EmailUtilsImpl.java b/src/main/java/eu/dnetlib/repo/manager/service/EmailUtilsImpl.java index 03dfc5d..31ce0da 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/EmailUtilsImpl.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/EmailUtilsImpl.java @@ -1,9 +1,9 @@ package eu.dnetlib.repo.manager.service; import eu.dnetlib.domain.data.PiwikInfo; +import eu.dnetlib.domain.functionality.validator.JobForValidation; import eu.dnetlib.repo.manager.domain.Repository; import eu.dnetlib.repo.manager.domain.RepositoryInterface; -import eu.dnetlib.domain.functionality.validator.JobForValidation; import eu.dnetlib.repo.manager.exception.ValidationServiceException; import eu.dnetlib.utils.MailLibrary; import org.apache.log4j.Logger; diff --git a/src/main/java/eu/dnetlib/repo/manager/service/PiWikServiceImpl.java b/src/main/java/eu/dnetlib/repo/manager/service/PiWikServiceImpl.java index 5cca147..360dd5d 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/PiWikServiceImpl.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/PiWikServiceImpl.java @@ -2,9 +2,9 @@ package eu.dnetlib.repo.manager.service; import com.fasterxml.jackson.databind.ObjectMapper; import eu.dnetlib.domain.data.PiwikInfo; -import eu.dnetlib.repo.manager.domain.Repository; import eu.dnetlib.repo.manager.domain.OrderByField; import eu.dnetlib.repo.manager.domain.OrderByType; +import eu.dnetlib.repo.manager.domain.Repository; import eu.dnetlib.repo.manager.exception.RepositoryServiceException; import org.apache.commons.codec.digest.DigestUtils; import org.apache.log4j.Logger; diff --git a/src/main/java/eu/dnetlib/repo/manager/service/RepositoryServiceImpl.java b/src/main/java/eu/dnetlib/repo/manager/service/RepositoryServiceImpl.java index c2f6ef7..df7daa8 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/RepositoryServiceImpl.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/RepositoryServiceImpl.java @@ -5,11 +5,9 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import eu.dnetlib.api.functionality.ValidatorServiceException; -import eu.dnetlib.enabling.datasources.common.AggregationInfo; -import eu.dnetlib.repo.manager.domain.Repository; -import eu.dnetlib.repo.manager.domain.RepositoryInterface; import eu.dnetlib.domain.enabling.Vocabulary; import eu.dnetlib.domain.functionality.validator.JobForValidation; +import eu.dnetlib.enabling.datasources.common.AggregationInfo; import eu.dnetlib.repo.manager.domain.*; import eu.dnetlib.repo.manager.domain.dto.Role; import eu.dnetlib.repo.manager.domain.dto.User; diff --git a/src/main/java/eu/dnetlib/repo/manager/service/ValidatorService.java b/src/main/java/eu/dnetlib/repo/manager/service/ValidatorService.java index 5541e1e..43d44bb 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/ValidatorService.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/ValidatorService.java @@ -5,8 +5,8 @@ import eu.dnetlib.domain.functionality.validator.JobForValidation; import eu.dnetlib.domain.functionality.validator.RuleSet; import eu.dnetlib.domain.functionality.validator.StoredJob; import eu.dnetlib.repo.manager.domain.InterfaceInformation; -import eu.dnetlib.repo.manager.exception.ValidationServiceException; import eu.dnetlib.repo.manager.exception.ResourceNotFoundException; +import eu.dnetlib.repo.manager.exception.ValidationServiceException; import org.json.JSONException; import org.springframework.http.ResponseEntity; diff --git a/src/main/java/eu/dnetlib/repo/manager/service/ValidatorServiceImpl.java b/src/main/java/eu/dnetlib/repo/manager/service/ValidatorServiceImpl.java index 699a4ad..08e1bdf 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/ValidatorServiceImpl.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/ValidatorServiceImpl.java @@ -1,10 +1,13 @@ package eu.dnetlib.repo.manager.service; import eu.dnetlib.api.functionality.ValidatorServiceException; -import eu.dnetlib.repo.manager.domain.RepositoryInterface; -import eu.dnetlib.domain.functionality.validator.*; +import eu.dnetlib.domain.functionality.validator.JobForValidation; +import eu.dnetlib.domain.functionality.validator.Rule; +import eu.dnetlib.domain.functionality.validator.RuleSet; +import eu.dnetlib.domain.functionality.validator.StoredJob; import eu.dnetlib.repo.manager.domain.Constants; import eu.dnetlib.repo.manager.domain.InterfaceInformation; +import eu.dnetlib.repo.manager.domain.RepositoryInterface; import eu.dnetlib.repo.manager.exception.ValidationServiceException; import eu.dnetlib.repo.manager.utils.CrisValidatorUtils; import eu.dnetlib.repo.manager.utils.OaiTools; diff --git a/src/main/java/eu/dnetlib/repo/manager/service/security/AuthoritiesUpdater.java b/src/main/java/eu/dnetlib/repo/manager/service/security/AuthoritiesUpdater.java index 2750adc..a82aab6 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/security/AuthoritiesUpdater.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/security/AuthoritiesUpdater.java @@ -9,8 +9,8 @@ import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.oauth2.common.exceptions.UnauthorizedClientException; import org.springframework.security.web.context.HttpSessionSecurityContextRepository; -import org.springframework.session.Session; import org.springframework.session.FindByIndexNameSessionRepository; +import org.springframework.session.Session; import org.springframework.stereotype.Service; import java.util.Collection; diff --git a/src/main/java/eu/dnetlib/repo/manager/service/security/AuthorizationServiceImpl.java b/src/main/java/eu/dnetlib/repo/manager/service/security/AuthorizationServiceImpl.java index 656d8f1..a697acb 100644 --- a/src/main/java/eu/dnetlib/repo/manager/service/security/AuthorizationServiceImpl.java +++ b/src/main/java/eu/dnetlib/repo/manager/service/security/AuthorizationServiceImpl.java @@ -1,6 +1,5 @@ package eu.dnetlib.repo.manager.service.security; -import com.google.gson.JsonArray; import com.google.gson.JsonElement; import eu.dnetlib.repo.manager.domain.dto.User; import eu.dnetlib.repo.manager.exception.ResourceNotFoundException; @@ -10,15 +9,12 @@ import org.apache.log4j.Logger; import org.mitre.openid.connect.model.OIDCAuthenticationToken; import org.mitre.openid.connect.model.UserInfo; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Service; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import java.util.List; -import java.util.stream.Collectors; @Service("authorizationService") public class AuthorizationServiceImpl implements AuthorizationService { diff --git a/src/main/java/eu/dnetlib/repo/manager/utils/Converter.java b/src/main/java/eu/dnetlib/repo/manager/utils/Converter.java index 4bc0de8..81e7ff8 100644 --- a/src/main/java/eu/dnetlib/repo/manager/utils/Converter.java +++ b/src/main/java/eu/dnetlib/repo/manager/utils/Converter.java @@ -15,9 +15,9 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; @Component public class Converter { diff --git a/src/main/resources/application-context.xml b/src/main/resources/application-context.xml index 7d4c104..4a5fb66 100644 --- a/src/main/resources/application-context.xml +++ b/src/main/resources/application-context.xml @@ -1,9 +1,9 @@ + http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> diff --git a/src/main/webapp/WEB-INF/applicationContext.xml b/src/main/webapp/WEB-INF/applicationContext.xml index b744c56..43855f7 100644 --- a/src/main/webapp/WEB-INF/applicationContext.xml +++ b/src/main/webapp/WEB-INF/applicationContext.xml @@ -1,12 +1,11 @@ diff --git a/src/test/resources/application-context.xml b/src/test/resources/application-context.xml index 7d4c104..4a5fb66 100644 --- a/src/test/resources/application-context.xml +++ b/src/test/resources/application-context.xml @@ -1,9 +1,9 @@ + http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> diff --git a/src/test/resources/applicationContext.xml b/src/test/resources/applicationContext.xml index 7928037..fabd773 100644 --- a/src/test/resources/applicationContext.xml +++ b/src/test/resources/applicationContext.xml @@ -1,13 +1,9 @@ + http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">