Revision f55cf326

b/web_client/build.xml
1 1
<?xml version="1.0" encoding="utf-8" ?>
2
<project name="gss" default="gwt-compile" basedir=".">
3
	<description>The GSS project build file</description>
2
<project name="pithos" default="gwt-compile" basedir=".">
3
	<description>The Pithos web client project build file</description>
4 4

  
5 5
	<property file="build.properties"/>
6 6
    <property name="deps.dir" value="dependencies"/>
......
24 24
    <property name="gwtquery-droppable-plugin.filename" value="droppable-plugin-1.0.2.jar"/>
25 25
    <property name="gwtquery-droppable-plugin.download.url" value="http://gss.googlecode.com/hg/lib/${gwtquery-droppable-plugin.filename}?r=c8bca56a1c4ab780ac0d0cc72a2b40b60d7ca4f7"/>
26 26

  
27
    <property name="root.context" value="gss" />
28
    <property name="gwt.module.class" value="GSS" />
27
    <property name="gwt.module.class" value="Pithos" />
29 28
    <property name="gwt.root.package" value="gr.grnet.pithos.web" />
30 29
    <property name="gwt.root.path" value="gr/grnet/pithos/web" />
31 30
    <property name="gwt.module" value="${gwt.root.package}.${gwt.module.class}" />
......
136 135
            <arg value="${gwt.www.dir}/${gwt.module}"/>
137 136
            <arg value="-noserver"/>
138 137
            <arg value="-startupUrl"/>
139
            <arg value="http://127.0.0.1:8080/client/GSS.html"/>
138
            <arg value="http://127.0.0.1:8080/client/pithos.html"/>
140 139
            <arg value="${gwt.module}"/>
141 140
        </java>
142 141
    </target>
/dev/null
1
<!--
2
  ~ Copyright 2011 GRNET S.A. All rights reserved.
3
  ~
4
  ~ Redistribution and use in source and binary forms, with or
5
  ~ without modification, are permitted provided that the following
6
  ~ conditions are met:
7
  ~
8
  ~   1. Redistributions of source code must retain the above
9
  ~      copyright notice, this list of conditions and the following
10
  ~      disclaimer.
11
  ~
12
  ~   2. Redistributions in binary form must reproduce the above
13
  ~      copyright notice, this list of conditions and the following
14
  ~      disclaimer in the documentation and/or other materials
15
  ~      provided with the distribution.
16
  ~
17
  ~ THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
18
  ~ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
  ~ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
  ~ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
21
  ~ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22
  ~ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23
  ~ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24
  ~ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25
  ~ AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26
  ~ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
27
  ~ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
  ~ POSSIBILITY OF SUCH DAMAGE.
29
  ~
30
  ~ The views and conclusions contained in the software and
31
  ~ documentation are those of the authors and should not be
32
  ~ interpreted as representing official policies, either expressed
33
  ~ or implied, of GRNET S.A.
34
  -->
35

  
36
<module>
37
	<inherits name="com.google.gwt.user.User"/>
38
    <inherits name="com.google.gwt.user.theme.standard.Standard"/>
39
	<inherits name="com.google.gwt.gears.Gears"/>
40
	<inherits name="com.google.gwt.http.HTTP"/>
41
	<inherits name="com.google.gwt.json.JSON"/>
42
	<inherits name="gwtquery.plugins.droppable.Droppable"/>
43

  
44
    <entry-point class='gr.grnet.pithos.web.client.GSS' />
45
	<stylesheet src='gss.css' />
46

  
47
	<!-- Rebind the file upload dialog if Gears is installed -->
48
	<replace-with class="gr.grnet.pithos.web.client.FileUploadGearsDialog">
49
		<all>
50
			<when-type-is class="gr.grnet.pithos.web.client.FileUploadDialog"/>
51
			<when-property-is name="gears.installed" value="true"/>
52
			<none>
53
				<when-property-is name="user.agent" value="ie6"/>
54
				<when-property-is name="user.agent" value="ie8"/>
55
			</none>
56
		</all>
57
	</replace-with>	  
58
	<!-- Use a special file upload dialog if Gears is installed on IE -->
59
	<replace-with class="gr.grnet.pithos.web.client.FileUploadGearsIEDialog">
60
		<all>
61
			<when-type-is class="gr.grnet.pithos.web.client.FileUploadDialog"/>
62
			<when-property-is name="gears.installed" value="true"/>
63
			<any>
64
				<when-property-is name="user.agent" value="ie6"/>
65
				<when-property-is name="user.agent" value="ie8"/>
66
			</any>
67
		</all>
68
	</replace-with>
69
    
70
	<source path="client"/>
71
</module>
b/web_client/src/gr/grnet/pithos/web/Pithos.gwt.xml
1
<!--
2
  ~ Copyright 2011 GRNET S.A. All rights reserved.
3
  ~
4
  ~ Redistribution and use in source and binary forms, with or
5
  ~ without modification, are permitted provided that the following
6
  ~ conditions are met:
7
  ~
8
  ~   1. Redistributions of source code must retain the above
9
  ~      copyright notice, this list of conditions and the following
10
  ~      disclaimer.
11
  ~
12
  ~   2. Redistributions in binary form must reproduce the above
13
  ~      copyright notice, this list of conditions and the following
14
  ~      disclaimer in the documentation and/or other materials
15
  ~      provided with the distribution.
16
  ~
17
  ~ THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
18
  ~ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
  ~ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
  ~ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
21
  ~ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22
  ~ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23
  ~ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24
  ~ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25
  ~ AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26
  ~ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
27
  ~ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
  ~ POSSIBILITY OF SUCH DAMAGE.
29
  ~
30
  ~ The views and conclusions contained in the software and
31
  ~ documentation are those of the authors and should not be
32
  ~ interpreted as representing official policies, either expressed
33
  ~ or implied, of GRNET S.A.
34
  -->
35

  
36
<module>
37
	<inherits name="com.google.gwt.user.User"/>
38
    <inherits name="com.google.gwt.user.theme.standard.Standard"/>
39
	<inherits name="com.google.gwt.gears.Gears"/>
40
	<inherits name="com.google.gwt.http.HTTP"/>
41
	<inherits name="com.google.gwt.json.JSON"/>
42
	<inherits name="gwtquery.plugins.droppable.Droppable"/>
43

  
44
    <entry-point class='gr.grnet.pithos.web.client.Pithos' />
45
	<stylesheet src='gss.css' />
46

  
47
	<!-- Rebind the file upload dialog if Gears is installed -->
48
	<replace-with class="gr.grnet.pithos.web.client.FileUploadGearsDialog">
49
		<all>
50
			<when-type-is class="gr.grnet.pithos.web.client.FileUploadDialog"/>
51
			<when-property-is name="gears.installed" value="true"/>
52
			<none>
53
				<when-property-is name="user.agent" value="ie6"/>
54
				<when-property-is name="user.agent" value="ie8"/>
55
			</none>
56
		</all>
57
	</replace-with>	  
58
	<!-- Use a special file upload dialog if Gears is installed on IE -->
59
	<replace-with class="gr.grnet.pithos.web.client.FileUploadGearsIEDialog">
60
		<all>
61
			<when-type-is class="gr.grnet.pithos.web.client.FileUploadDialog"/>
62
			<when-property-is name="gears.installed" value="true"/>
63
			<any>
64
				<when-property-is name="user.agent" value="ie6"/>
65
				<when-property-is name="user.agent" value="ie8"/>
66
			</any>
67
		</all>
68
	</replace-with>
69
    
70
	<source path="client"/>
