continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r479851 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-api/src/main/java/org/apache/maven/continuum/security/ continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-core/src/m...
Date Tue, 28 Nov 2006 02:23:26 GMT
Author: jmcconnell
Date: Mon Nov 27 18:23:25 2006
New Revision: 479851

URL: http://svn.apache.org/viewvc?view=rev&rev=479851
Log:
removed the deprecated continuumUser, permission and security objects.

Removed:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/security/ContinuumSecurity.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/security/ContinuumSecurityException.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/security/DefaultContinuumSecurity.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserGroupManagementAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserManagementAction.java
Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml
    maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?view=diff&rev=479851&r1=479850&r2=479851
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
Mon Nov 27 18:23:25 2006
@@ -24,11 +24,8 @@
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.project.Schedule;
-import org.apache.maven.continuum.model.system.ContinuumUser;
-import org.apache.maven.continuum.model.system.UserGroup;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.release.ContinuumReleaseManager;
-import org.apache.maven.continuum.security.ContinuumSecurity;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 
 import java.io.File;
@@ -374,60 +371,6 @@
     void reloadConfiguration()
         throws ContinuumException;
 
-    // ----------------------------------------------------------------------
-    // Security
-    // ----------------------------------------------------------------------
-
-    ContinuumSecurity getSecurity();
-
-    // ----------------------------------------------------------------------
-    // User
-    // ----------------------------------------------------------------------
-
-    void addUser( ContinuumUser user )
-        throws ContinuumException;
-
-    void addUser( Map configuration )
-        throws ContinuumException;
-
-    void updateUser( ContinuumUser user )
-        throws ContinuumException;
-
-    void updateUser( int userId, Map configuration )
-        throws ContinuumException;
-
-    List getUsers()
-        throws ContinuumException;
-
-    ContinuumUser getUser( int userId )
-        throws ContinuumException;
-
-    void removeUser( int userId )
-        throws ContinuumException;
-
-    // ----------------------------------------------------------------------
-    // User Group
-    // ----------------------------------------------------------------------
-
-    void addUserGroup( UserGroup userGroup );
-
-    void addUserGroup( Map configuration )
-        throws ContinuumException;
-
-    void updateUserGroup( UserGroup userGroup )
-        throws ContinuumException;
-
-    void updateUserGroup( int userGroupId, Map configuration )
-        throws ContinuumException;
-
-    List getUserGroups()
-        throws ContinuumException;
-
-    UserGroup getUserGroup( int userGroupId )
-        throws ContinuumException;
-
-    void removeUserGroup( int userGroupId )
-        throws ContinuumException;
 
     // ----------------------------------------------------------------------
     // Continuum Release

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java?view=diff&rev=479851&r1=479850&r2=479851
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
Mon Nov 27 18:23:25 2006
@@ -24,11 +24,8 @@
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.project.Schedule;
-import org.apache.maven.continuum.model.system.ContinuumUser;
 import org.apache.maven.continuum.model.system.Installation;
-import org.apache.maven.continuum.model.system.Permission;
 import org.apache.maven.continuum.model.system.SystemConfiguration;
-import org.apache.maven.continuum.model.system.UserGroup;
 
 import java.util.Collection;
 import java.util.List;
@@ -253,48 +250,6 @@
 
     CompanyInformation getCompanyInformation()
         throws ContinuumStoreException;
-
-    ContinuumUser addUser( ContinuumUser user );
-
-    void updateUser( ContinuumUser user )
-        throws ContinuumStoreException;
-
-    ContinuumUser getUser( int userId )
-        throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
-    ContinuumUser getGuestUser()
-        throws ContinuumStoreException;
-
-    List getUsers()
-        throws ContinuumStoreException;
-
-    ContinuumUser getUserByUsername( String username )
-        throws ContinuumStoreException;
-
-    void removeUser( ContinuumUser user );
-
-    List getPermissions()
-        throws ContinuumStoreException;
-
-    Permission getPermission( String name )
-        throws ContinuumStoreException;
-
-    Permission addPermission( Permission perm );
-
-    UserGroup addUserGroup( UserGroup group );
-
-    void updateUserGroup( UserGroup group )
-        throws ContinuumStoreException;
-
-    List getUserGroups()
-        throws ContinuumStoreException;
-
-    UserGroup getUserGroup( int userGroupId )
-        throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
-    UserGroup getUserGroup( String name );
-
-    void removeUserGroup( UserGroup group );
 
     void closeStore();
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?view=diff&rev=479851&r1=479850&r2=479851
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Mon Nov 27 18:23:25 2006
@@ -37,14 +37,11 @@
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.model.system.ContinuumUser;
-import org.apache.maven.continuum.model.system.UserGroup;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.project.builder.maven.MavenOneContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.maven.MavenTwoContinuumProjectBuilder;
 import org.apache.maven.continuum.scm.queue.CheckOutTask;
-import org.apache.maven.continuum.security.ContinuumSecurity;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
@@ -121,11 +118,6 @@
      */
     private SchedulesActivator schedulesActivator;
 
-    /**
-     * @deprecated should removeorg.apache.maven.continuum.security.ContinuumSecurity.
-     */
-    private ContinuumSecurity security;
-
     // ----------------------------------------------------------------------
     // Moved from core
     // ----------------------------------------------------------------------
@@ -2052,299 +2044,6 @@
         {
             throw new ContinuumException( "Can't reload configuration.", e );
         }
-    }
-
-    // ----------------------------------------------------------------------
-    // Security
-    // ----------------------------------------------------------------------
-
-    public ContinuumSecurity getSecurity()
-    {
-        return security;
-    }
-
-    // ----------------------------------------------------------------------
-    // User
-    // ----------------------------------------------------------------------
-
-    public List getUsers()
-        throws ContinuumException
-    {
-        try
-        {
-            return store.getUsers();
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Error while getting users.", ex );
-        }
-    }
-
-    public void addUser( ContinuumUser user )
-        throws ContinuumException
-    {
-        if ( StringUtils.isEmpty( user.getHashedPassword() ) )
-        {
-            throw new ContinuumException( "Password can't be null" );
-        }
-        store.addUser( user );
-    }
-
-    public void addUser( Map configuration )
-        throws ContinuumException
-    {
-        ContinuumUser user = new ContinuumUser();
-
-        user.setUsername( (String) configuration.get( "user.username" ) );
-
-        user.setFullName( (String) configuration.get( "user.fullName" ) );
-
-        user.setPassword( (String) configuration.get( "user.password" ) );
-
-        user.setEmail( (String) configuration.get( "user.email" ) );
-
-        user.setGroup( getUserGroup( Integer.parseInt( (String) configuration.get( "user.group"
) ) ) );
-
-        addUser( user );
-    }
-
-    public void updateUser( ContinuumUser user )
-        throws ContinuumException
-    {
-        if ( StringUtils.isEmpty( user.getHashedPassword() ) )
-        {
-            ContinuumUser u = getUser( user.getAccountId() );
-
-            user.setHashedPassword( u.getHashedPassword() );
-        }
-
-        try
-        {
-            store.updateUser( user );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Error while storing user.", ex );
-        }
-    }
-
-    public void updateUser( int userId, Map configuration )
-        throws ContinuumException
-    {
-        ContinuumUser user = getUser( userId );
-
-        user.setUsername( (String) configuration.get( "user.username" ) );
-
-        user.setFullName( (String) configuration.get( "user.fullName" ) );
-
-        user.setPassword( (String) configuration.get( "user.password" ) );
-
-        user.setEmail( (String) configuration.get( "user.email" ) );
-
-        user.setGroup( getUserGroup( Integer.parseInt( (String) configuration.get( "user.group"
) ) ) );
-
-        updateUser( user );
-    }
-
-    public ContinuumUser getUser( int userId )
-        throws ContinuumException
-    {
-        try
-        {
-            return store.getUser( userId );
-        }
-        catch ( Exception ex )
-        {
-            throw logAndCreateException( "Error while getting user.", ex );
-        }
-    }
-
-    public void removeUser( int userId )
-        throws ContinuumException
-    {
-        ContinuumUser user = getUser( userId );
-
-        store.removeUser( user );
-    }
-
-    // ----------------------------------------------------------------------
-    // User Group
-    // ----------------------------------------------------------------------
-
-    public List getUserGroups()
-        throws ContinuumException
-    {
-        try
-        {
-            return store.getUserGroups();
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Error while getting user groups.", ex );
-        }
-    }
-
-    public void addUserGroup( UserGroup userGroup )
-    {
-        store.addUserGroup( userGroup );
-    }
-
-    public void addUserGroup( Map configuration )
-        throws ContinuumException
-    {
-        try
-        {
-            UserGroup userGroup = new UserGroup();
-
-            userGroup.setName( (String) configuration.get( "group.name" ) );
-
-            userGroup.setDescription( (String) configuration.get( "group.description" ) );
-
-            List perms = parsePermissionConf( configuration );
-
-            userGroup.setPermissions( perms );
-
-            addUserGroup( userGroup );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Error while storing user group.", e );
-        }
-    }
-
-    public void updateUserGroup( int userGroupId, Map configuration )
-        throws ContinuumException
-    {
-        try
-        {
-            UserGroup userGroup = getUserGroup( userGroupId );
-
-            userGroup.setName( (String) configuration.get( "group.name" ) );
-
-            userGroup.setDescription( (String) configuration.get( "group.description" ) );
-
-            List perms = parsePermissionConf( configuration );
-
-            userGroup.setPermissions( perms );
-
-            updateUserGroup( userGroup );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Error while storing user group.", ex );
-        }
-    }
-
-    private List parsePermissionConf( Map configuration )
-        throws ContinuumStoreException
-    {
-        List perms = new ArrayList();
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.addProject" )
) )
-        {
-            perms.add( store.getPermission( "addProject" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.editProject" )
) )
-        {
-            perms.add( store.getPermission( "editProject" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.deleteProject"
) ) )
-        {
-            perms.add( store.getPermission( "deleteProject" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.buildProject"
) ) )
-        {
-            perms.add( store.getPermission( "buildProject" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.showProject" )
) )
-        {
-            perms.add( store.getPermission( "showProject" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.addBuildDefinitionToProject"
) ) )
-        {
-            perms.add( store.getPermission( "addBuildDefinitionToProject" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.editBuildDefinition"
) ) )
-        {
-            perms.add( store.getPermission( "editBuildDefinition" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.deleteBuildDefinition"
) ) )
-        {
-            perms.add( store.getPermission( "deleteBuildDefinition" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.addNotifier" )
) )
-        {
-            perms.add( store.getPermission( "addNotifier" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.editNotifier"
) ) )
-        {
-            perms.add( store.getPermission( "editNotifier" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.deleteNotifier"
) ) )
-        {
-            perms.add( store.getPermission( "deleteNotifier" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.manageConfiguration"
) ) )
-        {
-            perms.add( store.getPermission( "manageConfiguration" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.manageSchedule"
) ) )
-        {
-            perms.add( store.getPermission( "manageSchedule" ) );
-        }
-
-        if ( convertBoolean( (String) configuration.get( "group.permission.manageUsers" )
) )
-        {
-            perms.add( store.getPermission( "manageUsers" ) );
-        }
-
-        return perms;
-    }
-
-    public void updateUserGroup( UserGroup userGroup )
-        throws ContinuumException
-    {
-        try
-        {
-            store.updateUserGroup( userGroup );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Error while storing user group.", e );
-        }
-    }
-
-    public UserGroup getUserGroup( int userGroupId )
-        throws ContinuumException
-    {
-        try
-        {
-            return store.getUserGroup( userGroupId );
-        }
-        catch ( Exception ex )
-        {
-            throw logAndCreateException( "Error while getting user group.", ex );
-        }
-    }
-
-    public void removeUserGroup( int userGroupId )
-        throws ContinuumException
-    {
-        UserGroup group = getUserGroup( userGroupId );
-
-        store.removeUserGroup( group );
     }
 
     // ----------------------------------------------------------------------

Modified: maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml?view=diff&rev=479851&r1=479850&r2=479851
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml (original)
+++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml Mon Nov 27 18:23:25 2006
@@ -969,195 +969,6 @@
     </class>
 
     <class>
-      <name>UserGroup</name>
-      <packageName>org.apache.maven.continuum.model.system</packageName>
-      <version>1.0.0+</version>
-      <fields>
-        <field>
-          <name>id</name>
-          <identifier>true</identifier>
-          <version>1.0.0+</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>name</name>
-          <version>1.0.0+</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>description</name>
-          <version>1.0.0+</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>permissions</name>
-          <version>1.0.0+</version>
-          <association stash.part="true" jpox.dependent="false">
-            <type>Permission</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-      </fields>
-    </class>
-    <class>
-      <name>ContinuumUser</name>
-      <packageName>org.apache.maven.continuum.model.system</packageName>
-      <version>1.0.0+</version>
-      <fields>
-        <field>
-          <name>accountId</name>
-          <version>1.0.0+</version>
-          <type>int</type>
-          <identifier>true</identifier>
-        </field>
-        <field>
-          <name>username</name>
-          <version>1.0.0+</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>guest</name>
-          <version>1.0.0+</version>
-          <type>boolean</type>
-          <defaultValue>false</defaultValue>
-        </field>
-        <field>
-          <name>hashedPassword</name>
-          <version>1.0.0+</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>fullName</name>
-          <version>1.0.0+</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>email</name>
-          <version>1.0.0+</version>
-          <type>String</type>
-        </field>
-        <field jpox.column="usergroup">
-          <name>group</name>
-          <version>1.0.0+</version>
-          <association stash.part="true" jpox.dependent="false">
-            <type>UserGroup</type>
-          </association>
-        </field>
-        <field>
-          <name>notificationAddresses</name>
-          <version>1.0.0+</version>
-          <association stash.part="true" >
-            <type>NotificationAddress</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-      </fields>
-      <codeSegments>
-        <codeSegment>
-          <version>1.0.0+</version>
-          <code><![CDATA[
-            public String getPassword()
-            {
-                return "";
-            }
-
-            public void setPassword( String password )
-            {
-                setHashedPassword( crypt( password ) );
-            }
-
-            public boolean equalsPassword( String password )
-            {
-                if ( hashedPassword == null && password == null )
-                {
-                    return true;
-                }
-
-                if ( ( hashedPassword == null && password != null ) || ( hashedPassword
== null && password != null ) )
-                {
-                    return false;
-                }
-
-                return hashedPassword.equals( crypt( password ) );
-            }
-
-            private String crypt( String data )
-            {
-                try
-                {
-                    java.security.MessageDigest digester = java.security.MessageDigest.getInstance(
"SHA-1" );
-                    digester.reset();
-                    digester.update( data.getBytes() );
-                    return encode( digester.digest() );
-                }
-                catch( Exception e )
-                {
-                    return data;
-                }
-            }
-
-            /**
-             * Encodes a 128 bit or 160-bit byte array into a String.
-             *
-             * @param binaryData Array containing the digest
-             * @return Encoded hex string, or null if encoding failed
-             */
-            private String encode( byte[] binaryData )
-            {
-                if ( binaryData.length != 16 && binaryData.length != 20 )
-                {
-                    int bitLength = binaryData.length * 8;
-                    throw new IllegalArgumentException( "Unrecognised length for binary data:
" + bitLength + " bits" );
-                }
-
-                String retValue = "";
-
-                for ( int i = 0; i < binaryData.length; i++ )
-                {
-                    String t = Integer.toHexString( binaryData[i] & 0xff );
-
-                    if ( t.length() == 1 )
-                    {
-                        retValue += ( "0" + t );
-                    }
-                    else
-                    {
-                        retValue += t;
-                    }
-                }
-
-                return retValue.trim();
-            }
-          ]]></code>
-        </codeSegment>
-      </codeSegments>
-    </class>
-
-    <class>
-      <name>Permission</name>
-      <packageName>org.apache.maven.continuum.model.system</packageName>
-      <version>1.0.0+</version>
-      <fields>
-        <field>
-          <name>id</name>
-          <identifier>true</identifier>
-          <version>1.0.0+</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>name</name>
-          <version>1.0.0+</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>description</name>
-          <version>1.0.0+</version>
-          <type>String</type>
-        </field>
-      </fields>
-    </class>
-
-    <class>
       <name>NotificationAddress</name>
       <version>1.0.0+</version>
       <packageName>org.apache.maven.continuum.model.system</packageName>

Modified: maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?view=diff&rev=479851&r1=479850&r2=479851
==============================================================================
--- maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Mon Nov 27 18:23:25 2006
@@ -24,11 +24,8 @@
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.project.Schedule;
-import org.apache.maven.continuum.model.system.ContinuumUser;
 import org.apache.maven.continuum.model.system.Installation;
-import org.apache.maven.continuum.model.system.Permission;
 import org.apache.maven.continuum.model.system.SystemConfiguration;
-import org.apache.maven.continuum.model.system.UserGroup;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.jdo.JdoFactory;
 import org.codehaus.plexus.jdo.PlexusJdoUtils;
@@ -1374,232 +1371,7 @@
         {
             return (CompanyInformation) companyInfos.get( 0 );
         }
-    }
-
-    public ContinuumUser addUser( ContinuumUser user )
-    {
-        return (ContinuumUser) addObject( user );
-    }
-
-    public void updateUser( ContinuumUser user )
-        throws ContinuumStoreException
-    {
-        updateObject( user );
-    }
-
-    public ContinuumUser getGuestUser()
-        throws ContinuumStoreException
-    {
-        PersistenceManager pm = getPersistenceManager();
-
-        Transaction tx = pm.currentTransaction();
-
-        try
-        {
-            tx.begin();
-
-            Extent extent = pm.getExtent( ContinuumUser.class, true );
-
-            Query query = pm.newQuery( extent );
-
-            query.setFilter( "this.guest == true" );
-
-            Collection result = (Collection) query.execute();
-
-            if ( result.size() == 0 )
-            {
-                tx.commit();
-
-                return null;
-            }
-
-            Object object = pm.detachCopy( result.iterator().next() );
-
-            tx.commit();
-
-            return (ContinuumUser) object;
-        }
-        finally
-        {
-            rollback( tx );
-        }
-    }
-
-    public List getUsers()
-        throws ContinuumStoreException
-    {
-        return getAllObjectsDetached( ContinuumUser.class );
-    }
-
-    public ContinuumUser getUser( int userId )
-        throws ContinuumObjectNotFoundException, ContinuumStoreException
-    {
-        return (ContinuumUser) getObjectById( ContinuumUser.class, userId );
-    }
-
-    public ContinuumUser getUserByUsername( String username )
-        throws ContinuumStoreException
-    {
-        PersistenceManager pm = getPersistenceManager();
-
-        Transaction tx = pm.currentTransaction();
-
-        try
-        {
-            tx.begin();
-
-            Extent extent = pm.getExtent( ContinuumUser.class, true );
-
-            Query query = pm.newQuery( extent );
-
-            query.declareImports( "import java.lang.String" );
-
-            query.declareParameters( "String username" );
-
-            query.setFilter( "this.username == username" );
-
-            Collection result = (Collection) query.execute( username );
-
-            if ( result.size() == 0 )
-            {
-                tx.commit();
-
-                return null;
-            }
-
-            Object object = pm.detachCopy( result.iterator().next() );
-
-            tx.commit();
-
-            return (ContinuumUser) object;
-        }
-        finally
-        {
-            rollback( tx );
-        }
-    }
-
-    public void removeUser( ContinuumUser user )
-    {
-        removeObject( user );
-    }
-
-    public List getPermissions()
-        throws ContinuumStoreException
-    {
-        return getAllObjectsDetached( Permission.class );
-    }
-
-    public Permission getPermission( String name )
-        throws ContinuumStoreException
-    {
-        PersistenceManager pm = getPersistenceManager();
-
-        Transaction tx = pm.currentTransaction();
-
-        try
-        {
-            tx.begin();
-
-            Extent extent = pm.getExtent( Permission.class, true );
-
-            Query query = pm.newQuery( extent );
-
-            query.declareImports( "import java.lang.String" );
-
-            query.declareParameters( "String name" );
-
-            query.setFilter( "this.name == name" );
-
-            Collection result = (Collection) query.execute( name );
-
-            if ( result.size() == 0 )
-            {
-                tx.commit();
-
-                return null;
-            }
-
-            Object object = pm.detachCopy( result.iterator().next() );
-
-            tx.commit();
-
-            return (Permission) object;
-        }
-        finally
-        {
-            rollback( tx );
-        }
-    }
-
-    public Permission addPermission( Permission perm )
-    {
-        return (Permission) addObject( perm );
-    }
-
-    public UserGroup addUserGroup( UserGroup group )
-    {
-        return (UserGroup) addObject( group );
-    }
-
-    public void updateUserGroup( UserGroup group )
-        throws ContinuumStoreException
-    {
-        updateObject( group );
-    }
-
-    public List getUserGroups()
-        throws ContinuumStoreException
-    {
-        return getAllObjectsDetached( UserGroup.class );
-    }
-
-    public UserGroup getUserGroup( int userGroupId )
-        throws ContinuumObjectNotFoundException, ContinuumStoreException
-    {
-        return (UserGroup) getObjectById( UserGroup.class, userGroupId );
-    }
-
-    public UserGroup getUserGroup( String name )
-    {
-        PersistenceManager pm = getPersistenceManager();
-
-        Transaction tx = pm.currentTransaction();
-
-        try
-        {
-            tx.begin();
-
-            Extent extent = pm.getExtent( UserGroup.class, true );
-
-            Query query = pm.newQuery( extent );
-
-            query.declareImports( "import java.lang.String" );
-
-            query.declareParameters( "String name" );
-
-            query.setFilter( "this.name == name" );
-
-            Collection result = (Collection) query.execute( name );
-
-            if ( result.size() == 0 )
-            {
-                tx.commit();
-
-                return null;
-            }
-
-            Object object = pm.detachCopy( result.iterator().next() );
-
-            tx.commit();
-
-            return (UserGroup) object;
-        }
-        finally
-        {
-            rollback( tx );
-        }
-    }
+    }  
 
     private PersistenceManager getPersistenceManager()
     {
@@ -1614,11 +1386,6 @@
         pm.getFetchPlan().setDetachmentOptions( FetchPlan.DETACH_LOAD_FIELDS );
 
         return pm;
-    }
-
-    public void removeUserGroup( UserGroup group )
-    {
-        removeObject( group );
     }
 
     public void closeStore()



Mime
View raw message