[jboss-svn-commits] JBL Code SVN: r19083 - labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Mar 18 21:16:01 EDT 2008


Author: mingjin
Date: 2008-03-18 21:16:00 -0400 (Tue, 18 Mar 2008)
New Revision: 19083

Modified:
   labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/TypeDeclaration.java
Log:
JBRULES-1095 fix PackageBuilderTest
- TypeDeclaration.java: implements Serialization

Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/TypeDeclaration.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/TypeDeclaration.java	2008-03-19 01:11:44 UTC (rev 19082)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/TypeDeclaration.java	2008-03-19 01:16:00 UTC (rev 19083)
@@ -20,18 +20,20 @@
 
 import org.drools.facttemplates.FactTemplate;
 
+import java.io.Serializable;
+
 /**
  * The type declaration class stores all type's metadata
  * declared in source files.
  *  
  * @author etirelli
  */
-public class TypeDeclaration {
-    
+public class TypeDeclaration implements Serializable {
+
     public static enum Role {
         FACT,
         EVENT;
-        
+
         public static Role parseRole( String role ) {
             if( "event".equalsIgnoreCase( role ) ) {
                 return EVENT;
@@ -41,9 +43,9 @@
             return null;
         }
     }
-    
+
     public static enum Format {
-        POJO, 
+        POJO,
         TEMPLATE;
 
         public static Format parseFormat( String format ) {
@@ -55,14 +57,14 @@
             return null;
         }
     }
-    
+
     public static enum ClockStrategy {
         NONE,
-        PSEUDO, 
-        SYSTEM, 
-        HEARTBEAT, 
+        PSEUDO,
+        SYSTEM,
+        HEARTBEAT,
         ATTRIBUTE;
-        
+
         public static ClockStrategy parseClockStrategy( String clockStrategy ) {
             if( "none".equalsIgnoreCase( clockStrategy ) ) {
                 return NONE;
@@ -87,7 +89,7 @@
     private String durationAttribute;
     private Class<?> typeClass;
     private FactTemplate typeTemplate;
-    
+
     public TypeDeclaration( String typeName ) {
         this.typeName = typeName;
         this.role = Role.FACT;
@@ -98,7 +100,7 @@
         this.typeClass = null;
         this.typeTemplate = null;
     }
-    
+
     /**
      * @return the type
      */
@@ -203,7 +205,7 @@
     public void setTypeTemplate(FactTemplate typeTemplate) {
         this.typeTemplate = typeTemplate;
     }
-    
+
     /**
      * Returns true if the given parameter matches this type declaration
      * 
@@ -219,6 +221,6 @@
         }
         return matches;
     }
-    
-    
+
+
 }




More information about the jboss-svn-commits mailing list