incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r591909 - in /incubator/sling/trunk/event/src/main: java/org/apache/sling/event/impl/TimedEventHandler.java resources/SLING-INF/nodetypes/event.cnd
Date Mon, 05 Nov 2007 08:32:43 GMT
Author: cziegeler
Date: Mon Nov  5 00:32:41 2007
New Revision: 591909

URL: http://svn.apache.org/viewvc?rev=591909&view=rev
Log:
Fix several bugs in the timed events implementation. Applying patches from Philipp Kock (pkoch@day.com)
(SLING-95):
- TimedEvent must be lockable
- Local events were ignored instead of remote events (comment was correct, but code not)
- It's only an error if more than *one* scheduling information is specified.

Modified:
    incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/TimedEventHandler.java
    incubator/sling/trunk/event/src/main/resources/SLING-INF/nodetypes/event.cnd

Modified: incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/TimedEventHandler.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/TimedEventHandler.java?rev=591909&r1=591908&r2=591909&view=diff
==============================================================================
--- incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/TimedEventHandler.java
(original)
+++ incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/TimedEventHandler.java
Mon Nov  5 00:32:41 2007
@@ -238,7 +238,7 @@
                 return true;
             }
             // we ignore remote job events
-            if ( EventUtil.isLocal(event) ) {
+            if ( !EventUtil.isLocal(event) ) {
                 return true;
             }
 
@@ -458,7 +458,7 @@
             if ( this.date != null ) {
                 count++;
             }
-            if ( count > 0 ) {
+            if ( count > 1 ) {
                 throw new IllegalArgumentException("Only one configuration property from
" + EventUtil.PROPERTY_TIMED_EVENT_SCHEDULE +
                                       ", " + EventUtil.PROPERTY_TIMED_EVENT_PERIOD +
                                       ", or " + EventUtil.PROPERTY_TIMED_EVENT_DATE + " should
be used.");

Modified: incubator/sling/trunk/event/src/main/resources/SLING-INF/nodetypes/event.cnd
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/event/src/main/resources/SLING-INF/nodetypes/event.cnd?rev=591909&r1=591908&r2=591909&view=diff
==============================================================================
--- incubator/sling/trunk/event/src/main/resources/SLING-INF/nodetypes/event.cnd (original)
+++ incubator/sling/trunk/event/src/main/resources/SLING-INF/nodetypes/event.cnd Mon Nov 
5 00:32:41 2007
@@ -42,7 +42,7 @@
 [slingevent:TimedEvents] > slingevent:Events, mix:lockable
  + * (slingevent:TimedEvent)
  
-[slingevent:TimedEvent] > slingevent:Event
+[slingevent:TimedEvent] > slingevent:Event, mix:lockable
   - slingevent:processor (string)
   - slingevent:id (string)
 



Mime
View raw message