|
|
|
@ -2,13 +2,10 @@ package org.gcube.portlets.widgets.ckandatapublisherwidget.server.threads;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.net.HttpURLConnection;
|
|
|
|
|
import java.util.Base64;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
|
|
|
|
import org.gcube.common.portal.GCubePortalConstants;
|
|
|
|
|
import org.gcube.common.scope.api.ScopeProvider;
|
|
|
|
|
import org.gcube.portal.databook.client.GCubeSocialNetworking;
|
|
|
|
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.server.utils.GCoreEndPointReaderSocial;
|
|
|
|
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.server.utils.GenericUtils;
|
|
|
|
|
import org.json.simple.JSONObject;
|
|
|
|
@ -94,12 +91,16 @@ public class WritePostCatalogueManagerThread extends Thread {
|
|
|
|
|
ScopeProvider.instance.set(scope);
|
|
|
|
|
SecurityTokenProvider.instance.set(token);
|
|
|
|
|
|
|
|
|
|
final String profilePageURL = GCubePortalConstants.PREFIX_GROUP_URL + extractOrgFriendlyURL(userCurrentUrl) + GCubePortalConstants.USER_PROFILE_FRIENDLY_URL;
|
|
|
|
|
//see Feature #17577
|
|
|
|
|
/*final String profilePageURL = GCubePortalConstants.PREFIX_GROUP_URL + extractOrgFriendlyURL(userCurrentUrl) + GCubePortalConstants.USER_PROFILE_FRIENDLY_URL;
|
|
|
|
|
|
|
|
|
|
userFullName = "<a class=\"link\" href=\"" + profilePageURL + "?"+
|
|
|
|
|
Base64.getEncoder().encodeToString(GCubeSocialNetworking.USER_PROFILE_OID.getBytes())+"="+
|
|
|
|
|
Base64.getEncoder().encodeToString(username.getBytes())+"\">"+userFullName+
|
|
|
|
|
"</a> ";
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
userFullName = "@"+username;
|
|
|
|
|
|
|
|
|
|
// write
|
|
|
|
|
writeProductPost(
|
|
|
|
|