Compare commits

..

No commits in common. "master" and "v2.0.5" have entirely different histories.

5 changed files with 143 additions and 179 deletions

View File

@ -1,41 +1,27 @@
# Changelog for workspace-uploader # Changelog for workspace-uploader
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.1.0] - 2022-05-03
#### Enhancements ## [v2-0-5] [r4-23-0] - [2020-05-14]
- [#23225] Updated the method to read the members of (VRE or Simple) shared folders **Fixes**
[#19243] upload archive facility does not work properly with Windows OS
[#19232] manage file names that use special characters
## [v2.0.6] - 2020-07-15
- [#19317] Just to include the storagehub-client-wrapper at 1.0.0 version ## [2-0-4] - [2019-12-19]
#### Fixes Ported to Git and Jenkins
- [#19243] upload archive facility does not work properly with Windows OS
- [#19232] manage file names that use special characters
## [v2.0.5] - 2020-05-14
#### Fixes ## [2-0-3] - [2019-09-15]
- [#19243] upload archive facility does not work properly with Windows OS
- [#19232] manage file names that use special characters
## [v2.0.4] - 2019-12-19
Updated to Git and Jenkins
## [v2.0.3] - 2019-09-15
[Task #17152] Workspace uploader: avoid . (dot) char added as suffix when the filename does not contain an extension [Task #17152] Workspace uploader: avoid . (dot) char added as suffix when the filename does not contain an extension
@ -44,19 +30,22 @@ Updated to Git and Jenkins
[Bug #17450] Workspace: Notifications about file updated (New versions) is never generated [Bug #17450] Workspace: Notifications about file updated (New versions) is never generated
## [v2.0.2] - 2019-04-01
## [2-0-2] - [2019-04-01]
[Incident #16285] Bug fixing [Incident #16285] Bug fixing
[Feature #13327] Checking permission before uploading [Feature #13327] Checking permission before uploading
## [v2.0.1] - 2019-01-30
## [2-0-1] - [2019-01-30]
[Bug #13232] Fixing it [Bug #13232] Fixing it
## [v2.0.0] - 2018-09-19
## [2-0-0] - [2018-09-19]
[Feature #11722] Workspace Uploader - Update to StorageHUB [Feature #11722] Workspace Uploader - Update to StorageHUB
@ -65,7 +54,8 @@ In case of 100% added the message "Finalising the upload of [filename]"
[Task #12470] Check uploading of files in the Workpace by the drag and drop facility on Windows Operating System [Task #12470] Check uploading of files in the Workpace by the drag and drop facility on Windows Operating System
## [v1.8.0] - 2017-03-27
## [1-8-0] - [2017-03-27]
[Task #7820] DaD and Browse: create new version of existing items added [Task #7820] DaD and Browse: create new version of existing items added
@ -74,7 +64,8 @@ Removed currUserId parameter from client-side
Updated message displaying also version of file after upload completed Updated message displaying also version of file after upload completed
## [v1.7.0] - 2017-02-23
## [1-7-0] - [2017-02-23]
Removed currUserId parameter from client-side Removed currUserId parameter from client-side
@ -83,38 +74,46 @@ Removed currUserId parameter from client-side
Integrated with file versioning Integrated with file versioning
## [v1.6.0] - 2016-12-01
## [1-6-0] - [2016-12-01]
Feature #5901 Remove ASL Dependency from workspace-uploader Widget Feature #5901 Remove ASL Dependency from workspace-uploader Widget
Bug #6096 Fixed Bug #6096 Fixed
## [v1.4.0] - 2016-05-31
## [1-4-0] - [2016-05-31]
[Feature #4128] Migration to Liferay 6.2 [Feature #4128] Migration to Liferay 6.2
## [v1.3.0] - 2016-05-18
## [1-3-0] - [2016-05-18]
[Feature #4055] DnD multiple instances [Feature #4055] DnD multiple instances
## [v1.2.0] - 2016-05-09
## [1-2-0] - [2016-05-09]
[Feature #3962] Sequential upload status [Feature #3962] Sequential upload status
## [v1.1.0] - 2016-01-08
## [1-1-0] - [2016-01-08]
Bug Fixed #1333 Bug Fixed #1333
## [v1.0.1] - 2015-12-16
## [1-0-1] - [2015-12-16]
Bug Fixed - https://support.d4science.org/issues/1824 Bug Fixed - https://support.d4science.org/issues/1824
## [v1.0.0] - 2015-08-07
## [1-0-0] - [2015-08-07]
first release first release

View File

@ -14,7 +14,7 @@
<includes> <includes>
<include>README.md</include> <include>README.md</include>
<include>LICENSE.md</include> <include>LICENSE.md</include>
<include>CHANGELOG.md</include> <include>changelog.md</include>
<include>profile.xml</include> <include>profile.xml</include>
</includes> </includes>
<fileMode>755</fileMode> <fileMode>755</fileMode>

15
pom.xml
View File

@ -12,7 +12,7 @@
<groupId>org.gcube.portlets.widgets</groupId> <groupId>org.gcube.portlets.widgets</groupId>
<artifactId>workspace-uploader</artifactId> <artifactId>workspace-uploader</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>2.1.0</version> <version>2.0.5</version>
<name>Workspace Uploader Widget</name> <name>Workspace Uploader Widget</name>
<description>Workspace Uploader Widget allows your application to upload file/s in the gCube Workspace</description> <description>Workspace Uploader Widget allows your application to upload file/s in the gCube Workspace</description>
<scm> <scm>
@ -37,7 +37,7 @@
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId> <artifactId>maven-portal-bom</artifactId>
<version>3.6.3</version> <version>3.6.0</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -106,6 +106,13 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- TO USE LIFERAY 6.2 -->
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.common.portal</groupId> <groupId>org.gcube.common.portal</groupId>
<artifactId>portal-manager</artifactId> <artifactId>portal-manager</artifactId>
@ -117,12 +124,10 @@
<artifactId>storagehub-client-library</artifactId> <artifactId>storagehub-client-library</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.common</groupId> <groupId>org.gcube.common</groupId>
<artifactId>storagehub-client-wrapper</artifactId> <artifactId>storagehub-client-wrapper</artifactId>
<version>[1.0.0, 2.0.0-SNAPSHOT)</version> <version>[0.6.0, 1.0.0-SNAPSHOT)</version>
<scope>compile</scope>
</dependency> </dependency>
<!-- JSON PARSER --> <!-- JSON PARSER -->

View File

@ -18,7 +18,6 @@ import org.gcube.common.storagehub.model.service.Version;
import org.gcube.common.storagehub.model.types.WorkspaceItemType; import org.gcube.common.storagehub.model.types.WorkspaceItemType;
import org.gcube.common.storagehubwrapper.server.StorageHubWrapper; import org.gcube.common.storagehubwrapper.server.StorageHubWrapper;
import org.gcube.common.storagehubwrapper.server.tohl.Workspace; import org.gcube.common.storagehubwrapper.server.tohl.Workspace;
import org.gcube.common.storagehubwrapper.shared.Member;
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItem; import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItem;
import org.gcube.portlets.widgets.workspaceuploader.server.util.UserUtil; import org.gcube.portlets.widgets.workspaceuploader.server.util.UserUtil;
import org.gcube.portlets.widgets.workspaceuploader.shared.ContactModel; import org.gcube.portlets.widgets.workspaceuploader.shared.ContactModel;
@ -26,97 +25,96 @@ import org.gcube.vomanagement.usermanagement.model.GCubeUser;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
/** /**
* The Class NotificationsWorkspaceUploader. * The Class NotificationsWorkspaceUploader.
* *
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
* Jul 2, 2018 * Jul 2, 2018
*/ */
public class NotificationsWorkspaceUploader { public class NotificationsWorkspaceUploader {
protected static Logger logger = LoggerFactory.getLogger(NotificationsWorkspaceUploader.class); protected static Logger logger = LoggerFactory.getLogger(NotificationsWorkspaceUploader.class);
/** /**
* Check send notify changed item to share. * Check send notify changed item to share.
* *
* @param storageWrapper the storage wrapper * @param storageWrapper the storage wrapper
* @param request the request * @param request the request
* @param currUser the curr user * @param currUser the curr user
* @param scopeGroupId the scope group id * @param scopeGroupId the scope group id
* @param np the np * @param np the np
* @param httpSession the http session * @param httpSession the http session
* @param sourceItem the source item * @param sourceItem the source item
* @param sourceSharedId the source shared id * @param sourceSharedId the source shared id
* @param folderDestinationItem the folder destination item * @param folderDestinationItem the folder destination item
* @param isOverwrite the is overwrite * @param isOverwrite the is overwrite
*/ */
public static void checkSendNotifyChangedItemToShare(StorageHubWrapper storageWrapper, HttpServletRequest request, public static void checkSendNotifyChangedItemToShare(StorageHubWrapper storageWrapper, HttpServletRequest request, GCubeUser currUser, String scopeGroupId, NotificationsWorkspaceUploaderProducer np, HttpSession httpSession, final Item sourceItem, final String sourceSharedId, final FolderItem folderDestinationItem) {
GCubeUser currUser, String scopeGroupId, NotificationsWorkspaceUploaderProducer np, HttpSession httpSession,
final Item sourceItem, final String sourceSharedId, final FolderItem folderDestinationItem) {
logger.debug("checkSendNotifyChangedItemToShare called"); logger.debug("checkSendNotifyChangedItemToShare called");
if (folderDestinationItem != null) { if(folderDestinationItem!=null){
try { try{
if (folderDestinationItem.isShared()) { // Notify Added Item To Sharing? if(folderDestinationItem.isShared()){ //Notify Added Item To Sharing?
logger.trace("checkNotifyAddItemToShare source item: " + sourceItem.getName() + " sourceSharedId: " logger.trace("checkNotifyAddItemToShare source item: "+sourceItem.getName()+" sourceSharedId: "+sourceSharedId + " folder destination name: "+folderDestinationItem.getName() + " folder destination id: "+folderDestinationItem.getId());
+ sourceSharedId + " folder destination name: " + folderDestinationItem.getName() //share condition is true if source shared folder is not null
+ " folder destination id: " + folderDestinationItem.getId());
// share condition is true if source shared folder is not null
boolean shareChangeCondition = sourceSharedId == null ? false : true; boolean shareChangeCondition = sourceSharedId==null?false:true;
logger.debug("shareChangeCondition add item: " + shareChangeCondition); logger.debug("shareChangeCondition add item: "+shareChangeCondition);
// if shareChangeCondition is true.. notifies added item to sharing //if shareChangeCondition is true.. notifies added item to sharing
if (shareChangeCondition) { if(shareChangeCondition){
FolderItem folderDest = (FolderItem) folderDestinationItem; FolderItem folderDest = (FolderItem) folderDestinationItem;
SharedFolder rootSharedFolder = null; SharedFolder rootSharedFolder = null;
try { try{
FolderItem sharedFolder = storageWrapper.getStorageHubClientService() FolderItem sharedFolder = storageWrapper.getStorageHubClientService().getRootSharedFolder(folderDest.getId());
.getRootSharedFolder(folderDest.getId());
rootSharedFolder = (SharedFolder) sharedFolder; rootSharedFolder = (SharedFolder) sharedFolder;
} catch (Exception e) { }catch(Exception e){
// silent //silent
} }
// Reading members from rootSharedFolder //Reading memmbers from rootSharedFolder
List<Member> listMemebers = storageWrapper.getWorkspace() List<String> listLogins = storageWrapper.getWorkspace().getSharedFolderMembers(rootSharedFolder.getId());
.getSharedFolderMembers(rootSharedFolder.getId()); List<ContactModel> listContacts = new ArrayList<ContactModel>(listLogins.size());
for (String login : listLogins) {
List<ContactModel> listContacts = UserUtil.listMembersToListContact(listMemebers); listContacts.add(new ContactModel(login, login, false, UserUtil.getUserFullName(login)));
}
SocialFileItem socialItem = NotificationMapper.toSocialItem(storageWrapper, sourceItem); SocialFileItem socialItem = NotificationMapper.toSocialItem(storageWrapper, sourceItem);
// TO folderDest or rootSharedFolder?? //TO folderDest or rootSharedFolder??
SocialSharedFolder socialFolder = NotificationMapper.toSocialFolder(rootSharedFolder); SocialSharedFolder socialFolder = NotificationMapper.toSocialFolder(rootSharedFolder);
boolean isUpdate = false; boolean isUpdate = false;
try { try {
List<Version> versions = storageWrapper.getStorageHubClientService() List<Version> versions = storageWrapper.getStorageHubClientService().getListVersions(sourceItem.getId());
.getListVersions(sourceItem.getId()); isUpdate = versions.size()>1?true:false;
isUpdate = versions.size() > 1 ? true : false; logger.debug("Is file updating? "+shareChangeCondition);
logger.debug("Is file updating? " + shareChangeCondition); }catch (Exception e) {
} catch (Exception e) { //silent
// silent
} }
// SWITCH BETWEEN ADDED OR UPDATED //SWITCH BETWEEN ADDED OR UPDATED
if (!isUpdate) if(!isUpdate)
np.notifyAddedItemToSharing(listContacts, socialItem, socialFolder); np.notifyAddedItemToSharing(listContacts, socialItem, socialFolder);
else else
np.notifyUpdatedItemToSharing(listContacts, socialItem, socialFolder); np.notifyUpdatedItemToSharing(listContacts, socialItem, socialFolder);
} }
} else }
else
logger.trace("folder destination is not shared"); logger.trace("folder destination is not shared");
} catch (Exception e) { }catch (Exception e) {
logger.error("An error occurred in checkSendNotifyAddItemToShare ", e); logger.error("An error occurred in checkSendNotifyAddItemToShare ",e);
} }
} else }else
logger.warn( logger.warn("The notifies is failure in checkSendNotifyAddItemToShare because folder destination item is null");
"The notifies is failure in checkSendNotifyAddItemToShare because folder destination item is null");
} }
/** /**
@ -125,29 +123,30 @@ public class NotificationsWorkspaceUploader {
* @param wsItem the ws item * @param wsItem the ws item
* @return true, if is a shared folder * @return true, if is a shared folder
*/ */
public static boolean isASharedFolder(WorkspaceItem wsItem) { public static boolean isASharedFolder(WorkspaceItem wsItem){
if (wsItem != null) if(wsItem!=null)
return wsItem.getType().equals(WorkspaceItemType.SHARED_FOLDER); return wsItem.getType().equals(WorkspaceItemType.SHARED_FOLDER);
return false; return false;
} }
/** /**
* Checks if is a shared folder for id. * Checks if is a shared folder for id.
* *
* @param workspace the workspace * @param workspace the workspace
* @param itemId the item id * @param itemId the item id
* @return true, if is a shared folder for id * @return true, if is a shared folder for id
*/ */
public static boolean isASharedFolderForId(Workspace workspace, String itemId) { public static boolean isASharedFolderForId(Workspace workspace, String itemId){
if (itemId == null || itemId.isEmpty()) if(itemId==null || itemId.isEmpty())
return false; return false;
try { try {
WorkspaceItem wsItem = workspace.getItem(itemId); WorkspaceItem wsItem = workspace.getItem(itemId);
if (wsItem != null) if(wsItem!=null)
return wsItem.getType().equals(WorkspaceItemType.SHARED_FOLDER); return wsItem.getType().equals(WorkspaceItemType.SHARED_FOLDER);
return false; return false;
@ -157,24 +156,24 @@ public class NotificationsWorkspaceUploader {
} }
} }
/** /**
* Check is root folder shared. * Check is root folder shared.
* *
* @param itemId the item id * @param itemId the item id
* @param rootFolderSharedId the root folder shared id * @param rootFolderSharedId the root folder shared id
* @return true, if successful * @return true, if successful
*/ */
public static boolean checkIsRootFolderShared(String itemId, String rootFolderSharedId) { public static boolean checkIsRootFolderShared(String itemId, String rootFolderSharedId) {
logger.trace("checkIsRootFolderShared between [itemid: " + itemId + ", rootFolderSharedId: " logger.trace("checkIsRootFolderShared between [itemid: "+itemId +", rootFolderSharedId: "+rootFolderSharedId+"]");
+ rootFolderSharedId + "]"); if(itemId==null)
if (itemId == null)
return false; return false;
if (rootFolderSharedId == null) if(rootFolderSharedId==null)
return false; return false;
if (itemId.compareTo(rootFolderSharedId) == 0) if(itemId.compareTo(rootFolderSharedId)==0)
return true; return true;
return false; return false;

View File

@ -3,10 +3,8 @@ package org.gcube.portlets.widgets.workspaceuploader.server.util;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.gcube.common.storagehubwrapper.shared.Member;
import org.gcube.portlets.widgets.workspaceuploader.shared.ContactModel; import org.gcube.portlets.widgets.workspaceuploader.shared.ContactModel;
import org.gcube.vomanagement.usermanagement.UserManager; import org.gcube.vomanagement.usermanagement.UserManager;
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException; import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
import org.gcube.vomanagement.usermanagement.exception.UserRetrievalFault; import org.gcube.vomanagement.usermanagement.exception.UserRetrievalFault;
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager; import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
@ -14,27 +12,31 @@ import org.gcube.vomanagement.usermanagement.model.GCubeUser;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
/** /**
* The Class UserUtil. * The Class UserUtil.
* *
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Aug 3, 2015 * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Aug 3, 2015
*/ */
public class UserUtil { public class UserUtil {
static UserManager um = new LiferayUserManager(); static UserManager um = new LiferayUserManager();
protected static Logger logger = LoggerFactory.getLogger(UserUtil.class); protected static Logger logger = LoggerFactory.getLogger(UserUtil.class);
/** /**
* Gets the user full name. * Gets the user full name.
* *
* @param portalLogin the portal login * @param portalLogin the portal login
* @return the user full name * @return the user full name
*/ */
public static String getUserFullName(String portalLogin) { public static String getUserFullName(String portalLogin){
if (portalLogin == null) if(portalLogin==null)
return ""; return "";
if (WsUtil.isWithinPortal()) { // INTO PORTAL if (WsUtil.isWithinPortal()) { //INTO PORTAL
GCubeUser curr = null; GCubeUser curr = null;
@ -44,80 +46,38 @@ public class UserUtil {
} catch (UserManagementSystemException e) { } catch (UserManagementSystemException e) {
logger.error("An error occurred in getUserByUsername " + e, e); logger.error("An error occurred in getUserByUsername "+e,e);
} catch (UserRetrievalFault e) { } catch (UserRetrievalFault e) {
logger.error("An error occurred in getUserByUsername " + e, e); logger.error("An error occurred in getUserByUsername "+e,e);
} }
} catch (Exception e) { }catch (Exception e) {
logger.error("An error occurred in getUserByUsername " + e, e); logger.error("An error occurred in getUserByUsername "+e,e);
logger.warn("Return portal login " + portalLogin); logger.warn("Return portal login "+portalLogin);
return portalLogin; return portalLogin;
} }
if (curr != null) { if (curr != null){
// logger.trace("Return "+curr.getFullname() +" full name for: "+portalLogin); // logger.trace("Return "+curr.getFullname() +" full name for: "+portalLogin);
return curr.getFullname(); return curr.getFullname();
} }
} else { }else{
logger.trace("DEVELOPEMENT MODE ON"); logger.trace("DEVELOPEMENT MODE ON");
} }
logger.trace("Return portal login as full name for: " + portalLogin); logger.trace("Return portal login as full name for: "+portalLogin);
return portalLogin; return portalLogin;
} }
public static List<ContactModel> listMembersToListContact(List<Member> members) {
logger.info("listMembersToListContact called for " + members.size() + " member/s");
List<ContactModel> listContacts = new ArrayList<ContactModel>();
UserManager userManager = new LiferayUserManager();
for (Member member : members) {
logger.debug("Resolving member: " + member);
boolean isGroup = member.getMemberType().equals(Member.TYPE.GROUP) ? true : false;
if (!isGroup) {
// HE/SHE IS A USER
listContacts.add(new ContactModel(member.getIdentity(), member.getIdentity(), false,
UserUtil.getUserFullName(member.getIdentity())));
} else {
// HE/SHE IS A GROUP
logger.debug("The member: " + member
+ " is a group, resolving list of Users from "+LiferayUserManager.class.getSimpleName()+" for the group name: "
+ member.getName());
try {
List<GCubeUser> listUsers = userManager.listUsersByGroupName(member.getName());
if (listUsers != null) {
logger.debug("List of user for groupName are: " + listUsers.size());
for (GCubeUser user : listUsers) {
listContacts.add(new ContactModel(user.getUsername(), user.getUsername(), false,
user.getFullname()));
}
} else {
logger.warn("List of user for groupName: " + member.getName() + " is null");
}
} catch (UserManagementSystemException | GroupRetrievalFault | UserRetrievalFault e) {
logger.warn("Error occurrend on resolving the member: " + member.getName(), e);
}
}
}
logger.info("Returning " + listContacts.size() + " from members");
return listContacts;
}
/** /**
* Gets the list login by info contact model. * Gets the list login by info contact model.
* *
* @param listContacts the list contacts * @param listContacts the list contacts
* @return the list login by info contact model * @return the list login by info contact model
*/ */
public static List<String> getListLoginByInfoContactModel(List<ContactModel> listContacts) { public static List<String> getListLoginByInfoContactModel(List<ContactModel> listContacts){
List<String> listUsers = new ArrayList<String>(); List<String> listUsers = new ArrayList<String>();
@ -134,45 +94,46 @@ public class UserUtil {
* @param listContacts the list contacts * @param listContacts the list contacts
* @return the string * @return the string
*/ */
public static String separateUsersNamesToComma(List<ContactModel> listContacts) { public static String separateUsersNamesToComma(List<ContactModel> listContacts){
String users = ""; String users = "";
for (int i = 0; i < listContacts.size() - 1; i++) { for (int i = 0; i < listContacts.size()-1; i++) {
users += listContacts.get(i).getFullName() + ", "; users+= listContacts.get(i).getFullName() + ", ";
} }
if (listContacts.size() > 1) if(listContacts.size()>1)
users += listContacts.get(listContacts.size() - 1).getFullName(); users += listContacts.get(listContacts.size()-1).getFullName();
return users; return users;
} }
/** /**
* Separate full name to comma for portal login. * Separate full name to comma for portal login.
* *
* @param listLogin the list login * @param listLogin the list login
* @return the string * @return the string
*/ */
public static String separateFullNameToCommaForPortalLogin(List<String> listLogin) { public static String separateFullNameToCommaForPortalLogin(List<String> listLogin){
String users = ""; String users = "";
logger.trace("SeparateFullNameToCommaForPortalLogin converting: " + listLogin); logger.trace("SeparateFullNameToCommaForPortalLogin converting: "+listLogin);
// N-1 MEMBERS //N-1 MEMBERS
for (int i = 0; i < listLogin.size() - 1; i++) { for (int i = 0; i < listLogin.size()-1; i++) {
// logger.trace("Converting: "+i+") "+listLogin.get(i)); // logger.trace("Converting: "+i+") "+listLogin.get(i));
users += getUserFullName(listLogin.get(i)) + ", "; users+= getUserFullName(listLogin.get(i)) + ", ";
} }
// LAST MEMBER //LAST MEMBER
if (listLogin.size() >= 1) { if(listLogin.size()>=1){
// logger.trace("Converting: "+(listLogin.size()-1)+") " +listLogin.get(listLogin.size()-1)); // logger.trace("Converting: "+(listLogin.size()-1)+") " +listLogin.get(listLogin.size()-1));
users += getUserFullName(listLogin.get(listLogin.size() - 1)); users += getUserFullName(listLogin.get(listLogin.size()-1));
} }
logger.trace("SeparateFullNameToCommaForPortalLogin returning: " + users); logger.trace("SeparateFullNameToCommaForPortalLogin returning: "+users);
return users; return users;
} }