rafactor on class

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@120322 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2015-11-19 15:05:01 +00:00
parent d36690b83f
commit 80db6955aa
3 changed files with 12 additions and 13 deletions

View File

@ -60,7 +60,7 @@ import org.gcube.portlets.user.workspace.server.notifications.NotificationsUtil;
import org.gcube.portlets.user.workspace.server.resolver.UriResolverReaderParameter;
import org.gcube.portlets.user.workspace.server.shortener.UrlShortener;
import org.gcube.portlets.user.workspace.server.util.AclTypeComparator;
import org.gcube.portlets.user.workspace.server.util.DiffereceBeetweenInfoContactModel;
import org.gcube.portlets.user.workspace.server.util.DiffereceBetweenInfoContactModel;
import org.gcube.portlets.user.workspace.server.util.HttpRequestUtil;
import org.gcube.portlets.user.workspace.server.util.StringUtil;
import org.gcube.portlets.user.workspace.server.util.UserUtil;
@ -1715,7 +1715,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
sharedFolder.setDescription(folder.getDescription()); //SET NEW DESCRIPTION
//USER REMOVED FROM SHARE
DiffereceBeetweenInfoContactModel diff2 = new DiffereceBeetweenInfoContactModel(listSharedContact, listContacts);
DiffereceBetweenInfoContactModel diff2 = new DiffereceBetweenInfoContactModel(listSharedContact, listContacts);
List<InfoContactModel> listRemovedUsersFromShare = diff2.getDifferentsContacts();
workspaceLogger.info("List removed user from share has size: "+listRemovedUsersFromShare.size());
for (InfoContactModel userRemoved : listRemovedUsersFromShare) {
@ -3062,14 +3062,14 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
NotificationsProducer np = getNotificationProducer();
workspaceLogger.info("Sending notifications downgrade/upgrade administator/s..");
DiffereceBeetweenInfoContactModel diff1 = new DiffereceBeetweenInfoContactModel(oldAdmins, newAdmins);
DiffereceBetweenInfoContactModel diff1 = new DiffereceBetweenInfoContactModel(oldAdmins, newAdmins);
List<InfoContactModel> contactsDowngrade = diff1.getDifferentsContacts();
for (InfoContactModel infoContactModel : contactsDowngrade) {
np.notifyAdministratorDowngrade(infoContactModel, sharedFolder);
}
DiffereceBeetweenInfoContactModel diff2 = new DiffereceBeetweenInfoContactModel(newAdmins, oldAdmins);
DiffereceBetweenInfoContactModel diff2 = new DiffereceBetweenInfoContactModel(newAdmins, oldAdmins);
List<InfoContactModel> contactsUpgrade = diff2.getDifferentsContacts();
for (InfoContactModel infoContactModel : contactsUpgrade) {

View File

@ -15,7 +15,7 @@ import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
import org.gcube.common.homelibrary.home.workspace.WorkspaceSharedFolder;
import org.gcube.common.scope.impl.ScopeBean;
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
import org.gcube.portlets.user.workspace.server.util.DiffereceBeetweenInfoContactModel;
import org.gcube.portlets.user.workspace.server.util.DiffereceBetweenInfoContactModel;
import org.gcube.portlets.user.workspace.server.util.UserUtil;
import org.gcube.portlets.user.workspace.server.util.WsUtil;
@ -241,7 +241,7 @@ public class NotificationsProducer {
try{
//NEW USER SHARED
DiffereceBeetweenInfoContactModel diff = new DiffereceBeetweenInfoContactModel(listSharingContact, listSharedContact);
DiffereceBetweenInfoContactModel diff = new DiffereceBetweenInfoContactModel(listSharingContact, listSharedContact);
List<InfoContactModel> listNewContactsShared = diff.getDifferentsContacts();
@ -307,7 +307,7 @@ public class NotificationsProducer {
}
//USER REMOVED FROM SHARE
DiffereceBeetweenInfoContactModel diff2 = new DiffereceBeetweenInfoContactModel(listSharedContact, listSharingContact);
DiffereceBetweenInfoContactModel diff2 = new DiffereceBetweenInfoContactModel(listSharedContact, listSharingContact);
List<InfoContactModel> listRemovedUsersFromShare = diff2.getDifferentsContacts();

View File

@ -6,13 +6,14 @@ import java.util.List;
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
/**
* The Class DiffereceBeetweenInfoContactModel.
* The Class DiffereceBetweenInfoContactModel.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Nov 4, 2015
* Nov 19, 2015
*/
public class DiffereceBeetweenInfoContactModel {
public class DiffereceBetweenInfoContactModel {
private List<InfoContactModel> listOne;
@ -24,11 +25,9 @@ public class DiffereceBeetweenInfoContactModel {
* @param listA the list a
* @param listB the list b
*/
public DiffereceBeetweenInfoContactModel(List<InfoContactModel> listA, List<InfoContactModel> listB){
public DiffereceBetweenInfoContactModel(List<InfoContactModel> listA, List<InfoContactModel> listB){
this.listOne = listA;
this.listTwo = listB;
}
/**