commit 4eaecbac181fa9bd306d3a991f81767e572a2200
Author: Christos KK Loverdos <loverdos@gmail.com>
Date:   Fri Feb 1 15:01:51 2013 +0200

    Show display name in FolderPropertiesDialog

diff --git a/src/gr/grnet/pithos/web/client/FileContextMenu.java b/src/gr/grnet/pithos/web/client/FileContextMenu.java
index ba56139..1459f6f 100644
--- a/src/gr/grnet/pithos/web/client/FileContextMenu.java
+++ b/src/gr/grnet/pithos/web/client/FileContextMenu.java
@@ -193,7 +193,7 @@ public class FileContextMenu extends PopupPanel {
         boolean canWrite = true;
         if (selectedFolder != null) {
         	permissions = selectedFolder.getPermissions().get(app.getUserID());
-        	canWrite = selectedFolder.getOwner().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
+        	canWrite = selectedFolder.getOwnerID().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
 		}
         else {
         	for (File f : selectedFiles) {
diff --git a/src/gr/grnet/pithos/web/client/FileUploadDialog.java b/src/gr/grnet/pithos/web/client/FileUploadDialog.java
index 84ca349..32be778 100644
--- a/src/gr/grnet/pithos/web/client/FileUploadDialog.java
+++ b/src/gr/grnet/pithos/web/client/FileUploadDialog.java
@@ -200,7 +200,7 @@ public class FileUploadDialog extends DialogBox {
 					FilesAdded: function(up, files) {
 						var api = app.@gr.grnet.pithos.web.client.Pithos::getApiPath()();
 						var folder = app.@gr.grnet.pithos.web.client.Pithos::getUploadFolder()();
-						var owner = folder.@gr.grnet.pithos.web.client.foldertree.Folder::getOwner()();
+						var owner = folder.@gr.grnet.pithos.web.client.foldertree.Folder::getOwnerID()();
 						var uri = folder.@gr.grnet.pithos.web.client.foldertree.Folder::getUri()();
 						var path = api + owner + uri;
 						for (var j=0; j<files.length; j++)
diff --git a/src/gr/grnet/pithos/web/client/FolderContextMenu.java b/src/gr/grnet/pithos/web/client/FolderContextMenu.java
index b29a316..464a43a 100644
--- a/src/gr/grnet/pithos/web/client/FolderContextMenu.java
+++ b/src/gr/grnet/pithos/web/client/FolderContextMenu.java
@@ -83,7 +83,7 @@ public class FolderContextMenu extends PopupPanel {
         MenuBar contextMenu = new MenuBar(true);
 
         Boolean[] permissions = folder.getPermissions().get(app.getUserID());
-    	boolean canWrite = folder.getOwner().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
+    	boolean canWrite = folder.getOwnerID().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
     	boolean isFolderTreeSelected = selectedTree.equals(app.getFolderTreeView());
     	boolean otherSharedTreeSelected = selectedTree.equals(app.getOtherSharedTreeView());
     	boolean mysharedTreeSelected = selectedTree.equals(app.getMySharedTreeView());
diff --git a/src/gr/grnet/pithos/web/client/FolderPermissionsDialog.java b/src/gr/grnet/pithos/web/client/FolderPermissionsDialog.java
index 37732d4..91550d7 100644
--- a/src/gr/grnet/pithos/web/client/FolderPermissionsDialog.java
+++ b/src/gr/grnet/pithos/web/client/FolderPermissionsDialog.java
@@ -115,7 +115,7 @@ public class FolderPermissionsDialog extends DialogBox {
 
         VerticalPanel permPanel = new VerticalPanel();
         FilePermissionsDialog.Images images = GWT.create(FilePermissionsDialog.Images.class);
-        permList = new PermissionsList(images, folder.getPermissions(), folder.getOwner(), false, null);
+        permList = new PermissionsList(images, folder.getPermissions(), folder.getOwnerID(), false, null);
         permPanel.add(permList);
 
         HorizontalPanel permButtons = new HorizontalPanel();
@@ -215,7 +215,7 @@ public class FolderPermissionsDialog extends DialogBox {
 
 	protected void updateMetadata(final String path, final Map<String, Boolean[]> newPermissions) {
         if (newPermissions != null) {
-            PostRequest updateFolder = new PostRequest(app.getApiPath(), folder.getOwner(), path) {
+            PostRequest updateFolder = new PostRequest(app.getApiPath(), folder.getOwnerID(), path) {
                 @Override
                 public void onSuccess(Resource result) {
                     app.updateFolder(folder.getParent(), false, new Command() {
@@ -234,7 +234,7 @@ public class FolderPermissionsDialog extends DialogBox {
                     if (t instanceof RestException) {
                     	if (((RestException) t).getHttpStatusCode() == Response.SC_NOT_FOUND) { //Probably a virtual folder
                             final String path1 = folder.getUri();
-                            PutRequest newFolder = new PutRequest(app.getApiPath(), folder.getOwner(), path1) {
+                            PutRequest newFolder = new PutRequest(app.getApiPath(), folder.getOwnerID(), path1) {
                                 @Override
                                 public void onSuccess(Resource result) {
                                 	updateMetadata(path, newPermissions);
diff --git a/src/gr/grnet/pithos/web/client/FolderPropertiesDialog.java b/src/gr/grnet/pithos/web/client/FolderPropertiesDialog.java
index db3393a..0528c1e 100644
--- a/src/gr/grnet/pithos/web/client/FolderPropertiesDialog.java
+++ b/src/gr/grnet/pithos/web/client/FolderPropertiesDialog.java
@@ -34,31 +34,18 @@
  */
 package gr.grnet.pithos.web.client;
 
-import gr.grnet.pithos.web.client.foldertree.Folder;
-import gr.grnet.pithos.web.client.rest.PutRequest;
-import gr.grnet.pithos.web.client.rest.RestException;
-
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.core.client.Scheduler;
 import com.google.gwt.dom.client.NativeEvent;
-import com.google.gwt.event.dom.client.ChangeEvent;
-import com.google.gwt.event.dom.client.ChangeHandler;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.dom.client.KeyCodes;
-import com.google.gwt.event.dom.client.KeyDownEvent;
+import com.google.gwt.event.dom.client.*;
 import com.google.gwt.http.client.Response;
 import com.google.gwt.i18n.client.DateTimeFormat;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.Event.NativePreviewEvent;
-import com.google.gwt.user.client.ui.Anchor;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.DialogBox;
-import com.google.gwt.user.client.ui.FlexTable;
-import com.google.gwt.user.client.ui.HasHorizontalAlignment;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.*;
+import gr.grnet.pithos.web.client.foldertree.Folder;
+import gr.grnet.pithos.web.client.rest.PutRequest;
+import gr.grnet.pithos.web.client.rest.RestException;
 
 /**
  * The 'Folder properties' dialog box implementation.
@@ -67,86 +54,103 @@ public class FolderPropertiesDialog extends DialogBox {
 
     protected Pithos app;
 
-	/**
-	 * The widget that holds the folderName of the folder.
-	 */
-	TextBox folderName = new TextBox();
+    /**
+     * The widget that holds the folderName of the folder.
+     */
+    TextBox folderName = new TextBox();
 
-	/**
-	 * A flag that denotes whether the dialog will be used to create or modify a
-	 * folder.
-	 */
-	private final boolean create;
+    /**
+     * A flag that denotes whether the dialog will be used to create or modify a
+     * folder.
+     */
+    private final boolean create;
 
-	final Folder folder;
+    final Folder folder;
 
-	final VerticalPanel inner;
+    final VerticalPanel inner;
 
-	/**
-	 * The widget's constructor.
-	 */
-	public FolderPropertiesDialog(final Pithos app, boolean _create,  Folder selected) {
+    /**
+     * The widget's constructor.
+     */
+    public FolderPropertiesDialog(final Pithos app, boolean _create, Folder selected) {
         this.app = app;
-		Anchor close = new Anchor("close");
-		close.addStyleName("close");
-		close.addClickHandler(new ClickHandler() {
-			
-			@Override
-			public void onClick(ClickEvent event) {
-				hide();
-			}
-		});
-
-		setGlassEnabled(true);
-		setStyleName("pithos-DialogBox");
-
-		// Enable IE selection for the dialog (must disable it upon closing it)
-		Pithos.enableIESelection();
-
-		create = _create;
-		
-		folder = selected;
-
-		// Use this opportunity to set the dialog's caption.
-		if (create)
-			setText("Create folder");
-		else
-			setText("Folder properties");
-
-		// Outer contains inner and buttons
-		VerticalPanel outer = new VerticalPanel();
-		outer.add(close);
-		// Inner contains generalPanel and permPanel
-		inner = new VerticalPanel();
-		inner.addStyleName("inner");
-
-		VerticalPanel generalPanel = new VerticalPanel();
+        Anchor close = new Anchor("close");
+        close.addStyleName("close");
+        close.addClickHandler(new ClickHandler() {
+
+            @Override
+            public void onClick(ClickEvent event) {
+                hide();
+            }
+        });
+
+        setGlassEnabled(true);
+        setStyleName("pithos-DialogBox");
+
+        // Enable IE selection for the dialog (must disable it upon closing it)
+        Pithos.enableIESelection();
+
+        create = _create;
+
+        folder = selected;
+
+        // Use this opportunity to set the dialog's caption.
+        if(create) {
+            setText("Create folder");
+        }
+        else {
+            setText("Folder properties");
+        }
+
+        // Outer contains inner and buttons
+        VerticalPanel outer = new VerticalPanel();
+        outer.add(close);
+        // Inner contains generalPanel and permPanel
+        inner = new VerticalPanel();
+        inner.addStyleName("inner");
+
+        VerticalPanel generalPanel = new VerticalPanel();
         FlexTable generalTable = new FlexTable();
         generalTable.setText(0, 0, "Name");
         generalTable.setText(1, 0, "Parent");
         generalTable.setText(2, 0, "Creator");
         generalTable.setText(3, 0, "Last modified");
 
-		folderName.setText(create ? "" : folder.getName());
+        folderName.setText(create ? "" : folder.getName());
         folderName.setReadOnly(folder.isContainer() && !create);
         generalTable.setWidget(0, 1, folderName);
 
         final Label folderNameNote = new Label("Please note that slashes ('/') are not allowed in folder names.", true);
-		folderNameNote.setVisible(false);
-		folderNameNote.setStylePrimaryName("gss-readForAllNote");
-		generalTable.setWidget(0, 2, folderNameNote);
-		
-        if (create)
+        folderNameNote.setVisible(false);
+        folderNameNote.setStylePrimaryName("gss-readForAllNote");
+        generalTable.setWidget(0, 2, folderNameNote);
+
+        if(create) {
             generalTable.setText(1, 1, folder.getName());
-        else
+        }
+        else {
             generalTable.setText(1, 1, folder.getParent().getName());
-        if (create)
-        	generalTable.setText(2, 1, app.getCurrentUserDisplayNameOrID());
-        else
-        	generalTable.setText(2, 1, folder.getOwner());
+        }
+        if(create) {
+            generalTable.setText(2, 1, app.getCurrentUserDisplayNameOrID());
+        }
+        else {
+            final String ownerID = folder.getOwnerID();
+            final String displayName = app.getUserDisplayNameByID(ownerID);
+            final String ownerDisplayName;
+            if(displayName == null) {
+                // FIXME: Get the actual display name and do not use the id
+                ownerDisplayName = ownerID;
+            }
+            else {
+                ownerDisplayName = displayName;
+            }
+            generalTable.setText(2, 1, ownerDisplayName);
+        }
         DateTimeFormat formatter = DateTimeFormat.getFormat("d/M/yyyy h:mm a");
-        if(folder.getLastModified() != null)
+        if(folder.getLastModified() != null) {
             generalTable.setText(3, 1, formatter.format(folder.getLastModified()));
+        }
         generalTable.getFlexCellFormatter().setStyleName(0, 0, "props-labels");
         generalTable.getFlexCellFormatter().setStyleName(1, 0, "props-labels");
         generalTable.getFlexCellFormatter().setStyleName(2, 0, "props-labels");
@@ -161,160 +165,170 @@ public class FolderPropertiesDialog extends DialogBox {
 
         outer.add(inner);
 
-		// Create the 'Create/Update' button, along with a listener that hides the dialog
-		// when the button is clicked and quits the application.
-		String okLabel;
-		if (create)
-			okLabel = "Create";
-		else
-			okLabel = "Update";
-		final Button ok = new Button(okLabel, new ClickHandler() {
-			@Override
-			public void onClick(ClickEvent event) {
-				createOrUpdateFolder();
-				closeDialog();
-			}
-		});
-		ok.addStyleName("button");
-		outer.add(ok);
+        // Create the 'Create/Update' button, along with a listener that hides the dialog
+        // when the button is clicked and quits the application.
+        String okLabel;
+        if(create) {
+            okLabel = "Create";
+        }
+        else {
+            okLabel = "Update";
+        }
+        final Button ok = new Button(okLabel, new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent event) {
+                createOrUpdateFolder();
+                closeDialog();
+            }
+        });
+        ok.addStyleName("button");
+        outer.add(ok);
         outer.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER);
 
         folderName.addChangeHandler(new ChangeHandler() {
-			
-			@Override
-			public void onChange(ChangeEvent event) {
-				if(folderName.getText().contains("/")) {
-					folderNameNote.setVisible(true);
-					ok.setEnabled(false);
-				}
-				else {
-					folderNameNote.setVisible(false);
-					ok.setEnabled(true);
-				}
-			}
-		});
+
+            @Override
+            public void onChange(ChangeEvent event) {
+                if(folderName.getText().contains("/")) {
+                    folderNameNote.setVisible(true);
+                    ok.setEnabled(false);
+                }
+                else {
+                    folderNameNote.setVisible(false);
+                    ok.setEnabled(true);
+                }
+            }
+        });
 
         setWidget(outer);
-	}
-
-	@Override
-	public void center() {
-		super.center();
-		folderName.setFocus(true);
-	}
-
-	@Override
-	protected void onPreviewNativeEvent(NativePreviewEvent preview) {
-		super.onPreviewNativeEvent(preview);
-
-		NativeEvent evt = preview.getNativeEvent();
-		if (evt.getType().equals(KeyDownEvent.getType().getName()))
-			// Use the popup's key preview hooks to close the dialog when either
-			// enter or escape is pressed.
-			switch (evt.getKeyCode()) {
-				case KeyCodes.KEY_ENTER:
-					createOrUpdateFolder();
+    }
+
+    @Override
+    public void center() {
+        super.center();
+        folderName.setFocus(true);
+    }
+
+    @Override
+    protected void onPreviewNativeEvent(NativePreviewEvent preview) {
+        super.onPreviewNativeEvent(preview);
+
+        NativeEvent evt = preview.getNativeEvent();
+        if(evt.getType().equals(KeyDownEvent.getType().getName()))
+        // Use the popup's key preview hooks to close the dialog when either
+        // enter or escape is pressed.
+        {
+            switch(evt.getKeyCode()) {
+                case KeyCodes.KEY_ENTER:
+                    createOrUpdateFolder();
+                    closeDialog();
+                    break;
+                case KeyCodes.KEY_ESCAPE:
                     closeDialog();
-					break;
-				case KeyCodes.KEY_ESCAPE:
-					closeDialog();
-					break;
-			}
-	}
-
-
-	/**
-	 * Enables IE selection prevention and hides the dialog
-	 * (we disable the prevention on creation of the dialog)
-	 */
-	public void closeDialog() {
-		Pithos.preventIESelection();
-		hide();
-	}
-
-	/**
-	 * Generate an RPC request to create a new folder.
-	 */
-	private void createFolder() {
-		String name = folderName.getText().trim();
-		if (name.length() == 0)
-			return;
+                    break;
+            }
+        }
+    }
+
+
+    /**
+     * Enables IE selection prevention and hides the dialog
+     * (we disable the prevention on creation of the dialog)
+     */
+    public void closeDialog() {
+        Pithos.preventIESelection();
+        hide();
+    }
+
+    /**
+     * Generate an RPC request to create a new folder.
+     */
+    private void createFolder() {
+        String name = folderName.getText().trim();
+        if(name.length() == 0) {
+            return;
+        }
         String path = folder.getUri() + "/" + name;
-        PutRequest createFolder = new PutRequest(app.getApiPath(), folder.getOwner(), path) {
+        PutRequest createFolder = new PutRequest(app.getApiPath(), folder.getOwnerID(), path) {
             @Override
             public void onSuccess(Resource result) {
                 app.updateFolder(folder, true, new Command() {
-					
-					@Override
-					public void execute() {
-						app.updateStatistics();
-					}
-				}, true);
+
+                    @Override
+                    public void execute() {
+                        app.updateStatistics();
+                    }
+                }, true);
             }
 
             @Override
             public void onError(Throwable t) {
-				GWT.log("", t);
-				app.setError(t);
-				if (t instanceof RestException) {
-					app.displayError("Unable to create folder:" + ((RestException) t).getHttpStatusText());
-				}
-				else
-					app.displayError("System error creating folder:" + t.getMessage());
+                GWT.log("", t);
+                app.setError(t);
+                if(t instanceof RestException) {
+                    app.displayError("Unable to create folder:" + ((RestException) t).getHttpStatusText());
+                }
+                else {
+                    app.displayError("System error creating folder:" + t.getMessage());
+                }
             }
 
-			@Override
-			protected void onUnauthorized(Response response) {
-				app.sessionExpired();
-			}
-       };
+            @Override
+            protected void onUnauthorized(Response response) {
+                app.sessionExpired();
+            }
+        };
         createFolder.setHeader("X-Auth-Token", app.getUserToken());
         createFolder.setHeader("Accept", "*/*");
         createFolder.setHeader("Content-Length", "0");
         createFolder.setHeader("Content-Type", "application/directory");
         Scheduler.get().scheduleDeferred(createFolder);
-	}
-
-	/**
-	 * Upon closing the dialog by clicking OK or pressing ENTER this method does
-	 * the actual work of modifying folder properties or creating a new Folder
-	 * depending on the value of the create field
-	 */
-	protected void createOrUpdateFolder() {
-		if (create)
-			createFolder();
-		else
-			updateFolder();
-
-	}
-
-	private void updateFolder() {
+    }
+
+    /**
+     * Upon closing the dialog by clicking OK or pressing ENTER this method does
+     * the actual work of modifying folder properties or creating a new Folder
+     * depending on the value of the create field
+     */
+    protected void createOrUpdateFolder() {
+        if(create) {
+            createFolder();
+        }
+        else {
+            updateFolder();
+        }
+
+    }
+
+    private void updateFolder() {
         final String newName = folderName.getText().trim();
-        if (newName.length() == 0)
-        	return;
-        if (!folder.isContainer() && !folder.getName().equals(newName)) {
+        if(newName.length() == 0) {
+            return;
+        }
+        if(!folder.isContainer() && !folder.getName().equals(newName)) {
             final String path = folder.getParent().getUri() + "/" + newName;
-            app.copyFolder(folder, folder.getOwner(), path, true, new Command() {
-				
-				@Override
-				public void execute() {
+            app.copyFolder(folder, folder.getOwnerID(), path, true, new Command() {
+
+                @Override
+                public void execute() {
                     app.updateFolder(folder.getParent(), false, new Command() {
-            			
-            			@Override
-            			public void execute() {
-            				app.updateMySharedRoot();
-            			}
-            		}, true);
-				}
-			});
+
+                        @Override
+                        public void execute() {
+                            app.updateMySharedRoot();
+                        }
+                    }, true);
+                }
+            });
         }
-        else
+        else {
             app.updateFolder(folder.getParent(), false, new Command() {
-    			
-    			@Override
-    			public void execute() {
-    				app.updateMySharedRoot();
-    			}
-    		}, true);
-	}
+
+                @Override
+                public void execute() {
+                    app.updateMySharedRoot();
+                }
+            }, true);
+        }
+    }
 }
diff --git a/src/gr/grnet/pithos/web/client/Pithos.java b/src/gr/grnet/pithos/web/client/Pithos.java
index 9effc6d..8caac03 100644
--- a/src/gr/grnet/pithos/web/client/Pithos.java
+++ b/src/gr/grnet/pithos/web/client/Pithos.java
@@ -505,7 +505,7 @@ public class Pithos implements EntryPoint, ResizeHandler {
                     return true;
                 }
 
-                HeadRequest<Folder> head = new HeadRequest<Folder>(Folder.class, getApiPath(), f.getOwner(), "/" + f.getContainer()) {
+                HeadRequest<Folder> head = new HeadRequest<Folder>(Folder.class, getApiPath(), f.getOwnerID(), "/" + f.getContainer()) {
 
                     @Override
                     public void onSuccess(Folder _result) {
@@ -583,7 +583,7 @@ public class Pithos implements EntryPoint, ResizeHandler {
             }
             else {
                 Boolean[] perms = f.getPermissions().get(userID);
-                if(f.getOwner().equals(userID) || (perms != null && perms[1] != null && perms[1])) {
+                if(f.getOwnerID().equals(userID) || (perms != null && perms[1] != null && perms[1])) {
                     upload.setEnabled(true);
                     enableUploadArea();
                 }
@@ -954,7 +954,7 @@ public class Pithos implements EntryPoint, ResizeHandler {
         final PleaseWaitPopup pwp = new PleaseWaitPopup();
         pwp.center();
         String path = "/" + folder.getContainer() + "/" + folder.getPrefix() + "?delimiter=/" + "&t=" + System.currentTimeMillis();
-        DeleteRequest deleteFolder = new DeleteRequest(getApiPath(), folder.getOwner(), path) {
+        DeleteRequest deleteFolder = new DeleteRequest(getApiPath(), folder.getOwnerID(), path) {
 
             @Override
             protected void onUnauthorized(Response response) {
@@ -1075,8 +1075,8 @@ public class Pithos implements EntryPoint, ResizeHandler {
         copyFolder.setHeader("Accept", "*/*");
         copyFolder.setHeader("Content-Length", "0");
         copyFolder.setHeader("Content-Type", "application/directory");
-        if(!f.getOwner().equals(targetUsername)) {
-            copyFolder.setHeader("X-Source-Account", f.getOwner());
+        if(!f.getOwnerID().equals(targetUsername)) {
+            copyFolder.setHeader("X-Source-Account", f.getOwnerID());
         }
         if(move) {
             copyFolder.setHeader("X-Move-From", URL.encodePathSegment(f.getUri()));
@@ -1260,7 +1260,7 @@ public class Pithos implements EntryPoint, ResizeHandler {
             }
         }
         else {
-            HeadRequest<Folder> headFolder = new HeadRequest<Folder>(Folder.class, getApiPath(), folder.getOwner(), folder.getUri(), folder) {
+            HeadRequest<Folder> headFolder = new HeadRequest<Folder>(Folder.class, getApiPath(), folder.getOwnerID(), folder.getUri(), folder) {
 
                 @Override
                 public void onSuccess(Folder _result) {
@@ -1274,7 +1274,7 @@ public class Pithos implements EntryPoint, ResizeHandler {
                     if(t instanceof RestException) {
                         if(((RestException) t).getHttpStatusCode() == Response.SC_NOT_FOUND) {
                             final String path = folder.getUri();
-                            PutRequest newFolder = new PutRequest(getApiPath(), folder.getOwner(), path) {
+                            PutRequest newFolder = new PutRequest(getApiPath(), folder.getOwnerID(), path) {
                                 @Override
                                 public void onSuccess(Resource _result) {
                                     scheduleFolderHeadCommand(folder, callback);
diff --git a/src/gr/grnet/pithos/web/client/Toolbar.java b/src/gr/grnet/pithos/web/client/Toolbar.java
index 0b10a59..6d1b695 100644
--- a/src/gr/grnet/pithos/web/client/Toolbar.java
+++ b/src/gr/grnet/pithos/web/client/Toolbar.java
@@ -79,7 +79,7 @@ public class Toolbar extends Composite {
 				Folder folder = app.getSelectedTree().getSelection();
 				if (folder != null) {
 			        Boolean[] permissions = folder.getPermissions().get(app.getUserID());
-			    	boolean canWrite = folder.getOwner().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
+			    	boolean canWrite = folder.getOwnerID().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
 			    	
 			    	if (!folder.isInTrash() && canWrite)
 			    		new NewFolderCommand(app, null, folder).execute();
@@ -99,7 +99,7 @@ public class Toolbar extends Composite {
 				Folder folder = app.getSelectedTree().getSelection();
 				if (folder != null) {
 			        Boolean[] permissions = folder.getPermissions().get(app.getUserID());
-			    	boolean canWrite = folder.getOwner().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
+			    	boolean canWrite = folder.getOwnerID().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
 			    	boolean isFolderTreeSelected = app.getSelectedTree().equals(app.getFolderTreeView());
 			    	
 			    	if (!folder.isInTrash() && canWrite && isFolderTreeSelected && !folder.isContainer())
@@ -168,7 +168,7 @@ public class Toolbar extends Composite {
 					@Override
 					public void execute() {
 				        Boolean[] permissions = folder.getPermissions().get(app.getUserID());
-				    	boolean canWrite = folder.getOwner().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
+				    	boolean canWrite = folder.getOwnerID().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
 				    	boolean isFolderTreeSelected = app.getSelectedTree().equals(app.getFolderTreeView());
 				    	boolean otherSharedTreeSelected = app.getSelectedTree().equals(app.getOtherSharedTreeView());
 				    	
diff --git a/src/gr/grnet/pithos/web/client/ToolsMenu.java b/src/gr/grnet/pithos/web/client/ToolsMenu.java
index d72729e..79a2b08 100644
--- a/src/gr/grnet/pithos/web/client/ToolsMenu.java
+++ b/src/gr/grnet/pithos/web/client/ToolsMenu.java
@@ -96,7 +96,7 @@ public class ToolsMenu extends PopupPanel {
 
         if (folder != null) {
 	        Boolean[] permissions = folder.getPermissions().get(app.getUserID());
-	    	boolean canWrite = folder.getOwner().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
+	    	boolean canWrite = folder.getOwnerID().equals(app.getUserID()) || (permissions!= null && permissions[1] != null && permissions[1]);
 	    	boolean isFolderTreeSelected = selectedTree.equals(app.getFolderTreeView());
 	    	boolean isMysharedTreeSelected = app.isMySharedSelected();
 	    	
@@ -135,12 +135,12 @@ public class ToolsMenu extends PopupPanel {
 			        	if (item instanceof List) {
 			        		@SuppressWarnings("unchecked")
 							List<File> _files = (List<File>) item;
-			        		if (_files.get(0).getOwnerID().equals(folder.getOwner()))
+			        		if (_files.get(0).getOwnerID().equals(folder.getOwnerID()))
 			        			showPaste = true;
 			        	}
 			        	else {
 			        		Folder f = (Folder) item;
-			        		if (f.getOwner().equals(folder.getOwner()))
+			        		if (f.getOwnerID().equals(folder.getOwnerID()))
 			        			showPaste = true;
 			        	}
 			        	if (showPaste) {
diff --git a/src/gr/grnet/pithos/web/client/commands/PasteCommand.java b/src/gr/grnet/pithos/web/client/commands/PasteCommand.java
index 1189ade..1f1c486 100644
--- a/src/gr/grnet/pithos/web/client/commands/PasteCommand.java
+++ b/src/gr/grnet/pithos/web/client/commands/PasteCommand.java
@@ -77,7 +77,7 @@ public class PasteCommand implements Command {
             final Folder tobeCopied = (Folder) clipboardItem;
             if (operation == Clipboard.COPY) {
             	String targetUri = folder.getUri() + "/" + tobeCopied.getName();
-                app.copyFolder(tobeCopied, folder.getOwner(), targetUri, false, new Command() {
+                app.copyFolder(tobeCopied, folder.getOwnerID(), targetUri, false, new Command() {
                     @Override
                     public void execute() {
                         app.getClipboard().clear();
@@ -93,7 +93,7 @@ public class PasteCommand implements Command {
             }
             else {
             	String targetUri = folder.getUri() + "/" + tobeCopied.getName();
-                app.copyFolder(tobeCopied, folder.getOwner(), targetUri, true, new Command() {
+                app.copyFolder(tobeCopied, folder.getOwnerID(), targetUri, true, new Command() {
                     @Override
                     public void execute() {
                         app.getClipboard().clear();
@@ -107,7 +107,7 @@ public class PasteCommand implements Command {
 			List<File> tobeCopied = (List<File>) clipboardItem;
             Iterator<File> iter = tobeCopied.iterator();
             if (operation == Clipboard.COPY) {
-                app.copyFiles(iter, folder.getOwner(), folder.getUri(), new Command() {
+                app.copyFiles(iter, folder.getOwnerID(), folder.getUri(), new Command() {
                     @Override
                     public void execute() {
                         app.getClipboard().clear();
@@ -137,7 +137,7 @@ public class PasteCommand implements Command {
         if (iter.hasNext()) {
             File file = iter.next();
             String path = folder.getUri() + "/" + file.getName();
-            PutRequest copyFile = new PutRequest(app.getApiPath(), folder.getOwner(), path) {
+            PutRequest copyFile = new PutRequest(app.getApiPath(), folder.getOwnerID(), path) {
                 @Override
                 public void onSuccess(Resource result) {
                     moveFiles(iter, callback);
diff --git a/src/gr/grnet/pithos/web/client/foldertree/Folder.java b/src/gr/grnet/pithos/web/client/foldertree/Folder.java
index e7bffa1..f85e998 100644
--- a/src/gr/grnet/pithos/web/client/foldertree/Folder.java
+++ b/src/gr/grnet/pithos/web/client/foldertree/Folder.java
@@ -81,7 +81,7 @@ public class Folder extends Resource {
 
     private Set<File> files = new LinkedHashSet<File>();
 
-    private String owner;
+    private String ownerID;
 
     private Map<String, Boolean[]> permissions = new HashMap<String, Boolean[]>();
 
@@ -146,7 +146,7 @@ public class Folder extends Resource {
     }
 
     public void populate(String _owner, Response response) {
-        this.owner = _owner;
+        this.ownerID = _owner;
         String header = response.getHeader("Last-Modified");
         if (header != null)
 			try {
@@ -224,7 +224,7 @@ public class Folder extends Resource {
             container = name;
             prefix = "";
         }
-        this.owner = _owner;
+        this.ownerID = _owner;
 
         inheritedPermissionsFrom = unmarshallString(o, "x_object_shared_by");
         String rawPermissions = unmarshallString(o, "x_object_sharing");
@@ -247,7 +247,7 @@ public class Folder extends Resource {
     public boolean equals(Object other) {
         if (other instanceof Folder) {
             Folder o = (Folder) other;
-            return (owner == null ? true : owner.equals(o.getOwner())) 
+            return (ownerID == null ? true : ownerID.equals(o.getOwnerID()))
             		&& (getUri().equals(o.getUri()));
         }
         return false;
@@ -286,8 +286,8 @@ public class Folder extends Resource {
         return permissions;
     }
 
-    public String getOwner() {
-        return owner;
+    public String getOwnerID() {
+        return ownerID;
     }
 
 	public boolean isShared() {
diff --git a/src/gr/grnet/pithos/web/client/foldertree/FolderTreeViewModel.java b/src/gr/grnet/pithos/web/client/foldertree/FolderTreeViewModel.java
index bf23947..5e3f56b 100644
--- a/src/gr/grnet/pithos/web/client/foldertree/FolderTreeViewModel.java
+++ b/src/gr/grnet/pithos/web/client/foldertree/FolderTreeViewModel.java
@@ -152,7 +152,7 @@ public class FolderTreeViewModel implements TreeViewModel {
             final Folder f = iter.next();
 
             String path = "/" + f.getContainer() + "?format=json&delimiter=/&prefix=" + URL.encodeQueryString(f.getPrefix());
-            GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwner(), path, f) {
+            GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwnerID(), path, f) {
                 @Override
                 public void onSuccess(Folder _result) {
                     fetchFolder(iter, callback);
@@ -236,7 +236,7 @@ public class FolderTreeViewModel implements TreeViewModel {
 
     public void fetchFolder(final Folder f, final ListDataProvider<Folder> dataProvider, final boolean showfiles, final Command callback) {
         String path = "/" + f.getContainer() + "?format=json&delimiter=/&prefix=" + URL.encodeQueryString(f.getPrefix());
-        GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwner(), path, f) {
+        GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwnerID(), path, f) {
             @Override
             public void onSuccess(final Folder _result) {
                 if (showfiles)
diff --git a/src/gr/grnet/pithos/web/client/mysharedtree/MysharedTreeViewModel.java b/src/gr/grnet/pithos/web/client/mysharedtree/MysharedTreeViewModel.java
index 6c3147a..87aca52 100644
--- a/src/gr/grnet/pithos/web/client/mysharedtree/MysharedTreeViewModel.java
+++ b/src/gr/grnet/pithos/web/client/mysharedtree/MysharedTreeViewModel.java
@@ -170,7 +170,7 @@ public class MysharedTreeViewModel implements TreeViewModel {
             final Folder f = iter.next();
 
             String path = "/" + f.getContainer() + "?format=json&shared=&public=&delimiter=/&prefix=" + URL.encodeQueryString(f.getPrefix());
-            GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwner(), path, f) {
+            GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwnerID(), path, f) {
                 @Override
                 public void onSuccess(Folder _result) {
                     fetchFolder(iter, callback);
@@ -208,7 +208,7 @@ public class MysharedTreeViewModel implements TreeViewModel {
 
     public void fetchFolder(final Folder f, final boolean showfiles, final Command callback) {
         String path = "/" + f.getContainer() + "?format=json&shared=&public=" + URL.encodeQueryString(f.getPrefix());
-        GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwner(), path, f) {
+        GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwnerID(), path, f) {
             @Override
             public void onSuccess(final Folder _result) {
             	for (File file : _result.getFiles()) {
diff --git a/src/gr/grnet/pithos/web/client/othersharedtree/OtherSharedTreeViewModel.java b/src/gr/grnet/pithos/web/client/othersharedtree/OtherSharedTreeViewModel.java
index 14cc53c..0da9572 100644
--- a/src/gr/grnet/pithos/web/client/othersharedtree/OtherSharedTreeViewModel.java
+++ b/src/gr/grnet/pithos/web/client/othersharedtree/OtherSharedTreeViewModel.java
@@ -309,13 +309,13 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
 
     public void fetchFolder(final Folder f, final ListDataProvider<Folder> dataProvider, final boolean showfiles, final Command callback) {
         String path = "/" + f.getContainer() + "?format=json&delimiter=/&prefix=" + URL.encodeQueryString(f.getPrefix());
-        GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwner(), path, f) {
+        GetRequest<Folder> getFolder = new GetRequest<Folder>(Folder.class, app.getApiPath(), f.getOwnerID(), path, f) {
             @Override
             public void onSuccess(final Folder _result) {
                 if (showfiles)
                     app.showFiles(_result);
                 Iterator<Folder> iter = _result.getSubfolders().iterator();
-                fetchFolder(_result.getOwner(), iter, dataProvider, new Command() {
+                fetchFolder(_result.getOwnerID(), iter, dataProvider, new Command() {
                     @Override
                     public void execute() {
                         dataProvider.getList().clear();