71
</module>
b/web_client/src/gr/grnet/pithos/web/client/AbstractPropertiesDialog.java
83 83
	public AbstractPropertiesDialog() {
84 84

  
85 85
		// Enable IE selection for the dialog (must disable it upon closing it)
86
		GSS.enableIESelection();
86
		Pithos.enableIESelection();
87 87

  
88 88
		setAnimationEnabled(true);
89 89

  
......
94 94
	 * @param userId
95 95
	 */
96 96
	protected void updateTags() {
97
		GetCommand<TagsResource> tc = new GetCommand<TagsResource>(TagsResource.class, GSS.get().getCurrentUserResource().getTagsPath(),null) {
97
		GetCommand<TagsResource> tc = new GetCommand<TagsResource>(TagsResource.class, Pithos.get().getCurrentUserResource().getTagsPath(),null) {
98 98

  
99 99
			@Override
100 100
			public void onComplete() {
......
130 130
			@Override
131 131
			public void onError(Throwable t) {
132 132
				GWT.log("", t);
133
				GSS.get().displayError("Unable to fetch user tags");
133
				Pithos.get().displayError("Unable to fetch user tags");
134 134
			}
135 135
		};
136 136
		DeferredCommand.addCommand(tc);
......
173 173
	 * (we disable the prevention on creation of the dialog)
174 174
	 */
175 175
	public void closeDialog() {
176
		GSS.preventIESelection();
176
		Pithos.preventIESelection();
177 177
		hide();
178 178
	}
179 179
}
b/web_client/src/gr/grnet/pithos/web/client/CellTreeView.java
193 193
            public void onSelectionChange(com.google.gwt.view.client.SelectionChangeEvent event) {
194 194
            	NodeInfo<RestResource> nodeInfo = (NodeInfo<RestResource>) getModel().getNodeInfo(selectionModel.getSelectedObject());
195 195
            	if(nodeInfo==null || nodeInfo.getValueUpdater()==null){
196
            		GSS.get().showFileList(getSelection());
196
            		Pithos.get().showFileList(getSelection());
197 197
            	}
198 198
            	else
199 199
            		nodeInfo.getValueUpdater().update(selectionModel.getSelectedObject());
200
            	GSS.get().setCurrentSelection(selectionModel.getSelectedObject());
200
            	Pithos.get().setCurrentSelection(selectionModel.getSelectedObject());
201 201
            	
202 202
            	
203 203
            }
......
341 341
	}
342 342
	private boolean init=false;
343 343
	public boolean fetchRootFolders() {
344
		UserResource userResource = GSS.get().getCurrentUserResource();
344
		UserResource userResource = Pithos.get().getCurrentUserResource();
345 345
		if (userResource == null)
346 346
			return !DONE;
347 347
		if(!init){
......
359 359
				@Override
360 360
				public void onError(Throwable t) {
361 361
					GWT.log("Error fetching root folder", t);
362
					GSS.get().displayError("Unable to fetch root folder");
362
					Pithos.get().displayError("Unable to fetch root folder");
363 363
				}
364 364
	
365 365
			};
366 366
			DeferredCommand.addCommand(gf);
367
			DeferredCommand.addCommand(new GetCommand<TrashResource>(TrashResource.class, GSS.get().getCurrentUserResource().getTrashPath(), null) {
367
			DeferredCommand.addCommand(new GetCommand<TrashResource>(TrashResource.class, Pithos.get().getCurrentUserResource().getTrashPath(), null) {
368 368
				@Override
369 369
				public void onComplete() {
370 370
					trash = getResult();
......
376 376
						int statusCode = ((RestException)t).getHttpStatusCode();
377 377
						// On IE status code 1223 may be returned instead of 204.
378 378
						if(statusCode == 204 || statusCode == 1223){
379
							trash = new TrashResource(GSS.get().getCurrentUserResource().getTrashPath());
379
							trash = new TrashResource(Pithos.get().getCurrentUserResource().getTrashPath());
380 380
					}
381 381
					else{
382 382
						GWT.log("", t);
383
						GSS.get().displayError("Unable to fetch trash folder:"+t.getMessage());
384
						trash = new TrashResource(GSS.get().getCurrentUserResource().getTrashPath());
383
						Pithos.get().displayError("Unable to fetch trash folder:"+t.getMessage());
384
						trash = new TrashResource(Pithos.get().getCurrentUserResource().getTrashPath());
385 385
					}
386 386
				}
387 387
			}
......
396 396
				@Override
397 397
				public void onError(Throwable t) {
398 398
					GWT.log("Error fetching Shared Root folder", t);
399
					GSS.get().displayError("Unable to fetch Shared Root folder");
399
					Pithos.get().displayError("Unable to fetch Shared Root folder");
400 400
				}
401 401
			};
402 402
			DeferredCommand.addCommand(gs);
......
411 411
				@Override
412 412
				public void onError(Throwable t) {
413 413
					GWT.log("Error fetching Others Root folder", t);
414
					GSS.get().displayError("Unable to fetch Others Root folder");
414
					Pithos.get().displayError("Unable to fetch Others Root folder");
415 415
				}
416 416
			};
417 417
			DeferredCommand.addCommand(go);
......
430 430
	
431 431
	
432 432
	public void updateTrashNode(){
433
		DeferredCommand.addCommand(new GetCommand<TrashResource>(TrashResource.class, GSS.get().getCurrentUserResource().getTrashPath(), null) {
433
		DeferredCommand.addCommand(new GetCommand<TrashResource>(TrashResource.class, Pithos.get().getCurrentUserResource().getTrashPath(), null) {
434 434
			@Override
435 435
			public void onComplete() {
436 436
				trash = getResult();
......
446 446
					int statusCode = ((RestException)t).getHttpStatusCode();
447 447
					// On IE status code 1223 may be returned instead of 204.
448 448
					if(statusCode == 204 || statusCode == 1223){
449
						trash = new TrashResource(GSS.get().getCurrentUserResource().getTrashPath());
449
						trash = new TrashResource(Pithos.get().getCurrentUserResource().getTrashPath());
450 450
						model.getRootNodes().getList().set(1, trash);
451 451
						//model.getRootNodes().refresh();
452 452
				}
453 453
				else{
454 454
					GWT.log("", t);
455
					GSS.get().displayError("Unable to fetch trash folder:"+t.getMessage());
456
					trash = new TrashResource(GSS.get().getCurrentUserResource().getTrashPath());
455
					Pithos.get().displayError("Unable to fetch trash folder:"+t.getMessage());
456
					trash = new TrashResource(Pithos.get().getCurrentUserResource().getTrashPath());
457 457
					model.getRootNodes().getList().set(1, trash);
458 458
					//model.getRootNodes().refresh();
459 459
				}
......
463 463
	}
464 464
	
465 465
	public void updateRootNode(){
466
		final String path = GSS.get().getCurrentUserResource().getFilesPath();
466
		final String path = Pithos.get().getCurrentUserResource().getFilesPath();
467 467
		GetCommand<FolderResource> gf = new GetCommand<FolderResource>(FolderResource.class, path, null) {
468 468

  
469 469
			@Override
......
478 478
			@Override
479 479
			public void onError(Throwable t) {
480 480
				GWT.log("Error fetching root folder", t);
481
				GSS.get().displayError("Unable to fetch root folder");
481
				Pithos.get().displayError("Unable to fetch root folder");
482 482
			}
483 483

  
484 484
		};
......
486 486
	}
487 487
	
488 488
	public void updateMySharedNode(){
489
		GetCommand<SharedResource> gs = new GetCommand<SharedResource>(SharedResource.class, GSS.get().getCurrentUserResource().getSharedPath(), null) {
489
		GetCommand<SharedResource> gs = new GetCommand<SharedResource>(SharedResource.class, Pithos.get().getCurrentUserResource().getSharedPath(), null) {
490 490

  
491 491
			@Override
492 492
			public void onComplete() {
......
497 497
			@Override
498 498
			public void onError(Throwable t) {
499 499
				GWT.log("Error fetching Shared Root folder", t);
500
				GSS.get().displayError("Unable to fetch Shared Root folder");
500
				Pithos.get().displayError("Unable to fetch Shared Root folder");
501 501
			}
502 502
		};
503 503
		DeferredCommand.addCommand(gs);
......
505 505
	
506 506
	public void updateOtherNode(){
507 507
		GetCommand<OthersResource> go = new GetCommand<OthersResource>(OthersResource.class,
508
					GSS.get().getCurrentUserResource().getOthersPath(), null) {
508
					Pithos.get().getCurrentUserResource().getOthersPath(), null) {
509 509

  
510 510
			@Override
511 511
			public void onComplete() {
......
516 516
			@Override
517 517
			public void onError(Throwable t) {
518 518
				GWT.log("Error fetching Others Root folder", t);
519
				GSS.get().displayError("Unable to fetch Others Root folder");
519
				Pithos.get().displayError("Unable to fetch Others Root folder");
520 520
			}
521 521
		};
522 522
		DeferredCommand.addCommand(go);
......
528 528
	}
529 529
	
530 530
	public void clearSelection(){
531
		if(GSS.get().getCurrentSelection().equals(getSelection()))
532
			GSS.get().setCurrentSelection(null);
531
		if(Pithos.get().getCurrentSelection().equals(getSelection()))
532
			Pithos.get().setCurrentSelection(null);
533 533
		selectionModel.setSelected(getSelection(), false);
534 534
	}
535 535
	
......
623 623
	public void refreshCurrentNode(boolean clearSelection){
624 624
		NodeInfo<RestResource> nodeInfo = (NodeInfo<RestResource>) getModel().getNodeInfo(selectionModel.getSelectedObject());
625 625
    	if(nodeInfo==null || nodeInfo.getValueUpdater()==null){
626
    		GSS.get().showFileList(getSelection(),clearSelection);
626
    		Pithos.get().showFileList(getSelection(),clearSelection);
627 627
    	}
628 628
    	else{
629 629
    		if(!clearSelection)
b/web_client/src/gr/grnet/pithos/web/client/CellTreeViewModel.java
65 65
import gwtquery.plugins.droppable.client.gwt.DragAndDropNodeInfo;
66 66

  
67 67
import java.util.ArrayList;
68
import java.util.Arrays;
69 68
import java.util.HashMap;
70 69
import java.util.List;
71 70
import java.util.Map;
......
218 217
		public void onBrowserEvent(Cell.Context context, com.google.gwt.dom.client.Element parent, RestResource value, com.google.gwt.dom.client.NativeEvent event, com.google.gwt.cell.client.ValueUpdater<RestResource> valueUpdater) {
219 218
			if(event.getType().equals("contextmenu")){
220 219
				selectionModel.setSelected(value, true);
221
				GSS.get().setCurrentSelection(value);
222
				GSS.get().getTreeView().showPopup(event.getClientX(), event.getClientY());
220
				Pithos.get().setCurrentSelection(value);
221
				Pithos.get().getTreeView().showPopup(event.getClientX(), event.getClientY());
223 222
			}
224 223
		};
225 224
		
......
266 265
	        // Second level.
267 266
			ListDataProvider<RestResource> trashProvider = new ListDataProvider<RestResource>();
268 267
			List<RestResource> r = new ArrayList<RestResource>();
269
			for(FolderResource f : GSS.get().getTreeView().getTrash().getFolders()){
268
			for(FolderResource f : Pithos.get().getTreeView().getTrash().getFolders()){
270 269
				r.add(new TrashFolderResource(f));
271 270
			}
272 271
			trashProvider.setList(r);
......
334 333
			public void f(final DragAndDropContext context) {
335 334
				if(context.getDroppableData()!=null && context.getDroppableData() instanceof RestResource){
336 335
					
337
					GSS.get().getTreeView().getUtils().openNodeContainingResource((RestResource) context.getDroppableData(), new RefreshHandler() {
336
					Pithos.get().getTreeView().getUtils().openNodeContainingResource((RestResource) context.getDroppableData(), new RefreshHandler() {
338 337
						
339 338
						@Override
340 339
						public void onRefresh() {
......
423 422
						FolderResource rootResource = getResult();
424 423
						//((MyFolderResource)value).getResource().setFiles(rootResource.getFiles());
425 424
						((MyFolderResource)value).setResource(rootResource);
426
						if(GSS.get().getTreeView().getSelection().getUri().equals(value.getUri()))
425
						if(Pithos.get().getTreeView().getSelection().getUri().equals(value.getUri()))
427 426
							selectionModel.setSelected(value, true);
428
						GSS.get().onResourceUpdate(value,clearSelection);
427
						Pithos.get().onResourceUpdate(value,clearSelection);
429 428
						
430 429
					}
431 430
	
432 431
					@Override
433 432
					public void onError(Throwable t) {
434 433
						GWT.log("Error fetching root folder", t);
435
						GSS.get().displayError("Unable to fetch root folder");
434
						Pithos.get().displayError("Unable to fetch root folder");
436 435
					}
437 436
	
438 437
				};
439 438
				DeferredCommand.addCommand(gf);
440 439
			}
441 440
			else if(value instanceof TrashResource){
442
				DeferredCommand.addCommand(new GetCommand<TrashResource>(TrashResource.class, GSS.get().getCurrentUserResource().getTrashPath(), null) {
441
				DeferredCommand.addCommand(new GetCommand<TrashResource>(TrashResource.class, Pithos.get().getCurrentUserResource().getTrashPath(), null) {
443 442
					@Override
444 443
					public void onComplete() {
445 444
						//trash = getResult();
......
447 446
						((TrashResource)value).setFiles(getResult().getFiles());
448 447
						for(RestResource r : getRootNodes().getList()){
449 448
							if(r instanceof TrashResource)
450
								getRootNodes().getList().set(getRootNodes().getList().indexOf(r),GSS.get().getTreeView().getTrash());
449
								getRootNodes().getList().set(getRootNodes().getList().indexOf(r), Pithos.get().getTreeView().getTrash());
451 450
						}
452
						GSS.get().getTreeView().updateNodeChildren(GSS.get().getTreeView().getTrash());
453
						//GSS.get().showFileList(true);
454
						GSS.get().onResourceUpdate(value,clearSelection);
451
						Pithos.get().getTreeView().updateNodeChildren(Pithos.get().getTreeView().getTrash());
452
						//Pithos.get().showFileList(true);
453
						Pithos.get().onResourceUpdate(value,clearSelection);
455 454
					}
456 455

  
457 456
					@Override
......
465 464
						}
466 465
						else{
467 466
							GWT.log("", t);
468
							GSS.get().displayError("Unable to fetch trash folder:"+t.getMessage());
469
							//GSS.get().getTreeView().getTrash() = new TrashResource(GSS.get().getCurrentUserResource().getTrashPath());
467
							Pithos.get().displayError("Unable to fetch trash folder:"+t.getMessage());
468
							//Pithos.get().getTreeView().getTrash() = new TrashResource(Pithos.get().getCurrentUserResource().getTrashPath());
470 469
						}
471 470
					}
472 471
				}
......
480 479
						FolderResource rootResource = getResult();
481 480
						//((MyFolderResource)value).getResource().setFiles(rootResource.getFiles());
482 481
						((OthersFolderResource)value).setResource(rootResource);
483
						if(GSS.get().getTreeView().getSelection().getUri().equals(value.getUri()))
482
						if(Pithos.get().getTreeView().getSelection().getUri().equals(value.getUri()))
484 483
							selectionModel.setSelected(value, true);
485
						GSS.get().onResourceUpdate(value,clearSelection);
484
						Pithos.get().onResourceUpdate(value,clearSelection);
486 485
						
487 486
					}
488 487
	
489 488
					@Override
490 489
					public void onError(Throwable t) {
491 490
						GWT.log("Error fetching root folder", t);
492
						GSS.get().displayError("Unable to fetch root folder");
491
						Pithos.get().displayError("Unable to fetch root folder");
493 492
					}
494 493
	
495 494
				};
......
503 502
						FolderResource rootResource = getResult();
504 503
						//((MyFolderResource)value).getResource().setFiles(rootResource.getFiles());
505 504
						((SharedFolderResource)value).setResource(rootResource);
506
						if(GSS.get().getTreeView().getSelection().getUri().equals(value.getUri()))
505
						if(Pithos.get().getTreeView().getSelection().getUri().equals(value.getUri()))
507 506
							selectionModel.setSelected(value, true);
508
						GSS.get().onResourceUpdate(value,clearSelection);
507
						Pithos.get().onResourceUpdate(value,clearSelection);
509 508
						
510 509
					}
511 510
	
512 511
					@Override
513 512
					public void onError(Throwable t) {
514 513
						GWT.log("Error fetching root folder", t);
515
						GSS.get().displayError("Unable to fetch root folder");
514
						Pithos.get().displayError("Unable to fetch root folder");
516 515
					}
517 516
	
518 517
				};
......
527 526
						((SharedResource)value).setFolders(getResult().getFolders());
528 527
						((SharedResource)value).setFiles(getResult().getFiles());
529 528
						
530
						if(GSS.get().getTreeView().getSelection().getUri().equals(value.getUri()))
529
						if(Pithos.get().getTreeView().getSelection().getUri().equals(value.getUri()))
531 530
							selectionModel.setSelected(value, true);
532
						GSS.get().onResourceUpdate(value,clearSelection);
531
						Pithos.get().onResourceUpdate(value,clearSelection);
533 532
						
534 533
					}
535 534
	
536 535
					@Override
537 536
					public void onError(Throwable t) {
538 537
						GWT.log("Error fetching root folder", t);
539
						GSS.get().displayError("Unable to fetch root folder");
538
						Pithos.get().displayError("Unable to fetch root folder");
540 539
					}
541 540
	
542 541
				};
......
551 550
						((OtherUserResource)value).setFolders(getResult().getFolders());
552 551
						((OtherUserResource)value).setFiles(getResult().getFiles());
553 552
						
554
						if(GSS.get().getTreeView().getSelection().getUri().equals(value.getUri()))
553
						if(Pithos.get().getTreeView().getSelection().getUri().equals(value.getUri()))
555 554
							selectionModel.setSelected(value, true);
556
						GSS.get().onResourceUpdate(value,clearSelection);
555
						Pithos.get().onResourceUpdate(value,clearSelection);
557 556
						
558 557
					}
559 558
	
560 559
					@Override
561 560
					public void onError(Throwable t) {
562 561
						GWT.log("Error fetching root folder", t);
563
						GSS.get().displayError("Unable to fetch root folder");
562
						Pithos.get().displayError("Unable to fetch root folder");
564 563
					}
565 564
	
566 565
				};
......
674 673

  
675 674
							@Override
676 675
							public void onError(Throwable t) {
677
								GSS.get().displayError("Unable to fetch subfolders");
676
								Pithos.get().displayError("Unable to fetch subfolders");
678 677
								GWT.log("Unable to fetch subfolders", t);
679 678
							}
680 679

  
......
692 691
					public void onError(Throwable t) {
693 692
						
694 693
						GWT.log("Error fetching root folder", t);
695
						GSS.get().displayError("Unable to fetch root folder");
694
						Pithos.get().displayError("Unable to fetch root folder");
696 695
					}
697 696

  
698 697
				};
......
761 760
                                  @Override
762 761
                                  public void onError(Throwable t) {
763 762
                                          GWT.log("Error fetching Others Root folder", t);
764
                                          GSS.get().displayError("Unable to fetch Others Root folder");
763
                                          Pithos.get().displayError("Unable to fetch Others Root folder");
765 764
                                  }
766 765

  
767 766
                                  @Override
......
775 774
			          @Override
776 775
			          public void onError(Throwable t) {
777 776
			                  GWT.log("Error fetching Others Root folder", t);
778
			                  GSS.get().displayError("Unable to fetch Others Root folder");
777
			                  Pithos.get().displayError("Unable to fetch Others Root folder");
779 778
			          }
780 779
			  };
781 780
			  DeferredCommand.addCommand(go);
b/web_client/src/gr/grnet/pithos/web/client/Configuration.java
46 46
	/**
47 47
	 * @return the name of the service
48 48
	 */
49
	@DefaultStringValue("GSS")
49
	@DefaultStringValue("pithos")
50 50
	String serviceName();
51 51

  
52 52
	/**
b/web_client/src/gr/grnet/pithos/web/client/CredentialsDialog.java
34 34
 */
35 35
package gr.grnet.pithos.web.client;
36 36

  
37
import com.google.gwt.user.client.Window;
38 37
import gr.grnet.pithos.web.client.rest.PostCommand;
39 38
import gr.grnet.pithos.web.client.rest.RestException;
40 39

  
......
96 95
			Button ok = new Button("Yes", new ClickHandler() {
97 96
				@Override
98 97
				public void onClick(ClickEvent event) {
99
					resetPassword(GSS.get().getCurrentUserResource().getUri());
98
					resetPassword(Pithos.get().getCurrentUserResource().getUri());
100 99
					hide();
101 100
				}
102 101
			});
......
161 160
			Button confirm = new Button("Proceed", new ClickHandler() {
162 161
				@Override
163 162
				public void onClick(ClickEvent event) {
164
					GSS.get().authenticateUser();
163
					Pithos.get().authenticateUser();
165 164
					hide();
166 165
				}
167 166
			});
......
180 179
				// either enter or escape is pressed.
181 180
				switch (evt.getKeyCode()) {
182 181
					case KeyCodes.KEY_ENTER:
183
						GSS.get().authenticateUser();
182
						Pithos.get().authenticateUser();
184 183
						hide();
185 184
						break;
186 185
					case KeyCodes.KEY_ESCAPE:
......
212 211
		table.setText(0, 0, "Username");
213 212
		table.setText(1, 0, "Token");
214 213
		TextBox username = new TextBox();
215
		final GSS app = GSS.get();
214
		final Pithos app = Pithos.get();
216 215
		username.setText(app.getCurrentUserResource().getUsername());
217 216
		username.setReadOnly(true);
218 217
		username.setWidth(WIDTH_FIELD);
219 218
		username.addClickHandler(new ClickHandler() {
220 219
			@Override
221 220
			public void onClick(ClickEvent event) {
222
				GSS.enableIESelection();
221
				Pithos.enableIESelection();
223 222
				((TextBox) event.getSource()).selectAll();
224
				GSS.preventIESelection();
223
				Pithos.preventIESelection();
225 224
			}
226 225

  
227 226
		});
......
234 233
		tokenBox.addClickHandler(new ClickHandler() {
235 234
			@Override
236 235
			public void onClick(ClickEvent event) {
237
				GSS.enableIESelection();
236
				Pithos.enableIESelection();
238 237
				((TextBox) event.getSource()).selectAll();
239
				GSS.preventIESelection();
238
				Pithos.preventIESelection();
240 239
			}
241 240

  
242 241
		});
......
298 297
	private void resetPassword(String userUri) {
299 298

  
300 299
		if (userUri == null || userUri.length() == 0) {
301
			GSS.get().displayError("Empty user Uri!");
300
			Pithos.get().displayError("Empty user Uri!");
302 301
			return;
303 302
		}
304 303
		GWT.log("resetPassword(" + userUri + ")", null);
......
316 315
				if(t instanceof RestException){
317 316
					int statusCode = ((RestException)t).getHttpStatusCode();
318 317
					if(statusCode == 405)
319
						GSS.get().displayError("You don't have the necessary" +
318
						Pithos.get().displayError("You don't have the necessary" +
320 319
								" permissions");
321 320
					else if(statusCode == 404)
322
						GSS.get().displayError("Resource does not exist");
321
						Pithos.get().displayError("Resource does not exist");
323 322
					else
324
						GSS.get().displayError("Unable to reset password:" +
323
						Pithos.get().displayError("Unable to reset password:" +
325 324
									((RestException)t).getHttpStatusText());
326 325
				}
327 326
				else
328
					GSS.get().displayError("System error resetting password:" +
327
					Pithos.get().displayError("System error resetting password:" +
329 328
								t.getMessage());
330 329
			}
331 330
		};
b/web_client/src/gr/grnet/pithos/web/client/DeleteFileDialog.java
38 38
import gr.grnet.pithos.web.client.MessagePanel.Images;
39 39
import gr.grnet.pithos.web.client.foldertree.File;
40 40
import gr.grnet.pithos.web.client.foldertree.Resource;
41
import gr.grnet.pithos.web.client.rest.DeleteCommand;
42 41
import gr.grnet.pithos.web.client.rest.DeleteRequest;
43
import gr.grnet.pithos.web.client.rest.MultipleDeleteCommand;
44 42
import gr.grnet.pithos.web.client.rest.RestException;
45
import gr.grnet.pithos.web.client.rest.resource.FileResource;
46 43

  
47
import java.util.ArrayList;
48 44
import java.util.Iterator;
49 45
import java.util.List;
50 46

  
......
53 49
import com.google.gwt.event.dom.client.ClickEvent;
54 50
import com.google.gwt.event.dom.client.ClickHandler;
55 51
import com.google.gwt.event.dom.client.KeyCodes;
56
import com.google.gwt.user.client.DeferredCommand;
57 52
import com.google.gwt.user.client.Event.NativePreviewEvent;
58 53
import com.google.gwt.user.client.ui.AbstractImagePrototype;
59 54
import com.google.gwt.user.client.ui.Button;
......
134 129
    private void deleteFile(final Iterator<File> iter) {
135 130
        if (iter.hasNext()) {
136 131
            File f = iter.next();
137
            String path = GSS.get().getApiPath() + GSS.get().getUsername() + f.getUri();
132
            String path = Pithos.get().getApiPath() + Pithos.get().getUsername() + f.getUri();
138 133
            DeleteRequest deleteFile = new DeleteRequest(path) {
139 134
                @Override
140 135
                public void onSuccess(Resource result) {
......
145 140
                public void onError(Throwable t) {
146 141
                    GWT.log("", t);
147 142
                    if (t instanceof RestException) {
148
                        GSS.get().displayError("Unable to delete file: " + ((RestException) t).getHttpStatusText());
143
                        Pithos.get().displayError("Unable to delete file: " + ((RestException) t).getHttpStatusText());
149 144
                    }
150 145
                    else
151
                        GSS.get().displayError("System error unable to delete file: "+t.getMessage());
146
                        Pithos.get().displayError("System error unable to delete file: "+t.getMessage());
152 147
                }
153 148
            };
154
            deleteFile.setHeader("X-Auth-Token", GSS.get().getToken());
149
            deleteFile.setHeader("X-Auth-Token", Pithos.get().getToken());
155 150
            Scheduler.get().scheduleDeferred(deleteFile);
156 151
        }
157 152
        else {
158
            GSS.get().updateFolder(files.get(0).getParent());
153
            Pithos.get().updateFolder(files.get(0).getParent());
159 154
        }
160 155
    }
161 156

  
b/web_client/src/gr/grnet/pithos/web/client/DeleteFolderDialog.java
34 34
 */
35 35
package gr.grnet.pithos.web.client;
36 36

  
37
import com.google.gwt.core.client.Scheduler;
38 37
import com.google.gwt.event.dom.client.KeyDownEvent;
39
import com.google.gwt.http.client.Request;
40
import com.google.gwt.http.client.RequestBuilder;
41
import com.google.gwt.http.client.RequestCallback;
42
import com.google.gwt.http.client.RequestException;
43
import com.google.gwt.http.client.Response;
44
import com.google.gwt.json.client.JSONArray;
45
import com.google.gwt.json.client.JSONObject;
46
import com.google.gwt.json.client.JSONParser;
47
import com.google.gwt.json.client.JSONString;
48
import com.google.gwt.json.client.JSONValue;
49
import com.google.gwt.user.client.Event;
50 38
import gr.grnet.pithos.web.client.MessagePanel.Images;
51
import gr.grnet.pithos.web.client.foldertree.File;
52 39
import gr.grnet.pithos.web.client.foldertree.Folder;
53
import gr.grnet.pithos.web.client.foldertree.Resource;
54
import gr.grnet.pithos.web.client.rest.DeleteCommand;
55
import gr.grnet.pithos.web.client.rest.DeleteRequest;
56
import gr.grnet.pithos.web.client.rest.GetRequest;
57
import gr.grnet.pithos.web.client.rest.RestException;
58
import gr.grnet.pithos.web.client.rest.RestRequestCallback;
59
import gr.grnet.pithos.web.client.rest.resource.FolderResource;
60
import gr.grnet.pithos.web.client.rest.resource.RestResource;
61
import gr.grnet.pithos.web.client.rest.resource.RestResourceWrapper;
62
import gr.grnet.pithos.web.client.rest.resource.TrashFolderResource;
63 40

  
64
import com.google.gwt.core.client.GWT;
65 41
import com.google.gwt.dom.client.NativeEvent;
66 42
import com.google.gwt.event.dom.client.ClickEvent;
67 43
import com.google.gwt.event.dom.client.ClickHandler;
68 44
import com.google.gwt.event.dom.client.KeyCodes;
69
import com.google.gwt.user.client.DeferredCommand;
70 45
import com.google.gwt.user.client.Event.NativePreviewEvent;
71 46
import com.google.gwt.user.client.ui.AbstractImagePrototype;
72 47
import com.google.gwt.user.client.ui.Button;
......
75 50
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
76 51
import com.google.gwt.user.client.ui.HorizontalPanel;
77 52
import com.google.gwt.user.client.ui.VerticalPanel;
78
import java.util.Iterator;
79
import java.util.List;
80 53

  
81 54
/**
82 55
 * The 'delete folder' dialog box.
83 56
 */
84 57
public class DeleteFolderDialog extends DialogBox {
85 58

  
86
    private GSS app;
59
    private Pithos app;
87 60
    private Folder folder;
88 61
    
89 62
	/**
90 63
	 * The widget's constructor.
91 64
	 * @param images the supplied images
92 65
	 */
93
	public DeleteFolderDialog(GSS _app, Images images, Folder _folder) {
66
	public DeleteFolderDialog(Pithos _app, Images images, Folder _folder) {
94 67
        this.app = _app;
95 68
        this.folder = _folder;
96 69
		// Set the dialog's caption.
b/web_client/src/gr/grnet/pithos/web/client/DnDFolderPopupMenu.java
39 39
import gr.grnet.pithos.web.client.rest.MultiplePostCommand;
40 40
import gr.grnet.pithos.web.client.rest.PostCommand;
41 41
import gr.grnet.pithos.web.client.rest.RestException;
42
import gr.grnet.pithos.web.client.rest.resource.FileResource;
43 42
import gr.grnet.pithos.web.client.rest.resource.FolderResource;
44 43
import gr.grnet.pithos.web.client.rest.resource.RestResourceWrapper;
45 44

  
......
47 46
import java.util.List;
48 47

  
49 48
import com.google.gwt.core.client.GWT;
50
import com.google.gwt.http.client.URL;
51 49
import com.google.gwt.user.client.Command;
52 50
import com.google.gwt.user.client.DeferredCommand;
53 51
import com.google.gwt.user.client.ui.AbstractImagePrototype;
......
71 69
        };
72 70

  
73 71
        final MenuBar contextMenu = new MenuBar(true);
74
        final CellTreeView folders = GSS.get().getTreeView();
72
        final CellTreeView folders = Pithos.get().getTreeView();
75 73

  
76 74
        contextMenu.addItem("<span>" + AbstractImagePrototype.create(newImages.cut()).getHTML() + "&nbsp;Move</span>", true, new Command() {
77 75

  
......
81 79
                    moveFolder(target, (Folder) toCopy);
82 80
                }
83 81
                else if (toCopy instanceof List) {
84
                    List<File> files = GSS.get().getFileList().getSelectedFiles();
82
                    List<File> files = Pithos.get().getFileList().getSelectedFiles();
85 83
                    moveFiles(target, files);
86 84
                }
87 85
                hide();
......
95 93
                if (toCopy instanceof Folder)
96 94
                    copyFolder(target, (Folder) toCopy);
97 95
                else if (toCopy instanceof List) {
98
                    List<File> files = GSS.get().getFileList().getSelectedFiles();
96
                    List<File> files = Pithos.get().getFileList().getSelectedFiles();
99 97
                    copyFiles(target, files);
100 98
                }
101 99
                hide();
......
111 109
                    trashFolder(((RestResourceWrapper) toCopy).getResource());
112 110
                }
113 111
                else if (toCopy instanceof List) {
114
                    List<File> files = GSS.get().getFileList().getSelectedFiles();
112
                    List<File> files = Pithos.get().getFileList().getSelectedFiles();
115 113
                    trashFiles(files);
116 114
                }
117 115
                hide();
......
130 128
//
131 129
//            @Override
132 130
//            public void onComplete() {
133
//                GSS.get().getTreeView().updateNodeChildren(new RestResourceWrapper(target));
134
//                GSS.get().getStatusPanel().updateStats();
131
//                Pithos.get().getTreeView().updateNodeChildren(new RestResourceWrapper(target));
132
//                Pithos.get().getStatusPanel().updateStats();
135 133
//            }
136 134
//
137 135
//            @Override
......
140 138
//                if (t instanceof RestException) {
141 139
//                    int statusCode = ((RestException) t).getHttpStatusCode();
142 140
//                    if (statusCode == 405)
143
//                        GSS.get().displayError("You don't have the necessary permissions");
141
//                        Pithos.get().displayError("You don't have the necessary permissions");
144 142
//
145 143
//                    else if (statusCode == 409)
146
//                        GSS.get().displayError("A folder with the same name already exists");
144
//                        Pithos.get().displayError("A folder with the same name already exists");
147 145
//                    else if (statusCode == 413)
148
//                        GSS.get().displayError("Your quota has been exceeded");
146
//                        Pithos.get().displayError("Your quota has been exceeded");
149 147
//                    else
150
//                        GSS.get().displayError("Unable to copy folder:" + ((RestException) t).getHttpStatusText());
148
//                        Pithos.get().displayError("Unable to copy folder:" + ((RestException) t).getHttpStatusText());
151 149
//                }
152 150
//                else
153
//                    GSS.get().displayError("System error copying folder:" + t.getMessage());
151
//                    Pithos.get().displayError("System error copying folder:" + t.getMessage());
154 152
//            }
155 153
//        };
156 154
//        DeferredCommand.addCommand(cf);
......
166 164
//            @Override
167 165
//            public void onComplete() {
168 166
//                GWT.log("[MOVE]" + target.getUri() + "   " + toCopy.getParentURI());
169
//                GSS.get().getTreeView().updateNodeChildren(new RestResourceWrapper(target));
170
//                GSS.get().getTreeView().updateNodeChildrenForRemove(toCopy.getParentURI());
171
//                GSS.get().getStatusPanel().updateStats();
167
//                Pithos.get().getTreeView().updateNodeChildren(new RestResourceWrapper(target));
168
//                Pithos.get().getTreeView().updateNodeChildrenForRemove(toCopy.getParentURI());
169
//                Pithos.get().getStatusPanel().updateStats();
172 170
//            }
173 171
//
174 172
//            @Override
......
177 175
//                if (t instanceof RestException) {
178 176
//                    int statusCode = ((RestException) t).getHttpStatusCode();
179 177
//                    if (statusCode == 405)
180
//                        GSS.get().displayError("You don't have the necessary permissions");
178
//                        Pithos.get().displayError("You don't have the necessary permissions");
181 179
//
182 180
//                    else if (statusCode == 409)
183
//                        GSS.get().displayError("A folder with the same name already exists");
181
//                        Pithos.get().displayError("A folder with the same name already exists");
184 182
//                    else if (statusCode == 413)
185
//                        GSS.get().displayError("Your quota has been exceeded");
183
//                        Pithos.get().displayError("Your quota has been exceeded");
186 184
//                    else
187
//                        GSS.get().displayError("Unable to copy folder:" + ((RestException) t).getHttpStatusText());
185
//                        Pithos.get().displayError("Unable to copy folder:" + ((RestException) t).getHttpStatusText());
188 186
//                }
189 187
//                else
190
//                    GSS.get().displayError("System error copying folder:" + t.getMessage());
188
//                    Pithos.get().displayError("System error copying folder:" + t.getMessage());
191 189
//            }
192 190
//        };
193 191
//        DeferredCommand.addCommand(cf);
......
222 220

  
223 221
            @Override
224 222
            public void onComplete() {
225
                GSS.get().getTreeView().updateNodeChildrenForRemove(folder.getParentURI());
226
                GSS.get().getTreeView().updateTrashNode();
223
                Pithos.get().getTreeView().updateNodeChildrenForRemove(folder.getParentURI());
224
                Pithos.get().getTreeView().updateTrashNode();
227 225
                /*for(TreeItem item : items)
228
                        GSS.get().getFolders().updateFolder((DnDTreeItem) item);
229
                GSS.get().getFolders().update(GSS.get().getFolders().getTrashItem());
226
                        Pithos.get().getFolders().updateFolder((DnDTreeItem) item);
227
                Pithos.get().getFolders().update(Pithos.get().getFolders().getTrashItem());
230 228

  
231
                GSS.get().showFileList(true);
229
                Pithos.get().showFileList(true);
232 230
                */
233 231
            }
234 232

  
......
238 236
                if (t instanceof RestException) {
239 237
                    int statusCode = ((RestException) t).getHttpStatusCode();
240 238
                    if (statusCode == 405)
241
                        GSS.get().displayError("You don't have the necessary permissions");
239
                        Pithos.get().displayError("You don't have the necessary permissions");
242 240
                    else if (statusCode == 404)
243
                        GSS.get().displayError("Folder does not exist");
241
                        Pithos.get().displayError("Folder does not exist");
244 242
                    else
245
                        GSS.get().displayError("Unable to trash folder:" + ((RestException) t).getHttpStatusText());
243
                        Pithos.get().displayError("Unable to trash folder:" + ((RestException) t).getHttpStatusText());
246 244
                }
247 245
                else
248
                    GSS.get().displayError("System error trashing folder:" + t.getMessage());
246
                    Pithos.get().displayError("System error trashing folder:" + t.getMessage());
249 247
            }
250 248
        };
251 249
        DeferredCommand.addCommand(tot);
......
259 257

  
260 258
            @Override
261 259
            public void onComplete() {
262
                GSS.get().showFileList(true);
260
                Pithos.get().showFileList(true);
263 261
            }
264 262

  
265 263
            @Override
......
268 266
                if (t instanceof RestException) {
269 267
                    int statusCode = ((RestException) t).getHttpStatusCode();
270 268
                    if (statusCode == 405)
271
                        GSS.get().displayError("You don't have the necessary permissions");
269
                        Pithos.get().displayError("You don't have the necessary permissions");
272 270
                    else if (statusCode == 404)
273
                        GSS.get().displayError("File does not exist");
271
                        Pithos.get().displayError("File does not exist");
274 272
                    else
275
                        GSS.get().displayError("Unable to trash file:" + ((RestException) t).getHttpStatusText());
273
                        Pithos.get().displayError("Unable to trash file:" + ((RestException) t).getHttpStatusText());
276 274
                }
277 275
                else
278
                    GSS.get().displayError("System error trashing file:" + t.getMessage());
276
                    Pithos.get().displayError("System error trashing file:" + t.getMessage());
279 277
            }
280 278
        };
281 279
        DeferredCommand.addCommand(tot);
......
283 281

  
284 282
    private void executeCopyOrMoveFiles(final int index, final List<String> paths) {
285 283
        if (index >= paths.size()) {
286
            GSS.get().showFileList(true);
287
            GSS.get().getStatusPanel().updateStats();
284
            Pithos.get().showFileList(true);
285
            Pithos.get().getStatusPanel().updateStats();
288 286
            return;
289 287
        }
290 288
        PostCommand cf = new PostCommand(paths.get(index), "", 200) {
......
300 298
                if (t instanceof RestException) {
301 299
                    int statusCode = ((RestException) t).getHttpStatusCode();
302 300
                    if (statusCode == 405)
303
                        GSS.get().displayError("You don't have the necessary permissions");
301
                        Pithos.get().displayError("You don't have the necessary permissions");
304 302
                    else if (statusCode == 404)
305
                        GSS.get().displayError("File not found");
303
                        Pithos.get().displayError("File not found");
306 304
                    else if (statusCode == 409)
307
                        GSS.get().displayError("A file with the same name already exists");
305
                        Pithos.get().displayError("A file with the same name already exists");
308 306
                    else if (statusCode == 413)
309
                        GSS.get().displayError("Your quota has been exceeded");
307
                        Pithos.get().displayError("Your quota has been exceeded");
310 308
                    else
311
                        GSS.get().displayError("Unable to copy file:" + ((RestException) t).getHttpStatusText());
309
                        Pithos.get().displayError("Unable to copy file:" + ((RestException) t).getHttpStatusText());
312 310
                }
313 311
                else
314
                    GSS.get().displayError("System error copying file:" + t.getMessage());
312
                    Pithos.get().displayError("System error copying file:" + t.getMessage());
315 313
            }
316 314
        };
317 315
        DeferredCommand.addCommand(cf);
b/web_client/src/gr/grnet/pithos/web/client/EditMenu.java
41 41
import gr.grnet.pithos.web.client.commands.ToTrashCommand;
42 42
import gr.grnet.pithos.web.client.foldertree.File;
43 43
import gr.grnet.pithos.web.client.foldertree.Folder;
44
import gr.grnet.pithos.web.client.rest.resource.FileResource;
45

  
46
import gr.grnet.pithos.web.client.rest.resource.GroupUserResource;
47
import gr.grnet.pithos.web.client.rest.resource.RestResourceWrapper;
48 44

  
49 45
import java.util.List;
50 46

  
51
import com.google.gwt.event.dom.client.ClickEvent;
52
import com.google.gwt.event.dom.client.ClickHandler;
53 47
import com.google.gwt.resources.client.ClientBundle;
54 48
import com.google.gwt.resources.client.ImageResource;
55 49
import com.google.gwt.user.client.Command;
56 50
import com.google.gwt.user.client.ui.AbstractImagePrototype;
57 51
import com.google.gwt.user.client.ui.MenuBar;
58 52
import com.google.gwt.user.client.ui.MenuItem;
59
import com.google.gwt.user.client.ui.PopupPanel;
60 53

  
61 54
/**
62 55
 * The 'Edit' menu implementation.
......
134 127
	 *
135 128
	 * @param newImages the image bundle passed on by the parent object
136 129
	 */
137
	public EditMenu(final GSS _app, final Images newImages) {
130
	public EditMenu(final Pithos _app, final Images newImages) {
138 131
		super(true);
139 132
		setAnimationEnabled(true);
140 133
		images = newImages;
b/web_client/src/gr/grnet/pithos/web/client/FileContextMenu.java
39 39
import gr.grnet.pithos.web.client.commands.DeleteCommand;
40 40
import gr.grnet.pithos.web.client.commands.PasteCommand;
41 41
import gr.grnet.pithos.web.client.commands.PropertiesCommand;
42
import gr.grnet.pithos.web.client.commands.RefreshCommand;
43
import gr.grnet.pithos.web.client.commands.RestoreTrashCommand;
44 42
import gr.grnet.pithos.web.client.commands.ToTrashCommand;
45 43
import gr.grnet.pithos.web.client.commands.UploadFileCommand;
46 44
import gr.grnet.pithos.web.client.foldertree.File;
47 45
import gr.grnet.pithos.web.client.foldertree.Folder;
48
import gr.grnet.pithos.web.client.rest.resource.FileResource;
49
import gr.grnet.pithos.web.client.rest.resource.FolderResource;
50
import gr.grnet.pithos.web.client.rest.resource.RestResource;
51
import gr.grnet.pithos.web.client.rest.resource.RestResourceWrapper;
52
import gr.grnet.pithos.web.client.rest.resource.TrashFolderResource;
53 46

  
54 47
import java.util.List;
55 48

  
56
import com.google.gwt.event.dom.client.ClickEvent;
57
import com.google.gwt.event.dom.client.ClickHandler;
58
import com.google.gwt.event.dom.client.ContextMenuEvent;
59 49
import com.google.gwt.resources.client.ClientBundle;
60 50
import com.google.gwt.resources.client.ImageResource;
61 51
import com.google.gwt.user.client.Command;
62
import com.google.gwt.user.client.Event;
63 52
import com.google.gwt.user.client.ui.AbstractImagePrototype;
64 53
import com.google.gwt.user.client.ui.MenuBar;
65 54
import com.google.gwt.user.client.ui.MenuItem;
......
132 121
		// The popup's constructor's argument is a boolean specifying that it
133 122
		// auto-close itself when the user clicks outside of it.
134 123
		super(true);
135
		GSS gss = GSS.get();
124
		Pithos gss = Pithos.get();
136 125
		setAnimationEnabled(true);
137 126
		images = newImages;
138 127
        MenuBar contextMenu = new MenuBar(true);
139 128

  
140
        if (GSS.get().getClipboard().hasFiles()) {
141
            pasteItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.paste()).getHTML() + "&nbsp;Paste</span>", true, new PasteCommand(GSS.get(), this, selectedFolder));
129
        if (Pithos.get().getClipboard().hasFiles()) {
130
            pasteItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.paste()).getHTML() + "&nbsp;Paste</span>", true, new PasteCommand(Pithos.get(), this, selectedFolder));
142 131
            contextMenu.addItem(pasteItem);
143 132
        }
144 133

  
......
155 144
//			MenuItem delete = new MenuItem("<span>" + AbstractImagePrototype.create(images.delete()).getHTML() + "&nbsp;Delete</span>", true, new DeleteCommand(this, null, images));
156 145
//			contextMenu.addItem(delete);
157 146
//		} else {
158
			cutItem = new MenuItem("<span id='fileContextMenu.cut'>" + AbstractImagePrototype.create(newImages.cut()).getHTML() + "&nbsp;Cut</span>", true, new CutCommand(GSS.get(), this, selectedFiles));
147
			cutItem = new MenuItem("<span id='fileContextMenu.cut'>" + AbstractImagePrototype.create(newImages.cut()).getHTML() + "&nbsp;Cut</span>", true, new CutCommand(Pithos.get(), this, selectedFiles));
159 148
            contextMenu.addItem(cutItem);
160 149

  
161
			copyItem = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.copy()).getHTML() + "&nbsp;Copy</span>", true, new CopyCommand(GSS.get(), this, selectedFiles));
150
			copyItem = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.copy()).getHTML() + "&nbsp;Copy</span>", true, new CopyCommand(Pithos.get(), this, selectedFiles));
162 151
            contextMenu.addItem(copyItem);
163 152

  
164
			trashItem = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.emptyTrash()).getHTML() + "&nbsp;Move to Trash</span>", true, new ToTrashCommand(GSS.get(), this, selectedFiles));
153
			trashItem = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.emptyTrash()).getHTML() + "&nbsp;Move to Trash</span>", true, new ToTrashCommand(Pithos.get(), this, selectedFiles));
165 154
            contextMenu.addItem(trashItem);
166 155

  
167 156
			deleteItem = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.delete()).getHTML() + "&nbsp;Delete</span>", true, new DeleteCommand(this, selectedFiles, images));
......
170 159
//			sharingItem = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.sharing()).getHTML() + "&nbsp;Sharing</span>", true, new PropertiesCommand(this, images, 1));
171 160
//            contextMenu.addItem(sharingItem);
172 161

  
173
            contextMenu.addItem(new MenuItem("<span>" + AbstractImagePrototype.create(newImages.viewText()).getHTML() + "&nbsp;Properties</span>", true, new PropertiesCommand(GSS.get(), this, selectedFiles, images, 0)));
162
            contextMenu.addItem(new MenuItem("<span>" + AbstractImagePrototype.create(newImages.viewText()).getHTML() + "&nbsp;Properties</span>", true, new PropertiesCommand(Pithos.get(), this, selectedFiles, images, 0)));
174 163

  
175 164
            if (!selectedFiles.isEmpty())
176
			    contextMenu.addItem(new MenuItem("<span><a class='hidden-link' href='" + GSS.get().getApiPath() + GSS.get().getUsername() + selectedFiles.get(0).getUri() + "?X-Auth-Token=" + GSS.get().getToken() + "' target='_blank'>" + AbstractImagePrototype.create(newImages.download()).getHTML() + " Download</a></span>", true, (Command) null));
165
			    contextMenu.addItem(new MenuItem("<span><a class='hidden-link' href='" + Pithos.get().getApiPath() + Pithos.get().getUsername() + selectedFiles.get(0).getUri() + "?X-Auth-Token=" + Pithos.get().getToken() + "' target='_blank'>" + AbstractImagePrototype.create(newImages.download()).getHTML() + " Download</a></span>", true, (Command) null));
177 166

  
178 167
			MenuItem unSelect = new MenuItem("<span>" + AbstractImagePrototype.create(images.unselectAll()).getHTML() + "&nbsp;Unselect</span>", true, new Command() {
179 168
                @Override
180 169
                public void execute() {
181 170
                    hide();
182
                    GSS.get().getFileList().clearSelectedRows();
171
                    Pithos.get().getFileList().clearSelectedRows();
183 172
                }
184 173
            });
185 174
			contextMenu.addItem(unSelect);
b/web_client/src/gr/grnet/pithos/web/client/FileList.java
278 278
			}
279 279
		};
280 280

  
281
		celltable = new DragAndDropCellTable<File>(GSS.VISIBLE_FILE_COUNT, resources, keyProvider);
281
		celltable = new DragAndDropCellTable<File>(Pithos.VISIBLE_FILE_COUNT, resources, keyProvider);
282 282
        celltable.setWidth("100%");
283 283
        celltable.setStyleName("pithos-List");
284 284

  
......
465 465
             @Override 
466 466
             public void onSelectionChange(SelectionChangeEvent event) {
467 467
            	 if(getSelectedFiles().size() == 1)
468
            		 GSS.get().setCurrentSelection(getSelectedFiles().get(0));
468
            		 Pithos.get().setCurrentSelection(getSelectedFiles().get(0));
469 469
            	 else
470
            		 GSS.get().setCurrentSelection(getSelectedFiles());
470
            		 Pithos.get().setCurrentSelection(getSelectedFiles());
471 471
             }
472 472
         };
