Skip to content

Commit

Permalink
IVYPORTAL-17428 Check and remove deprecated features from portal - Co…
Browse files Browse the repository at this point in the history
…de + Docs (#991)

* Removed deprecated code

* Renamed data class property iCase to caze to avoid warning

* Removed warning releated to applicationHomeRef(), data class attribute start with Capital

* Removed warning related to no explicit encoding in Designer

* Replace xml namespace java.sun.com to xmlns.jcp.org
  • Loading branch information
lttung-axonivy authored Sep 5, 2024
1 parent 8114583 commit 9fe12cc
Show file tree
Hide file tree
Showing 124 changed files with 180 additions and 848 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
1 change: 1 addition & 0 deletions AxonIvyPortal/PortalKitTestHelper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<properties>
<ivy.engine.version>11.4.0</ivy.engine.version>
<build.plugin.version>11.4.0-SNAPSHOT</build.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:ic="http://ivyteam.ch/jsf/component"
xmlns:p="http://primefaces.org/ui"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:pa="http://primefaces.org/serenity">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui" xmlns:pa="http://primefaces.org/serenity">

<p:ajaxStatus id="ajaxLoadingStatus">
<f:facet name="start">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:ic="http://ivyteam.ch/jsf/component"
xmlns:p="http://primefaces.org/ui"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
1 change: 1 addition & 0 deletions AxonIvyPortal/portal-components/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<properties>
<ivy.engine.version>11.4.0</ivy.engine.version>
<build.plugin.version>11.4.0-SNAPSHOT</build.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@
"config" : {
"output" : {
"code" : [
"import org.apache.log4j.Level;",
"import com.axonivy.portal.components.ivydata.exception.PortalIvyDataException;",
"import com.axonivy.portal.components.util.ErrorHandler;",
"",
"for (PortalIvyDataException exception : in.exceptions) {",
" ErrorHandler.addError(org.apache.log4j.Priority.ERROR, exception);",
" ErrorHandler.addError(exception);",
"}"
]
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public static void navigateToUrl(String url) {
PrimeFaces.current().executeScript(statement);
}

/**
* Navigate to portal home
*/
public static void navigateToPortalHome() {
navigateToUrl(Ivy.html().applicationHomeRef());
}
/**
* Navigate to portal home
*/
public static void navigateToPortalHome() {
navigateToUrl(Ivy.html().applicationHomeLink().getAbsoluteEncoded());
}

/**
* Navigate to PortalEndPage without finishing a task, e.g. clicking on Cancel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ public List<IDocument> getAll() {
return new ArrayList<>(documents);
}

/**
* We make it as deprecated from 8.0 Please refer to sub-function process DeleteDocument
*
* @param document
*/
@Deprecated
public void delete(IDocument document) {
documentsOf(iCase).delete(document);
}

/**
* @param document
* @return streamed content
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package com.axonivy.portal.components.util;

import org.apache.log4j.Priority;

import com.axonivy.portal.components.ivydata.exception.PortalIvyDataException;

import ch.ivyteam.ivy.environment.Ivy;

public class ErrorHandler {

private ErrorHandler() {}

public static void addError(Priority priority, PortalIvyDataException error) {
Ivy.log().log(priority, error.toString());
public static void addError(PortalIvyDataException error) {
Ivy.log().error(error.toString());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type" : "String",
"modifiers" : [ "PERSISTENT" ]
}, {
"name" : "iCase",
"name" : "caze",
"type" : "ch.ivyteam.ivy.workflow.ICase",
"modifiers" : [ "PERSISTENT" ]
}, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"processCall" : "Functional Processes/OpenCaseDetailsHook:call(ch.ivyteam.ivy.workflow.ICase,Boolean,Boolean)",
"call" : {
"map" : {
"param.caseView" : "in.iCase",
"param.caseView" : "in.caze",
"param.isShowBackButton" : "true",
"param.isOpenInFrame" : "in.isOpenInFrame"
}
Expand All @@ -59,11 +59,11 @@
"signature" : "openDetails",
"input" : {
"params" : [
{ "name" : "iCase", "type" : "ch.ivyteam.ivy.workflow.ICase", "desc" : "" },
{ "name" : "caze", "type" : "ch.ivyteam.ivy.workflow.ICase", "desc" : "" },
{ "name" : "isOpenInFrame", "type" : "Boolean", "desc" : "" }
],
"map" : {
"out.iCase" : "param.iCase",
"out.caze" : "param.caze",
"out.isOpenInFrame" : "param.isOpenInFrame"
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:pa="http://primefaces.org/serenity">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui" xmlns:pa="http://primefaces.org/serenity">

<p:ajaxStatus id="ajaxLoadingStatus">
<f:facet name="start">
Expand Down
1 change: 1 addition & 0 deletions AxonIvyPortal/portal-selenium-test/customized_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<powermock.version>2.0.2</powermock.version>
<build.plugin.version>11.4.0-SNAPSHOT</build.plugin.version>
<ivy.engine.version>11.4.0</ivy.engine.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<powermock.version>2.0.2</powermock.version>
<build.plugin.version>11.4.0-SNAPSHOT</build.plugin.version>
<ivy.engine.version>11.4.0</ivy.engine.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<distributionManagement>
<repository>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
1 change: 1 addition & 0 deletions AxonIvyPortal/portal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<properties>
<ivy.engine.version>11.4.0</ivy.engine.version>
<build.plugin.version>11.4.0-SNAPSHOT</build.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,7 @@
"call" : {
"map" : {
"param.isTaskFinished" : "in.isTaskFinished",
"param.iCase" : "in.caseSelected"
"param.caze" : "in.caseSelected"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,6 @@ public boolean isMobileDevice() {
return RequestUtils.isMobileDevice();
}

/**
* We moved this method to PortalExceptionBean#getErrorDetailToEndUser
* @return system configuration of ErrorDetailToEndUser
*/
@Deprecated
public boolean getErrorDetailToEndUser() {
try {
PortalExceptionBean portalExceptionBean = (PortalExceptionBean) ManagedBeans.find("portalExceptionBean").get();
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9fe12cc

Please sign in to comment.