portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r725977 [29/48] - in /portals/jetspeed-2/portal/trunk: ./ app-servers/security/jboss/src/java/META-INF/jboss-secsvc/ app-servers/security/jboss/src/java/org/apache/jetspeed/appservers/security/jboss/ applications/jetspeed/src/main/javascrip...
Date Fri, 12 Dec 2008 12:07:04 GMT
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/AggregateStatisticsImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/AggregateStatisticsImpl.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/AggregateStatisticsImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/AggregateStatisticsImpl.java Fri Dec 12 04:06:29 2008
@@ -4,177 +4,177 @@
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.statistics.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.jetspeed.statistics.AggregateStatistics;
-
-/**
- * AggregateStatisticsImpl
- * 
- * @author <a href="mailto:chris@bluesunrise.com">Chris Schaefer </a>
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
- * @version $Id: $
- */
-public class AggregateStatisticsImpl implements AggregateStatistics
-{
-
-    private float avgProcessingTime;
-
-    private float maxProcessingTime;
-
-    private float minProcessingTime;
-
-    private float stddevProcessingTime;
-
-    private int hitcount;
-
-    private List statlist;
-
-    public AggregateStatisticsImpl()
-    {
-        statlist = new ArrayList();
-    }
-
-    public void addRow(Map row)
-    {
-        statlist.add(row);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.AggregateStatistics#getAvgProcessingTime()
-     */
-    public float getAvgProcessingTime()
-    {
-        return this.avgProcessingTime;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.AggregateStatistics#getHitCount()
-     */
-    public int getHitCount()
-    {
-        return this.hitcount;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.AggregateStatistics#getMaxProcessingTime()
-     */
-    public float getMaxProcessingTime()
-    {
-        return this.maxProcessingTime;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.AggregateStatistics#getMinProcessingTime()
-     */
-    public float getMinProcessingTime()
-    {
-        return this.minProcessingTime;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.AggregateStatistics#setHitCount(int)
-     */
-    public void setHitCount(int hitCount)
-    {
-        
-        this.hitcount = hitCount;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.AggregateStatistics#setMaxProcessingTime(float)
-     */
-    public void setMaxProcessingTime(float time)
-    {
-        this.maxProcessingTime = Math.round(time);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.AggregateStatistics#setMinProcessingTime(float)
-     */
-    public void setMinProcessingTime(float time)
-    {
-        this.minProcessingTime = Math.round(time);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.jetspeed.statistics.AggregateStatistics#setAvgProcessingTime(float)
-     */
-    public void setAvgProcessingTime(float time)
-    {
-        this.avgProcessingTime = Math.round(time);
-
-    }
-
-
-    public String toString()
-    {
-        String s = "hit count = " + this.hitcount + "\n";
-        s = s + "max time = " + this.maxProcessingTime + "\n";
-        s = s + "min time = " + this.minProcessingTime + "\n";
-        s = s + "avg time = " + this.avgProcessingTime + "\n";
-        s = s + "stddev   = " + this.stddevProcessingTime + "\n";
-        String listStr ="";
-        Iterator it = this.statlist.iterator();
-        int count = 0;
-        int size = statlist.size();
-        int max = 5;
-        while((it.hasNext()) && (count++<max)) {
-            Object o = it.next();
-            listStr = listStr+"\t"+o+"\n";
-        }
-        if(size > max) {
-            s = s + "\tlist (top "+max+"):\n"+listStr;
-        } else {
-            s = s + "\tlist ("+size+" entries):\n"+listStr;
-        }
-        return s;
-    }
-
-    /**
-     * @return Returns the statlist.
-     */
-    public List getStatlist()
-    {
-        return statlist;
-    }
-
-    /**
-     * @param statlist
-     *            The statlist to set.
-     */
-    public void setStatlist(List statlist)
-    {
-        this.statlist = statlist;
-    }
-}
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.statistics.impl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.jetspeed.statistics.AggregateStatistics;
+
+/**
+ * AggregateStatisticsImpl
+ * 
+ * @author <a href="mailto:chris@bluesunrise.com">Chris Schaefer </a>
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
+ * @version $Id: $
+ */
+public class AggregateStatisticsImpl implements AggregateStatistics
+{
+
+    private float avgProcessingTime;
+
+    private float maxProcessingTime;
+
+    private float minProcessingTime;
+
+    private float stddevProcessingTime;
+
+    private int hitcount;
+
+    private List statlist;
+
+    public AggregateStatisticsImpl()
+    {
+        statlist = new ArrayList();
+    }
+
+    public void addRow(Map row)
+    {
+        statlist.add(row);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.AggregateStatistics#getAvgProcessingTime()
+     */
+    public float getAvgProcessingTime()
+    {
+        return this.avgProcessingTime;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.AggregateStatistics#getHitCount()
+     */
+    public int getHitCount()
+    {
+        return this.hitcount;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.AggregateStatistics#getMaxProcessingTime()
+     */
+    public float getMaxProcessingTime()
+    {
+        return this.maxProcessingTime;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.AggregateStatistics#getMinProcessingTime()
+     */
+    public float getMinProcessingTime()
+    {
+        return this.minProcessingTime;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.AggregateStatistics#setHitCount(int)
+     */
+    public void setHitCount(int hitCount)
+    {
+        
+        this.hitcount = hitCount;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.AggregateStatistics#setMaxProcessingTime(float)
+     */
+    public void setMaxProcessingTime(float time)
+    {
+        this.maxProcessingTime = Math.round(time);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.AggregateStatistics#setMinProcessingTime(float)
+     */
+    public void setMinProcessingTime(float time)
+    {
+        this.minProcessingTime = Math.round(time);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.statistics.AggregateStatistics#setAvgProcessingTime(float)
+     */
+    public void setAvgProcessingTime(float time)
+    {
+        this.avgProcessingTime = Math.round(time);
+
+    }
+
+
+    public String toString()
+    {
+        String s = "hit count = " + this.hitcount + "\n";
+        s = s + "max time = " + this.maxProcessingTime + "\n";
+        s = s + "min time = " + this.minProcessingTime + "\n";
+        s = s + "avg time = " + this.avgProcessingTime + "\n";
+        s = s + "stddev   = " + this.stddevProcessingTime + "\n";
+        String listStr ="";
+        Iterator it = this.statlist.iterator();
+        int count = 0;
+        int size = statlist.size();
+        int max = 5;
+        while((it.hasNext()) && (count++<max)) {
+            Object o = it.next();
+            listStr = listStr+"\t"+o+"\n";
+        }
+        if(size > max) {
+            s = s + "\tlist (top "+max+"):\n"+listStr;
+        } else {
+            s = s + "\tlist ("+size+" entries):\n"+listStr;
+        }
+        return s;
+    }
+
+    /**
+     * @return Returns the statlist.
+     */
+    public List getStatlist()
+    {
+        return statlist;
+    }
+
+    /**
+     * @param statlist
+     *            The statlist to set.
+     */
+    public void setStatlist(List statlist)
+    {
+        this.statlist = statlist;
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/AggregateStatisticsImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedPageStatistics.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedPageStatistics.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedPageStatistics.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedPageStatistics.java Fri Dec 12 04:06:29 2008
@@ -1,86 +1,86 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.statistics.impl;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-
-import javax.sql.DataSource;
-
-/**
- * <p>
- * BatchedPageStatistics
- * </p>
- * 
- * @author <a href="mailto:chris@bluesunrise.com">Chris Schaefer </a>
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
- * @version $Id: TestPortletEntityDAO.java,v 1.3 2005/05/24 14:43:19 ate Exp $
- */
-public class BatchedPageStatistics extends BatchedStatistics
-{
-
-    public BatchedPageStatistics(DataSource ds, int batchSize,
-            long msElapsedTimeThreshold, String name)
-    {
-        super(ds, batchSize, msElapsedTimeThreshold, name);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.impl.BatchedStatistics#canDoRecordType(org.apache.jetspeed.statistics.impl.LogRecord)
-     */
-    public boolean canDoRecordType(LogRecord rec)
-    {
-        return (rec instanceof PageLogRecord);
-    }
-
-    /**
-     * @param stm
-     * @param recordIterator
-     * @throws SQLException
-     */
-    protected void loadOneRecordToStatement(PreparedStatement stm, LogRecord rec)
-            throws SQLException
-    {
-        PageLogRecord record = (PageLogRecord) rec;
-
-        stm.setString(1, record.getIpAddress());
-        stm.setString(2, record.getUserName());
-        stm.setTimestamp(3, record.getTimeStamp());
-        stm.setString(4, record.getPagePath());
-        stm.setInt(5, record.getStatus());
-        stm.setLong(6, record.getMsElapsedTime());
-
-    }
-
-    /**
-     * @param con
-     * @return
-     * @throws SQLException
-     */
-    protected PreparedStatement getPreparedStatement(Connection con)
-            throws SQLException
-    {
-        PreparedStatement stm;
-        stm = con
-                .prepareStatement("INSERT INTO PAGE_STATISTICS VALUES(?,?,?,?,?,?)");
-        return stm;
-    }
-
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.statistics.impl;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import javax.sql.DataSource;
+
+/**
+ * <p>
+ * BatchedPageStatistics
+ * </p>
+ * 
+ * @author <a href="mailto:chris@bluesunrise.com">Chris Schaefer </a>
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
+ * @version $Id: TestPortletEntityDAO.java,v 1.3 2005/05/24 14:43:19 ate Exp $
+ */
+public class BatchedPageStatistics extends BatchedStatistics
+{
+
+    public BatchedPageStatistics(DataSource ds, int batchSize,
+            long msElapsedTimeThreshold, String name)
+    {
+        super(ds, batchSize, msElapsedTimeThreshold, name);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.impl.BatchedStatistics#canDoRecordType(org.apache.jetspeed.statistics.impl.LogRecord)
+     */
+    public boolean canDoRecordType(LogRecord rec)
+    {
+        return (rec instanceof PageLogRecord);
+    }
+
+    /**
+     * @param stm
+     * @param recordIterator
+     * @throws SQLException
+     */
+    protected void loadOneRecordToStatement(PreparedStatement stm, LogRecord rec)
+            throws SQLException
+    {
+        PageLogRecord record = (PageLogRecord) rec;
+
+        stm.setString(1, record.getIpAddress());
+        stm.setString(2, record.getUserName());
+        stm.setTimestamp(3, record.getTimeStamp());
+        stm.setString(4, record.getPagePath());
+        stm.setInt(5, record.getStatus());
+        stm.setLong(6, record.getMsElapsedTime());
+
+    }
+
+    /**
+     * @param con
+     * @return
+     * @throws SQLException
+     */
+    protected PreparedStatement getPreparedStatement(Connection con)
+            throws SQLException
+    {
+        PreparedStatement stm;
+        stm = con
+                .prepareStatement("INSERT INTO PAGE_STATISTICS VALUES(?,?,?,?,?,?)");
+        return stm;
+    }
+
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedPageStatistics.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedPortletStatistics.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedPortletStatistics.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedPortletStatistics.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedPortletStatistics.java Fri Dec 12 04:06:29 2008
@@ -1,91 +1,91 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.jetspeed.statistics.impl;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-
-import javax.sql.DataSource;
-
-/**
- * Batches up LogRecord statistics, and flushes them periodically to the
- * appropriate table in the database.
- * <P>
- * IMPORTANT: It is the caller's responsibility to insure that the LogRecord
- * instances added to a BatchedStatistics instance are all of the same type
- * (Portlet Access, Page Access, or User Logout).
- * 
- * @author <a href="mailto:chris@bluesunrise.com">Chris Schaefer </a>
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
- * @version $Id: TestPortletEntityDAO.java,v 1.3 2005/05/24 14:43:19 ate Exp $
- */
-public class BatchedPortletStatistics extends BatchedStatistics
-{
-
-    public BatchedPortletStatistics(DataSource ds, int batchSize,
-            long msElapsedTimeThreshold, String name)
-    {
-        super(ds, batchSize, msElapsedTimeThreshold, name);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.impl.BatchedStatistics#canDoRecordType(org.apache.jetspeed.statistics.impl.LogRecord)
-     */
-    public boolean canDoRecordType(LogRecord rec)
-    {
-        return (rec instanceof PortletLogRecord);
-    }
-
-    /**
-     * @param stm
-     * @param recordIterator
-     * @throws SQLException
-     */
-    protected void loadOneRecordToStatement(PreparedStatement stm, LogRecord rec)
-            throws SQLException
-    {
-        PortletLogRecord record = (PortletLogRecord) rec;
-
-        stm.setString(1, record.getIpAddress());
-        stm.setString(2, record.getUserName());
-        stm.setTimestamp(3, record.getTimeStamp());
-        stm.setString(4, record.getPagePath());
-        stm.setString(5, record.getPortletName());
-        stm.setInt(6, record.getStatus());
-        stm.setLong(7, record.getMsElapsedTime());
-
-    }
-
-    /**
-     * @param con
-     * @return
-     * @throws SQLException
-     */
-    protected PreparedStatement getPreparedStatement(Connection con)
-            throws SQLException
-    {
-        PreparedStatement stm;
-        stm = con
-                .prepareStatement("INSERT INTO PORTLET_STATISTICS VALUES(?,?,?,?,?,?,?)");
-        return stm;
-    }
-
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.statistics.impl;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import javax.sql.DataSource;
+
+/**
+ * Batches up LogRecord statistics, and flushes them periodically to the
+ * appropriate table in the database.
+ * <P>
+ * IMPORTANT: It is the caller's responsibility to insure that the LogRecord
+ * instances added to a BatchedStatistics instance are all of the same type
+ * (Portlet Access, Page Access, or User Logout).
+ * 
+ * @author <a href="mailto:chris@bluesunrise.com">Chris Schaefer </a>
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
+ * @version $Id: TestPortletEntityDAO.java,v 1.3 2005/05/24 14:43:19 ate Exp $
+ */
+public class BatchedPortletStatistics extends BatchedStatistics
+{
+
+    public BatchedPortletStatistics(DataSource ds, int batchSize,
+            long msElapsedTimeThreshold, String name)
+    {
+        super(ds, batchSize, msElapsedTimeThreshold, name);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.impl.BatchedStatistics#canDoRecordType(org.apache.jetspeed.statistics.impl.LogRecord)
+     */
+    public boolean canDoRecordType(LogRecord rec)
+    {
+        return (rec instanceof PortletLogRecord);
+    }
+
+    /**
+     * @param stm
+     * @param recordIterator
+     * @throws SQLException
+     */
+    protected void loadOneRecordToStatement(PreparedStatement stm, LogRecord rec)
+            throws SQLException
+    {
+        PortletLogRecord record = (PortletLogRecord) rec;
+
+        stm.setString(1, record.getIpAddress());
+        stm.setString(2, record.getUserName());
+        stm.setTimestamp(3, record.getTimeStamp());
+        stm.setString(4, record.getPagePath());
+        stm.setString(5, record.getPortletName());
+        stm.setInt(6, record.getStatus());
+        stm.setLong(7, record.getMsElapsedTime());
+
+    }
+
+    /**
+     * @param con
+     * @return
+     * @throws SQLException
+     */
+    protected PreparedStatement getPreparedStatement(Connection con)
+            throws SQLException
+    {
+        PreparedStatement stm;
+        stm = con
+                .prepareStatement("INSERT INTO PORTLET_STATISTICS VALUES(?,?,?,?,?,?,?)");
+        return stm;
+    }
+
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedPortletStatistics.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedStatistics.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedStatistics.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedStatistics.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedStatistics.java Fri Dec 12 04:06:29 2008
@@ -1,232 +1,232 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.statistics.impl;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.sql.DataSource;
-
-/**
- * <p>
- * BatchedStatistics
- * </p>
- * 
- * @author <a href="mailto:chris@bluesunrise.com">Chris Schaefer </a>
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
- * @version $Id: TestPortletEntityDAO.java,v 1.3 2005/05/24 14:43:19 ate Exp $
- */
-public abstract class BatchedStatistics implements Runnable
-{
-
-    public BatchedStatistics(DataSource ds, int batchSize,
-            long msElapsedTimeThreshold, String name)
-    {
-        this.ds = ds;
-        this.msElapsedTimeThreshold = msElapsedTimeThreshold;
-        this.batchSize = batchSize;
-        this.name = name;
-        if (this.name == null)
-        {
-            this.name = this.getClass().getName();
-        }
-        msLastFlushTime = System.currentTimeMillis();
-        thread = new Thread(this, name);
-        
-    }
-    
-    public void startThread() {
-        
-        thread.start();
-        
-        // give a quick break until the thread is running
-        // we know thread is running when done is false
-        while (this.done)
-        {
-            try
-            {
-                Thread.sleep(1);
-            } catch (InterruptedException e)
-            {
-            }
-        }
-    }
-
-    protected Connection getConnection() throws SQLException
-    {
-        return ds.getConnection();
-    }
-
-    /**
-     * should only be called from code synchronized to the linked list
-     */
-    private void checkAndDoFlush()
-    {
-        long msCurrentTime = System.currentTimeMillis();
-        if ((logRecords.size() >= batchSize)
-                || (msCurrentTime - msLastFlushTime > msElapsedTimeThreshold))
-        {
-            flush();
-            msLastFlushTime = msCurrentTime;
-        }
-    }
-
-    public void addStatistic(LogRecord logRecord)
-    {
-        synchronized (logRecords)
-        {
-            logRecords.add(logRecord);
-            checkAndDoFlush();
-        }
-    }
-
-    public boolean isDone()
-    {
-        return done;
-    }
-
-    public void tellThreadToStop()
-    {
-        keepRunning = false;
-        //this.thread.notify();
-    }
-
-    private boolean done = true;
-
-    private boolean keepRunning = true;
-
-    public void run()
-    {
-        done = false;
-        while (keepRunning)
-        {
-            try
-            {
-                synchronized (this.thread)
-                {
-                    this.thread.wait(msElapsedTimeThreshold / 4);
-                }
-            } catch (InterruptedException ie)
-            {
-                keepRunning = false;
-            }
-            synchronized (logRecords)
-            {
-                checkAndDoFlush();
-            }
-        }
-        // force a flush on the way out even if the constraints have not been
-        // met
-        synchronized (logRecords)
-        {
-            flush();
-        }
-        done = true;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.impl.BatchedStatistics#flush() should
-     *      only be called from code synchronized to the linked list
-     */
-    public void flush()
-    {
-        if (logRecords.isEmpty()) return;
-
-        Connection con = null;
-        PreparedStatement stm = null;
-
-        try
-        {
-            con = getConnection();
-            boolean autoCommit = con.getAutoCommit();
-            con.setAutoCommit(false);
-
-            stm = getPreparedStatement(con);
-            Iterator recordIterator = logRecords.iterator();
-            while (recordIterator.hasNext())
-            {
-                LogRecord record = (LogRecord) recordIterator.next();
-
-                loadOneRecordToStatement(stm, record);
-
-                stm.addBatch();
-            }
-            stm.executeBatch();
-            con.commit();
-            // only clear the records if we actually store them...
-            logRecords.clear();
-            con.setAutoCommit(autoCommit);
-        } catch (SQLException e)
-        {
-            // todo log to standard Jetspeed logger
-            e.printStackTrace();
-            try
-            {
-                con.rollback();
-            }
-            catch (Exception e2) {}            
-        } finally
-        {
-            try
-            {
-                if (stm != null) stm.close();
-            } catch (SQLException se)
-            {
-            }
-            releaseConnection(con);
-        }
-    }
-
-    abstract protected PreparedStatement getPreparedStatement(Connection con)
-            throws SQLException;
-
-    abstract protected void loadOneRecordToStatement(PreparedStatement stm,
-            LogRecord rec) throws SQLException;
-
-    void releaseConnection(Connection con)
-    {
-        try
-        {
-            if (con != null) con.close();
-        } catch (SQLException e)
-        {
-        }
-    }
-
-    protected Thread thread;
-
-    protected long msLastFlushTime = 0;
-
-    protected int batchSize = 10;
-
-    protected long msElapsedTimeThreshold = 5000;
-
-    protected List logRecords = new LinkedList();
-
-    protected DataSource ds = null;
-
-    protected String name;
-
-    public abstract boolean canDoRecordType(LogRecord rec);
-
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.statistics.impl;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.sql.DataSource;
+
+/**
+ * <p>
+ * BatchedStatistics
+ * </p>
+ * 
+ * @author <a href="mailto:chris@bluesunrise.com">Chris Schaefer </a>
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
+ * @version $Id: TestPortletEntityDAO.java,v 1.3 2005/05/24 14:43:19 ate Exp $
+ */
+public abstract class BatchedStatistics implements Runnable
+{
+
+    public BatchedStatistics(DataSource ds, int batchSize,
+            long msElapsedTimeThreshold, String name)
+    {
+        this.ds = ds;
+        this.msElapsedTimeThreshold = msElapsedTimeThreshold;
+        this.batchSize = batchSize;
+        this.name = name;
+        if (this.name == null)
+        {
+            this.name = this.getClass().getName();
+        }
+        msLastFlushTime = System.currentTimeMillis();
+        thread = new Thread(this, name);
+        
+    }
+    
+    public void startThread() {
+        
+        thread.start();
+        
+        // give a quick break until the thread is running
+        // we know thread is running when done is false
+        while (this.done)
+        {
+            try
+            {
+                Thread.sleep(1);
+            } catch (InterruptedException e)
+            {
+            }
+        }
+    }
+
+    protected Connection getConnection() throws SQLException
+    {
+        return ds.getConnection();
+    }
+
+    /**
+     * should only be called from code synchronized to the linked list
+     */
+    private void checkAndDoFlush()
+    {
+        long msCurrentTime = System.currentTimeMillis();
+        if ((logRecords.size() >= batchSize)
+                || (msCurrentTime - msLastFlushTime > msElapsedTimeThreshold))
+        {
+            flush();
+            msLastFlushTime = msCurrentTime;
+        }
+    }
+
+    public void addStatistic(LogRecord logRecord)
+    {
+        synchronized (logRecords)
+        {
+            logRecords.add(logRecord);
+            checkAndDoFlush();
+        }
+    }
+
+    public boolean isDone()
+    {
+        return done;
+    }
+
+    public void tellThreadToStop()
+    {
+        keepRunning = false;
+        //this.thread.notify();
+    }
+
+    private boolean done = true;
+
+    private boolean keepRunning = true;
+
+    public void run()
+    {
+        done = false;
+        while (keepRunning)
+        {
+            try
+            {
+                synchronized (this.thread)
+                {
+                    this.thread.wait(msElapsedTimeThreshold / 4);
+                }
+            } catch (InterruptedException ie)
+            {
+                keepRunning = false;
+            }
+            synchronized (logRecords)
+            {
+                checkAndDoFlush();
+            }
+        }
+        // force a flush on the way out even if the constraints have not been
+        // met
+        synchronized (logRecords)
+        {
+            flush();
+        }
+        done = true;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.impl.BatchedStatistics#flush() should
+     *      only be called from code synchronized to the linked list
+     */
+    public void flush()
+    {
+        if (logRecords.isEmpty()) return;
+
+        Connection con = null;
+        PreparedStatement stm = null;
+
+        try
+        {
+            con = getConnection();
+            boolean autoCommit = con.getAutoCommit();
+            con.setAutoCommit(false);
+
+            stm = getPreparedStatement(con);
+            Iterator recordIterator = logRecords.iterator();
+            while (recordIterator.hasNext())
+            {
+                LogRecord record = (LogRecord) recordIterator.next();
+
+                loadOneRecordToStatement(stm, record);
+
+                stm.addBatch();
+            }
+            stm.executeBatch();
+            con.commit();
+            // only clear the records if we actually store them...
+            logRecords.clear();
+            con.setAutoCommit(autoCommit);
+        } catch (SQLException e)
+        {
+            // todo log to standard Jetspeed logger
+            e.printStackTrace();
+            try
+            {
+                con.rollback();
+            }
+            catch (Exception e2) {}            
+        } finally
+        {
+            try
+            {
+                if (stm != null) stm.close();
+            } catch (SQLException se)
+            {
+            }
+            releaseConnection(con);
+        }
+    }
+
+    abstract protected PreparedStatement getPreparedStatement(Connection con)
+            throws SQLException;
+
+    abstract protected void loadOneRecordToStatement(PreparedStatement stm,
+            LogRecord rec) throws SQLException;
+
+    void releaseConnection(Connection con)
+    {
+        try
+        {
+            if (con != null) con.close();
+        } catch (SQLException e)
+        {
+        }
+    }
+
+    protected Thread thread;
+
+    protected long msLastFlushTime = 0;
+
+    protected int batchSize = 10;
+
+    protected long msElapsedTimeThreshold = 5000;
+
+    protected List logRecords = new LinkedList();
+
+    protected DataSource ds = null;
+
+    protected String name;
+
+    public abstract boolean canDoRecordType(LogRecord rec);
+
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedStatistics.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedUserStatistics.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedUserStatistics.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedUserStatistics.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedUserStatistics.java Fri Dec 12 04:06:29 2008
@@ -1,84 +1,84 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.statistics.impl;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-
-import javax.sql.DataSource;
-
-/**
- * <p>
- * BatchedUserStatistics
- * </p>
- * 
- * @author <a href="mailto:chris@bluesunrise.com">Chris Schaefer </a>
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
- * @version $Id: TestPortletEntityDAO.java,v 1.3 2005/05/24 14:43:19 ate Exp $
- */
-public class BatchedUserStatistics extends BatchedStatistics
-{
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.impl.BatchedStatistics#canDoRecordType(org.apache.jetspeed.statistics.impl.LogRecord)
-     */
-    public boolean canDoRecordType(LogRecord rec)
-    {
-        return (rec instanceof UserLogRecord);
-    }
-
-    public BatchedUserStatistics(DataSource ds, int batchSize,
-            long msElapsedTimeThreshold, String name)
-    {
-        super(ds, batchSize, msElapsedTimeThreshold, name);
-    }
-
-    /**
-     * @param stm
-     * @param recordIterator
-     * @throws SQLException
-     */
-    protected void loadOneRecordToStatement(PreparedStatement stm, LogRecord rec)
-            throws SQLException
-    {
-        UserLogRecord record = (UserLogRecord) rec;
-
-        stm.setString(1, record.getIpAddress());
-        stm.setString(2, record.getUserName());
-        stm.setTimestamp(3, record.getTimeStamp());
-        stm.setInt(4, record.getStatus());
-        stm.setLong(5, record.getMsElapsedTime());
-    }
-
-    /**
-     * @param con
-     * @return
-     * @throws SQLException
-     */
-    protected PreparedStatement getPreparedStatement(Connection con)
-            throws SQLException
-    {
-        PreparedStatement stm;
-        stm = con
-                .prepareStatement("INSERT INTO USER_STATISTICS VALUES(?,?,?,?,?)");
-        return stm;
-    }
-
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.statistics.impl;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import javax.sql.DataSource;
+
+/**
+ * <p>
+ * BatchedUserStatistics
+ * </p>
+ * 
+ * @author <a href="mailto:chris@bluesunrise.com">Chris Schaefer </a>
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
+ * @version $Id: TestPortletEntityDAO.java,v 1.3 2005/05/24 14:43:19 ate Exp $
+ */
+public class BatchedUserStatistics extends BatchedStatistics
+{
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.impl.BatchedStatistics#canDoRecordType(org.apache.jetspeed.statistics.impl.LogRecord)
+     */
+    public boolean canDoRecordType(LogRecord rec)
+    {
+        return (rec instanceof UserLogRecord);
+    }
+
+    public BatchedUserStatistics(DataSource ds, int batchSize,
+            long msElapsedTimeThreshold, String name)
+    {
+        super(ds, batchSize, msElapsedTimeThreshold, name);
+    }
+
+    /**
+     * @param stm
+     * @param recordIterator
+     * @throws SQLException
+     */
+    protected void loadOneRecordToStatement(PreparedStatement stm, LogRecord rec)
+            throws SQLException
+    {
+        UserLogRecord record = (UserLogRecord) rec;
+
+        stm.setString(1, record.getIpAddress());
+        stm.setString(2, record.getUserName());
+        stm.setTimestamp(3, record.getTimeStamp());
+        stm.setInt(4, record.getStatus());
+        stm.setLong(5, record.getMsElapsedTime());
+    }
+
+    /**
+     * @param con
+     * @return
+     * @throws SQLException
+     */
+    protected PreparedStatement getPreparedStatement(Connection con)
+            throws SQLException
+    {
+        PreparedStatement stm;
+        stm = con
+                .prepareStatement("INSERT INTO USER_STATISTICS VALUES(?,?,?,?,?)");
+        return stm;
+    }
+
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/BatchedUserStatistics.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/LogRecord.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/LogRecord.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/LogRecord.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/LogRecord.java Fri Dec 12 04:06:29 2008
@@ -1,161 +1,161 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.statistics.impl;
-
-import java.sql.Timestamp;
-
-/**
- * LogRecord
- * <P>
- * Abstract class that holds the fields of a log entry generated by
- * implementations of the PortalStatistics interface.
- * <P>
- * Some of the fields are common to all types of log entries; those fields are
- * implemented in LogRecord. The fields that are specific to a particular type
- * of log entry need to be implemented in a class that extends LogRecord.
- * 
- * @author <a href="mailto:rklein@bluesunrise.com">Richard D. Klein </a>
- * @version $Id: LogRecord.java 188420 2005-03-23 22:25:50Z rdk $
- */
-public abstract class LogRecord
-{
-
-    public static final String TYPE_PORTLET = "PORTLET";
-
-    public static final String TYPE_PAGE = "PAGE";
-
-    public static final String TYPE_USER = "USER";
-
-    protected String ipAddress = null;
-
-    protected String logType = null;
-
-    protected long msElapsedTime = 0;
-
-    protected int status = 0;
-
-    protected Timestamp timeStamp = null;
-
-    protected String userName = null;
-
-    public LogRecord(String logType)
-    {
-        this.logType = logType;
-    }
-
-    /**
-     * @return Returns the ipAddress.
-     */
-    public String getIpAddress()
-    {
-        return ipAddress;
-    }
-
-    /**
-     * @param ipAddress
-     *            The ipAddress to set.
-     */
-    public void setIpAddress(String ipAddress)
-    {
-        this.ipAddress = ipAddress;
-    }
-
-    /**
-     * @return Returns the logType.
-     */
-    public String getLogType()
-    {
-        return logType;
-    }
-
-    /**
-     * @param logType
-     *            The logType to set.
-     */
-    public void setLogType(String logType)
-    {
-        this.logType = logType;
-    }
-
-    /**
-     * @return Returns the msElapsedTime.
-     */
-    public long getMsElapsedTime()
-    {
-        return msElapsedTime;
-    }
-
-    /**
-     * @param msElapsedTime
-     *            The msElapsedTime to set.
-     */
-    public void setMsElapsedTime(long msElapsedTime)
-    {
-        this.msElapsedTime = msElapsedTime;
-    }
-
-    /**
-     * @return Returns the status.
-     */
-    public int getStatus()
-    {
-        return status;
-    }
-
-    /**
-     * @param status
-     *            The status to set.
-     */
-    public void setStatus(int status)
-    {
-        this.status = status;
-    }
-
-    /**
-     * @return Returns the timeStamp.
-     */
-    public Timestamp getTimeStamp()
-    {
-        return timeStamp;
-    }
-
-    /**
-     * @param timeStamp
-     *            The timeStamp to set.
-     */
-    public void setTimeStamp(Timestamp timeStamp)
-    {
-        this.timeStamp = timeStamp;
-    }
-
-    /**
-     * @return Returns the userName.
-     */
-    public String getUserName()
-    {
-        return userName;
-    }
-
-    /**
-     * @param userName
-     *            The userName to set.
-     */
-    public void setUserName(String userName)
-    {
-        this.userName = userName;
-    }
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.statistics.impl;
+
+import java.sql.Timestamp;
+
+/**
+ * LogRecord
+ * <P>
+ * Abstract class that holds the fields of a log entry generated by
+ * implementations of the PortalStatistics interface.
+ * <P>
+ * Some of the fields are common to all types of log entries; those fields are
+ * implemented in LogRecord. The fields that are specific to a particular type
+ * of log entry need to be implemented in a class that extends LogRecord.
+ * 
+ * @author <a href="mailto:rklein@bluesunrise.com">Richard D. Klein </a>
+ * @version $Id: LogRecord.java 188420 2005-03-23 22:25:50Z rdk $
+ */
+public abstract class LogRecord
+{
+
+    public static final String TYPE_PORTLET = "PORTLET";
+
+    public static final String TYPE_PAGE = "PAGE";
+
+    public static final String TYPE_USER = "USER";
+
+    protected String ipAddress = null;
+
+    protected String logType = null;
+
+    protected long msElapsedTime = 0;
+
+    protected int status = 0;
+
+    protected Timestamp timeStamp = null;
+
+    protected String userName = null;
+
+    public LogRecord(String logType)
+    {
+        this.logType = logType;
+    }
+
+    /**
+     * @return Returns the ipAddress.
+     */
+    public String getIpAddress()
+    {
+        return ipAddress;
+    }
+
+    /**
+     * @param ipAddress
+     *            The ipAddress to set.
+     */
+    public void setIpAddress(String ipAddress)
+    {
+        this.ipAddress = ipAddress;
+    }
+
+    /**
+     * @return Returns the logType.
+     */
+    public String getLogType()
+    {
+        return logType;
+    }
+
+    /**
+     * @param logType
+     *            The logType to set.
+     */
+    public void setLogType(String logType)
+    {
+        this.logType = logType;
+    }
+
+    /**
+     * @return Returns the msElapsedTime.
+     */
+    public long getMsElapsedTime()
+    {
+        return msElapsedTime;
+    }
+
+    /**
+     * @param msElapsedTime
+     *            The msElapsedTime to set.
+     */
+    public void setMsElapsedTime(long msElapsedTime)
+    {
+        this.msElapsedTime = msElapsedTime;
+    }
+
+    /**
+     * @return Returns the status.
+     */
+    public int getStatus()
+    {
+        return status;
+    }
+
+    /**
+     * @param status
+     *            The status to set.
+     */
+    public void setStatus(int status)
+    {
+        this.status = status;
+    }
+
+    /**
+     * @return Returns the timeStamp.
+     */
+    public Timestamp getTimeStamp()
+    {
+        return timeStamp;
+    }
+
+    /**
+     * @param timeStamp
+     *            The timeStamp to set.
+     */
+    public void setTimeStamp(Timestamp timeStamp)
+    {
+        this.timeStamp = timeStamp;
+    }
+
+    /**
+     * @return Returns the userName.
+     */
+    public String getUserName()
+    {
+        return userName;
+    }
+
+    /**
+     * @param userName
+     *            The userName to set.
+     */
+    public void setUserName(String userName)
+    {
+        this.userName = userName;
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/LogRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PageLogRecord.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PageLogRecord.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PageLogRecord.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PageLogRecord.java Fri Dec 12 04:06:29 2008
@@ -1,54 +1,54 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.statistics.impl;
-
-/**
- * PageLogRecord
- * <P>
- * Extends the abstract class LogRecord to holds the fields of a Page Access log
- * entry.
- * 
- * @author <a href="mailto:rklein@bluesunrise.com">Richard D. Klein </a>
- * @version $Id: LogRecord.java 188420 2005-03-23 22:25:50Z rdk $
- */
-public class PageLogRecord extends LogRecord
-{
-
-    protected String pagePath = null;
-
-    public PageLogRecord()
-    {
-        super(LogRecord.TYPE_PAGE);
-    }
-
-    /**
-     * @return Returns the pagePath.
-     */
-    public String getPagePath()
-    {
-        return pagePath;
-    }
-
-    /**
-     * @param pagePath
-     *            The pagePath to set.
-     */
-    public void setPagePath(String pagePath)
-    {
-        this.pagePath = pagePath;
-    }
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.statistics.impl;
+
+/**
+ * PageLogRecord
+ * <P>
+ * Extends the abstract class LogRecord to holds the fields of a Page Access log
+ * entry.
+ * 
+ * @author <a href="mailto:rklein@bluesunrise.com">Richard D. Klein </a>
+ * @version $Id: LogRecord.java 188420 2005-03-23 22:25:50Z rdk $
+ */
+public class PageLogRecord extends LogRecord
+{
+
+    protected String pagePath = null;
+
+    public PageLogRecord()
+    {
+        super(LogRecord.TYPE_PAGE);
+    }
+
+    /**
+     * @return Returns the pagePath.
+     */
+    public String getPagePath()
+    {
+        return pagePath;
+    }
+
+    /**
+     * @param pagePath
+     *            The pagePath to set.
+     */
+    public void setPagePath(String pagePath)
+    {
+        this.pagePath = pagePath;
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PageLogRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortletLogRecord.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortletLogRecord.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortletLogRecord.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortletLogRecord.java Fri Dec 12 04:06:29 2008
@@ -1,73 +1,73 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.statistics.impl;
-
-/**
- * PortletLogRecord
- * <P>
- * Extends the abstract class LogRecord to holds the fields of a Portlet Access
- * log entry.
- * 
- * @author <a href="mailto:rklein@bluesunrise.com">Richard D. Klein </a>
- * @version $Id: LogRecord.java 188420 2005-03-23 22:25:50Z rdk $
- */
-public class PortletLogRecord extends LogRecord
-{
-
-    protected String portletName = null;
-
-    protected String pagePath = null;
-
-    public PortletLogRecord()
-    {
-        super(LogRecord.TYPE_PORTLET);
-    }
-
-    /**
-     * @return Returns the pagePath.
-     */
-    public String getPagePath()
-    {
-        return pagePath;
-    }
-
-    /**
-     * @param pagePath
-     *            The pagePath to set.
-     */
-    public void setPagePath(String pagePath)
-    {
-        this.pagePath = pagePath;
-    }
-
-    /**
-     * @return Returns the portletName.
-     */
-    public String getPortletName()
-    {
-        return portletName;
-    }
-
-    /**
-     * @param portletName
-     *            The portletName to set.
-     */
-    public void setPortletName(String portletName)
-    {
-        this.portletName = portletName;
-    }
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.statistics.impl;
+
+/**
+ * PortletLogRecord
+ * <P>
+ * Extends the abstract class LogRecord to holds the fields of a Portlet Access
+ * log entry.
+ * 
+ * @author <a href="mailto:rklein@bluesunrise.com">Richard D. Klein </a>
+ * @version $Id: LogRecord.java 188420 2005-03-23 22:25:50Z rdk $
+ */
+public class PortletLogRecord extends LogRecord
+{
+
+    protected String portletName = null;
+
+    protected String pagePath = null;
+
+    public PortletLogRecord()
+    {
+        super(LogRecord.TYPE_PORTLET);
+    }
+
+    /**
+     * @return Returns the pagePath.
+     */
+    public String getPagePath()
+    {
+        return pagePath;
+    }
+
+    /**
+     * @param pagePath
+     *            The pagePath to set.
+     */
+    public void setPagePath(String pagePath)
+    {
+        this.pagePath = pagePath;
+    }
+
+    /**
+     * @return Returns the portletName.
+     */
+    public String getPortletName()
+    {
+        return portletName;
+    }
+
+    /**
+     * @param portletName
+     *            The portletName to set.
+     */
+    public void setPortletName(String portletName)
+    {
+        this.portletName = portletName;
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortletLogRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/StatisticsQueryCriteriaImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/StatisticsQueryCriteriaImpl.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/StatisticsQueryCriteriaImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/StatisticsQueryCriteriaImpl.java Fri Dec 12 04:06:29 2008
@@ -14,127 +14,127 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-package org.apache.jetspeed.statistics.impl;
-
-import org.apache.jetspeed.statistics.StatisticsQueryCriteria;
-
-public class StatisticsQueryCriteriaImpl implements StatisticsQueryCriteria
-{
-
-    private String user;
-
-    private String timePeriod;
-
-    private String queryType;
-
-    private String listsize;
-
-    private String sorttype;
-
-    private String sortorder;
-
-    /**
-     * @return Returns the ipAddress.
-     */
-    public String getTimePeriod()
-    {
-        return timePeriod;
-    }
-
-    /**
-     * @param ipAddress
-     *            The ipAddress to set.
-     */
-    public void setTimePeriod(String ipAddress)
-    {
-        this.timePeriod = ipAddress;
-    }
-
-    /**
-     * @return Returns the user.
-     */
-    public String getUser()
-    {
-        return user;
-    }
-
-    /**
-     * @param user
-     *            The user to set.
-     */
-    public void setUser(String user)
-    {
-        this.user = user;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#getQueryType()
-     */
-    public String getQueryType()
-    {
-
-        return queryType;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#setQueryType(java.lang.String)
-     */
-    public void setQueryType(String queryType)
-    {
-        this.queryType = queryType;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#getListsize()
-     */
-    public String getListsize()
-    {
-        return this.listsize;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#getSorttype()
-     */
-    public String getSorttype()
-    {
-        return this.sorttype;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#setListsize(java.lang.String)
-     */
-    public void setListsize(String listsize)
-    {
-        this.listsize = listsize;
-
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#setSorttype(java.lang.String)
-     */
-    public void setSorttype(String sorttype)
-    {
-        this.sorttype = sorttype;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#getSortorder()
-     */
-    public String getSortorder()
-    {
-        return this.sortorder;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#setSortorder(java.lang.String)
-     */
-    public void setSortorder(String sortorder)
-    {
-        this.sortorder = sortorder;
-
-    }
-}
+package org.apache.jetspeed.statistics.impl;
+
+import org.apache.jetspeed.statistics.StatisticsQueryCriteria;
+
+public class StatisticsQueryCriteriaImpl implements StatisticsQueryCriteria
+{
+
+    private String user;
+
+    private String timePeriod;
+
+    private String queryType;
+
+    private String listsize;
+
+    private String sorttype;
+
+    private String sortorder;
+
+    /**
+     * @return Returns the ipAddress.
+     */
+    public String getTimePeriod()
+    {
+        return timePeriod;
+    }
+
+    /**
+     * @param ipAddress
+     *            The ipAddress to set.
+     */
+    public void setTimePeriod(String ipAddress)
+    {
+        this.timePeriod = ipAddress;
+    }
+
+    /**
+     * @return Returns the user.
+     */
+    public String getUser()
+    {
+        return user;
+    }
+
+    /**
+     * @param user
+     *            The user to set.
+     */
+    public void setUser(String user)
+    {
+        this.user = user;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#getQueryType()
+     */
+    public String getQueryType()
+    {
+
+        return queryType;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#setQueryType(java.lang.String)
+     */
+    public void setQueryType(String queryType)
+    {
+        this.queryType = queryType;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#getListsize()
+     */
+    public String getListsize()
+    {
+        return this.listsize;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#getSorttype()
+     */
+    public String getSorttype()
+    {
+        return this.sorttype;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#setListsize(java.lang.String)
+     */
+    public void setListsize(String listsize)
+    {
+        this.listsize = listsize;
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#setSorttype(java.lang.String)
+     */
+    public void setSorttype(String sorttype)
+    {
+        this.sorttype = sorttype;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#getSortorder()
+     */
+    public String getSortorder()
+    {
+        return this.sortorder;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.statistics.StatisticsQueryCriteria#setSortorder(java.lang.String)
+     */
+    public void setSortorder(String sortorder)
+    {
+        this.sortorder = sortorder;
+
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/StatisticsQueryCriteriaImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/UserLogRecord.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/UserLogRecord.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/UserLogRecord.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/UserLogRecord.java Fri Dec 12 04:06:29 2008
@@ -1,35 +1,35 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.statistics.impl;
-
-/**
- * UserLogRecord
- * <P>
- * Extends the abstract class LogRecord to holds the fields of a User Logout log
- * entry.
- * 
- * @author <a href="mailto:rklein@bluesunrise.com">Richard D. Klein </a>
- * @version $Id: LogRecord.java 188420 2005-03-23 22:25:50Z rdk $
- */
-public class UserLogRecord extends LogRecord
-{
-
-    public UserLogRecord()
-    {
-        super(LogRecord.TYPE_USER);
-    }
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.statistics.impl;
+
+/**
+ * UserLogRecord
+ * <P>
+ * Extends the abstract class LogRecord to holds the fields of a User Logout log
+ * entry.
+ * 
+ * @author <a href="mailto:rklein@bluesunrise.com">Richard D. Klein </a>
+ * @version $Id: LogRecord.java 188420 2005-03-23 22:25:50Z rdk $
+ */
+public class UserLogRecord extends LogRecord
+{
+
+    public UserLogRecord()
+    {
+        super(LogRecord.TYPE_USER);
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/UserLogRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/UserStatsImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java
------------------------------------------------------------------------------
    svn:eol-style = native



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