Last of the user related dialogs correctly converted to dialog framework, Users list and Quota info UI improvements.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7471 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-11-29 08:35:33 +00:00
parent de55e11515
commit f907501d38
3 changed files with 110 additions and 137 deletions

View File

@@ -112,6 +112,11 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
return this.users;
}
public int getUsersSize()
{
return getUsers().size();
}
public long getUsersTotalUsage()
{
long totalUsage = 0L;
@@ -121,7 +126,7 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
Long sizeLatest = (Long)properties.getUserUsage((String)user.getProperties().get("userName"));
if (sizeLatest != null)
{
totalUsage = totalUsage + sizeLatest;
totalUsage += sizeLatest;
}
}
return totalUsage;
@@ -136,7 +141,7 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
Long sizeCurrent = (Long)user.getProperties().get("sizeQuota");
if (sizeCurrent != null)
{
totalQuota = totalQuota + sizeCurrent;
totalQuota += sizeCurrent;
}
}
return totalQuota;
@@ -366,8 +371,7 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
public NodePropertyResolver resolverUserSizeLatest = new NodePropertyResolver() {
public Object get(Node personNode) {
Long sizeLatest = (Long)properties.getUserUsage((String)personNode.getProperties().get("userName"));
return sizeLatest;
return (Long)properties.getUserUsage((String)personNode.getProperties().get("userName"));
}
};
@@ -398,6 +402,14 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
return null;
}
public String close()
{
contextUpdated();
return DIALOG_CLOSE;
}
// ------------------------------------------------------------------------------
// IContextListener implementation