continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r442466 - /maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
Date Tue, 12 Sep 2006 06:01:31 GMT
Author: carlos
Date: Mon Sep 11 23:01:30 2006
New Revision: 442466

URL: http://svn.apache.org/viewvc?view=rev&rev=442466
Log:
Create default project group on initialization

Modified:
    maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java

Modified: maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java?view=diff&rev=442466&r1=442465&r2=442466
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
Mon Sep 11 23:01:30 2006
@@ -19,6 +19,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.model.system.ContinuumUser;
 import org.apache.maven.continuum.model.system.Permission;
@@ -43,16 +44,6 @@
     implements ContinuumInitializer
 {
     // ----------------------------------------------------------------------
-    // Default values for the default project group
-    // ----------------------------------------------------------------------
-
-    public static final String DEFAULT_PROJECT_GROUP_NAME = "DEFAULT_PROJECT_GROUP";
-
-    public static final String DEFAULT_PROJECT_GROUP_ID = "DEFAULT";
-
-    public static final String DEFAULT_PROJECT_GROUP_DESCRIPTION = "Default Project Group";
-
-    // ----------------------------------------------------------------------
     // Default values for the default schedule
     // ----------------------------------------------------------------------
 
@@ -134,6 +125,8 @@
 
             createDefaultUsers();
 
+            createDefaultProjectGroup();
+
             //put back password validation rules
             securityPolicy.setPasswordRules( rules );
 
@@ -318,5 +311,18 @@
                 throw new ContinuumStoreException( "There was a password rule violation.",
pre );
             }
         }
+    }
+
+    private void createDefaultProjectGroup()
+    {
+        ProjectGroup group = new ProjectGroup();
+
+        group.setName( "Default Project Group" );
+
+        group.setGroupId( ContinuumStore.DEFAULT_GROUP_ID );
+
+        group.setDescription( "Contains all projects that do not have a group of their own"
);
+
+        group = store.addProjectGroup( group );
     }
 }



Mime
View raw message