portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r568339 - in /portals/jetspeed-2/branches/JETSPEED-2.1.3: components/portal/src/java/org/apache/jetspeed/aggregator/impl/ components/portal/src/test/org/apache/jetspeed/aggregator/ jetspeed-api/src/java/org/apache/jetspeed/aggregator/
Date Wed, 22 Aug 2007 00:14:52 GMT
Author: ate
Date: Tue Aug 21 17:14:51 2007
New Revision: 568339

URL: http://svn.apache.org/viewvc?rev=568339&view=rev
Log:
Fixing ClassCastException in TestWorkerMonitor by publishing RenderJobImpl WorkerMonitor related
api to the jetspeed-api so they could be implementing in the MockRenderJob 

Modified:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/aggregator/impl/WorkerMonitorImpl.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/test/org/apache/jetspeed/aggregator/MockRenderJob.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/aggregator/RenderingJob.java

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java?rev=568339&r1=568338&r2=568339&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
Tue Aug 21 17:14:51 2007
@@ -379,7 +379,7 @@
         return this.contentIsCached;
     }
     
-    void setWorkerAttribute(String name, Object value)
+    public void setWorkerAttribute(String name, Object value)
     {
         if (this.workerAttributes == null)
         {
@@ -396,7 +396,7 @@
         }
     }
     
-    Object getWorkerAttribute(String name)
+    public Object getWorkerAttribute(String name)
     {
         Object value = null;
         
@@ -408,7 +408,7 @@
         return value;
     }
     
-    void removeWorkerAttribute(String name)
+    public void removeWorkerAttribute(String name)
     {
         if (this.workerAttributes != null)
         {

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/aggregator/impl/WorkerMonitorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/aggregator/impl/WorkerMonitorImpl.java?rev=568339&r1=568338&r2=568339&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/aggregator/impl/WorkerMonitorImpl.java
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/aggregator/impl/WorkerMonitorImpl.java
Tue Aug 21 17:14:51 2007
@@ -181,7 +181,7 @@
         Worker worker = this.getWorker();
 
         AccessControlContext context = AccessController.getContext();
-        ((RenderingJobImpl) job).setWorkerAttribute(ACCESS_CONTROL_CONTEXT_WORKER_ATTR, context);
+        job.setWorkerAttribute(ACCESS_CONTROL_CONTEXT_WORKER_ATTR, context);
         
         if (worker==null)
         {
@@ -238,7 +238,7 @@
                 
                 if (job != null)
                 {
-                    AccessControlContext context = (AccessControlContext) ((RenderingJobImpl)
job).getWorkerAttribute(ACCESS_CONTROL_CONTEXT_WORKER_ATTR);
+                    AccessControlContext context = (AccessControlContext) job.getWorkerAttribute(ACCESS_CONTROL_CONTEXT_WORKER_ATTR);
                     worker.setJob(job, context);
                     runningJobs--;
                     return;

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/test/org/apache/jetspeed/aggregator/MockRenderJob.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/test/org/apache/jetspeed/aggregator/MockRenderJob.java?rev=568339&r1=568338&r2=568339&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/test/org/apache/jetspeed/aggregator/MockRenderJob.java
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/test/org/apache/jetspeed/aggregator/MockRenderJob.java
Tue Aug 21 17:14:51 2007
@@ -165,4 +165,19 @@
         return false;
     }
 
+    public Object getWorkerAttribute(String name)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void removeWorkerAttribute(String name)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    public void setWorkerAttribute(String name, Object value)
+    {
+        // TODO Auto-generated method stub
+    }
 }

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/aggregator/RenderingJob.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/aggregator/RenderingJob.java?rev=568339&r1=568338&r2=568339&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/aggregator/RenderingJob.java
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/jetspeed-api/src/java/org/apache/jetspeed/aggregator/RenderingJob.java
Tue Aug 21 17:14:51 2007
@@ -62,5 +62,10 @@
 
     boolean isContentCached();
     
+    void setWorkerAttribute(String name, Object value);
+    
+    Object getWorkerAttribute(String name);
+    
+    void removeWorkerAttribute(String name);
 }
 



---------------------------------------------------------------------
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