portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject svn commit: r331072 - in /portals/jetspeed-2/trunk: components/statistics/src/java/org/apache/jetspeed/statistics/impl/ jetspeed-api/src/java/org/apache/jetspeed/exception/ jetspeed-api/src/java/org/apache/jetspeed/security/ layout-portlets/src/test/or...
Date Sun, 06 Nov 2005 03:43:57 GMT
Author: dlestrat
Date: Sat Nov  5 19:43:50 2005
New Revision: 331072

URL: http://svn.apache.org/viewcvs?rev=331072&view=rev
Log:
http://issues.apache.org/jira/browse/JS2-188#action_12356329

Revisited the LDAP implementation.  Integrate Apache DS with J2.
All unit tests for LDAP are passing on Apache DS.  Leave them excluded for now.
Various quick fixes for serializable objects.  Add serialUID.

Documentation to come in the next few days.

Modified:
    portals/jetspeed-2/trunk/components/statistics/src/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages.properties
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_en.properties
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_nl.properties
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/InvalidNewPasswordException.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/InvalidPasswordException.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/PasswordAlreadyUsedException.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/SecurityException.java
    portals/jetspeed-2/trunk/layout-portlets/src/test/org/apache/jetspeed/portlets/layout/TestColumnLayout.java

Modified: portals/jetspeed-2/trunk/components/statistics/src/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/statistics/src/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java?rev=331072&r1=331071&r2=331072&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/statistics/src/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/statistics/src/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
Sat Nov  5 19:43:50 2005
@@ -55,9 +55,7 @@
         PortalStatistics
 {
 
-    /*
-     * (non-Javadoc)
-     * 
+    /** 
      * @see org.apache.jetspeed.statistics.PortalStatistics#forceFlush()
      */
     public void forceFlush()
@@ -130,6 +128,15 @@
     /* date formatter */
     protected SimpleDateFormat formatter = null;
 
+    /**
+     * <p>
+     * Default Constructor.
+     * </p>
+     */
+    public PortalStatisticsImpl()
+    {
+    }
+    
     public PortalStatisticsImpl(
              boolean logToCLF,
              boolean logToDatabase,
@@ -415,14 +422,11 @@
 
     }
 
-    /*
-     * (non-Javadoc)
-     * 
+    /** 
      * @see org.springframework.beans.factory.DisposableBean#destroy()
      */
     public void springDestroy()
     {
-        long start = System.currentTimeMillis();
         if (portletBatch != null)
         {
             portletBatch.tellThreadToStop();
@@ -446,9 +450,9 @@
             }
         }
 
-        if (this.currentUsers != 0)
+        if ((this.currentUsers != 0) && logger.isDebugEnabled())
         {
-            System.out.println("destroying while users are logged in");
+            logger.debug("destroying while users are logged in");
         }
         boolean done = false;
         while (!done)
@@ -488,19 +492,16 @@
         
     }
 
-    /*
-     * (non-Javadoc)
-     * 
+    /** 
      * @see org.apache.jetspeed.statistics.PortalStatistics#getNumberOfCurrentUsers()
      */
     public int getNumberOfCurrentUsers()
     {
-        // TODO Auto-generated method stub
         return currentUsers;
     }
 
     
-    /* (non-Javadoc)
+    /**
      * @see org.apache.jetspeed.statistics.PortalStatistics#queryStatistics(org.apache.jetspeed.statistics.StatisticsQueryCriteria)
      */
     public AggregateStatistics queryStatistics(StatisticsQueryCriteria criteria) throws InvalidCriteriaException
@@ -517,15 +518,18 @@
         {
             tableName = "USER_STATISTICS";
             groupColumn = "USER_NAME";
-        } else if ("portlet".equals(queryType))
+        }
+        else if ("portlet".equals(queryType))
         {
             tableName = "PORTLET_STATISTICS";
             groupColumn = "PORTLET";
-        } else if ("page".equals(queryType))
+        }
+        else if ("page".equals(queryType))
         {
             tableName = "PAGE_STATISTICS";
             groupColumn = "PAGE";
-        } else {
+        }
+        else {
             throw new InvalidCriteriaException(" invalid queryType passed to queryStatistics");
         }
         query= "select count(*) as count ,STDDEV(ELAPSED_TIME),MIN(ELAPSED_TIME),AVG(ELAPSED_TIME),MAX(ELAPSED_TIME)
from "+tableName;
@@ -544,7 +548,8 @@
                 as.setAvgProcessingTime(rs.getFloat("AVG(ELAPSED_TIME)"));
                 as.setMaxProcessingTime(rs.getFloat("MAX(ELAPSED_TIME)"));
             }
-        } catch (SQLException e)
+        }
+        catch (SQLException e)
         {
             throw new InvalidCriteriaException(e.toString());
         }

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages.properties?rev=331072&r1=331071&r2=331072&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages.properties
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages.properties
Sat Nov  5 19:43:50 2005
@@ -15,3 +15,5 @@
 org.apache.jetspeed.security.SecurityException.PASSWORD_ALREADY_USED = Password already used.
 org.apache.jetspeed.security.SecurityException.ANONYMOUS_USER_PROTECTED = The user {0} is
protected.
 org.apache.jetspeed.security.SecurityException.UNEXPECTED = Unexpected security error at
{0} from {1}: {2}
+org.apache.jetspeed.security.SecurityException.INVALID_UID = The uid cannot contain any regular
expression meta-characters or be null or be empty.
+org.apache.jetspeed.security.SecurityException.INVALID_DN = The dn cannot be null or empty.
\ No newline at end of file

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_en.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_en.properties?rev=331072&r1=331071&r2=331072&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_en.properties
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_en.properties
Sat Nov  5 19:43:50 2005
@@ -15,3 +15,5 @@
 org.apache.jetspeed.security.SecurityException.PASSWORD_ALREADY_USED = Password already used.
 org.apache.jetspeed.security.SecurityException.ANONYMOUS_USER_PROTECTED = The user {0} is
protected.
 org.apache.jetspeed.security.SecurityException.UNEXPECTED = Unexpected security error at
{0} from {1}: {2}
+org.apache.jetspeed.security.SecurityException.INVALID_UID = The uid cannot contain any regular
expression meta-characters or be null or be empty.
+org.apache.jetspeed.security.SecurityException.INVALID_DN = The dn cannot be null or empty.

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_nl.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_nl.properties?rev=331072&r1=331071&r2=331072&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_nl.properties
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_nl.properties
Sat Nov  5 19:43:50 2005
@@ -15,3 +15,6 @@
 org.apache.jetspeed.security.SecurityException.PASSWORD_ALREADY_USED = Wachtwoord reeds gebruikt.
 org.apache.jetspeed.security.SecurityException.ANONYMOUS_USER_PROTECTED = De gebruiker {0}
is beveiligd.
 org.apache.jetspeed.security.SecurityException.UNEXPECTED = Onverwachte beveiligingsfout
in {0} vanuit {1}: {2}
+# org.apache.jetspeed.security.SecurityException.INVALID_UID = The uid cannot contain any
regular expression meta-characters or be null or be empty.
+# org.apache.jetspeed.security.SecurityException.INVALID_DN = The dn cannot be null or empty.
+

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/InvalidNewPasswordException.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/InvalidNewPasswordException.java?rev=331072&r1=331071&r2=331072&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/InvalidNewPasswordException.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/InvalidNewPasswordException.java
Sat Nov  5 19:43:50 2005
@@ -22,6 +22,9 @@
  */
 public class InvalidNewPasswordException extends SecurityException
 {
+    /** The serial version uid. */
+    private static final long serialVersionUID = -801235816327102698L;
+
     public InvalidNewPasswordException()
     {
         super(INVALID_NEW_PASSWORD);

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/InvalidPasswordException.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/InvalidPasswordException.java?rev=331072&r1=331071&r2=331072&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/InvalidPasswordException.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/InvalidPasswordException.java
Sat Nov  5 19:43:50 2005
@@ -22,6 +22,9 @@
  */
 public class InvalidPasswordException extends SecurityException
 {
+    /** The serial uid. */
+    private static final long serialVersionUID = 3213606705251501558L;
+
     public InvalidPasswordException()
     {
         super(INVALID_PASSWORD);

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/PasswordAlreadyUsedException.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/PasswordAlreadyUsedException.java?rev=331072&r1=331071&r2=331072&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/PasswordAlreadyUsedException.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/PasswordAlreadyUsedException.java
Sat Nov  5 19:43:50 2005
@@ -22,6 +22,9 @@
  */
 public class PasswordAlreadyUsedException extends SecurityException
 {
+    /** The serial version uid. */
+    private static final long serialVersionUID = 302007677387600743L;
+
     public PasswordAlreadyUsedException()
     {
         super(PASSWORD_ALREADY_USED);

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/SecurityException.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/SecurityException.java?rev=331072&r1=331071&r2=331072&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/SecurityException.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/security/SecurityException.java
Sat Nov  5 19:43:50 2005
@@ -24,6 +24,9 @@
  */
 public class SecurityException extends JetspeedException
 {
+    /** The serial version uid. */
+    private static final long serialVersionUID = -8823877029853488430L;
+
     /** <p>Principal does not exist exception message.</p> */
     public static final KeyedMessage PRINCIPAL_DOES_NOT_EXIST = new KeyedMessage("The principal
{0} does not exist.");
 
@@ -74,7 +77,13 @@
 
     /** <p>The anonymous user is protected exception message.</p> */
     public static final KeyedMessage UNEXPECTED = new KeyedMessage("Unexpected security error
at {0} from {1}: {2}");
+    
+    /** <p>The uid is invalid.</p> */
+    public static final KeyedMessage INVALID_UID = new KeyedMessage("The uid cannot contain
any regular expression meta-characters or be null or be empty.");
 
+    /** <p>The dn is invalid.</p> */
+    public static final KeyedMessage INVALID_DN = new KeyedMessage("The dn cannot be null
or empty.");
+    
     /**
      * <p>Default Constructor.</p>
      */

Modified: portals/jetspeed-2/trunk/layout-portlets/src/test/org/apache/jetspeed/portlets/layout/TestColumnLayout.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/layout-portlets/src/test/org/apache/jetspeed/portlets/layout/TestColumnLayout.java?rev=331072&r1=331071&r2=331072&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/layout-portlets/src/test/org/apache/jetspeed/portlets/layout/TestColumnLayout.java
(original)
+++ portals/jetspeed-2/trunk/layout-portlets/src/test/org/apache/jetspeed/portlets/layout/TestColumnLayout.java
Sat Nov  5 19:43:50 2005
@@ -104,13 +104,15 @@
     {
         FragmentImpl f1 = new FragmentImpl();
         f1.setId("f1");
-        f1.setPropertyValue("test", "row", "0");
-        f1.setPropertyValue("test", "column", "0");
+        f1.setName("test");
+        f1.setLayoutRow(0);
+        f1.setLayoutColumn(0);
 
         FragmentImpl f2 = new FragmentImpl();
         f2.setId("f2");
-        f2.setPropertyValue("test", "row", "0");
-        f2.setPropertyValue("test", "column", "0");
+        f2.setName("test");
+        f2.setLayoutRow(0);
+        f2.setLayoutColumn(0);
 
         ColumnLayout layout = new ColumnLayout(3, "test", widthes);
         layout.addFragment(f1);
@@ -136,12 +138,15 @@
     {
         FragmentImpl f1 = new FragmentImpl();
         f1.setId("f1");
-        f1.setPropertyValue("test", "row", "0");
-        f1.setPropertyValue("test", "column", "0");
+        f1.setName("test");
+        f1.setLayoutRow(0);
+        f1.setLayoutColumn(0);
 
         FragmentImpl f2 = new FragmentImpl();
         f2.setId("f2");
-        f2.setPropertyValue("test", "row", "0");
+        f2.setName("test");
+        f2.setLayoutRow(0);
+        f2.setLayoutColumn(0);
 
         ColumnLayout layout = new ColumnLayout(3, "test", widthes);
         layout.addFragment(f1);
@@ -164,12 +169,15 @@
     {
         FragmentImpl f1 = new FragmentImpl();
         f1.setId("f1");
-        f1.setPropertyValue("test", "row", "0");
-        f1.setPropertyValue("test", "column", "0");
+        f1.setName("test");
+        f1.setLayoutRow(0);
+        f1.setLayoutColumn(0);
 
         FragmentImpl f2 = new FragmentImpl();
         f2.setId("f2");
-        f2.setPropertyValue("test", "column", "0");
+        f2.setName("test");
+        f2.setLayoutRow(0);
+        f2.setLayoutColumn(0);
 
         ColumnLayout layout = new ColumnLayout(3, "test", widthes);
         layout.addFragment(f1);
@@ -188,8 +196,8 @@
     {
         FragmentImpl f1 = new FragmentImpl();
         f1.setId("f1");
-        f1.setPropertyValue("test", "row", "0");
-        f1.setPropertyValue("test", "column", "5");
+        f1.setLayoutRow(0);
+        f1.setLayoutColumn(5);
 
         ColumnLayout layout = new ColumnLayout(3, "test", widthes);
         layout.addFragment(f1);
@@ -290,8 +298,9 @@
         // correctly
         FragmentImpl f7 = new FragmentImpl();
         f7.setId("f7");
-        f7.setPropertyValue("test", "row", "0");
-        f7.setPropertyValue("test", "column", "1");
+        f7.setName("test");
+        f7.setLayoutRow(0);
+        f7.setLayoutColumn(1);
 
         listenerMock.reset();
         LayoutCoordinate coordinate = new LayoutCoordinate(1, 0);
@@ -416,38 +425,45 @@
     {
         f1 = new FragmentImpl();
         f1.setId("f1");
-        f1.setPropertyValue("test", "row", "0");
-        f1.setPropertyValue("test", "column", "0");
+        f1.setName("test");
+        f1.setLayoutRow(0);
+        f1.setLayoutColumn(0);
 
         f2 = new FragmentImpl();
         f2.setId("f2");
-        f2.setPropertyValue("test", "row", "1");
-        f2.setPropertyValue("test", "column", "0");
+        f2.setName("test");
+        f2.setLayoutRow(1);
+        f2.setLayoutColumn(0);
 
         f3 = new FragmentImpl();
         f3.setId("f3");
-        f3.setPropertyValue("test", "row", "2");
-        f3.setPropertyValue("test", "column", "0");
-
+        f3.setName("test");
+        f3.setLayoutRow(2);
+        f3.setLayoutColumn(0);
+        
         f4 = new FragmentImpl();
         f4.setId("f4");
-        f4.setPropertyValue("test", "row", "0");
-        f4.setPropertyValue("test", "column", "1");
-
+        f4.setName("test");
+        f4.setLayoutRow(0);
+        f4.setLayoutColumn(1);
+        
         f5 = new FragmentImpl();
         f5.setId("f5");
-        f5.setPropertyValue("test", "row", "1");
-        f5.setPropertyValue("test", "column", "1");
+        f5.setName("test");
+        f5.setLayoutRow(1);
+        f5.setLayoutColumn(1);
 
         f6 = new FragmentImpl();
         f6.setId("f6");
-        f6.setPropertyValue("test", "row", "2");
-        f6.setPropertyValue("test", "column", "1");
+        f6.setName("test");
+        f6.setLayoutRow(2);
+        f6.setLayoutColumn(1);
         
         f8 = new FragmentImpl();
         f8.setId("f8");
-        f8.setPropertyValue("test", "row", "1");
-        f8.setPropertyValue("test", "column", "2");
+        f8.setName("test");
+        f8.setLayoutRow(1);
+        f8.setLayoutColumn(2);
 
         layout = new ColumnLayout(3, "test", widthes );
         layout.addFragment(f1);



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