Author: ips
Date: 2011-05-19 17:01:48 -0400 (Thu, 19 May 2011)
New Revision: 1021
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/ui/nav/ResourceTypeTreeNode.java
trunk/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: trunk/core/src/main/java/org/jboss/on/embedded/ui/nav/ResourceTypeTreeNode.java
===================================================================
---
trunk/core/src/main/java/org/jboss/on/embedded/ui/nav/ResourceTypeTreeNode.java 2011-05-13
21:03:02 UTC (rev 1020)
+++
trunk/core/src/main/java/org/jboss/on/embedded/ui/nav/ResourceTypeTreeNode.java 2011-05-19
21:01:48 UTC (rev 1021)
@@ -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: trunk/core/src/main/java/org/jboss/on/embedded/ui/nav/SubCategoryTreeNode.java
===================================================================
---
trunk/core/src/main/java/org/jboss/on/embedded/ui/nav/SubCategoryTreeNode.java 2011-05-13
21:03:02 UTC (rev 1020)
+++
trunk/core/src/main/java/org/jboss/on/embedded/ui/nav/SubCategoryTreeNode.java 2011-05-19
21:01:48 UTC (rev 1021)
@@ -96,7 +96,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()