root / src / gr / grnet / pithos / web / client / commands / PurgeContainerCommand.java @ 8ddb4627
History | View | Annotate | Download (2.5 kB)
1 | a57faaf0 | Christos Stathis | /*
|
---|---|---|---|
2 | e6e9f6e6 | Christos KK Loverdos | * Copyright 2011-2013 GRNET S.A. All rights reserved.
|
3 | 63366925 | Christos Stathis | *
|
4 | 63366925 | Christos Stathis | * Redistribution and use in source and binary forms, with or
|
5 | 63366925 | Christos Stathis | * without modification, are permitted provided that the following
|
6 | 63366925 | Christos Stathis | * conditions are met:
|
7 | 63366925 | Christos Stathis | *
|
8 | 63366925 | Christos Stathis | * 1. Redistributions of source code must retain the above
|
9 | 63366925 | Christos Stathis | * copyright notice, this list of conditions and the following
|
10 | 63366925 | Christos Stathis | * disclaimer.
|
11 | 63366925 | Christos Stathis | *
|
12 | 63366925 | Christos Stathis | * 2. Redistributions in binary form must reproduce the above
|
13 | 63366925 | Christos Stathis | * copyright notice, this list of conditions and the following
|
14 | 63366925 | Christos Stathis | * disclaimer in the documentation and/or other materials
|
15 | 63366925 | Christos Stathis | * provided with the distribution.
|
16 | 63366925 | Christos Stathis | *
|
17 | 63366925 | Christos Stathis | * THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
|
18 | 63366925 | Christos Stathis | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19 | 63366925 | Christos Stathis | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
20 | 63366925 | Christos Stathis | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
|
21 | 63366925 | Christos Stathis | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
22 | 63366925 | Christos Stathis | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
23 | 63366925 | Christos Stathis | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
24 | 63366925 | Christos Stathis | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
25 | 63366925 | Christos Stathis | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
26 | 63366925 | Christos Stathis | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
27 | 63366925 | Christos Stathis | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
28 | 63366925 | Christos Stathis | * POSSIBILITY OF SUCH DAMAGE.
|
29 | 63366925 | Christos Stathis | *
|
30 | 63366925 | Christos Stathis | * The views and conclusions contained in the software and
|
31 | 63366925 | Christos Stathis | * documentation are those of the authors and should not be
|
32 | 63366925 | Christos Stathis | * interpreted as representing official policies, either expressed
|
33 | 63366925 | Christos Stathis | * or implied, of GRNET S.A.
|
34 | a57faaf0 | Christos Stathis | */
|
35 | a57faaf0 | Christos Stathis | package gr.grnet.pithos.web.client.commands; |
36 | a57faaf0 | Christos Stathis | |
37 | 8ddb4627 | Christos KK Loverdos | import gr.grnet.pithos.web.client.GroupCreateDialog; |
38 | 749068ba | Christos Stathis | import gr.grnet.pithos.web.client.Pithos; |
39 | 8ddb4627 | Christos KK Loverdos | import gr.grnet.pithos.web.client.PurgeContainerDialog; |
40 | 49080dd5 | Christos Stathis | import gr.grnet.pithos.web.client.foldertree.Folder; |
41 | a57faaf0 | Christos Stathis | |
42 | a57faaf0 | Christos Stathis | import com.google.gwt.user.client.Command; |
43 | a57faaf0 | Christos Stathis | import com.google.gwt.user.client.ui.PopupPanel; |
44 | a57faaf0 | Christos Stathis | |
45 | a57faaf0 | Christos Stathis | |
46 | a57faaf0 | Christos Stathis | /**
|
47 | a57faaf0 | Christos Stathis | * Command to empty trash bin.
|
48 | a57faaf0 | Christos Stathis | */
|
49 | 8ddb4627 | Christos KK Loverdos | public class PurgeContainerCommand implements Command{ |
50 | 8ddb4627 | Christos KK Loverdos | private final PopupPanel containerPanel; |
51 | a57faaf0 | Christos Stathis | |
52 | 8ddb4627 | Christos KK Loverdos | private final Pithos app; |
53 | 42214d4a | Christos Stathis | |
54 | 8ddb4627 | Christos KK Loverdos | private final Folder container; |
55 | a7c43f26 | Christos Stathis | |
56 | 8ddb4627 | Christos KK Loverdos | public PurgeContainerCommand(Pithos app, PopupPanel containerPanel, Folder container){
|
57 | 8ddb4627 | Christos KK Loverdos | this.app = app;
|
58 | 8ddb4627 | Christos KK Loverdos | this.containerPanel = containerPanel;
|
59 | 8ddb4627 | Christos KK Loverdos | this.container = container;
|
60 | a57faaf0 | Christos Stathis | } |
61 | a57faaf0 | Christos Stathis | |
62 | a57faaf0 | Christos Stathis | @Override
|
63 | a57faaf0 | Christos Stathis | public void execute() { |
64 | 8ddb4627 | Christos KK Loverdos | if(containerPanel != null) { |
65 | 8ddb4627 | Christos KK Loverdos | containerPanel.hide(); |
66 | 8ddb4627 | Christos KK Loverdos | } |
67 | 8ddb4627 | Christos KK Loverdos | PurgeContainerDialog dlg = new PurgeContainerDialog(app, container);
|
68 | 8ddb4627 | Christos KK Loverdos | dlg.center(); |
69 | a57faaf0 | Christos Stathis | } |
70 | a57faaf0 | Christos Stathis | } |