Author: glen
Date: Wed Jan  9 15:15:42 2008
New Revision: 12089

Log:

Spelling corrections, and treat multiple identical taggings as a noop.



Modified:
   trunk/registry/modules/core/src/main/java/org/wso2/registry/Registry.java
   
trunk/registry/modules/core/src/main/java/org/wso2/registry/TaggedResourcePath.java
   
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java
   
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/RegistryServer.java
   
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
   trunk/registry/modules/webapps/src/main/webapp/admin/ajax_rating.jsp
   trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp

Modified: 
trunk/registry/modules/core/src/main/java/org/wso2/registry/Registry.java
==============================================================================
--- trunk/registry/modules/core/src/main/java/org/wso2/registry/Registry.java   
(original)
+++ trunk/registry/modules/core/src/main/java/org/wso2/registry/Registry.java   
Wed Jan  9 15:15:42 2008
@@ -162,7 +162,7 @@
     void rateResource(String resourcePath, int rating) throws 
RegistryException;
 
     /**
-     * Returns the avarage rating for the given resource. This is the average 
of all ratings done by
+     * Returns the average rating for the given resource. This is the average 
of all ratings done by
      * all users for the given resource.
      *
      * @param resourcePath Path of the resource.

Modified: 
trunk/registry/modules/core/src/main/java/org/wso2/registry/TaggedResourcePath.java
==============================================================================
--- 
trunk/registry/modules/core/src/main/java/org/wso2/registry/TaggedResourcePath.java
 (original)
+++ 
trunk/registry/modules/core/src/main/java/org/wso2/registry/TaggedResourcePath.java
 Wed Jan  9 15:15:42 2008
@@ -50,6 +50,6 @@
     }
 
     public void addTagCount(String tag, long count) {
-        tagCounts.put(tag, new Long(count));
+        tagCounts.put(tag, count);
     }
 }

Modified: 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java
==============================================================================
--- 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java
   (original)
+++ 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java
   Wed Jan  9 15:15:42 2008
@@ -649,8 +649,8 @@
             Factory factory = abdera.getFactory();
             Feed feed = factory.newFeed();
             feed.setUpdated(new Date());
-            feed.setId("http://wso2.org/jdbcregistry:avarageRating";);
-            feed.setTitle("Avarage Rating for the resource " + path);
+            feed.setId("http://wso2.org/jdbcregistry:averageRating";);
+            feed.setTitle("Average Rating for the resource " + path);
             String nodeLink = baseUri + "atom" + path +
                               RegistryConstants.URL_SEPARATOR +
                               RegistryConstants.PARAMETER_AVERAGE_RATINGS;

Modified: 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/RegistryServer.java
==============================================================================
--- 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/RegistryServer.java
 (original)
+++ 
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/RegistryServer.java
 Wed Jan  9 15:15:42 2008
@@ -63,7 +63,7 @@
         RegistryRealm realm = new InMemoryRegistryRealm();
         JDBCRegistry jdbcRegistry = new InMemoryJDBCRegistry(realm);
         System.getProperties().put(RegistryConstants.REGISTRY, jdbcRegistry);
-        System.getProperties().put(RegistryConstants.REGISTRY_REALM, new 
InMemoryRegistryRealm());
+        System.getProperties().put(RegistryConstants.REGISTRY_REALM, realm);
 
         registry = jdbcRegistry;
 

Modified: 
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
==============================================================================
--- 
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
  (original)
+++ 
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
  Wed Jan  9 15:15:42 2008
@@ -459,11 +459,8 @@
                 }
 
                 if (tagsDAO.taggingExist(tags[i], resource.getId(), userID, 
conn)) {
-                    String msg =
-                            Messages.getMessage("resource.already.tagged", 
resourcePath, tags[i],
-                                                userID);
-                    log.error(msg);
-                    throw new RegistryException(msg);
+                    // Already there, don't bother doing it again.
+                    return;
                 }
 
                 tagsDAO.addTagging(tags[i], resource.getId(), userID, conn);

Modified: trunk/registry/modules/webapps/src/main/webapp/admin/ajax_rating.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/ajax_rating.jsp        
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/ajax_rating.jsp        
Wed Jan  9 15:15:42 2008
@@ -54,7 +54,7 @@
 </tr>
 <% } %>    
 <tr>
-       <th valign="top" style="width:140px;">Avarage Rating:</th>
+       <th valign="top" style="width:140px;">Average Rating:</th>
        <td>
                <div id="ratingDivAvg">
 

Modified: 
trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp 
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp 
Wed Jan  9 15:15:42 2008
@@ -463,7 +463,7 @@
         </tr>
         <tr>
             <td style="font-style:italic;">
-                <img src="/wso2registry/admin/images/help-small.jpg" 
style="margin-right:5px;" />Comma seperate to add multiple tags.
+                <img src="/wso2registry/admin/images/help-small.jpg" 
style="margin-right:5px;" />Use commas ("one, two") to add multiple tags.
             </td>
         </tr>
     </table>

_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev

Reply via email to