2 * Copyright (c) 2011 Greek Research and Technology Network
4 package gr.grnet.pithos.web.client.commands;
6 import gr.grnet.pithos.web.client.DeleteGroupDialog;
7 import gr.grnet.pithos.web.client.DeleteUserDialog;
8 import gr.grnet.pithos.web.client.GSS;
9 import gr.grnet.pithos.web.client.Groups.Images;
10 import gr.grnet.pithos.web.client.rest.resource.GroupResource;
11 import gr.grnet.pithos.web.client.rest.resource.GroupUserResource;
13 import com.google.gwt.user.client.Command;
14 import com.google.gwt.user.client.ui.PopupPanel;
17 public class DeleteUserOrGroupCommand implements Command{
18 private PopupPanel containerPanel;
22 * @param aContainerPanel
23 * @param newImages the images of the new folder dialog
25 public DeleteUserOrGroupCommand(PopupPanel aContainerPanel, final Images newImages){
26 containerPanel = aContainerPanel;
31 public void execute() {
32 containerPanel.hide();
33 if(GSS.get().getCurrentSelection() instanceof GroupResource)
35 else if(GSS.get().getCurrentSelection() instanceof GroupUserResource)
38 GSS.get().displayError("No user or group selected");
41 void displayNewGroup() {
42 DeleteGroupDialog dlg = new DeleteGroupDialog(images);
46 void displayNewUser() {
47 DeleteUserDialog dlg = new DeleteUserDialog(images);