Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit e1bf86fa authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

quick fix of index.html

parent 293a7e85
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.PostConstruct;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.nio.charset.Charset;
import java.nio.charset.UnsupportedCharsetException;
import java.util.Optional;
import static eu.europa.ec.edelivery.smp.exceptions.ErrorCode.DOMAIN_NOT_EXISTS;
......@@ -50,9 +53,9 @@ public class SearchResource {
@RequestParam(value = "domain", required = false) String domainCode
) {
String participantIdentifierDecoded =StringUtils.isBlank(participantIdentifier)?null:URLDecoder.decode(participantIdentifier);
String participantSchemeDecoded = StringUtils.isBlank(participantScheme)?null:URLDecoder.decode(participantScheme);
String domainCodeDecoded = StringUtils.isBlank(domainCode)?null:URLDecoder.decode(domainCode);
String participantIdentifierDecoded =decodeUrlToUTF8(participantIdentifier);
String participantSchemeDecoded = decodeUrlToUTF8(participantScheme);
String domainCodeDecoded = decodeUrlToUTF8(domainCode);
LOG.info("Search for page: {}, page size: {}, part. id: {}, part sch: {}, domain {}", page, pageSize, participantIdentifierDecoded,
participantSchemeDecoded, domainCodeDecoded);
......@@ -65,4 +68,16 @@ public class SearchResource {
return uiServiceGroupService.getTableList(page, pageSize, orderBy, orderType, sgf);
}
private String decodeUrlToUTF8(String value){
if (StringUtils.isBlank(value)){
return null;
}
try {
return URLDecoder.decode(value, "UTF-8");
} catch (UnsupportedEncodingException ex){
LOG.error("Unsupported UTF-8 encoding while converting: " + value, ex);
}
return value;
}
}
......@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Arrays;
......@@ -61,9 +62,9 @@ public class ServiceGroupResource {
@RequestParam(value = "domain", required = false) String domainCode
) {
String participantIdentifierDecoded =StringUtils.isBlank(participantIdentifier)?null:URLDecoder.decode(participantIdentifier);
String participantSchemeDecoded = StringUtils.isBlank(participantScheme)?null:URLDecoder.decode(participantScheme);
String domainCodeDecoded = StringUtils.isBlank(domainCode)?null:URLDecoder.decode(domainCode);
String participantIdentifierDecoded =decodeUrlToUTF8(participantIdentifier);
String participantSchemeDecoded = decodeUrlToUTF8(participantScheme);
String domainCodeDecoded = decodeUrlToUTF8(domainCode);
LOG.info("Search for page: {}, page size: {}, part. id: {}, part sch: {}, domain {}",page, pageSize, participantIdentifierDecoded,
participantSchemeDecoded, domainCodeDecoded );
......@@ -121,5 +122,17 @@ public class ServiceGroupResource {
LOG.info("GOT LIST OF ServiceGroupRO to UPDATE: " + updateEntities.length);
uiServiceGroupService.updateServiceGroupList(Arrays.asList(updateEntities));
}
private String decodeUrlToUTF8(String value){
if (StringUtils.isBlank(value)){
return null;
}
try {
return URLDecoder.decode(value, "UTF-8");
} catch (UnsupportedEncodingException ex){
LOG.error("Unsupported UTF-8 encoding while converting: " + value, ex);
}
return value;
}
}
......@@ -27,6 +27,6 @@
<h2>Version: ${project.version}</h2>
<h6>Build timestamp: ${buildtimestamp}</h6>
<h6>Specification: <a href="http://docs.oasis-open.org/bdxr/bdx-smp/v1.0/bdx-smp-v1.0.html" target="_blank">http://docs.oasis-open.org/bdxr/bdx-smp/v1.0/bdx-smp-v1.0.html</a></h6>
<h6>UI: <a href="../../../../../smp-angular/src/main/resources/META-INF/resources/ui/index.html" target="_blank">eDelivery SMP</a></h6>
<h6>UI: <a href="ui/index.html" target="_blank">eDelivery SMP</a></h6>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment