Revision 25007267 src/gr/grnet/pithos/web/client/Pithos.java

b/src/gr/grnet/pithos/web/client/Pithos.java
151 151
    	otherSharedTreeView.updateFolder(f, showfiles);
152 152
    }
153 153

  
154
    public List<Tag> getAllTags() {
155
        List<Tag> tagList = new ArrayList<Tag>();
156
        for (Folder f : account.getContainers()) {
157
            for (String t : f.getTags()) {
158
                tagList.add(new Tag(t));
159
            }
160
        }
161
        return tagList;
162
    }
163

  
164 154
    public MysharedTreeView getMySharedTreeView() {
165 155
        return mysharedTreeView;
166 156
    }
......
519 509
        fileList.setFiles(new ArrayList<File>(files));
520 510
    }
521 511

  
522
    protected void fetchFile(final Iterator<File> iter, final Set<File> files) {
523
        if (iter.hasNext()) {
524
            File file = iter.next();
525
            String path = file.getUri() + "?format=json";
526
            GetRequest<File> getFile = new GetRequest<File>(File.class, getApiPath(), username, path, file) {
527
                @Override
528
                public void onSuccess(File _result) {
529
                    fetchFile(iter, files);
530
                }
531

  
532
                @Override
533
                public void onError(Throwable t) {
534
                    GWT.log("Error getting file", t);
535
					setError(t);
536
                    if (t instanceof RestException)
537
                        displayError("Error getting file: " + ((RestException) t).getHttpStatusText());
538
                    else
539
                        displayError("System error fetching file: " + t.getMessage());
540
                }
541

  
542
				@Override
543
				protected void onUnauthorized(Response response) {
544
					sessionExpired();
545
				}
546
            };
547
            getFile.setHeader("X-Auth-Token", "0000");
548
            Scheduler.get().scheduleDeferred(getFile);
549
        }
550
        else
551
            fileList.setFiles(new ArrayList<File>(files));
552
    }
553

  
554 512
    /**
555 513
	 * Parse and store the user credentials to the appropriate fields.
556 514
	 */

Also available in: Unified diff