incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r731509 - in /incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl: AbstractRepositoryEventHandler.java EventHelper.java JobEventHandler.java
Date Mon, 05 Jan 2009 09:53:48 GMT
Author: cziegeler
Date: Mon Jan  5 01:53:46 2009
New Revision: 731509

URL: http://svn.apache.org/viewvc?rev=731509&view=rev
Log:
SLING-799: Create ordered folder to store events and sort the query result for jobs.

Modified:
    incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/AbstractRepositoryEventHandler.java
    incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/EventHelper.java
    incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java

Modified: incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/AbstractRepositoryEventHandler.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/AbstractRepositoryEventHandler.java?rev=731509&r1=731508&r2=731509&view=diff
==============================================================================
--- incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/AbstractRepositoryEventHandler.java
(original)
+++ incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/AbstractRepositoryEventHandler.java
Mon Jan  5 01:53:46 2009
@@ -226,7 +226,7 @@
     throws RepositoryException {
         final Node node = JcrResourceUtil.createPath(this.repositoryPath,
                                    EventHelper.NODETYPE_FOLDER,
-                                   EventHelper.NODETYPE_FOLDER,
+                                   EventHelper.NODETYPE_ORDERED_FOLDER,
                                    this.writerSession, true);
 
         return node;

Modified: incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/EventHelper.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/EventHelper.java?rev=731509&r1=731508&r2=731509&view=diff
==============================================================================
--- incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/EventHelper.java
(original)
+++ incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/EventHelper.java
Mon Jan  5 01:53:46 2009
@@ -45,9 +45,12 @@
     public static final String JOB_NODE_TYPE = "slingevent:Job";
     public static final String TIMED_EVENT_NODE_TYPE = "slingevent:TimedEvent";
 
-    /** The nodetype for newly created folders */
+    /** The nodetype for newly created intermediate folders */
     public static final String NODETYPE_FOLDER = "sling:Folder";
 
+    /** The nodetype for newly created folders */
+    public static final String NODETYPE_ORDERED_FOLDER = "sling:OrderedFolder";
+
     /** Allowed characters for a node name */
     private static final String ALLOWED_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz0123456789_,.-+*#!ยค$%&()=[]?";
     /** Replacement characters for unallowed characters in a node name */

Modified: incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java?rev=731509&r1=731508&r2=731509&view=diff
==============================================================================
--- incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java
(original)
+++ incubator/sling/trunk/extensions/event/src/main/java/org/apache/sling/event/impl/JobEventHandler.java
Mon Jan  5 01:53:46 2009
@@ -1278,6 +1278,9 @@
                 buffer.append(')');
             }
             buffer.append("]");
+            buffer.append(" order by @");
+            buffer.append(EventHelper.NODE_PROPERTY_CREATED);
+            buffer.append(" ascending");
             final String queryString = buffer.toString();
             logger.debug("Executing job query {}.", queryString);
 



Mime
View raw message