enhancements
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@92580 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
94dd4a056e
commit
181ff4576c
|
@ -1,13 +1,6 @@
|
|||
package org.gcube.portlets.widgets.workspacesharingwidget.client;
|
||||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.ACL_TYPE;
|
||||
|
||||
import com.extjs.gxt.ui.client.widget.Window;
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
|
||||
/**
|
||||
* Entry point classes define <code>onModuleLoad()</code>.
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.widgets.workspacesharingwidget.client;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.rpc.WorkspaceSharingService;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.rpc.WorkspaceSharingServiceAsync;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing.SmartShare;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.CredentialModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.FileModel;
|
||||
|
||||
import com.extjs.gxt.ui.client.event.BaseEvent;
|
||||
import com.extjs.gxt.ui.client.event.Events;
|
||||
import com.extjs.gxt.ui.client.event.Listener;
|
||||
import com.extjs.gxt.ui.client.widget.Dialog;
|
||||
import com.extjs.gxt.ui.client.widget.Window;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Feb 25, 2014
|
||||
*
|
||||
*/
|
||||
public class WorkspaceSmartSharingController {
|
||||
|
||||
public static final WorkspaceSharingServiceAsync rpcWorkspaceSharingService = (WorkspaceSharingServiceAsync) GWT.create(WorkspaceSharingService.class);
|
||||
|
||||
private SmartShare smartShare = null;
|
||||
|
||||
private List<CredentialModel> listAlreadySharedContact;
|
||||
|
||||
private FileModel fileModel;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param file a fake file (used to display name of the file or folder)
|
||||
* @param listAlreadySharedContact
|
||||
*/
|
||||
public WorkspaceSmartSharingController(FileModel file, List<CredentialModel> listAlreadySharedContact) {
|
||||
this.listAlreadySharedContact = listAlreadySharedContact;
|
||||
this.fileModel = file;
|
||||
smartShare = new SmartShare();
|
||||
smartShare.setSize(ConstantsSharing.WIDTH_DIALOG+20, ConstantsSharing.HEIGHT_DIALOG-150);
|
||||
updateSharingDialog();
|
||||
addListenersSharingDialog();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Example of listners
|
||||
*/
|
||||
private void addListenersSharingDialog(){
|
||||
|
||||
smartShare.getButtonById(Dialog.OK).addListener(Events.Select, new Listener<BaseEvent>() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(BaseEvent be) {
|
||||
|
||||
if(smartShare.isValidForm(true)){
|
||||
//THAT'S OK
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fileModel
|
||||
*/
|
||||
private void updateSharingDialog(){
|
||||
smartShare.unmask();
|
||||
smartShare.updateSharingDialog(fileModel, listAlreadySharedContact);
|
||||
// dialogShareItem.show();
|
||||
|
||||
smartShare.layout();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Window getSharingDialog() {
|
||||
return smartShare;
|
||||
}
|
||||
|
||||
}
|
|
@ -2,6 +2,7 @@ package org.gcube.portlets.widgets.workspacesharingwidget.client.rpc;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.CredentialModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.FileModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.WorkspaceACL;
|
||||
|
@ -70,4 +71,13 @@ public interface WorkspaceSharingService extends RemoteService {
|
|||
*/
|
||||
boolean shareFolder(FileModel folder, List<InfoContactModel> listContacts,
|
||||
boolean isNewFolder, WorkspaceACL acl) throws Exception;
|
||||
|
||||
/**
|
||||
* @param listAlreadySharedContact
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<InfoContactModel> getInfoContactModelsFromCredential(
|
||||
List<CredentialModel> listAlreadySharedContact) throws Exception;
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.gcube.portlets.widgets.workspacesharingwidget.client.rpc;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.CredentialModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.FileModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.WorkspaceACL;
|
||||
|
@ -62,4 +63,11 @@ public interface WorkspaceSharingServiceAsync
|
|||
void shareFolder(FileModel folder, List<InfoContactModel> listContacts,
|
||||
boolean isNewFolder, WorkspaceACL acl,
|
||||
AsyncCallback<Boolean> callback);
|
||||
|
||||
|
||||
void getInfoContactModelsFromCredential(
|
||||
List<CredentialModel> listAlreadySharedContact,
|
||||
AsyncCallback<List<InfoContactModel>> callback);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.CredentialModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
@ -13,4 +14,12 @@ public interface ContactFetcher {
|
|||
public List<InfoContactModel> getExclusiveContactsFromAllContact(List<InfoContactModel> listSharedUser);
|
||||
public void getOwner(String sharedFolderId, AsyncCallback<InfoContactModel> callback);
|
||||
|
||||
/**
|
||||
* @param listAlreadySharedContact
|
||||
* @param callback
|
||||
*/
|
||||
void getInfoContactModelsFromCredential(
|
||||
List<CredentialModel> listAlreadySharedContact,
|
||||
AsyncCallback<List<InfoContactModel>> callback);
|
||||
|
||||
}
|
||||
|
|
|
@ -16,9 +16,6 @@ import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
|||
import com.extjs.gxt.ui.client.Style.Scroll;
|
||||
import com.extjs.gxt.ui.client.Style.VerticalAlignment;
|
||||
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
||||
import com.extjs.gxt.ui.client.event.EventType;
|
||||
import com.extjs.gxt.ui.client.event.Events;
|
||||
import com.extjs.gxt.ui.client.event.Listener;
|
||||
import com.extjs.gxt.ui.client.event.SelectionListener;
|
||||
import com.extjs.gxt.ui.client.widget.Dialog;
|
||||
import com.extjs.gxt.ui.client.widget.HorizontalPanel;
|
||||
|
|
|
@ -1,56 +1,55 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.WorkspaceSharingController;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.ConstantsSharing;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing.multisuggest.MultiDragContact;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing.multisuggest.MultiValuePanel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.CredentialModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.FileModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.WorkspaceACL;
|
||||
|
||||
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
||||
import com.extjs.gxt.ui.client.Style.Scroll;
|
||||
import com.extjs.gxt.ui.client.Style.VerticalAlignment;
|
||||
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
||||
import com.extjs.gxt.ui.client.event.SelectionListener;
|
||||
import com.extjs.gxt.ui.client.widget.Dialog;
|
||||
import com.extjs.gxt.ui.client.widget.HorizontalPanel;
|
||||
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
||||
import com.extjs.gxt.ui.client.widget.MessageBox;
|
||||
import com.extjs.gxt.ui.client.widget.form.TextArea;
|
||||
import com.extjs.gxt.ui.client.widget.form.TextField;
|
||||
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
||||
import com.google.gwt.core.shared.GWT;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.shared.HandlerManager;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Feb 27, 2014
|
||||
* @Mar 3, 2014
|
||||
*
|
||||
*/
|
||||
public class DialogShareWItemNoACL extends Dialog {
|
||||
public class SmartShare extends Dialog{
|
||||
|
||||
private int widthDialog = 530;
|
||||
private int heightTextArea = 100;
|
||||
private TextField<String> txtName;
|
||||
private TextArea textAreaDescription = new TextArea();
|
||||
private FileModel fileToShare = null;
|
||||
private UserStore userStore = new UserStore();
|
||||
private MultiValuePanel suggestPanel = new MultiValuePanel(userStore);
|
||||
private Button buttonMultiDrag = new Button("Choose Contacts");
|
||||
private TextField<String> txtOwner;
|
||||
private PanelTogglePermission permission;
|
||||
private HorizontalPanel hpPermission = null;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public SmartShare() {
|
||||
initLayout();
|
||||
}
|
||||
|
||||
|
||||
private List<InfoContactModel> listAlreadyShared = new ArrayList<InfoContactModel>(){
|
||||
|
||||
/**
|
||||
|
@ -80,21 +79,20 @@ public class DialogShareWItemNoACL extends Dialog {
|
|||
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Use to modify a shared folder or share an existing folder
|
||||
* @param fileModel
|
||||
* @param type
|
||||
*/
|
||||
public DialogShareWItemNoACL(FileModel fileModel, HandlerManager eventBus, final boolean shareOnlyOwner) {
|
||||
initLayout();
|
||||
this.fileToShare = fileModel;
|
||||
// this.setIcon(Resources.getIconShareFolder());
|
||||
|
||||
setWidth(widthDialog);
|
||||
|
||||
public void updateSharingDialog(FileModel fileModel, List<CredentialModel> listAlreadySharedContact){
|
||||
this.fileToShare = fileModel;
|
||||
|
||||
setButtons(Dialog.OKCANCEL);
|
||||
|
||||
String heading = "Share workspace";
|
||||
String heading = "Share";
|
||||
if(fileModel.isDirectory())
|
||||
heading+=" folder: ";
|
||||
else
|
||||
|
@ -107,21 +105,8 @@ public class DialogShareWItemNoACL extends Dialog {
|
|||
txtName.setValue(fileModel.getName());
|
||||
txtName.setReadOnly(true);
|
||||
txtName.setAutoValidate(true);
|
||||
txtName.setFieldLabel("Folder Name");
|
||||
txtName.setFieldLabel("Item Name");
|
||||
|
||||
txtOwner = new TextField<String>();
|
||||
txtOwner.setAllowBlank(true);
|
||||
txtOwner.setValue("");
|
||||
txtOwner.setReadOnly(true);
|
||||
txtOwner.setAutoValidate(false);
|
||||
txtOwner.setFieldLabel("Owner");
|
||||
|
||||
textAreaDescription.setFieldLabel("Description");
|
||||
textAreaDescription.setHeight(heightTextArea);
|
||||
textAreaDescription.setWidth(380);
|
||||
|
||||
textAreaDescription.setValue(fileModel.getDescription());
|
||||
// textAreaDescription.setReadOnly(true);
|
||||
|
||||
final LayoutContainer lc = new LayoutContainer();
|
||||
lc.setStyleAttribute("margin-top", "10px");
|
||||
|
@ -136,121 +121,55 @@ public class DialogShareWItemNoACL extends Dialog {
|
|||
|
||||
buttonMultiDrag.setStyleName("wizardButton");
|
||||
|
||||
// buttonMultiDrag.setIcon(Resources.getIconUsers());
|
||||
|
||||
flexTable.setWidget(1, 0, new Label("Add more"));
|
||||
flexTable.setWidget(1, 1, buttonMultiDrag);
|
||||
|
||||
Label labelDescription = new Label("Description");
|
||||
flexTable.setWidget(2, 0, labelDescription);
|
||||
flexTable.setWidget(2, 1, textAreaDescription);
|
||||
|
||||
|
||||
hpPermission = new HorizontalPanel();
|
||||
hpPermission.setVerticalAlign(VerticalAlignment.MIDDLE);
|
||||
Label labelProperty = new Label("Permissions");
|
||||
// final ToggleButton togglePermission = new ToggleButton("Set Permissions");
|
||||
// flexTable.setWidget(3, 0, labelProperty);
|
||||
|
||||
// flexTable.setWidget(3, 1, Resources.getIconLoading().createImage());
|
||||
hpPermission.add(labelProperty);
|
||||
|
||||
WorkspaceSharingController.rpcWorkspaceSharingService.getACLs(new AsyncCallback<List<WorkspaceACL>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<WorkspaceACL> result) {
|
||||
permission = new PanelTogglePermission(result,null);
|
||||
hpPermission.add(permission);
|
||||
hpPermission.layout();
|
||||
permission.setEnabled(false);
|
||||
layout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
hpPermission.add(new Label("Error on recovering ACLs"));
|
||||
hpPermission.layout();
|
||||
layout();
|
||||
}
|
||||
});
|
||||
if(listAlreadySharedContact!=null && listAlreadySharedContact.size()>0){
|
||||
|
||||
lc.add(flexTable);
|
||||
if(hpPermission!=null)
|
||||
lc.add(hpPermission);
|
||||
lc.mask();
|
||||
userStore.getListSharedUserByFolderId(fileModel.getIdentifier(), new AsyncCallback<List<InfoContactModel>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<InfoContactModel> result) {
|
||||
|
||||
for (InfoContactModel infoContactModel : result) {
|
||||
userStore.getInfoContactModelsFromCredential(listAlreadySharedContact, new AsyncCallback<List<InfoContactModel>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<InfoContactModel> result) {
|
||||
for (InfoContactModel infoContactModel : result) {
|
||||
if(infoContactModel.getName()!=null){
|
||||
listAlreadyShared.add(infoContactModel);
|
||||
suggestPanel.addRecipient(infoContactModel.getName(),false);
|
||||
layout();
|
||||
}
|
||||
}
|
||||
|
||||
lc.unmask();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
lc.unmask();
|
||||
|
||||
}
|
||||
});
|
||||
lc.layout();
|
||||
layout();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
lc.unmask();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
lc.add(flexTable);
|
||||
|
||||
userStore.getOwner(fileModel.getIdentifier(), new AsyncCallback<InfoContactModel>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
txtOwner.setValue("Error on retrieving Owner");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(InfoContactModel result) {
|
||||
txtOwner.setValue(result.getName());
|
||||
if(shareOnlyOwner)
|
||||
permissionControl(result.getLogin(), true);
|
||||
}
|
||||
});
|
||||
|
||||
setFocusWidget(suggestPanel.getBox());
|
||||
add(txtName);
|
||||
add(txtOwner);
|
||||
// add(txtOwner);
|
||||
add(lc);
|
||||
addListners();
|
||||
|
||||
if(shareOnlyOwner)
|
||||
enableFormDialog(false); //FORM IS DISABLED BY DEFAULT
|
||||
|
||||
// this.show();
|
||||
}
|
||||
|
||||
private void permissionControl(String owner, boolean showAlert){
|
||||
GWT.log("Permission control compare between owner: "+owner +" and my login: "+WorkspaceSharingController.getMyLogin());
|
||||
|
||||
if(WorkspaceSharingController.getMyLogin().compareToIgnoreCase(owner)!=0){
|
||||
enableFormDialog(false);
|
||||
if(showAlert)
|
||||
MessageBox.alert("Permission denied", "You have no permissions to change sharing. You are not owner of \""+txtName.getValue()+"\"", null);
|
||||
}else{
|
||||
enableFormDialog(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void enableFormDialog(boolean bool){
|
||||
getButtonById(Dialog.OK).setEnabled(bool);
|
||||
buttonMultiDrag.setEnabled(bool);
|
||||
textAreaDescription.setEnabled(bool);
|
||||
if(permission!=null)
|
||||
permission.setEnabled(bool);
|
||||
|
||||
// setEnabled(bool);
|
||||
|
||||
}
|
||||
|
||||
public FileModel getParentFolder() {
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public FileModel getFileToShare() {
|
||||
return fileToShare;
|
||||
}
|
||||
|
||||
|
@ -262,11 +181,10 @@ public class DialogShareWItemNoACL extends Dialog {
|
|||
setModal(true);
|
||||
setScrollMode(Scroll.AUTOY);
|
||||
setBodyStyle("padding: 9px; background: none");
|
||||
setWidth(widthDialog);
|
||||
setHeight(397);
|
||||
setWidth(ConstantsSharing.WIDTH_DIALOG);
|
||||
setHeight(ConstantsSharing.HEIGHT_DIALOG);
|
||||
setResizable(true);
|
||||
setButtonAlign(HorizontalAlignment.CENTER);
|
||||
setWidth(widthDialog);
|
||||
setButtons(Dialog.OKCANCEL);
|
||||
}
|
||||
|
||||
|
@ -275,6 +193,11 @@ public class DialogShareWItemNoACL extends Dialog {
|
|||
// printSelectedUser();
|
||||
return suggestPanel.getSelectedUser();
|
||||
}
|
||||
|
||||
|
||||
public List<CredentialModel> getSharedListUsersCredential() {
|
||||
return suggestPanel.getSelectedUserCredential();
|
||||
}
|
||||
|
||||
|
||||
public void addListners(){
|
||||
|
@ -384,13 +307,6 @@ public class DialogShareWItemNoACL extends Dialog {
|
|||
return txtName.getValue();
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
if(textAreaDescription.getValue()==null)
|
||||
return "";
|
||||
|
||||
return textAreaDescription.getValue();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param displayAlert
|
||||
|
@ -415,10 +331,5 @@ public class DialogShareWItemNoACL extends Dialog {
|
|||
return true;
|
||||
|
||||
}
|
||||
|
||||
public WorkspaceACL getSelectedACL(){
|
||||
if(permission!=null)
|
||||
return permission.getSelectedACL();
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.ConstantsSharing;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.WorkspaceSharingController;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.CredentialModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
import com.extjs.gxt.ui.client.widget.MessageBox;
|
||||
|
@ -110,4 +111,23 @@ public class UserStore implements ContactFetcher{
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getInfoContactModelsFromCredential(List<CredentialModel> listAlreadySharedContact, final AsyncCallback<List<InfoContactModel>> callback){
|
||||
|
||||
WorkspaceSharingController.rpcWorkspaceSharingService.getInfoContactModelsFromCredential(listAlreadySharedContact, new AsyncCallback<List<InfoContactModel>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
GWT.log("an error occured ingetInfoContactModelsFromCredential "+caught.getMessage());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<InfoContactModel> result) {
|
||||
callback.onSuccess(result);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -5,6 +5,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing.ContactFetcher;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.CredentialModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
@ -70,7 +71,7 @@ public class MultiValuePanel extends Composite {
|
|||
|
||||
if(li.getWidget(0) instanceof Paragraph){
|
||||
Paragraph p = (Paragraph) li.getWidget(0);
|
||||
// GWT.log("p "+p.getText() +" is removable : " + p.isRemovable());
|
||||
GWT.log("p "+p.getText() +" is removable : " + p.isRemovable());
|
||||
if (itemsSelected.contains(p.getText()) && (p.isRemovable()==true)) {
|
||||
itemsSelected.remove(p.getText());
|
||||
GWT.log("Removing selected item: " + p.getText() + "'");
|
||||
|
@ -155,6 +156,26 @@ public class MultiValuePanel extends Composite {
|
|||
return toReturn;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the selected contacts (user logins e.g. pino.pini)
|
||||
*/
|
||||
public List<CredentialModel> getSelectedUserCredential() {
|
||||
if (users == null)
|
||||
return new ArrayList<CredentialModel>();
|
||||
else {
|
||||
List<CredentialModel> toReturn = new ArrayList<CredentialModel>();
|
||||
|
||||
for (String login : itemsSelected) {
|
||||
InfoContactModel wsuser = users.get(login);
|
||||
if(wsuser!= null && !toReturn.contains(wsuser))
|
||||
toReturn.add(wsuser.getReferenceCredential());
|
||||
}
|
||||
return toReturn;
|
||||
}
|
||||
}
|
||||
|
||||
private void removeListItem(ListItem displayItem, BulletList list) {
|
||||
GWT.log("Removing: " + displayItem.getWidget(0).getElement().getInnerHTML(), null);
|
||||
|
@ -190,7 +211,7 @@ public class MultiValuePanel extends Composite {
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
||||
GWT.log("Error on loading contacts");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -201,7 +222,6 @@ public class MultiValuePanel extends Composite {
|
|||
for (InfoContactModel wsUser : result) {
|
||||
oracle.add(wsUser.getName());
|
||||
users.put(wsUser.getName(), wsUser);
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 210 B |
|
@ -95,7 +95,7 @@ li.multivalue-panel-token-ws span {
|
|||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background: #F2F2F2 url(images/white-grad.png) repeat-x scroll left top;
|
||||
background: #F2F2F2 url(white-grad.png) repeat-x scroll left top;
|
||||
border-color: #BBB;
|
||||
color: #464646;
|
||||
font-size: 12px;
|
||||
|
@ -114,7 +114,7 @@ li.multivalue-panel-token-ws span {
|
|||
border-color: #BBB;
|
||||
cursor: default;
|
||||
opacity: 1.0;
|
||||
background: #F2F2F2 url(images/white-grad.png) repeat-x scroll left top;
|
||||
background: #F2F2F2 url(white-grad.png) repeat-x scroll left top;
|
||||
}
|
||||
|
||||
.wizardButton:hover {
|
||||
|
@ -124,7 +124,7 @@ li.multivalue-panel-token-ws span {
|
|||
}
|
||||
|
||||
.wizardButton:active {
|
||||
background: #e3e8f3 url(images/white-grad.png) repeat-x scroll left top;
|
||||
background: #e3e8f3 url(white-grad.png) repeat-x scroll left top;
|
||||
}
|
||||
|
||||
|
||||
|
@ -163,4 +163,296 @@ table.userssuggest th {
|
|||
height: 30px;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************** COPIED FROM WS MAIL WIDGET ***************************/
|
||||
|
||||
attach-file-link {
|
||||
font-size: 12px;
|
||||
}
|
||||
a.attach-file-link {
|
||||
color: #3B5998;
|
||||
font-family: 'Helvetica Neue',Arial,sans-serif;
|
||||
}
|
||||
a.attach-file-link, a.attach-file-link:visited {
|
||||
color: #3B5998;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.attach-file-link:hover {
|
||||
font-size: 12px;
|
||||
opacity: 0.8;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.mail-div-table {
|
||||
background-clip: border-box;
|
||||
background-image: none;
|
||||
background-origin: padding-box;
|
||||
border-bottom: 1px solid #DADADA;
|
||||
display: table;
|
||||
padding: 7px;
|
||||
width: 500px;
|
||||
}
|
||||
.mail-div-table-row {
|
||||
display: table-row;
|
||||
text-align: left;
|
||||
}
|
||||
.mail-div-table-col {
|
||||
display: table-cell;
|
||||
padding-right: 5px;
|
||||
padding-top: 5px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.mail-div-table-col.labels {
|
||||
color: #666666;
|
||||
font-family: arial,sans-serif;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
width: 100px;
|
||||
}
|
||||
.error {
|
||||
background-color: #FFC0CB;
|
||||
color: #FFFFFF;
|
||||
transition: background 0.45s ease-in-out 0s;
|
||||
}
|
||||
.dark-color {
|
||||
background-color: #FFFFFF;
|
||||
color: #333333;
|
||||
transition: background 0.25s ease-in-out 0s;
|
||||
}
|
||||
.simple-tbox {
|
||||
border: 1px solid #CCCCCC;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
color: #000000;
|
||||
font-family: 'Lucida Grande',Verdana,'Bitstream Vera Sans',Arial,sans-serif !important;
|
||||
font-size: 12px !important;
|
||||
padding: 4px 2px;
|
||||
width: 496px;
|
||||
}
|
||||
.simple-tarea {
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
height: 80px;
|
||||
}
|
||||
.gwt-SuggestBox {
|
||||
border-color: #999999;
|
||||
border-width: 1px;
|
||||
color: #333333;
|
||||
font-family: 'Lucida Grande',Verdana,'Bitstream Vera Sans',Arial,sans-serif;
|
||||
font-size: 12px;
|
||||
letter-spacing: normal;
|
||||
padding: 4px 2px;
|
||||
z-index: 1500;
|
||||
}
|
||||
.gwt-SuggestBoxPopup {
|
||||
z-index: 10010;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .item {
|
||||
color: #333333;
|
||||
cursor: default;
|
||||
font-family: 'Lucida Grande',Verdana,'Bitstream Vera Sans',Arial,sans-serif;
|
||||
font-size: 11px;
|
||||
padding: 2px 6px;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .item-selected {
|
||||
background: none repeat scroll 0 0 #D3E1F1;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupContent {
|
||||
background: none repeat scroll 0 0 #FFFFFF;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupTopCenter {
|
||||
border-top: 1px solid #BBBBBB;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupBottomCenter {
|
||||
border-bottom: 1px solid #BBBBBB;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupTopCenterInner, .gwt-SuggestBoxPopup .suggestPopupBottomCenterInner {
|
||||
height: 1px;
|
||||
line-height: 1px;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupMiddleLeft {
|
||||
background-color: #FFFFFF;
|
||||
border-left: 1px solid #BBBBBB;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupMiddleRight {
|
||||
background-color: #FFFFFF;
|
||||
border-right: 1px solid #BBBBBB;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupMiddleLeftInner, .gwt-SuggestBoxPopup .suggestPopupMiddleRightInner {
|
||||
line-height: 1px;
|
||||
width: 1px;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
|
||||
background-color: #FFFFFF;
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupTopRightInner {
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupBottomLeftInner {
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupBottomRightInner {
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupTopLeft {
|
||||
background-color: #FFFFFF;
|
||||
border-left: 1px solid #BBBBBB;
|
||||
border-top: 1px solid #BBBBBB;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupTopRight {
|
||||
border-right: 1px solid #BBBBBB;
|
||||
border-top: 1px solid #BBBBBB;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupBottomLeft {
|
||||
border-bottom: 1px solid #BBBBBB;
|
||||
border-left: 1px solid #BBBBBB;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
}
|
||||
.gwt-SuggestBoxPopup .suggestPopupBottomRight {
|
||||
border-bottom: 1px solid #BBBBBB;
|
||||
border-right: 1px solid #BBBBBB;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
}
|
||||
html > body .gwt-SuggestBoxPopup {
|
||||
}
|
||||
* html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
width: 0;
|
||||
}
|
||||
* html .gwt-SuggestBoxPopup .suggestPopupTopRightInner {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
width: 0;
|
||||
}
|
||||
* html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
width: 0;
|
||||
}
|
||||
* html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
width: 0;
|
||||
}
|
||||
.auto_suggest {
|
||||
background-color: #FFFFFF;
|
||||
height: 230px;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
z-index: 20;
|
||||
}
|
||||
ul.attach-panel-list {
|
||||
background-color: #FFFFFF;
|
||||
cursor: text;
|
||||
font-family: Verdana;
|
||||
font-size: 12px;
|
||||
height: auto !important;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
min-height: 1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
width: 500px;
|
||||
z-index: 999;
|
||||
}
|
||||
ul.attach-panel-list li input {
|
||||
background-color: #FFFFFF;
|
||||
border: 0 none;
|
||||
margin: 2px 0;
|
||||
padding: 3px 8px;
|
||||
width: 100px;
|
||||
}
|
||||
li.attach-panel-token {
|
||||
background-color: #FFFFCC;
|
||||
background-image: url("images/clip.png");
|
||||
background-repeat: no-repeat;
|
||||
border: 1px solid #CCCCCC;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
color: #1C2A47;
|
||||
cursor: default;
|
||||
float: left;
|
||||
font-size: 11px;
|
||||
height: auto !important;
|
||||
margin: 3px;
|
||||
overflow: hidden;
|
||||
padding: 1px 3px;
|
||||
}
|
||||
li.attach-panel-token p {
|
||||
display: inline;
|
||||
line-height: 15px;
|
||||
margin: 0;
|
||||
padding-left: 16px;
|
||||
}
|
||||
li.attach-panel-token span {
|
||||
color: #A6B3CF;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
margin-left: 5px;
|
||||
}
|
||||
ul.multivalue-panel-list {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #CCCCCC;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
cursor: text;
|
||||
font-family: Verdana;
|
||||
font-size: 12px;
|
||||
height: auto !important;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
min-height: 1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
width: 500px;
|
||||
z-index: 999;
|
||||
}
|
||||
ul.multivalue-panel-list li input {
|
||||
background-color: #FFFFFF;
|
||||
border: 0 none;
|
||||
margin: 2px 0;
|
||||
padding: 3px 8px;
|
||||
width: 100px;
|
||||
}
|
||||
li.multivalue-panel-token {
|
||||
background-color: #E2E6F0;
|
||||
border: 1px solid #9DACCC;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
color: #1C2A47;
|
||||
cursor: default;
|
||||
float: left;
|
||||
font-size: 11px;
|
||||
height: auto !important;
|
||||
margin: 3px;
|
||||
overflow: hidden;
|
||||
padding: 1px 3px;
|
||||
}
|
||||
.notSelectable {
|
||||
background-color: #FFFFFF !important;
|
||||
}
|
||||
li.multivalue-panel-token p {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
li.multivalue-panel-token span {
|
||||
color: #A6B3CF;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
/*************************** END COPIED FROM WS MAIL WIDGET ***************************/
|
||||
|
|
|
@ -19,7 +19,6 @@ import org.gcube.common.homelibrary.home.workspace.folder.items.ExternalPDFFile;
|
|||
import org.gcube.common.homelibrary.home.workspace.folder.items.gcube.Document;
|
||||
import org.gcube.common.homelibrary.home.workspace.folder.items.gcube.ImageDocument;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.server.util.UserUtil;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.server.util.WsUtil;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.ACL_TYPE;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.FileModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.FolderModel;
|
||||
|
@ -114,8 +113,7 @@ public class GWTWorkspaceSharingBuilder {
|
|||
* @return
|
||||
* @throws InternalErrorException
|
||||
*/
|
||||
public List<InfoContactModel> buildGXTListContactsModel(
|
||||
List<UserModel> listUsers) throws InternalErrorException {
|
||||
public List<InfoContactModel> buildGXTListContactsModel(List<UserModel> listUsers) throws InternalErrorException {
|
||||
|
||||
List<InfoContactModel> listContactsModel = new ArrayList<InfoContactModel>();
|
||||
|
||||
|
@ -149,8 +147,7 @@ public class GWTWorkspaceSharingBuilder {
|
|||
* @param listPortalLogin
|
||||
* @return
|
||||
*/
|
||||
public List<InfoContactModel> buildGxtInfoContactsFromPortalLogins(
|
||||
List<String> listPortalLogin) {
|
||||
public List<InfoContactModel> buildGxtInfoContactsFromPortalLogins(List<String> listPortalLogin) {
|
||||
|
||||
List<InfoContactModel> listContact = new ArrayList<InfoContactModel>();
|
||||
for (String portalLogin : listPortalLogin)
|
||||
|
@ -172,8 +169,7 @@ public class GWTWorkspaceSharingBuilder {
|
|||
portalLogin = "";
|
||||
}
|
||||
|
||||
return new InfoContactModel(portalLogin, portalLogin,
|
||||
UserUtil.getUserFullName(portalLogin));
|
||||
return new InfoContactModel(portalLogin, portalLogin,UserUtil.getUserFullName(portalLogin));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.gcube.portlets.widgets.workspacesharingwidget.server.notifications.No
|
|||
import org.gcube.portlets.widgets.workspacesharingwidget.server.util.ScopeUtilFilter;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.server.util.UserUtil;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.server.util.WsUtil;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.CredentialModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.FileModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.SessionExpiredException;
|
||||
|
@ -394,5 +395,29 @@ public class WorkspaceSharingServiceImpl extends RemoteServiceServlet implements
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portlets.widgets.workspacesharingwidget.client.rpc.WorkspaceSharingService#getInfoContactModelsFromCredential(java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public List<InfoContactModel> getInfoContactModelsFromCredential(List<CredentialModel> listAlreadySharedContact) throws Exception {
|
||||
|
||||
if(listAlreadySharedContact==null || listAlreadySharedContact.size()==0)
|
||||
throw new Exception("Credentials list is null or empty");
|
||||
|
||||
|
||||
GWTWorkspaceSharingBuilder builder = getGWTWorkspaceBuilder();
|
||||
List<InfoContactModel> listContacts = new ArrayList<InfoContactModel>(listAlreadySharedContact.size());
|
||||
for (CredentialModel credentialModel : listAlreadySharedContact) {
|
||||
|
||||
if(!credentialModel.isGroup()){
|
||||
InfoContactModel contact = builder.buildGxtInfoContactFromPortalLogin(credentialModel.getLogin());
|
||||
contact.setReferenceCredential(credentialModel);
|
||||
listContacts.add(contact);
|
||||
}
|
||||
}
|
||||
|
||||
return listContacts;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -99,10 +99,10 @@ public class WsUtil {
|
|||
withoutPortal = true;
|
||||
|
||||
//COMMENT THIS IN PRODUCTION ENVIROMENT
|
||||
// }else if(user.compareToIgnoreCase("francesco.mangiacrapa")==0){
|
||||
//
|
||||
// withoutPortal = true;
|
||||
//// END UNCOMMENT
|
||||
}else if(user.compareToIgnoreCase("francesco.mangiacrapa")==0){
|
||||
|
||||
withoutPortal = true;
|
||||
// END UNCOMMENT
|
||||
}else{
|
||||
|
||||
withoutPortal = false;
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.widgets.workspacesharingwidget.shared;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Mar 3, 2014
|
||||
*
|
||||
*/
|
||||
public class CredentialModel implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -4265499048265553603L;
|
||||
|
||||
private String id;
|
||||
private String login;
|
||||
private boolean isGroup;
|
||||
|
||||
public CredentialModel(){
|
||||
|
||||
}
|
||||
/**
|
||||
* @param id
|
||||
* @param login
|
||||
* @param isGroup
|
||||
*/
|
||||
public CredentialModel(String id, String login, boolean isGroup) {
|
||||
this.id = id;
|
||||
this.login = login;
|
||||
this.isGroup = isGroup;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public String getLogin() {
|
||||
return login;
|
||||
}
|
||||
public boolean isGroup() {
|
||||
return isGroup;
|
||||
}
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
public void setLogin(String login) {
|
||||
this.login = login;
|
||||
}
|
||||
public void setGroup(boolean isGroup) {
|
||||
this.isGroup = isGroup;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("CredentialModel [id=");
|
||||
builder.append(id);
|
||||
builder.append(", login=");
|
||||
builder.append(login);
|
||||
builder.append(", isGroup=");
|
||||
builder.append(isGroup);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -41,7 +41,6 @@ public class FileModel extends BaseModelData implements Serializable {
|
|||
|
||||
private static final String FOLDERITEMTYPE = "FOLDERITEMTYPE";
|
||||
|
||||
protected InfoContactModel infoContacts;
|
||||
protected boolean isRoot = false;
|
||||
protected boolean isVreFolder;
|
||||
|
||||
|
@ -65,7 +64,6 @@ public class FileModel extends BaseModelData implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* USED FOR ATTACHMENTS AND FolderBulkCreator
|
||||
*
|
||||
* @param identifier
|
||||
* @param name
|
||||
|
|
|
@ -21,6 +21,9 @@ public class InfoContactModel extends BaseModelData implements Serializable {
|
|||
protected static final String ID = "id";
|
||||
public static final String FULLNAME = "fullname";
|
||||
public static final String LOGIN = "login";
|
||||
public static final String ISGROUP = "isgroup";
|
||||
|
||||
private CredentialModel referenceCredential;
|
||||
|
||||
|
||||
public InfoContactModel() {}
|
||||
|
@ -31,6 +34,14 @@ public class InfoContactModel extends BaseModelData implements Serializable {
|
|||
setName(fullName);
|
||||
}
|
||||
|
||||
public void setIsGroup(boolean isGroup){
|
||||
set(ISGROUP, isGroup);
|
||||
}
|
||||
|
||||
public Boolean isGroup(boolean isGroup){
|
||||
return (Boolean) get(ISGROUP);
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
set(FULLNAME,name);
|
||||
|
||||
|
@ -65,17 +76,35 @@ public class InfoContactModel extends BaseModelData implements Serializable {
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return the referenceCredential
|
||||
*/
|
||||
public CredentialModel getReferenceCredential() {
|
||||
return referenceCredential;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param referenceCredential the referenceCredential to set
|
||||
*/
|
||||
public void setReferenceCredential(CredentialModel referenceCredential) {
|
||||
this.referenceCredential = referenceCredential;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("InfoContactModel [getName()=");
|
||||
builder.append("InfoContactModel [referenceCredential=");
|
||||
builder.append(referenceCredential);
|
||||
builder.append(", getName()=");
|
||||
builder.append(getName());
|
||||
builder.append(", getId()=");
|
||||
builder.append(getId());
|
||||
builder.append(", getLogin()=");
|
||||
builder.append(getLogin());
|
||||
builder.append(", getReferenceCredential()=");
|
||||
builder.append(getReferenceCredential());
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue