diff --git a/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/ApplicationIconServlet.java b/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/ApplicationIconServlet.java index 543e6fc8b9d..d74e66f7336 100644 --- a/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/ApplicationIconServlet.java +++ b/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/ApplicationIconServlet.java @@ -15,8 +15,11 @@ import java.util.Optional; +import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import lombok.extern.slf4j.Slf4j; import org.bonitasoft.engine.api.APIClient; import org.bonitasoft.engine.api.ApplicationAPI; import org.bonitasoft.engine.business.application.Application; @@ -32,6 +35,7 @@ import org.bonitasoft.web.toolkit.client.common.exception.http.ServerException; import org.bonitasoft.web.toolkit.client.data.APIID; +@Slf4j public class ApplicationIconServlet extends IconServlet { @Override @@ -49,7 +53,26 @@ protected Optional retrieveIcon(Long iconId, APISession apiSession) } } + /** + * {@inheritDoc} + * + * @deprecated as of 9.0.0, Application icon should be deleted/updated at startup. + */ @Override + @Deprecated(since = "9.0.0") + protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException { + log.warn("DELETE request on Application Icon is deprecated! " + + "An application icon should be deleted or updated at startup instead."); + super.doDelete(request, response); + } + + /** + * {@inheritDoc} + * + * @deprecated as of 9.0.0, Application icon should be deleted/updated at startup. + */ + @Override + @Deprecated(since = "9.0.0") protected void deleteIcon(Long entityId, APISession apiSession, HttpServletRequest request) throws ServerException { ApplicationAPI applicationApi = getApplicationApi(apiSession); ApplicationUpdater updater = new ApplicationUpdater(); diff --git a/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/PageUploadServlet.java b/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/PageUploadServlet.java index 14b4eb26e26..091c0c94b16 100644 --- a/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/PageUploadServlet.java +++ b/bpm/bonita-web-server/src/main/java/org/bonitasoft/console/common/server/servlet/PageUploadServlet.java @@ -23,8 +23,11 @@ import javax.activation.FileTypeMap; import javax.activation.MimetypesFileTypeMap; +import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.fileupload.FileItem; import org.apache.commons.io.FileUtils; import org.bonitasoft.console.common.server.page.CustomPageService; @@ -37,6 +40,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * @deprecated as of 9.0.0, Application page should be created/updated at startup. + */ +@Slf4j +@Deprecated(since = "9.0.0") public class PageUploadServlet extends TenantFileUploadServlet { /** @@ -56,6 +64,19 @@ public class PageUploadServlet extends TenantFileUploadServlet { protected File pageTmp; + /** + * {@inheritDoc} + * + * @deprecated as of 9.0.0, Application page should be created/updated at startup. + */ + @Override + @Deprecated(since = "9.0.0") + public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + log.warn("Application Page upload is deprecated! " + + "An application page should be created or updated at startup instead."); + super.doPost(request, response); + } + @Override protected String generateResponseString(final HttpServletRequest request, final String fileName, final String uploadedFileName) throws Exception { diff --git a/bpm/bonita-web-server/src/main/webapp/WEB-INF/web.xml b/bpm/bonita-web-server/src/main/webapp/WEB-INF/web.xml index 25e3ebf890d..873292120ab 100644 --- a/bpm/bonita-web-server/src/main/webapp/WEB-INF/web.xml +++ b/bpm/bonita-web-server/src/main/webapp/WEB-INF/web.xml @@ -383,6 +383,7 @@ true + processUploadServlet org.bonitasoft.console.common.server.servlet.TenantFileUploadServlet @@ -391,6 +392,7 @@ bar + apiProcessUploadServlet org.bonitasoft.console.common.server.servlet.TenantFileUploadServlet @@ -601,10 +603,12 @@ livingApplicationPageServlet /portal/resource/app/* + processUploadServlet /portal/processUpload + apiProcessUploadServlet /API/processUpload @@ -613,22 +617,27 @@ xmlUploadServlet /portal/organizationUpload + xmlUploadServlet /portal/applicationsUpload + xmlUploadServlet /portal/actorsUpload + zipUploadServlet /portal/bdmUpload + pageUploadServlet /portal/pageUpload + apiPageUploadServlet /API/pageUpload @@ -645,6 +654,7 @@ fileUploadServlet /portal/fileUpload + formFileUploadServlet /API/formFileUpload