manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1633108 - in /manifoldcf/trunk: connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/ connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/ connect...
Date Mon, 20 Oct 2014 11:40:13 GMT
Author: kwright
Date: Mon Oct 20 11:40:12 2014
New Revision: 1633108

URL: http://svn.apache.org/r1633108
Log:
Regularize downstream rejection status codes, and implement CONNECTORS-1077 for wiki connector.

Modified:
    manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java
    manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java
    manifoldcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
    manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputHistoryActivity.java
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IHistoryActivity.java

Modified: manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java?rev=1633108&r1=1633107&r2=1633108&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java
(original)
+++ manifoldcf/trunk/connectors/documentfilter/connector/src/main/java/org/apache/manifoldcf/agents/transformation/documentfilter/DocumentFilter.java
Mon Oct 20 11:40:12 2014
@@ -172,7 +172,7 @@ public class DocumentFilter extends org.
     if (!checkURLIndexable(sp, outputDescription, documentURI, activities))
     {
       activities.noDocument();
-      activities.recordActivity(null, ACTIVITY_FILTER, null, documentURI, "FILTEREDURL",
"Rejected due to URL ('"+documentURI+"')");
+      activities.recordActivity(null, ACTIVITY_FILTER, null, documentURI, activities.EXCLUDED_URL,
"Rejected due to URL ('"+documentURI+"')");
       if (Logging.ingest.isDebugEnabled())
         Logging.ingest.debug("Document filter: Rejected document "+documentURI+" due to URL
('"+documentURI+"')");
       return DOCUMENTSTATUS_REJECTED;
@@ -181,7 +181,7 @@ public class DocumentFilter extends org.
     if (!checkLengthIndexable(sp, outputDescription, document.getBinaryLength(), activities))
     {
       activities.noDocument();
-      activities.recordActivity(null, ACTIVITY_FILTER, null, documentURI, "FILTEREDLENGTH",
"Rejected due to length ("+document.getBinaryLength()+")");
+      activities.recordActivity(null, ACTIVITY_FILTER, null, documentURI, activities.EXCLUDED_LENGTH,
"Rejected due to length ("+document.getBinaryLength()+")");
       if (Logging.ingest.isDebugEnabled())
         Logging.ingest.debug("Document filter: Rejected document "+documentURI+" due to length
("+document.getBinaryLength()+")");
       return DOCUMENTSTATUS_REJECTED;
@@ -190,7 +190,7 @@ public class DocumentFilter extends org.
     if (!checkMimeTypeIndexable(sp, outputDescription, document.getMimeType(), activities))
     {
       activities.noDocument();
-      activities.recordActivity(null, ACTIVITY_FILTER, null, documentURI, "FILTEREDMIMETYPE",
"Rejected due to mime type ('"+document.getMimeType()+"')");
+      activities.recordActivity(null, ACTIVITY_FILTER, null, documentURI, activities.EXCLUDED_MIMETYPE,
"Rejected due to mime type ('"+document.getMimeType()+"')");
       if (Logging.ingest.isDebugEnabled())
         Logging.ingest.debug("Document filter: Rejected document "+documentURI+" due to mime
type ('"+document.getMimeType()+"')");
       return DOCUMENTSTATUS_REJECTED;
@@ -199,7 +199,7 @@ public class DocumentFilter extends org.
     if (!checkDateIndexable(sp, outputDescription, document.getModifiedDate(), activities))
     {
       activities.noDocument();
-      activities.recordActivity(null, ACTIVITY_FILTER, null, documentURI, "FILTEREDDATE",
"Rejected due to date ('"+document.getModifiedDate()+"')");
+      activities.recordActivity(null, ACTIVITY_FILTER, null, documentURI, activities.EXCLUDED_DATE,
"Rejected due to date ('"+document.getModifiedDate()+"')");
       if (Logging.ingest.isDebugEnabled())
         Logging.ingest.debug("Document filter: Rejected document "+documentURI+" due to date
('"+document.getModifiedDate()+"')");
       return DOCUMENTSTATUS_REJECTED;

Modified: manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java?rev=1633108&r1=1633107&r2=1633108&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java
(original)
+++ manifoldcf/trunk/connectors/tika/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tika/TikaExtractor.java
Mon Oct 20 11:40:12 2014
@@ -158,7 +158,7 @@ public class TikaExtractor extends org.a
     {
       activities.noDocument();
       activities.recordActivity(null, ACTIVITY_EXTRACT, null, documentURI,
-        "MIMETYPEREJECTION", "Downstream pipeline rejected mime type 'text/plain;charset=utf-8'");
+        activities.EXCLUDED_MIMETYPE, "Downstream pipeline rejected mime type 'text/plain;charset=utf-8'");
       return DOCUMENTSTATUS_REJECTED;
     }
 
@@ -250,7 +250,7 @@ public class TikaExtractor extends org.a
             }
             catch (IOException e)
             {
-              resultCode = "IOEXCEPTION";
+              resultCode = activities.IOEXCEPTION;
               description = e.getMessage();
               throw e;
             }
@@ -270,7 +270,7 @@ public class TikaExtractor extends org.a
         if (!activities.checkLengthIndexable(ds.getBinaryLength()))
         {
           activities.noDocument();
-          resultCode = "LENGTHREJECTION";
+          resultCode = activities.EXCLUDED_LENGTH;
           description = "Downstream pipeline rejected document with length "+ds.getBinaryLength();
           return DOCUMENTSTATUS_REJECTED;
         }

Modified: manifoldcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java?rev=1633108&r1=1633107&r2=1633108&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
(original)
+++ manifoldcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
Mon Oct 20 11:40:12 2014
@@ -362,9 +362,7 @@ public class WikiConnector extends org.a
       ExecuteAPILoginThread t = new ExecuteAPILoginThread(client, method, result);
       try {
         t.start();
-        t.join();
-
-        handleException(t.getException());
+        token = t.finishUp();
       } catch (ManifoldCFException e) {
         t.interrupt();
         throw e;
@@ -387,7 +385,6 @@ public class WikiConnector extends org.a
         return true;
       
       // Grab the token from the first call
-      token = t.getToken();
       if (token == null)
       {
         // We don't need a token, we just couldn't log in
@@ -425,10 +422,7 @@ public class WikiConnector extends org.a
       ExecuteTokenAPILoginThread t = new ExecuteTokenAPILoginThread(httpClient, method, result);
       try {
         t.start();
-        t.join();
-
-	handleException(t.getException());
-	
+        t.finishUp();
       } catch (ManifoldCFException e) {
         t.interrupt();
         throw e;
@@ -503,7 +497,7 @@ public class WikiConnector extends org.a
         // Call the execute method appropriately
 	HttpResponse rval = client.execute(executeMethod);
         if (rval.getStatusLine().getStatusCode() != 200) {
-          throw new ManifoldCFException("Unexpected response code " + rval.getStatusLine().getStatusCode()
+ ": " + readResponseAsString(rval));
+          throw new ManifoldCFException("Unexpected HTTP response code " + rval.getStatusLine().getStatusCode()
+ ": " + readResponseAsString(rval));
         }
 
         // Read response and make sure it's valid
@@ -552,14 +546,13 @@ public class WikiConnector extends org.a
       }
     }
 
-    public Throwable getException() {
-      return exception;
-    }
-    
-    public String getToken()
-    {
+    public String finishUp()
+      throws InterruptedException, ManifoldCFException, ServiceInterruption, IOException,
HttpException {
+      join();
+      handleException(exception);
       return token;
     }
+    
   }
 
   /**
@@ -658,7 +651,7 @@ public class WikiConnector extends org.a
         // Call the execute method appropriately
         HttpResponse rval = client.execute(executeMethod);
         if (rval.getStatusLine().getStatusCode() != 200) {
-          throw new ManifoldCFException("Unexpected response code " + rval.getStatusLine().getStatusCode()
+ ": " + readResponseAsString(rval));
+          throw new ManifoldCFException("Unexpected HTTP response code " + rval.getStatusLine().getStatusCode()
+ ": " + readResponseAsString(rval));
         }
 
         // Read response and make sure it's valid
@@ -702,8 +695,10 @@ public class WikiConnector extends org.a
       }
     }
 
-    public Throwable getException() {
-      return exception;
+    public void finishUp()
+      throws InterruptedException, ManifoldCFException, ServiceInterruption, IOException,
HttpException {
+      join();
+      handleException(exception);
     }
   }
 
@@ -2058,9 +2053,7 @@ public class WikiConnector extends org.a
         try
         {
           t.start();
-          t.join();
-          handleException(t.getException());
-          if (loginAttempted || !t.isLoginRequired())
+          if (!t.finishUp() || loginAttempted)
             return;
         }
         catch (ManifoldCFException e)
@@ -2144,8 +2137,8 @@ public class WikiConnector extends org.a
   /** Thread to execute a "check" operation.  This thread both executes the operation and
parses the result. */
   protected static class ExecuteCheckThread extends Thread
   {
-    protected HttpClient client;
-    protected HttpRequestBase executeMethod;
+    protected final HttpClient client;
+    protected final HttpRequestBase executeMethod;
     protected Throwable exception = null;
     protected boolean loginNeeded = false;
 
@@ -2164,7 +2157,7 @@ public class WikiConnector extends org.a
         // Call the execute method appropriately
         HttpResponse rval = client.execute(executeMethod);
         if (rval.getStatusLine().getStatusCode() != 200)
-          throw new ManifoldCFException("Unexpected response code: "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
+          throw new ManifoldCFException("Unexpected HTTP response code: "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
         // Read response and make sure it's valid
         InputStream is = rval.getEntity().getContent();
         try
@@ -2193,15 +2186,14 @@ public class WikiConnector extends org.a
       }
     }
 
-    public Throwable getException()
-    {
-      return exception;
-    }
-
-    public boolean isLoginRequired()
+    public boolean finishUp()
+      throws InterruptedException, ManifoldCFException, ServiceInterruption, IOException,
HttpException
     {
+      join();
+      handleException(exception);
       return loginNeeded;
     }
+
   }
 
   /** Parse check response, e.g.:
@@ -2401,9 +2393,7 @@ public class WikiConnector extends org.a
             activities.addSeedDocument(pageID);
           }
           
-          t.join();
-          handleException(t.getException());
-          if (loginAttempted || !t.isLoginRequired())
+          if (!t.finishUp() || loginAttempted)
             return t.getLastPageTitle();
         }
         catch (ManifoldCFException e)
@@ -2529,7 +2519,7 @@ public class WikiConnector extends org.a
         // Call the execute method appropriately
         HttpResponse rval = client.execute(executeMethod);
         if (rval.getStatusLine().getStatusCode() != 200)
-          throw new ManifoldCFException("Unexpected response code: "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
+          throw new ManifoldCFException("Unexpected HTTP response code: "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
         // Read response and make sure it's valid
         InputStream is = rval.getEntity().getContent();
         try
@@ -2561,20 +2551,19 @@ public class WikiConnector extends org.a
       }
     }
 
-    public Throwable getException()
+    public boolean finishUp()
+      throws InterruptedException, ManifoldCFException, ServiceInterruption, IOException,
HttpException
     {
-      return exception;
+      join();
+      handleException(exception);
+      return loginNeeded;
     }
-
+    
     public String getLastPageTitle()
     {
       return lastPageTitle;
     }
     
-    public boolean isLoginRequired()
-    {
-      return loginNeeded;
-    }
   }
 
   /** Parse list output, e.g.:
@@ -2796,9 +2785,7 @@ public class WikiConnector extends org.a
         try
         {
           t.start();
-          t.join();
-          handleException(t.getException());
-          if (loginAttempted || !t.isLoginRequired())
+          if (!t.finishUp() || loginAttempted)
             return;
         }
         catch (ManifoldCFException e)
@@ -2910,7 +2897,7 @@ public class WikiConnector extends org.a
         // Call the execute method appropriately
         HttpResponse rval = client.execute(executeMethod);
         if (rval.getStatusLine().getStatusCode() != 200)
-          throw new ManifoldCFException("Unexpected response code: "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
+          throw new ManifoldCFException("Unexpected HTTP response code: "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
         // Read response and make sure it's valid
         InputStream is = rval.getEntity().getContent();
         try
@@ -2939,15 +2926,14 @@ public class WikiConnector extends org.a
       }
     }
 
-    public Throwable getException()
-    {
-      return exception;
-    }
-
-    public boolean isLoginRequired()
+    public boolean finishUp()
+      throws InterruptedException, ManifoldCFException, ServiceInterruption, IOException,
HttpException
     {
+      join();
+      handleException(exception);
       return loginNeeded;
     }
+    
   }
 
   /** This method parses a response like the following:
@@ -3113,9 +3099,7 @@ public class WikiConnector extends org.a
         try
         {
           t.start();
-          t.join();
-          handleException(t.getException());
-          if (loginAttempted || !t.isLoginRequired())
+          if (!t.finishUp() || loginAttempted)
             return;
         }
         catch (ManifoldCFException e)
@@ -3227,7 +3211,7 @@ public class WikiConnector extends org.a
         // Call the execute method appropriately
         HttpResponse rval = client.execute(executeMethod);
         if (rval.getStatusLine().getStatusCode() != 200)
-          throw new ManifoldCFException("Unexpected response code: "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
+          throw new ManifoldCFException("Unexpected HTTP response code: "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
         // Read response and make sure it's valid
         InputStream is = rval.getEntity().getContent();
         try
@@ -3256,13 +3240,11 @@ public class WikiConnector extends org.a
       }
     }
 
-    public Throwable getException()
-    {
-      return exception;
-    }
-
-    public boolean isLoginRequired()
+    public boolean finishUp()
+      throws InterruptedException, ManifoldCFException, ServiceInterruption, IOException,
HttpException
     {
+      join();
+      handleException(exception);
       return loginNeeded;
     }
   }
@@ -3503,10 +3485,7 @@ public class WikiConnector extends org.a
         try
         {
           t.start();
-          t.join();
-          
-          handleException(t.getException());
-          if (loginAttempted || !t.isLoginRequired())
+          if (!t.finishUp() || loginAttempted)
             return;
         }
         catch (ManifoldCFException e)
@@ -3604,7 +3583,7 @@ public class WikiConnector extends org.a
         HttpResponse rval = client.execute(executeMethod);
         if (rval.getStatusLine().getStatusCode() != 200)
         {
-          throw new ManifoldCFException("Unexpected response code "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
+          throw new ManifoldCFException("Unexpected HTTP response code "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
         }
 
         // Read response and make sure it's valid
@@ -3668,13 +3647,11 @@ public class WikiConnector extends org.a
       }
     }
 
-    public Throwable getException()
-    {
-      return exception;
-    }
-
-    public boolean isLoginRequired()
+    public boolean finishUp()
+      throws InterruptedException, ManifoldCFException, ServiceInterruption, IOException,
HttpException
     {
+      join();
+      handleException(exception);
       return loginNeeded;
     }
   }
@@ -3848,13 +3825,7 @@ public class WikiConnector extends org.a
         try
         {
           t.start();
-          t.join();
-          
-          statusCode = t.getStatusCode();
-          errorMessage = t.getErrorMessage();
-            
-          handleException(t.getException());
-   
+          boolean needsLogin = t.finishUp();
           // Fetch all the data we need from the thread, and do the indexing.
           File contentFile = t.getContentFile();
           if (contentFile != null)
@@ -3873,24 +3844,32 @@ public class WikiConnector extends org.a
               if (!activities.checkURLIndexable(fullURL))
               {
                 activities.noDocument(documentIdentifier,documentVersion);
+                statusCode = activities.EXCLUDED_URL;
+                errorMessage = "Downstream pipeline excluded document URL ('"+fullURL+"')";
                 return;
               }
               
               if (!activities.checkLengthIndexable(dataSize))
               {
                 activities.noDocument(documentIdentifier,documentVersion);
+                statusCode = activities.EXCLUDED_LENGTH;
+                errorMessage = "Downstream pipeline excluded document length ("+dataSize+")";
                 return;
               }
               
               if (!activities.checkMimeTypeIndexable(contentType))
               {
                 activities.noDocument(documentIdentifier,documentVersion);
+                statusCode = activities.EXCLUDED_MIMETYPE;
+                errorMessage = "Downstream pipeline excluded document mime type ('"+contentType+"')";
                 return;
               }
               
               if (!activities.checkDateIndexable(modifiedDate))
               {
                 activities.noDocument(documentIdentifier,documentVersion);
+                statusCode = activities.EXCLUDED_DATE;
+                errorMessage = "Downstream pipeline excluded document date ("+modifiedDate+")";
                 return;
               }
               
@@ -3934,28 +3913,41 @@ public class WikiConnector extends org.a
               contentFile.delete();
             }
           }
+          else
+          {
+            statusCode = t.getStatusCode();
+            errorMessage = t.getErrorMessage();
+          }
           
-          if (loginAttempted || !t.isLoginRequired())
+          if (loginAttempted || !needsLogin)
             return;
         }
         catch (ManifoldCFException e)
         {
           t.interrupt();
+          statusCode = t.getStatusCode();
+          errorMessage = t.getErrorMessage();
           throw e;
         }
         catch (ServiceInterruption e)
         {
           t.interrupt();
+          statusCode = t.getStatusCode();
+          errorMessage = t.getErrorMessage();
           throw e;
         }
         catch (IOException e)
         {
           t.interrupt();
+          statusCode = t.getStatusCode();
+          errorMessage = t.getErrorMessage();
           throw e;
         }
 	catch (HttpException e)
 	{
 	  t.interrupt();
+          statusCode = t.getStatusCode();
+          errorMessage = t.getErrorMessage();
 	  throw e;
 	}
         catch (InterruptedException e)
@@ -4057,8 +4049,7 @@ public class WikiConnector extends org.a
         HttpResponse rval = client.execute(executeMethod);
         if (rval.getStatusLine().getStatusCode() != 200)
         {
-          statusCode = "HTTP code "+rval.getStatusLine().getStatusCode();
-          throw new ManifoldCFException("Unexpected response code "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
+          throw new ManifoldCFException("Unexpected HTTP response code "+rval.getStatusLine().getStatusCode()+":
"+readResponseAsString(rval));
         }
         // Read response and make sure it's valid
         InputStream is = rval.getEntity().getContent();
@@ -4122,7 +4113,7 @@ public class WikiConnector extends org.a
       }
       catch (Throwable e)
       {
-        statusCode = "Exception";
+        statusCode = IProcessActivity.EXCEPTION;
         errorMessage = e.getMessage();
         this.exception = e;
       }
@@ -4132,11 +4123,14 @@ public class WikiConnector extends org.a
       }
     }
 
-    public Throwable getException()
+    public boolean finishUp()
+      throws InterruptedException, ManifoldCFException, ServiceInterruption, IOException,
HttpException
     {
-      return exception;
+      join();
+      handleException(exception);
+      return loginNeeded;
     }
-
+    
     public String getStatusCode()
     {
       return statusCode;
@@ -4174,11 +4168,6 @@ public class WikiConnector extends org.a
       return lastModified;
     }
     
-    public boolean isLoginRequired()
-    {
-      return loginNeeded;
-    }
-    
     public void cleanup()
     {
       if (contentFile != null)
@@ -4752,8 +4741,10 @@ public class WikiConnector extends org.a
 	throw (HttpException) thr;
       } else if (thr instanceof RuntimeException) {
 	throw (RuntimeException) thr;
-      } else {
+      } else if (thr instanceof Error) {
 	throw (Error) thr;
+      } else {
+        throw new RuntimeException("Unexpected exception class: "+thr.getClass().getName()+":
"+thr.getMessage(),thr);
       }
     }
   }

Modified: manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputHistoryActivity.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputHistoryActivity.java?rev=1633108&r1=1633107&r2=1633108&view=diff
==============================================================================
--- manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputHistoryActivity.java
(original)
+++ manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputHistoryActivity.java
Mon Oct 20 11:40:12 2014
@@ -27,9 +27,15 @@ public interface IOutputHistoryActivity
 {
   public static final String _rcsid = "@(#)$Id: IOutputHistoryActivity.java 988245 2010-08-23
18:39:35Z kwright $";
 
-  public static final String EXCEPTION = "EXCEPTION";
-  public static final String CREATED_DIRECTORY = "CREATEDDIRECTORY";
-
+  // General result codes.  Use these rather than inventing your own, where reasonable
+  public static final String EXCEPTION = "GENERALEXCEPTION";
+  public static final String CREATED_DIRECTORY = "CREATEDIRECTORY";
+  public static final String IOEXCEPTION = "IOEXCEPTION";
+  public static final String EXCLUDED_URL = "EXCLUDEDURL";
+  public static final String EXCLUDED_LENGTH = "EXCLUDEDLENGTH";
+  public static final String EXCLUDED_MIMETYPE = "EXCLUDEDMIMETYPE";
+  public static final String EXCLUDED_DATE = "EXCLUDEDDATE";
+  
   /** Record time-stamped information about the activity of the output connector.
   *@param startTime is either null or the time since the start of epoch in milliseconds (Jan
1, 1970).  Every
   *       activity has an associated time; the startTime field records when the activity
began.  A null value

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IHistoryActivity.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IHistoryActivity.java?rev=1633108&r1=1633107&r2=1633108&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IHistoryActivity.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IHistoryActivity.java
Mon Oct 20 11:40:12 2014
@@ -27,6 +27,13 @@ public interface IHistoryActivity
 {
   public static final String _rcsid = "@(#)$Id: IHistoryActivity.java 988245 2010-08-23 18:39:35Z
kwright $";
 
+  // General result codes.  Use these rather than inventing your own, where reasonable.
+  public static final String EXCLUDED_URL = IOutputHistoryActivity.EXCLUDED_URL;
+  public static final String EXCLUDED_LENGTH = IOutputHistoryActivity.EXCLUDED_LENGTH;
+  public static final String EXCLUDED_MIMETYPE = IOutputHistoryActivity.EXCLUDED_MIMETYPE;
+  public static final String EXCLUDED_DATE = IOutputHistoryActivity.EXCLUDED_DATE;
+  public static final String EXCEPTION = IOutputHistoryActivity.EXCEPTION;
+
   /** Record time-stamped information about the activity of the connector.
   *@param startTime is either null or the time since the start of epoch in milliseconds (Jan
1, 1970).  Every
   *       activity has an associated time; the startTime field records when the activity
began.  A null value



Mime
View raw message