summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-11-20 08:54:31 (EST)
committerSven Rottstock2012-11-20 08:54:31 (EST)
commit65be72a9b40fc2dd65b637b9616683587c0ea37c (patch)
tree41af3348943b893770111485b2f6608d5abe6ad1
parent08b144f470667ffd8272ab2c488342f1743af2c3 (diff)
downloadorg.eclipse.stardust.ui.web-65be72a9b40fc2dd65b637b9616683587c0ea37c.zip
org.eclipse.stardust.ui.web-65be72a9b40fc2dd65b637b9616683587c0ea37c.tar.gz
org.eclipse.stardust.ui.web-65be72a9b40fc2dd65b637b9616683587c0ea37c.tar.bz2
Jira-ID: CRNT-26919
a)Sorted the perspectives in AuthorizationManagerBean buildUiPermissionTree() git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@60961 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/authorization/AuthorizationManagerBean.java23
1 files changed, 20 insertions, 3 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/authorization/AuthorizationManagerBean.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/authorization/AuthorizationManagerBean.java
index d3add68..8a0c9d6 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/authorization/AuthorizationManagerBean.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/views/authorization/AuthorizationManagerBean.java
@@ -769,19 +769,36 @@ public class AuthorizationManagerBean extends PopupUIComponentBean
UiPermissionUtils.ICON_UI_PERM);
Map<String, IPerspectiveDefinition> perspectives = PortalUiController.getInstance().getPerspectives();
+
+ List<IPerspectiveDefinition> allPerspectives = new ArrayList<IPerspectiveDefinition>();
+ for (IPerspectiveDefinition perspectiveDef : perspectives.values())
+ {
+ allPerspectives.add(perspectiveDef);
+ }
+ // Sort Perspectives
+ Collections.sort(allPerspectives, new Comparator<IPerspectiveDefinition>()
+ {
+ public int compare(IPerspectiveDefinition arg0, IPerspectiveDefinition arg1)
+ {
+ // For time being till Authorization is not implemented for
+ // Admin Perspective sort in reverse (descending) order
+ // so that other users can login into portal
+ return arg0.getLabel().compareTo(arg1.getLabel());
+ }
+ });
+
// global elements
Map<String, Map<String, Set<UiElement>>> globalElements = new HashMap<String, Map<String, Set<UiElement>>>();
- for (Entry<String, IPerspectiveDefinition> perspEntry : perspectives.entrySet())
+ for (IPerspectiveDefinition perspective : allPerspectives)
{
- IPerspectiveDefinition perspective = perspEntry.getValue();
// add perspective node
DefaultMutableTreeNode perspNode = addAbsoluteNode(uiTreeNode, perspective.getLabel(),
PermissionUserObject.ICON_PERMISSION);
// add permissions for perspective
- DefaultMutableTreeNode perspAccessNode = addPermissionNode(perspNode, perspEntry.getKey(),
+ DefaultMutableTreeNode perspAccessNode = addPermissionNode(perspNode, perspective.getName(),
PERMISSION_TYPE.ALLOW);
updateParticipantNodes(perspAccessNode);