diff --git a/Dockerfile b/Dockerfile
index cf702bc..18d6038 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,8 +2,9 @@ FROM tomcat:8.5-jre8-alpine
MAINTAINER "pkanakakis@di.uoa.gr"
RUN ["rm", "-fr", "/usr/local/tomcat/webapps/ROOT"]
COPY ./target/uoa-repository-manager-service.war /usr/local/tomcat/webapps/uoa-repository-manager-service.war
-COPY ./src/main/resources/eu/dnetlib/repo/manager/service/application.properties /usr/local/tomcat/lib/application.properties
-COPY ./src/main/resources/eu/dnetlib/repo/manager/service/email-texts.properties /usr/local/tomcat/lib/email-texts.properties
+COPY src/main/resources/dnet-override.properties /usr/local/tomcat/lib/dnet-override.properties
+#COPY src/main/resources/application.properties /usr/local/tomcat/lib/application.properties
+#COPY src/main/resources/email-texts.properties /usr/local/tomcat/lib/email-texts.properties
VOLUME /var/log/uoa-repository-manager-service:/var/log/uoa-repository-manager-service/
CMD ["catalina.sh", "run"]
diff --git a/pom.xml b/pom.xml
index 7119646..e96a8b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -253,26 +253,26 @@
-
- com.googlecode.maven-download-plugin
- download-maven-plugin
- 1.3.0
-
-
- process-resources
-
- wget
-
-
-
- https://github.com/ostranme/swagger-ui-themes/archive/v3.0.0.zip
-
- true
- ${project.build.directory}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/eu/dnetlib/repo/manager/service/config/Config.java b/src/main/java/eu/dnetlib/repo/manager/service/config/Config.java
index 142f474..9b462ab 100644
--- a/src/main/java/eu/dnetlib/repo/manager/service/config/Config.java
+++ b/src/main/java/eu/dnetlib/repo/manager/service/config/Config.java
@@ -15,7 +15,7 @@ import javax.annotation.PostConstruct;
@Configuration
@EnableRedisHttpSession
-@PropertySource(value = { "classpath:eu/dnetlib/repo/manager/service/application.properties"} )
+@PropertySource(value = {"classpath:application.properties"} )
@ComponentScan(basePackages = "eu.dnetlib.repo.manager.service.controllers")
public class Config {
@@ -51,8 +51,8 @@ public class Config {
DefaultCookieSerializer serializer = new DefaultCookieSerializer();
serializer.setCookieName("openAIRESession");
serializer.setCookiePath("/");
- // serializer.setDomainName(".openaire.eu");
- serializer.setDomainName(".di.uoa.gr");
+// serializer.setDomainName(".openaire.eu");
+// serializer.setDomainName(".athenarc.gr");
LOGGER.info("Serializer : " + serializer);
return serializer;
}
diff --git a/src/main/java/eu/dnetlib/repo/manager/service/config/FrontEndLinkURIAuthenticationSuccessHandler.java b/src/main/java/eu/dnetlib/repo/manager/service/config/FrontEndLinkURIAuthenticationSuccessHandler.java
index 90c93bb..48087dd 100644
--- a/src/main/java/eu/dnetlib/repo/manager/service/config/FrontEndLinkURIAuthenticationSuccessHandler.java
+++ b/src/main/java/eu/dnetlib/repo/manager/service/config/FrontEndLinkURIAuthenticationSuccessHandler.java
@@ -56,20 +56,21 @@ public class FrontEndLinkURIAuthenticationSuccessHandler implements Authenticati
.getSource().getAsJsonArray("edu_person_entitlements").toString(), "UTF-8") + "");
- Gson gson = new GsonBuilder().create();
Cookie openAIREUser = new Cookie("openAIREUser", new Gson().toJson(userInfo) );
- openAIREUser .setMaxAge(14400);
+ openAIREUser.setMaxAge(14400);
+ openAIREUser.setPath("/");
// openAIREUser .setDomain(".openaire.eu");
- openAIREUser .setDomain(".di.uoa.gr");
+// openAIREUser.setDomain(".athenarc.gr");
response.addCookie(openAIREUser);
Cookie accessToken = new Cookie("AccessToken", authOIDC.getAccessTokenValue());
accessToken.setMaxAge(14400);
// accessToken.setDomain(".openaire.eu");
- accessToken.setDomain(".di.uoa.gr");
- response.addCookie(accessToken);
+ accessToken.setPath("/");
+// accessToken.setDomain(".athenarc.gr");
+ response.addCookie(accessToken);
response.sendRedirect(frontEndURI);
}
diff --git a/src/main/java/eu/dnetlib/repo/manager/service/config/RepoManagerContextLoaderListener.java b/src/main/java/eu/dnetlib/repo/manager/service/config/RepoManagerContextLoaderListener.java
index 15d5cec..261d474 100644
--- a/src/main/java/eu/dnetlib/repo/manager/service/config/RepoManagerContextLoaderListener.java
+++ b/src/main/java/eu/dnetlib/repo/manager/service/config/RepoManagerContextLoaderListener.java
@@ -32,7 +32,7 @@ public class RepoManagerContextLoaderListener extends ContextLoaderListener {
String repoMode = props.getProperty("services.validator.mode.repo");
String userMode = props.getProperty("services.validator.mode.user");
Boolean standaloneMode = Boolean.parseBoolean(props.getProperty("services.validator.mode.standalone"));
-
+
logger.info("User mode: " + userMode);
logger.info("Repo mode: " + repoMode);
logger.info("Standalone mode: " + standaloneMode);
@@ -77,7 +77,7 @@ public class RepoManagerContextLoaderListener extends ContextLoaderListener {
"classpath*:/gr/uoa/di/driver/app/springContext-commons.xml",
"classpath*:/gr/uoa/di/driver/app/springContext-registrator.xml"
};
-
+
if (standaloneMode) {
logger.debug("Loading contexts for standalone mode");
ctx.setConfigLocations((String[])ArrayUtils.addAll(springContextCore,springContextForStandalone));
@@ -85,22 +85,22 @@ public class RepoManagerContextLoaderListener extends ContextLoaderListener {
logger.debug("Loading contexts for dnet");
ctx.setConfigLocations((String[])ArrayUtils.addAll(springContextCore,springContextForIS));
}
-
+
ctx.refresh();
-
+
logger.debug("done");
-
+
return ctx;
- }
-
+ }
+
private Properties loadProperties() {
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[] {
"classpath*:/eu/dnetlib/repo/manager/server/config/springContext-repo-manager-config.xml"
});
-
+
CascadingPropertyLoader pLoader = (CascadingPropertyLoader) ctx.getBean("propertyLoader");
Properties props = pLoader.getProperties();
-
+
ctx.destroy();
ctx.close();
return props;
diff --git a/src/main/java/eu/dnetlib/repo/manager/service/controllers/BrokerApi.java b/src/main/java/eu/dnetlib/repo/manager/service/controllers/BrokerApi.java
index 9f2ad3b..a7aad1b 100644
--- a/src/main/java/eu/dnetlib/repo/manager/service/controllers/BrokerApi.java
+++ b/src/main/java/eu/dnetlib/repo/manager/service/controllers/BrokerApi.java
@@ -4,9 +4,11 @@ import eu.dnetlib.repo.manager.shared.BrokerException;
import eu.dnetlib.repo.manager.shared.Term;
import eu.dnetlib.repo.manager.shared.broker.*;
import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiParam;
import org.json.JSONException;
import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PostAuthorize;
+import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
@@ -23,7 +25,7 @@ public interface BrokerApi {
@ResponseBody
DatasourcesBroker getDatasourcesOfUser(String user,String includeShared,String includeByOthers) throws BrokerException, JSONException;
- @RequestMapping(value = "/getTopicsForDatasource/{datasourceName}" , method = RequestMethod.GET,
+ @RequestMapping(value = "/getTopicsForDatasource/{datasourceName:.+}" , method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
List getTopicsForDatasource(String datasourceName) throws BrokerException;
@@ -35,7 +37,7 @@ public interface BrokerApi {
String size,
AdvQueryObject advQueryObject) throws BrokerException, JSONException ,IOException;
- @RequestMapping(value = "/showEvents/{datasourceName}/{topic}/{page}" , method = RequestMethod.GET,
+ @RequestMapping(value = "/showEvents/{datasourceName:.+}/{topic}/{page}" , method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
EventsPage showEvents(String datasourceName,
@@ -56,7 +58,7 @@ public interface BrokerApi {
@RequestMapping(value = "/unsubscribe/{subscriptionId}" , method = RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
- void unsubscribe(String subscriptionId) throws BrokerException;
+ ResponseEntity