portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r449842 - /portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java
Date Mon, 25 Sep 2006 22:49:10 GMT
Author: taylor
Date: Mon Sep 25 15:49:09 2006
New Revision: 449842

URL: http://svn.apache.org/viewvc?view=rev&rev=449842
Log:
new api required for serialization

Modified:
    portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java

Modified: portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java?view=diff&rev=449842&r1=449841&r2=449842
==============================================================================
--- portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java
(original)
+++ portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java
Mon Sep 25 15:49:09 2006
@@ -399,5 +399,38 @@
             return null;
         }
     }
+
+    /**
+     * Obtain an iterator of all existing capabilities.
+     * @return Returns an iterator for all existing Capabilities of type <code>Capability</code>
+     */
+    public Iterator getCapabilities()
+    {
+        QueryByCriteria query = QueryFactory.newQuery(capabilityClass, new Criteria());
+        query.addOrderByAscending("name");
+        return getPersistenceBrokerTemplate().getCollectionByQuery(query).iterator();   
    
+    }
+    
+    /**
+     * Obtain an iterator of all existing mime types.
+     * @return Returns an iterator for all existing Mime Types of type <code>MimeType</code>
+     */
+    public Iterator getMimeTypes()
+    {
+        QueryByCriteria query = QueryFactory.newQuery(mimeTypeClass, new Criteria());
+        query.addOrderByAscending("name");
+        return getPersistenceBrokerTemplate().getCollectionByQuery(query).iterator();   
            
+    }
+    
+    /**
+     * Obtain an iterator of all existing media types.
+     * @return Returns an iterator for all existing media types of type <code>MediaType</code>
+     */
+    public Iterator getMediaTypes()
+    {
+        QueryByCriteria query = QueryFactory.newQuery(mediaTypeClass, new Criteria());
+        query.addOrderByAscending("name");
+        return getPersistenceBrokerTemplate().getCollectionByQuery(query).iterator();   
                    
+    }
     
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message