diff --git a/src/main/java/org/gcube/gcat/rest/Item.java b/src/main/java/org/gcube/gcat/rest/Item.java index 25d85c1..65a40f5 100644 --- a/src/main/java/org/gcube/gcat/rest/Item.java +++ b/src/main/java/org/gcube/gcat/rest/Item.java @@ -366,6 +366,11 @@ public class Item extends REST implements org.gcube.gcat.api.interf * Please note that even the user indicates social_post=true the social post * is create only and only if the Catalogue-Manager enabled this feature, see socialPostEnabled property in * Read Configuration. + * When the social post is created the a notification to the VRe user is sent if the property + * notificationToUsersEnabled is true in the above mentioned configuration. + * If false notificationToUsersEnabled=false the social post will not produce a notification + * to the VRE user which will be only informed about the item pubblication by reading the generated + * social post in the VRE. *

* * diff --git a/src/main/java/org/gcube/gcat/rest/docs/ApiDocs.java b/src/main/java/org/gcube/gcat/rest/docs/ApiDocs.java index 88aaa97..3006d74 100644 --- a/src/main/java/org/gcube/gcat/rest/docs/ApiDocs.java +++ b/src/main/java/org/gcube/gcat/rest/docs/ApiDocs.java @@ -17,36 +17,36 @@ import org.slf4j.LoggerFactory; /** * @author Luca Frosini (ISTI-CNR) */ -@Path("api-docs") +//@Path("api-docs") public class ApiDocs { private static Logger logger = LoggerFactory.getLogger(ApiDocs.class); - @GET - @Path("{any:.*}") - public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException { - logger.trace("Called method to redirect to api-docs/index.html"); - - String pathInfo = req.getPathInfo(); - try { - - if (pathInfo.endsWith("/api-docs")) { - pathInfo += "/index.html"; - } - - if (pathInfo.endsWith("/api-docs/")) { - pathInfo += "index.html"; - } - - logger.info("redirecting to {}", pathInfo); - - String realPath = req.getServletContext().getRealPath(pathInfo); - return new FileInputStream(new File(realPath)); - - } catch (Exception e) { - throw new InternalServerErrorException(e); - } - } +// @GET +// @Path("{any:.*}") +// public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException { +// logger.trace("Called method to redirect to api-docs/index.html"); +// +// String pathInfo = req.getPathInfo(); +// try { +// +// if (pathInfo.endsWith("/api-docs")) { +// pathInfo += "/index.html"; +// } +// +// if (pathInfo.endsWith("/api-docs/")) { +// pathInfo += "index.html"; +// } +// +// logger.info("redirecting to {}", pathInfo); +// +// String realPath = req.getServletContext().getRealPath(pathInfo); +// return new FileInputStream(new File(realPath)); +// +// } catch (Exception e) { +// throw new InternalServerErrorException(e); +// } +// } } diff --git a/src/main/java/org/gcube/gcat/rest/docs/Docs.java b/src/main/java/org/gcube/gcat/rest/docs/Docs.java index 30122a8..85451a8 100644 --- a/src/main/java/org/gcube/gcat/rest/docs/Docs.java +++ b/src/main/java/org/gcube/gcat/rest/docs/Docs.java @@ -17,36 +17,36 @@ import org.slf4j.LoggerFactory; /** * @author Luca Frosini (ISTI-CNR) */ -@Path("docs") +// @Path("docs") public class Docs { private static Logger logger = LoggerFactory.getLogger(Docs.class); - @GET - @Path("{any:.*}") - public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException { - logger.trace("Called method to redirect to docs/index.html"); - - String pathInfo = req.getPathInfo(); - try { - - if (pathInfo.endsWith("/docs")) { - pathInfo += "/index.html"; - } - - if (pathInfo.endsWith("/docs/")) { - pathInfo += "index.html"; - } - - logger.info("redirecting to {}", pathInfo); - - String realPath = req.getServletContext().getRealPath(pathInfo); - return new FileInputStream(new File(realPath)); - - } catch (Exception e) { - throw new InternalServerErrorException(e); - } - } +// @GET +// @Path("{any:.*}") +// public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException { +// logger.trace("Called method to redirect to docs/index.html"); +// +// String pathInfo = req.getPathInfo(); +// try { +// +// if (pathInfo.endsWith("/docs")) { +// pathInfo += "/index.html"; +// } +// +// if (pathInfo.endsWith("/docs/")) { +// pathInfo += "index.html"; +// } +// +// logger.info("redirecting to {}", pathInfo); +// +// String realPath = req.getServletContext().getRealPath(pathInfo); +// return new FileInputStream(new File(realPath)); +// +// } catch (Exception e) { +// throw new InternalServerErrorException(e); +// } +// } }