Author: ips
Date: 2011-05-19 17:05:49 -0400 (Thu, 19 May 2011)
New Revision: 1022
Modified:
branches/AdminConsole_EAP_5_1/core/src/main/java/org/jboss/on/embedded/ui/nav/ResourceTypeTreeNode.java
branches/AdminConsole_EAP_5_1/core/src/main/java/org/jboss/on/embedded/ui/nav/SubCategoryTreeNode.java
Log:
[JBPAPP-5969] for consistency, make sure resource type descriptions and subcategory
descriptions all start with a capital letter
(
https://issues.jboss.org/browse/JBPAPP-5969)
Modified:
branches/AdminConsole_EAP_5_1/core/src/main/java/org/jboss/on/embedded/ui/nav/ResourceTypeTreeNode.java
===================================================================
---
branches/AdminConsole_EAP_5_1/core/src/main/java/org/jboss/on/embedded/ui/nav/ResourceTypeTreeNode.java 2011-05-19
21:01:48 UTC (rev 1021)
+++
branches/AdminConsole_EAP_5_1/core/src/main/java/org/jboss/on/embedded/ui/nav/ResourceTypeTreeNode.java 2011-05-19
21:05:49 UTC (rev 1022)
@@ -1,6 +1,6 @@
/*
* Embedded Jopr Project
- * Copyright (C) 2006-2009 Red Hat, Inc.
+ * Copyright (C) 2006-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,6 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
package org.jboss.on.embedded.ui.nav;
import org.rhq.core.domain.resource.Resource;
@@ -65,10 +64,18 @@
}
public String getDescription() {
- return getResourceType().getDescription();
+ String description = getResourceType().getDescription();
+ // For consistency, make sure all descriptions start with a capital letter.
+ if (description.length() >= 1){
+ String returnDescription = Character.toUpperCase(description.charAt(0)) +
description.substring(1);
+ return returnDescription;
+ } else {
+ return description;
+ }
}
public Resource getParentResource() {
return parentResource;
}
}
+
Modified:
branches/AdminConsole_EAP_5_1/core/src/main/java/org/jboss/on/embedded/ui/nav/SubCategoryTreeNode.java
===================================================================
---
branches/AdminConsole_EAP_5_1/core/src/main/java/org/jboss/on/embedded/ui/nav/SubCategoryTreeNode.java 2011-05-19
21:01:48 UTC (rev 1021)
+++
branches/AdminConsole_EAP_5_1/core/src/main/java/org/jboss/on/embedded/ui/nav/SubCategoryTreeNode.java 2011-05-19
21:05:49 UTC (rev 1022)
@@ -1,6 +1,6 @@
/*
* Embedded Jopr Project
- * Copyright (C) 2006-2009 Red Hat, Inc.
+ * Copyright (C) 2006-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,6 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
package org.jboss.on.embedded.ui.nav;
import java.util.Collection;
@@ -96,7 +95,14 @@
public String getDescription()
{
- return getSubCategory().getDescription();
+ String description = getSubCategory().getDescription();
+ // For consistency, make sure all descriptions start with a capital letter.
+ if (description.length() >= 1){
+ String returnDescription = Character.toUpperCase(description.charAt(0)) +
description.substring(1);
+ return returnDescription;
+ } else {
+ return description;
+ }
}
public ResourceSubCategory getSubCategory()
@@ -115,3 +121,4 @@
return getPath();
}
}
+