473 473
         selectionModel.addSelectionChangeHandler(selectionHandler);
474 474
         
475 475
		celltable.setSelectionModel(selectionModel, GSSSelectionEventManager.<File> createDefaultManager());
476
		celltable.setPageSize(GSS.VISIBLE_FILE_COUNT);
476
		celltable.setPageSize(Pithos.VISIBLE_FILE_COUNT);
477 477
		
478 478
		sinkEvents(Event.ONCONTEXTMENU);
479 479
//		sinkEvents(Event.ONMOUSEUP);
......
481 481
//		sinkEvents(Event.ONCLICK);
482 482
//		sinkEvents(Event.ONKEYDOWN);
483 483
//		sinkEvents(Event.ONDBLCLICK);
484
		GSS.preventIESelection();
484
		Pithos.preventIESelection();
485 485
	}
486 486

  
487 487
	public List<File> getSelectedFiles() {
......
541 541
//			event.preventDefault();
542 542
//		} else if (DOM.eventGetType(event) == Event.ONDBLCLICK)
543 543
//			if (getSelectedFiles().size() == 1) {
544
//				GSS app = GSS.get();
544
//				Pithos app = Pithos.get();
545 545
//				File file = getSelectedFiles().get(0);
546 546
//				Window.open(file.getUri(), "_blank", "");
547 547
//				event.preventDefault();
......
555 555
	 */
556 556
	void update(boolean sort) {
557 557
		int count = folderFileCount;
558
		int max = startIndex + GSS.VISIBLE_FILE_COUNT;
558
		int max = startIndex + Pithos.VISIBLE_FILE_COUNT;
559 559
		if (max > count)
560 560
			max = count;
561 561
		folderTotalSize = 0;
......
565 565
		}
566 566
		if (folderFileCount == 0) {
567 567
			showingStats = "no files";
568
		} else if (folderFileCount < GSS.VISIBLE_FILE_COUNT) {
568
		} else if (folderFileCount < Pithos.VISIBLE_FILE_COUNT) {
569 569
			if (folderFileCount == 1)
570 570
				showingStats = "1 file";
571 571
			else
......
622 622
	 * Update status panel with currently showing file stats.
623 623
	 */
624 624
	public void updateCurrentlyShowingStats() {
625
		GSS.get().getStatusPanel().updateCurrentlyShowing(showingStats);
625
		Pithos.get().getStatusPanel().updateCurrentlyShowing(showingStats);
626 626
	}
627 627
	
628 628
	/**
......
652 652
	        }
653 653
	    }
654 654

  
655
        if(files.size() > GSS.VISIBLE_FILE_COUNT){
655
        if(files.size() > Pithos.VISIBLE_FILE_COUNT){
656 656
            pagerBottom.setVisible(true);
657 657
            pagerTop.setVisible(true);
658 658
        }
......
781 781
	 * Shows the files in the cellTable 
782 782
     */
783 783
	private void showCellTable(){
784
		if(files.size()>GSS.VISIBLE_FILE_COUNT){
784
		if(files.size()> Pithos.VISIBLE_FILE_COUNT){
785 785
			pagerBottom.setVisible(true);
786 786
			pagerTop.setVisible(true);
787 787
		}
b/web_client/src/gr/grnet/pithos/web/client/FileMenu.java
34 34
 */
35 35
package gr.grnet.pithos.web.client;
36 36

  
37
import gr.grnet.pithos.web.client.commands.EmptyTrashCommand;
38 37
import gr.grnet.pithos.web.client.commands.NewFolderCommand;
39 38
import gr.grnet.pithos.web.client.commands.PropertiesCommand;
40
import gr.grnet.pithos.web.client.commands.RefreshCommand;
41 39
import gr.grnet.pithos.web.client.commands.UploadFileCommand;
42 40
import gr.grnet.pithos.web.client.foldertree.File;
43 41
import gr.grnet.pithos.web.client.foldertree.Folder;
44
import gr.grnet.pithos.web.client.rest.resource.FileResource;
45 42

  
46 43
import java.util.List;
47 44

  
48
import com.google.gwt.event.dom.client.ClickEvent;
49
import com.google.gwt.event.dom.client.ClickHandler;
50 45
import com.google.gwt.resources.client.ClientBundle;
51 46
import com.google.gwt.resources.client.ImageResource;
52 47
import com.google.gwt.user.client.Command;
......
100 95
	 *
101 96
	 * @param _images the image bundle passed on by the parent object
102 97
	 */
103
	public FileMenu(GSS _app, final Images _images) {
98
	public FileMenu(Pithos _app, final Images _images) {
104 99
        super(true);
105 100
		setAnimationEnabled(true);
106 101
		images = _images;
......
115 110
            addItem(uploadItem);
116 111
        }
117 112
        if (selectedFiles.size() == 1) {
118
            addItem(new MenuItem("<span><a class='hidden-link' href='" + GSS.get().getApiPath() + GSS.get().getUsername() + selectedFiles.get(0).getUri() + "?X-Auth-Token=" + GSS.get().getToken() + "' target='_blank'>" + AbstractImagePrototype.create(images.download()).getHTML() + " Download</a></span>", true, (Command) null));
113
            addItem(new MenuItem("<span><a class='hidden-link' href='" + Pithos.get().getApiPath() + Pithos.get().getUsername() + selectedFiles.get(0).getUri() + "?X-Auth-Token=" + Pithos.get().getToken() + "' target='_blank'>" + AbstractImagePrototype.create(images.download()).getHTML() + " Download</a></span>", true, (Command) null));
119 114
        }
120 115

  
121 116
//        MenuItem emptyTrashItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.emptyTrash()).getHTML() + "&nbsp;Empty Trash</span>", true, new EmptyTrashCommand(this));
......
132 127
//                       .setVisible(propertiesVisible);
133 128
//
134 129
        if (selectedFiles.size() > 0 || selectedFolder != null) {
135
            MenuItem propertiesItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.viewText()).getHTML() + "&nbsp;Properties</span>", true, new PropertiesCommand(GSS.get(), null, selectedFiles.size() > 0 ? selectedFiles : selectedFolder, images, 0));
130
            MenuItem propertiesItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.viewText()).getHTML() + "&nbsp;Properties</span>", true, new PropertiesCommand(Pithos.get(), null, selectedFiles.size() > 0 ? selectedFiles : selectedFolder, images, 0));
136 131
            addItem(propertiesItem);
137 132
        }
138 133
	}
b/web_client/src/gr/grnet/pithos/web/client/FilePropertiesDialog.java
38 38
import gr.grnet.pithos.web.client.foldertree.File;
39 39
import gr.grnet.pithos.web.client.foldertree.Resource;
40 40
import gr.grnet.pithos.web.client.rest.PostCommand;
41
import gr.grnet.pithos.web.client.rest.PostRequest;
42 41
import gr.grnet.pithos.web.client.rest.PutRequest;
43 42
import gr.grnet.pithos.web.client.rest.RestException;
44
import gr.grnet.pithos.web.client.rest.resource.FileResource;
45
import gr.grnet.pithos.web.client.rest.resource.GroupResource;
46
import gr.grnet.pithos.web.client.rest.resource.PermissionHolder;
47

  
48
import java.util.Iterator;
49
import java.util.List;
50
import java.util.Set;
51 43

  
52 44
import com.google.gwt.core.client.GWT;
53
import com.google.gwt.event.dom.client.ChangeEvent;
54
import com.google.gwt.event.dom.client.ChangeHandler;
55 45
import com.google.gwt.event.dom.client.ClickEvent;
56 46
import com.google.gwt.event.dom.client.ClickHandler;
57 47
import com.google.gwt.i18n.client.DateTimeFormat;
58
import com.google.gwt.json.client.JSONArray;
59 48
import com.google.gwt.json.client.JSONBoolean;
60 49
import com.google.gwt.json.client.JSONObject;
61
import com.google.gwt.json.client.JSONString;
62 50
import com.google.gwt.resources.client.ClientBundle;
63 51
import com.google.gwt.resources.client.ImageResource;
64 52
import com.google.gwt.user.client.Command;
65 53
import com.google.gwt.user.client.DeferredCommand;
66
import com.google.gwt.user.client.ui.AbstractImagePrototype;
67 54
import com.google.gwt.user.client.ui.Button;
68 55
import com.google.gwt.user.client.ui.CheckBox;
69 56
import com.google.gwt.user.client.ui.DecoratedTabPanel;
......
71 58
import com.google.gwt.user.client.ui.FlexTable;
72 59
import com.google.gwt.user.client.ui.FlowPanel;
73 60
import com.google.gwt.user.client.ui.FocusPanel;
74
import com.google.gwt.user.client.ui.HTML;
75 61
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
76 62
import com.google.gwt.user.client.ui.HorizontalPanel;
77
import com.google.gwt.user.client.ui.Label;
78 63
import com.google.gwt.user.client.ui.TextBox;
79 64
import com.google.gwt.user.client.ui.VerticalPanel;
80 65

  
......
120 105

  
121 106
	private String userFullName;
122 107

  
123
    private GSS app;
108
    private Pithos app;
124 109

  
125 110
	/**
126 111
	 * The widget's constructor.
127 112
	 */
128
	public FilePropertiesDialog(GSS _app, File _file) {
113
	public FilePropertiesDialog(Pithos _app, File _file) {
129 114
        app = _app;
130 115
        file = _file;
131 116

  
......
326 311
//        path.addClickHandler(new ClickHandler() {
327 312
//            @Override
328 313
//            public void onClick(ClickEvent event) {
329
//                GSS.enableIESelection();
314
//                Pithos.enableIESelection();
330 315
//                ((TextBox) event.getSource()).selectAll();
331
//                GSS.preventIESelection();
316
//                Pithos.preventIESelection();
332 317
//            }
333 318
//        });
334 319
//        path.setText(file.getUri());
......
412 397
//			json.put("versioned", JSONBoolean.getInstance(versioned.getValue()));
413 398
		//only update the read for all perm if the user is the owner
414 399
//		if (readForAll.getValue() != file.isReadForAll())
415
//			if (file.getOwner().equals(GSS.get().getCurrentUserResource().getUsername()))
400
//			if (file.getOwner().equals(Pithos.get().getCurrentUserResource().getUsername()))
416 401
//				json.put("readForAll", JSONBoolean.getInstance(readForAll.getValue()));
417 402
//		int i = 0;
418 403
//		if (permList.hasChanges()) {
......
489 474
				if (t instanceof RestException) {
490 475
					int statusCode = ((RestException) t).getHttpStatusCode();
491 476
					if (statusCode == 405)
492
						GSS.get().displayError("You don't have the necessary permissions");
477
						Pithos.get().displayError("You don't have the necessary permissions");
493 478
					else if (statusCode == 404)
494
						GSS.get().displayError("User in permissions does not exist");
479
						Pithos.get().displayError("User in permissions does not exist");
495 480
					else if (statusCode == 409)
496
						GSS.get().displayError("A folder with the same name already exists");
481
						Pithos.get().displayError("A folder with the same name already exists");
497 482
					else if (statusCode == 413)
498
						GSS.get().displayError("Your quota has been exceeded");
483
						Pithos.get().displayError("Your quota has been exceeded");
499 484
					else
500
						GSS.get().displayError("Unable to modify file:" + ((RestException) t).getHttpStatusText());
485
						Pithos.get().displayError("Unable to modify file:" + ((RestException) t).getHttpStatusText());
501 486
				} else
502
					GSS.get().displayError("System error moifying file:" + t.getMessage());
487
					Pithos.get().displayError("System error moifying file:" + t.getMessage());
503 488
			}
504 489
		};
505 490
		DeferredCommand.addCommand(cf);
......
513 498

  
514 499
			@Override
515 500
			public void onComplete() {
516
				GSS.get().getTreeView().refreshCurrentNode(false);
501
				Pithos.get().getTreeView().refreshCurrentNode(false);
517 502
			}
518 503

  
519 504
			@Override
......
522 507
				if (t instanceof RestException) {
523 508
					int statusCode = ((RestException) t).getHttpStatusCode();
524 509
					if (statusCode == 405)
525
						GSS.get().displayError("You don't have the necessary permissions");
510
						Pithos.get().displayError("You don't have the necessary permissions");
526 511
					else if (statusCode == 404)
527
						GSS.get().displayError("User in permissions does not exist");
512
						Pithos.get().displayError("User in permissions does not exist");
528 513
					else if (statusCode == 409)
529
						GSS.get().displayError("A folder with the same name already exists");
514
						Pithos.get().displayError("A folder with the same name already exists");
530 515
					else if (statusCode == 413)
531
						GSS.get().displayError("Your quota has been exceeded");
516
						Pithos.get().displayError("Your quota has been exceeded");
532 517
					else
533
						GSS.get().displayError("Unable to modify file:" + ((RestException) t).getHttpStatusText());
518
						Pithos.get().displayError("Unable to modify file:" + ((RestException) t).getHttpStatusText());
534 519
				} else
535
					GSS.get().displayError("System error moifying file:" + t.getMessage());
520
					Pithos.get().displayError("System error moifying file:" + t.getMessage());
536 521
			}
537 522
		};
538 523
		DeferredCommand.addCommand(cf);
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff