This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 921300ad454b6c5cebd603bf5786e5e432b375f3 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed May 31 13:34:36 2017 +0200 utilisation de la ShortTopiaIdFactory pour avoir des URLs plus courtes --- pollen-rest-api/src/main/resources/pollen-rest-api.properties | 1 + .../main/java/org/chorem/pollen/services/bean/PollenEntityId.java | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pollen-rest-api/src/main/resources/pollen-rest-api.properties b/pollen-rest-api/src/main/resources/pollen-rest-api.properties index 66f7e5d..4e3951b 100644 --- a/pollen-rest-api/src/main/resources/pollen-rest-api.properties +++ b/pollen-rest-api/src/main/resources/pollen-rest-api.properties @@ -29,3 +29,4 @@ hibernate.connection.provider_class=org.hibernate.hikaricp.internal.HikariCPConn hibernate.hikari.minimumIdle=2 hibernate.hikari.maximumPoolSize=20 hibernate.hikari.autoCommit=false +topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.ShortTopiaIdFactory diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/bean/PollenEntityId.java b/pollen-services/src/main/java/org/chorem/pollen/services/bean/PollenEntityId.java index cec4f31..0fc6801 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/bean/PollenEntityId.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/bean/PollenEntityId.java @@ -21,7 +21,6 @@ package org.chorem.pollen.services.bean; * #L% */ -import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.StringUtils; import org.nuiton.topia.persistence.TopiaEntity; import org.nuiton.topia.persistence.TopiaIdFactory; @@ -61,7 +60,7 @@ public class PollenEntityId<E extends TopiaEntity> { public static String encode(TopiaIdFactory topiaIdFactory, String entityId) { String randomPart = topiaIdFactory.getRandomPart(entityId); - return new String(Base64.encodeBase64URLSafe(randomPart.getBytes())); + return randomPart; } @@ -112,8 +111,7 @@ public class PollenEntityId<E extends TopiaEntity> { if (reducedId != null && !isTemporaryId()) { - String decodedId = new String(Base64.decodeBase64(reducedId)); - String id = topiaIdFactory.newTopiaId(entityType, decodedId); + String id = topiaIdFactory.newTopiaId(entityType, reducedId); setEntityId(id); } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.