directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r496902 [1/3] - in /directory/sandbox/triplesec-jacc2: ./ admin-api2/src/main/java/org/safehaus/triplesec/admin/ admin-api2/src/main/java/org/safehaus/triplesec/admin/persistence/ changelog/src/main/java/org/safehaus/triplesec/changelog/bet...
Date Wed, 17 Jan 2007 00:29:27 GMT
Author: djencks
Date: Tue Jan 16 16:29:24 2007
New Revision: 496902

URL: http://svn.apache.org/viewvc?view=rev&rev=496902
Log:
Now it builds.... don't know if anything works

Modified:
    directory/sandbox/triplesec-jacc2/admin-api2/src/main/java/org/safehaus/triplesec/admin/TriplesecAdmin.java
    directory/sandbox/triplesec-jacc2/admin-api2/src/main/java/org/safehaus/triplesec/admin/persistence/StateManager.java
    directory/sandbox/triplesec-jacc2/changelog/src/main/java/org/safehaus/triplesec/changelog/beta/interceptor/ChangelogService.java
    directory/sandbox/triplesec-jacc2/changelog/src/main/java/org/safehaus/triplesec/changelog/beta/support/AttributeUtils.java
    directory/sandbox/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/MutableTriplesecStartupConfiguration.java
    directory/sandbox/triplesec-jacc2/pom.xml
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/AdminFrame.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ApplicationPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ConfigurationFileManager.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ConnectionDialog.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ExternalLinkPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GeneralPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GroupPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GroupUsersPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/HotpSettingsPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/LeftTreeNavigation.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/LoginDialog.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewApplicationPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewGroupPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewPermissionPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewProfilePanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewRolePanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewUserPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/PermissionDependentsPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/PermissionPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ProfilePanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ProfilePermissionsPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ProfileRolesPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ProvisioningPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/RoleDependentsPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/RoleGrantsPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/RolePanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/SecretDialog.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/SettingsEditor.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/UserDependentsPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/UserInfoPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/UserNorthPanel.java
    directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/UserPanel.java
    directory/sandbox/triplesec-jacc2/webapp-config/pom.xml
    directory/sandbox/triplesec-jacc2/webapp-config/src/main/java/org/safehaus/triplesec/configui/util/TriplesecConfigBuilder.java
    directory/sandbox/triplesec-jacc2/webapp-config/src/test/java/org/safehaus/triplesec/configui/util/TriplesecConfigBuilderTest.java
    directory/sandbox/triplesec-jacc2/webapp-registration/src/main/java/org/safehaus/triplesec/registration/view/panels/WizardPanelFinish.java

Modified: directory/sandbox/triplesec-jacc2/admin-api2/src/main/java/org/safehaus/triplesec/admin/TriplesecAdmin.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/admin-api2/src/main/java/org/safehaus/triplesec/admin/TriplesecAdmin.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/admin-api2/src/main/java/org/safehaus/triplesec/admin/TriplesecAdmin.java (original)
+++ directory/sandbox/triplesec-jacc2/admin-api2/src/main/java/org/safehaus/triplesec/admin/TriplesecAdmin.java Tue Jan 16 16:29:24 2007
@@ -23,6 +23,8 @@
 import java.util.HashSet;
 import java.util.Properties;
 import java.util.Set;
+import java.util.Collection;
+import java.util.ArrayList;
 
 import javax.naming.directory.DirContext;
 import javax.naming.ldap.InitialLdapContext;
@@ -144,7 +146,14 @@
     // Application and ApplicationModifier Read Operations
     // -----------------------------------------------------------------------
 
-
+    /**
+     * TODO implement me somehow
+     * @return all the applications in scope.
+     */
+    public Collection<Application> getApplications()
+    {
+        return new ArrayList<Application>();
+    }
 
     public Application getApplication( String name ) throws DataAccessException
     {

Modified: directory/sandbox/triplesec-jacc2/admin-api2/src/main/java/org/safehaus/triplesec/admin/persistence/StateManager.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/admin-api2/src/main/java/org/safehaus/triplesec/admin/persistence/StateManager.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/admin-api2/src/main/java/org/safehaus/triplesec/admin/persistence/StateManager.java (original)
+++ directory/sandbox/triplesec-jacc2/admin-api2/src/main/java/org/safehaus/triplesec/admin/persistence/StateManager.java Tue Jan 16 16:29:24 2007
@@ -30,7 +30,7 @@
 import javax.naming.directory.ModificationItem;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class StateManager<T extends PersistenceCapable>
 {
@@ -81,6 +81,15 @@
     {
         this.parent = parent;
         pc.parentSet( parent );
+    }
+
+    /**
+     * TODO making this public is a bit questionable
+     * @return parent state manager
+     */
+    public StateManager getParent()
+    {
+        return parent;
     }
 
     public PersistenceCapable getPc()

Modified: directory/sandbox/triplesec-jacc2/changelog/src/main/java/org/safehaus/triplesec/changelog/beta/interceptor/ChangelogService.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/changelog/src/main/java/org/safehaus/triplesec/changelog/beta/interceptor/ChangelogService.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/changelog/src/main/java/org/safehaus/triplesec/changelog/beta/interceptor/ChangelogService.java (original)
+++ directory/sandbox/triplesec-jacc2/changelog/src/main/java/org/safehaus/triplesec/changelog/beta/interceptor/ChangelogService.java Tue Jan 16 16:29:24 2007
@@ -40,10 +40,11 @@
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.ServerContext;
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.DateUtils;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.safehaus.triplesec.changelog.beta.model.AddChangeEvent;
 import org.safehaus.triplesec.changelog.beta.model.ChangeEvent;
 import org.safehaus.triplesec.changelog.beta.model.DeleteChangeEvent;
@@ -109,7 +110,7 @@
         initDb();
 
         // Get a handle on the attribute registry to check if attributes are binary
-        registry = dsConfig.getGlobalRegistries().getAttributeTypeRegistry();
+        registry = dsConfig.getRegistries().getAttributeTypeRegistry();
 
         log.info( "# -----------------------------------------------------------------------------" );
         log.info( "# Initializing changelog service: " + DateUtils.getGeneralizedTime() );
@@ -291,7 +292,7 @@
     }
 
 
-    public void modify( NextInterceptor next, LdapDN nDn, ModificationItem[] mods ) throws NamingException
+    public void modify( NextInterceptor next, LdapDN nDn, ModificationItemImpl[] mods ) throws NamingException
     {
 
         next.modify( nDn, mods );

Modified: directory/sandbox/triplesec-jacc2/changelog/src/main/java/org/safehaus/triplesec/changelog/beta/support/AttributeUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/changelog/src/main/java/org/safehaus/triplesec/changelog/beta/support/AttributeUtils.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/changelog/src/main/java/org/safehaus/triplesec/changelog/beta/support/AttributeUtils.java (original)
+++ directory/sandbox/triplesec-jacc2/changelog/src/main/java/org/safehaus/triplesec/changelog/beta/support/AttributeUtils.java Tue Jan 16 16:29:24 2007
@@ -28,7 +28,7 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 
-import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.util.Base64;
 import org.safehaus.triplesec.changelog.beta.model.StringAttribute;
 

Modified: directory/sandbox/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/MutableTriplesecStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/MutableTriplesecStartupConfiguration.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/MutableTriplesecStartupConfiguration.java (original)
+++ directory/sandbox/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/MutableTriplesecStartupConfiguration.java Tue Jan 16 16:29:24 2007
@@ -195,7 +195,7 @@
         return super.getPartitionConfigurations();
     }
 
-    protected void setPartitionConfigurations( java.util.Set<? extends org.apache.directory.server.core.configuration.PartitionConfiguration> set )
+    public void setPartitionConfigurations( java.util.Set<? extends org.apache.directory.server.core.configuration.PartitionConfiguration> set )
     {
         super.setPartitionConfigurations( set );
     }

Modified: directory/sandbox/triplesec-jacc2/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/pom.xml?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/pom.xml (original)
+++ directory/sandbox/triplesec-jacc2/pom.xml Tue Jan 16 16:29:24 2007
@@ -649,9 +649,7 @@
       </activation>
     
       <modules>
-<!--
         <module>changelog</module>
--->
         <module>configuration</module>
         <module>configuration-io</module>
         <module>crypto</module>

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/AdminFrame.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/AdminFrame.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/AdminFrame.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/AdminFrame.java Tue Jan 16 16:29:24 2007
@@ -157,7 +157,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ApplicationPanel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ApplicationPanel.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ApplicationPanel.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ApplicationPanel.java Tue Jan 16 16:29:24 2007
@@ -39,9 +39,9 @@
 import javax.swing.tree.TreePath;
 
 import org.safehaus.triplesec.admin.Application;
-import org.safehaus.triplesec.admin.ApplicationModifier;
 import org.safehaus.triplesec.admin.DataAccessException;
 import javax.swing.JPasswordField;
+import javax.naming.NamingException;
 
 
 public class ApplicationPanel extends JPanel
@@ -93,7 +93,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {
@@ -116,7 +115,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getMainPanel()
     {
@@ -134,7 +133,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getButtonPanel()
     {
@@ -153,7 +152,7 @@
     /**
      * This method initializes jButton	
      * 	
-     * @return javax.swing.JButton	
+     * @return javax.swing.JButton
      */
     private JButton getRevertButton()
     {
@@ -176,7 +175,7 @@
     /**
      * This method initializes jButton	
      * 	
-     * @return javax.swing.JButton	
+     * @return javax.swing.JButton
      */
     private JButton getSaveButton()
     {
@@ -199,7 +198,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getAboveButtonPanel()
     {
@@ -218,7 +217,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getNorthPanel()
     {
@@ -245,7 +244,7 @@
     /**
      * This method initializes jTabbedPane	
      * 	
-     * @return javax.swing.JTabbedPane	
+     * @return javax.swing.JTabbedPane
      */
     private JTabbedPane getCenterTabbedPane()
     {
@@ -261,7 +260,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getSouthPanel()
     {
@@ -281,7 +280,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getGeneralPanelTab()
     {
@@ -296,7 +295,7 @@
     /**
      * This method initializes iconLabel
      * 	
-     * @return javax.swing.JLabel	
+     * @return javax.swing.JLabel
      */
     private JLabel getIconLabel()
     {
@@ -318,7 +317,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getJPanel()
     {
@@ -386,7 +385,7 @@
     /**
      * This method initializes jTextArea	
      * 	
-     * @return javax.swing.JTextArea	
+     * @return javax.swing.JTextArea
      */
     private JTextArea getDescriptionTextArea()
     {
@@ -398,11 +397,11 @@
         return descriptionTextArea;
     }
 
-    
+
     /**
      * This method initializes jPanel4	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getJPanel4()
     {
@@ -418,8 +417,8 @@
 
     private void setApplicationFields()
     {
-        generalPanel.setFields( application );
-        applicationNameTextField.setText( application.getAppRdn() );
+//        generalPanel.setFields( application );
+        applicationNameTextField.setText( application.getAppName() );
         applicationPasswordField.setText( application.getPassword() );
         confirmPasswordField.setText( application.getPassword() );
         descriptionTextArea.setText( application.getDescription() );
@@ -460,56 +459,69 @@
     {
         char[] passwordChars = applicationPasswordField.getPassword();
         char[] confirmChars = confirmPasswordField.getPassword();
-        
+
         if ( passwordChars == null || confirmChars == null )
         {
             JOptionPane.showMessageDialog( this, "Either the password or the confirmation field is null." );
             return;
         }
-        
+
         String passwordStr = new String( passwordChars );
         String confirmStr = new String( confirmChars );
-        
+
         if ( ! passwordStr.equals( confirmStr ) )
         {
             JOptionPane.showMessageDialog( this, "Passwords do not match." );
             return;
         }
-        
-        ApplicationModifier modifier = application.modifier()
-            .setDescription( descriptionTextArea.getText() )
-            .setPassword( passwordStr );
-        if ( modifier.isUpdateNeeded() )
-        {
-            try
-            {
-                application = modifier.modify();
-            }
-            catch ( DataAccessException e )
-            {
-                JOptionPane.showMessageDialog( this, UiUtils.wrap( "Failed to modify application:\n" + e.getMessage(),
-                    79 ), "Application modification failure!", JOptionPane.ERROR_MESSAGE );
-                return;
-            }
-            node.setUserObject( application );
-        }
 
-        if ( !application.getAppRdn().equals( applicationNameTextField.getText() ) )
+        application.setDescription( descriptionTextArea.getText() );
+        application.setPassword( passwordStr );
+        application.setAppName( applicationNameTextField.getText() );
+        try
         {
-            try
-            {
-                application = application.modifier().rename( applicationNameTextField.getText() );
-                ( ( DefaultTreeModel ) tree.getModel() ).valueForPathChanged( new TreePath( node.getPath() ),
-                    application );
-                leftTreeNavigation.reloadApplication( this.node );
-            }
-            catch ( DataAccessException e )
-            {
-                JOptionPane.showMessageDialog( this, UiUtils.wrap( "Failed to rename application:\n" + e.getMessage(),
-                    79 ), "Application rename failure!", JOptionPane.ERROR_MESSAGE );
-                return;
-            }
+            application.getStateManager().commit();
+        } catch ( NamingException e )
+        {
+            JOptionPane.showMessageDialog( this, UiUtils.wrap( "Failed to modify application:\n" + e.getMessage(),
+                79 ), "Application modification failure!", JOptionPane.ERROR_MESSAGE );
+            return;
+
         }
+//        ApplicationModifier modifier = application.modifier()
+//            .setDescription( descriptionTextArea.getText() )
+//            .setPassword( passwordStr );
+//        if ( modifier.isUpdateNeeded() )
+//        {
+//            try
+//            {
+//                application = modifier.modify();
+//            }
+//            catch ( DataAccessException e )
+//            {
+//                JOptionPane.showMessageDialog( this, UiUtils.wrap( "Failed to modify application:\n" + e.getMessage(),
+//                    79 ), "Application modification failure!", JOptionPane.ERROR_MESSAGE );
+//                return;
+//            }
+//            node.setUserObject( application );
+//        }
+//
+//        if ( !application.getAppRdn().equals( applicationNameTextField.getText() ) )
+//        {
+//            try
+//            {
+//                application = application.modifier().rename( applicationNameTextField.getText() );
+//                ( ( DefaultTreeModel ) tree.getModel() ).valueForPathChanged( new TreePath( node.getPath() ),
+//                    application );
+//                leftTreeNavigation.reloadApplication( this.node );
+//            }
+//            catch ( DataAccessException e )
+//            {
+//                JOptionPane.showMessageDialog( this, UiUtils.wrap( "Failed to rename application:\n" + e.getMessage(),
+//                    79 ), "Application rename failure!", JOptionPane.ERROR_MESSAGE );
+//                return;
+//            }
+//        }
 
         node.setUserObject( application );
         setApplicationFields();
@@ -519,7 +531,7 @@
     /**
      * This method initializes jTextField	
      * 	
-     * @return javax.swing.JTextField	
+     * @return javax.swing.JTextField
      */
     private JTextField getStatusTextField()
     {
@@ -535,7 +547,7 @@
     /**
      * This method initializes jTextField	
      * 	
-     * @return javax.swing.JTextField	
+     * @return javax.swing.JTextField
      */
     private JTextField getApplicationNameTextField()
     {
@@ -550,7 +562,7 @@
     /**
      * This method initializes jButton	
      * 	
-     * @return javax.swing.JButton	
+     * @return javax.swing.JButton
      */
     private JButton getDeleteButton()
     {
@@ -564,7 +576,7 @@
                 {
                     try
                     {
-                        application.modifier().delete();
+                        application.getStateManager().getEntityManager().remove( application );
                         DefaultMutableTreeNode parentNode = ( DefaultMutableTreeNode ) node.getParent();
                         DefaultTreeModel treeModel = ( DefaultTreeModel ) tree.getModel();
                         treeModel.removeNodeFromParent( node );
@@ -574,8 +586,8 @@
                     }
                     catch ( DataAccessException e1 )
                     {
-                        JOptionPane.showMessageDialog( ApplicationPanel.this, 
-                            "Failed to delete application: " + e1.getMessage(), "Delete Failed", 
+                        JOptionPane.showMessageDialog( ApplicationPanel.this,
+                            "Failed to delete application: " + e1.getMessage(), "Delete Failed",
                             JOptionPane.ERROR_MESSAGE );
                     }
                 }
@@ -588,7 +600,7 @@
     /**
      * This method initializes jPanel1	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getJPanel1()
     {
@@ -619,7 +631,7 @@
     /**
      * This method initializes jPasswordField	
      * 	
-     * @return javax.swing.JPasswordField	
+     * @return javax.swing.JPasswordField
      */
     private JPasswordField getApplicationPasswordField()
     {
@@ -634,7 +646,7 @@
     /**
      * This method initializes jPasswordField1	
      * 	
-     * @return javax.swing.JPasswordField	
+     * @return javax.swing.JPasswordField
      */
     private JPasswordField getConfirmPasswordField()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ConfigurationFileManager.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ConfigurationFileManager.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ConfigurationFileManager.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ConfigurationFileManager.java Tue Jan 16 16:29:24 2007
@@ -240,7 +240,6 @@
         /**
          * This method initializes this
          * 
-         * @return void
          */
         private void initialize()
         {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ConnectionDialog.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ConnectionDialog.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ConnectionDialog.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ConnectionDialog.java Tue Jan 16 16:29:24 2007
@@ -112,7 +112,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ExternalLinkPanel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ExternalLinkPanel.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ExternalLinkPanel.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/ExternalLinkPanel.java Tue Jan 16 16:29:24 2007
@@ -78,7 +78,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GeneralPanel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GeneralPanel.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GeneralPanel.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GeneralPanel.java Tue Jan 16 16:29:24 2007
@@ -53,7 +53,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GroupPanel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GroupPanel.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GroupPanel.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GroupPanel.java Tue Jan 16 16:29:24 2007
@@ -84,7 +84,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GroupUsersPanel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GroupUsersPanel.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GroupUsersPanel.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/GroupUsersPanel.java Tue Jan 16 16:29:24 2007
@@ -122,7 +122,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/HotpSettingsPanel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/HotpSettingsPanel.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/HotpSettingsPanel.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/HotpSettingsPanel.java Tue Jan 16 16:29:24 2007
@@ -92,7 +92,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/LeftTreeNavigation.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/LeftTreeNavigation.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/LeftTreeNavigation.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/LeftTreeNavigation.java Tue Jan 16 16:29:24 2007
@@ -31,6 +31,9 @@
 import org.safehaus.triplesec.admin.Application;
 import org.safehaus.triplesec.admin.DataAccessException;
 import org.safehaus.triplesec.admin.TriplesecAdmin;
+import org.safehaus.triplesec.admin.Profile;
+import org.safehaus.triplesec.admin.Role;
+import org.safehaus.triplesec.admin.Permission;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -187,41 +190,40 @@
 
         rootNode.setUserObject( realm );
 
-        for ( Iterator ii = admin.groupIterator(); ii.hasNext(); /**/ )
-        {
-            model.insertNodeInto( new DefaultMutableTreeNode( ii.next() ), groupsNode, 0 );
-        }
-        
-        for ( Iterator ii = admin.userIterator(); ii.hasNext(); /**/ )
-        {
-            model.insertNodeInto( new DefaultMutableTreeNode( ii.next() ), usersNode, 0 );
-        }
+//        for ( Iterator ii = admin.groupIterator(); ii.hasNext(); /**/ )
+//        {
+//            model.insertNodeInto( new DefaultMutableTreeNode( ii.next() ), groupsNode, 0 );
+//        }
+//
+//        for ( Iterator ii = admin.userIterator(); ii.hasNext(); /**/ )
+//        {
+//            model.insertNodeInto( new DefaultMutableTreeNode( ii.next() ), usersNode, 0 );
+//        }
         
-        for ( Iterator ii = admin.applicationIterator(); ii.hasNext(); /**/ )
+        for ( Application app: admin.getApplications())
         {
-            Application app = ( Application ) ii.next();
             DefaultMutableTreeNode appNode = new DefaultMutableTreeNode( app );
             model.insertNodeInto( appNode, applicationsNode, 0 );
             
             DefaultMutableTreeNode profilesNode = new DefaultMutableTreeNode( "Profiles" );
             model.insertNodeInto( profilesNode, appNode, 0 );
-            for ( Iterator jj = app.profileIterator(); jj.hasNext(); /**/ )
+            for ( Profile profile: app.getProfiles())
             {
-                model.insertNodeInto( new DefaultMutableTreeNode( jj.next() ), profilesNode, 0 );
+                model.insertNodeInto( new DefaultMutableTreeNode( profile ), profilesNode, 0 );
             }
             
             DefaultMutableTreeNode rolesNode = new DefaultMutableTreeNode( "Roles" );
             model.insertNodeInto( rolesNode, appNode, 0 );
-            for ( Iterator jj = app.roleIterator(); jj.hasNext(); /**/ )
+            for ( Role role: app.getRoles())
             {
-                model.insertNodeInto( new DefaultMutableTreeNode( jj.next() ), rolesNode, 0 );
+                model.insertNodeInto( new DefaultMutableTreeNode( role ), rolesNode, 0 );
             }
 
             DefaultMutableTreeNode permissionsNode = new DefaultMutableTreeNode( "Permissions" );
             model.insertNodeInto( permissionsNode, appNode, 0 );
-            for ( Iterator jj = app.permissionIterator(); jj.hasNext(); /**/ )
+            for ( Permission permission: app.getPermissions() )
             {
-                model.insertNodeInto( new DefaultMutableTreeNode( jj.next() ), permissionsNode, 0 );
+                model.insertNodeInto( new DefaultMutableTreeNode( permission ), permissionsNode, 0 );
             }
         }
     }
@@ -245,23 +247,23 @@
         Application app = ( Application ) appNode.getUserObject();
         DefaultMutableTreeNode profilesNode = new DefaultMutableTreeNode( "Profiles" );
         model.insertNodeInto( profilesNode, appNode, 0 );
-        for ( Iterator jj = app.profileIterator(); jj.hasNext(); /**/ )
+        for ( Profile profile: app.getProfiles())
         {
-            model.insertNodeInto( new DefaultMutableTreeNode( jj.next() ), profilesNode, 0 );
+            model.insertNodeInto( new DefaultMutableTreeNode( profile ), profilesNode, 0 );
         }
-        
+
         DefaultMutableTreeNode rolesNode = new DefaultMutableTreeNode( "Roles" );
         model.insertNodeInto( rolesNode, appNode, 0 );
-        for ( Iterator jj = app.roleIterator(); jj.hasNext(); /**/ )
+        for ( Role role: app.getRoles())
         {
-            model.insertNodeInto( new DefaultMutableTreeNode( jj.next() ), rolesNode, 0 );
+            model.insertNodeInto( new DefaultMutableTreeNode( role ), rolesNode, 0 );
         }
 
         DefaultMutableTreeNode permissionsNode = new DefaultMutableTreeNode( "Permissions" );
         model.insertNodeInto( permissionsNode, appNode, 0 );
-        for ( Iterator jj = app.permissionIterator(); jj.hasNext(); /**/ )
+        for ( Permission permission: app.getPermissions() )
         {
-            model.insertNodeInto( new DefaultMutableTreeNode( jj.next() ), permissionsNode, 0 );
+            model.insertNodeInto( new DefaultMutableTreeNode( permission ), permissionsNode, 0 );
         }
     }
     
@@ -314,9 +316,9 @@
             }
         }
         
-        for ( Iterator ii = admin.groupIterator(); ii.hasNext(); /**/ )
-        {
-            model.insertNodeInto( new DefaultMutableTreeNode( ii.next() ), groupsNode, 0 );
-        }
+//        for ( Iterator ii = admin.groupIterator(); ii.hasNext(); /**/ )
+//        {
+//            model.insertNodeInto( new DefaultMutableTreeNode( ii.next() ), groupsNode, 0 );
+//        }
     }
 } // @jve:decl-index=0:visual-constraint="10,10"

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/LoginDialog.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/LoginDialog.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/LoginDialog.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/LoginDialog.java Tue Jan 16 16:29:24 2007
@@ -93,7 +93,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewApplicationPanel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewApplicationPanel.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewApplicationPanel.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewApplicationPanel.java Tue Jan 16 16:29:24 2007
@@ -25,6 +25,7 @@
 import java.awt.GridBagLayout;
 import java.util.Enumeration;
 import java.util.Iterator;
+import java.util.HashSet;
 
 import javax.swing.ImageIcon;
 import javax.swing.JButton;
@@ -44,15 +45,13 @@
 import javax.swing.tree.DefaultTreeModel;
 
 import org.safehaus.triplesec.admin.Application;
-import org.safehaus.triplesec.admin.ApplicationModifier;
 import org.safehaus.triplesec.admin.DataAccessException;
 import org.safehaus.triplesec.admin.Permission;
 import org.safehaus.triplesec.admin.Profile;
-import org.safehaus.triplesec.admin.ProfileModifier;
 import org.safehaus.triplesec.admin.Role;
-import org.safehaus.triplesec.admin.RoleModifier;
 import org.safehaus.triplesec.admin.TriplesecAdmin;
 import javax.swing.JPasswordField;
+import javax.naming.NamingException;
 
 
 public class NewApplicationPanel extends JPanel
@@ -113,7 +112,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {
@@ -136,7 +134,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getMainPanel()
     {
@@ -154,7 +152,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getButtonPanel()
     {
@@ -172,7 +170,7 @@
     /**
      * This method initializes jButton	
      * 	
-     * @return javax.swing.JButton	
+     * @return javax.swing.JButton
      */
     private JButton getCopyButton()
     {
@@ -181,8 +179,8 @@
             copyButton = new JButton();
             copyButton.setText( "Copy" );
             copyButton.addActionListener( new java.awt.event.ActionListener()
-            {   
-            	public void actionPerformed(java.awt.event.ActionEvent e) 
+            {
+                public void actionPerformed(java.awt.event.ActionEvent e)
                 {
                     try
                     {
@@ -191,33 +189,33 @@
                     catch ( DataAccessException e1 )
                     {
                         String msg = UiUtils.wrap( "Failed to copy application: " + e1.getMessage(), 79 );
-                        JOptionPane.showMessageDialog( NewApplicationPanel.this, msg, 
+                        JOptionPane.showMessageDialog( NewApplicationPanel.this, msg,
                             "Failed to copy application!", JOptionPane.ERROR_MESSAGE );
                     }
-            	}
-            
+                }
+
             } );
         }
         return copyButton;
     }
 
-    
+
     public void copyAction() throws DataAccessException
     {
         String msg = UiUtils.wrap( "This copy operation will persist immediately replicating the entire " +
-                "application subtree.  Would you still like to continue?", 79 ); 
-        int response = JOptionPane.showOptionDialog( this, msg, "Continue?", JOptionPane.YES_NO_OPTION, 
+                "application subtree.  Would you still like to continue?", 79 );
+        int response = JOptionPane.showOptionDialog( this, msg, "Continue?", JOptionPane.YES_NO_OPTION,
             JOptionPane.QUESTION_MESSAGE, null, null, null );
         if ( response == JOptionPane.NO_OPTION )
         {
             return;
         }
-        
+
         // -------------------------------------------------------------------
         // Get ahold of the application and it's node that was to 
         // be copied with all child entities underneath it
         // -------------------------------------------------------------------
-        
+
         int index = existingAppsTable.getSelectionModel().getAnchorSelectionIndex();
         if ( existingAppsTableModel.getRowCount() == 0 || index < 0 )
         {
@@ -233,11 +231,11 @@
                 copiedApplicationNode = child;
             }
         }
-        
+
         // -------------------------------------------------------------------
         // Now we create the new application and bail if it fails
         // -------------------------------------------------------------------
-       
+
         DefaultMutableTreeNode newApplicationNode = createAction();
         if ( newApplicationNode == null )
         {
@@ -248,7 +246,7 @@
         // -------------------------------------------------------------------
         // Iterated and copy app's perms and create in new app
         // -------------------------------------------------------------------
-        
+
         DefaultMutableTreeNode permsNode = null;
         DefaultMutableTreeNode newPermsNode = null;
         DefaultTreeModel model = ( DefaultTreeModel ) leftTreeNavigation.getTree().getModel();
@@ -272,16 +270,19 @@
         {
             DefaultMutableTreeNode copiedPermissionNode = ( DefaultMutableTreeNode ) ii.nextElement();
             Permission copiedPermission = ( Permission ) copiedPermissionNode.getUserObject();
-            Permission newPermission = newApplication.modifier()
-                .newPermission( copiedPermission.getName() )
-                .setDescription( copiedPermission.getDescription() ).add();
+            Permission newPermission = new Permission( copiedPermission.getPermissionId(),
+                    copiedPermission.getDescription(),
+                    copiedPermission.getJavaClass(),
+                    copiedPermission.getJavaName(),
+                    copiedPermission.getJavaActions());
+            newApplication.addPermission( newPermission);
             model.insertNodeInto( new DefaultMutableTreeNode( newPermission ), newPermsNode, 0 );
         }
-        
+
         // -------------------------------------------------------------------
         // Iterate and copy app's roles and create in new app
         // -------------------------------------------------------------------
-        
+
         DefaultMutableTreeNode rolesNode = null;
         DefaultMutableTreeNode newRolesNode = null;
         for ( Enumeration ii = copiedApplicationNode.children(); ii.hasMoreElements(); /**/ )
@@ -304,20 +305,23 @@
         {
             DefaultMutableTreeNode copiedRoleNode = ( DefaultMutableTreeNode ) ii.nextElement();
             Role copiedRole = ( Role ) copiedRoleNode.getUserObject();
-            RoleModifier modifier = newApplication.modifier().newRole( copiedRole.getName() )
-                .setDescription( copiedRole.getDescription() );
-            for ( Iterator jj = copiedRole.getGrants().iterator(); jj.hasNext(); /**/ )
+            Role newRole = new Role(copiedRole.getRoleName(), copiedRole.getDescription());
+            newApplication.addRole( newRole);
+            for (Permission grant: copiedRole.getGrants())
             {
-                modifier.addGrant( ( String ) jj.next() );
+                newRole.addGrant( grant);
+            }
+            for (Permission denial: copiedRole.getDenials())
+            {
+                newRole.addDenial( denial);
             }
-            Role newRole = modifier.add();
             model.insertNodeInto( new DefaultMutableTreeNode( newRole ), newRolesNode, 0 );
         }
-        
+
         // -------------------------------------------------------------------
         // Iterate and copy app's profiles and create in new app
         // -------------------------------------------------------------------
-        
+
         DefaultMutableTreeNode profilesNode = null;
         DefaultMutableTreeNode newProfilesNode = null;
         for ( Enumeration ii = copiedApplicationNode.children(); ii.hasMoreElements(); /**/ )
@@ -340,34 +344,26 @@
         {
             DefaultMutableTreeNode copiedProfileNode = ( DefaultMutableTreeNode ) ii.nextElement();
             Profile copiedProfile = ( Profile ) copiedProfileNode.getUserObject();
-            ProfileModifier modifier = newApplication.modifier()
-                .newProfile( copiedProfile.getId(), copiedProfile.getUser() )
-                .setDescription( copiedProfile.getDescription() );
-            for ( Iterator jj = copiedProfile.getGrants().iterator(); jj.hasNext(); /**/ )
-            {
-                modifier.addGrant( ( String ) jj.next() );
-            }
-            for ( Iterator jj = copiedProfile.getDenials().iterator(); jj.hasNext(); /**/ )
-            {
-                modifier.addDenial( ( String ) jj.next() );
-            }
-            for ( Iterator jj = copiedProfile.getRoles().iterator(); jj.hasNext(); /**/ )
-            {
-                modifier.addRole( ( String ) jj.next() );
-            }
-            Profile newProfile = modifier.add();
+            Profile newProfile = new Profile(copiedProfile.getProfileId(),
+                    copiedProfile.getDescription(),
+                    new HashSet<Permission>(copiedProfile.getGrants()),
+                    new HashSet<Permission>(copiedProfile.getDenials()),
+                    new HashSet<Role>(copiedProfile.getRoles()),
+                    copiedProfile.isDisabled(),
+                    copiedProfile.getUser());
+            newApplication.addProfile( newProfile);
             model.insertNodeInto( new DefaultMutableTreeNode( newProfile ), newProfilesNode, 0 );
         }
-        
+
         applicationNameTextField.setText( null );
         statusTextField.setText( null );
     }
-    
+
 
     /**
      * This method initializes jButton	
      * 	
-     * @return javax.swing.JButton	
+     * @return javax.swing.JButton
      */
     private JButton getCreateButton()
     {
@@ -390,7 +386,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getAboveButtonPanel()
     {
@@ -409,7 +405,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getNorthPanel()
     {
@@ -436,7 +432,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getSouthPanel()
     {
@@ -456,7 +452,7 @@
     /**
      * This method initializes iconLabel
      * 	
-     * @return javax.swing.JLabel	
+     * @return javax.swing.JLabel
      */
     private JLabel getIconLabel()
     {
@@ -478,7 +474,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getJPanel()
     {
@@ -540,7 +536,7 @@
     /**
      * This method initializes jTextArea	
      * 	
-     * @return javax.swing.JTextArea	
+     * @return javax.swing.JTextArea
      */
     private JTextArea getDescriptionTextArea()
     {
@@ -556,7 +552,7 @@
     /**
      * This method initializes jPanel4	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getIconPanel()
     {
@@ -598,29 +594,36 @@
     {
         char[] passwordChars = applicationPasswordField.getPassword();
         char[] confirmChars = confirmPasswordField.getPassword();
-        
+
         if ( passwordChars == null || confirmChars == null )
         {
             JOptionPane.showMessageDialog( this, "Either the password or the confirmation field is null." );
             return null;
         }
-        
+
         String passwordStr = new String( passwordChars );
         String confirmStr = new String( confirmChars );
-        
+
         if ( ! passwordStr.equals( confirmStr ) )
         {
             JOptionPane.showMessageDialog( this, "Passwords do not match." );
             return null;
         }
-        
+
         DefaultMutableTreeNode appNode;
-        Application application;
-        ApplicationModifier modifier = triplesecAdmin.newApplication( applicationNameTextField.getText() )
-            .setDescription( descriptionTextArea.getText() ).setPassword( passwordStr );
+        Application application = new Application(applicationNameTextField.getText(), descriptionTextArea.getText(), passwordStr);
+        triplesecAdmin.getEntityManager().persist( application, null);
         try
         {
-            application = modifier.add();
+            application.getStateManager().commit();
+        } catch ( NamingException e )
+        {
+            JOptionPane.showMessageDialog( this,
+                UiUtils.wrap( "Failed to create application:\n" + e.getMessage(), 79 ),
+                "Application creation failure!", JOptionPane.ERROR_MESSAGE );
+            return null;
+        }
+        try {
             appNode = new DefaultMutableTreeNode( application );
             DefaultTreeModel model = ( DefaultTreeModel ) leftTreeNavigation.getTree().getModel();
             model.insertNodeInto( appNode, node, 0 );
@@ -644,7 +647,7 @@
     /**
      * This method initializes jTabbedPane	
      * 	
-     * @return javax.swing.JTabbedPane	
+     * @return javax.swing.JTabbedPane
      */
     private JTabbedPane getCenterTabbedPane()
     {
@@ -661,7 +664,7 @@
     /**
      * This method initializes jPanel3	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getExistingPanelTab()
     {
@@ -684,7 +687,7 @@
     /**
      * This method initializes jScrollPane	
      * 	
-     * @return javax.swing.JScrollPane	
+     * @return javax.swing.JScrollPane
      */
     private JScrollPane getJScrollPane()
     {
@@ -700,7 +703,7 @@
     /**
      * This method initializes jTable	
      * 	
-     * @return javax.swing.JTable	
+     * @return javax.swing.JTable
      */
     private JTable getExistingAppsTable()
     {
@@ -718,7 +721,7 @@
                         return;
                     }
                     Application application = ( Application ) existingAppsTableModel.getValueAt( index, 0 );
-                    applicationNameTextField.setText( "CopyOf" + application.getAppRdn() );
+                    applicationNameTextField.setText( "CopyOf" + application.getAppName() );
                     descriptionTextArea.setText( application.getDescription() );
                 }
             } );
@@ -731,7 +734,7 @@
     /**
      * This method initializes defaultTableModel	
      * 	
-     * @return javax.swing.table.DefaultTableModel	
+     * @return javax.swing.table.DefaultTableModel
      */
     private ExistingApplicationsTableModel getExistingAppsTableModel()
     {
@@ -775,15 +778,15 @@
             {
                 case ( 0 ):
                     return child.getUserObject();
-                case ( 1 ):
-                    return ( ( Application ) child.getUserObject() ).getCreatorsName();
-                case ( 2 ):
-                    return ( ( Application ) child.getUserObject() ).getCreateTimestamp().toString();
+//                case ( 1 ):
+//                    return ( ( Application ) child.getUserObject() ).getCreatorsName();
+//                case ( 2 ):
+//                    return ( ( Application ) child.getUserObject() ).getCreateTimestamp().toString();
             }
             return child.getUserObject();
         }
 
-    
+
         public String getColumnName( int columnIndex )
         {
             switch ( columnIndex )
@@ -804,7 +807,7 @@
     /**
      * This method initializes jTextField	
      * 	
-     * @return javax.swing.JTextField	
+     * @return javax.swing.JTextField
      */
     private JTextField getStatusTextField()
     {
@@ -820,7 +823,7 @@
     /**
      * This method initializes jTextField1	
      * 	
-     * @return javax.swing.JTextField	
+     * @return javax.swing.JTextField
      */
     private JTextField getApplicationNameTextField()
     {
@@ -835,7 +838,7 @@
     /**
      * This method initializes jPanel1	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getJPanel1()
     {
@@ -866,7 +869,7 @@
     /**
      * This method initializes jPasswordField	
      * 	
-     * @return javax.swing.JPasswordField	
+     * @return javax.swing.JPasswordField
      */
     private JPasswordField getApplicationPasswordField()
     {
@@ -881,7 +884,7 @@
     /**
      * This method initializes jPasswordField1	
      * 	
-     * @return javax.swing.JPasswordField	
+     * @return javax.swing.JPasswordField
      */
     private JPasswordField getConfirmPasswordField()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewGroupPanel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewGroupPanel.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewGroupPanel.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewGroupPanel.java Tue Jan 16 16:29:24 2007
@@ -112,7 +112,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewPermissionPanel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewPermissionPanel.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewPermissionPanel.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewPermissionPanel.java Tue Jan 16 16:29:24 2007
@@ -44,7 +44,7 @@
 import org.safehaus.triplesec.admin.Application;
 import org.safehaus.triplesec.admin.DataAccessException;
 import org.safehaus.triplesec.admin.Permission;
-import org.safehaus.triplesec.admin.PermissionModifier;
+import org.safehaus.triplesec.admin.persistence.PCException;
 
 
 public class NewPermissionPanel extends JPanel
@@ -92,7 +92,6 @@
     /**
      * This method initializes this
      * 
-     * @return void
      */
     private void initialize()
     {
@@ -115,7 +114,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getMainPanel()
     {
@@ -133,7 +132,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getButtonPanel()
     {
@@ -150,7 +149,7 @@
     /**
      * This method initializes jButton	
      * 	
-     * @return javax.swing.JButton	
+     * @return javax.swing.JButton
      */
     private JButton getCreateButton()
     {
@@ -173,7 +172,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getAboveButtonPanel()
     {
@@ -192,7 +191,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getNorthPanel()
     {
@@ -219,7 +218,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getSouthPanel()
     {
@@ -239,7 +238,7 @@
     /**
      * This method initializes iconLabel
      * 	
-     * @return javax.swing.JLabel	
+     * @return javax.swing.JLabel
      */
     private JLabel getIconLabel()
     {
@@ -261,7 +260,7 @@
     /**
      * This method initializes jPanel	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getJPanel()
     {
@@ -323,7 +322,7 @@
     /**
      * This method initializes jTextArea	
      * 	
-     * @return javax.swing.JTextArea	
+     * @return javax.swing.JTextArea
      */
     private JTextArea getDescriptionTextArea()
     {
@@ -339,7 +338,7 @@
     /**
      * This method initializes jPanel4	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getIconPanel()
     {
@@ -359,7 +358,7 @@
         this.node = node;
         existingPermissionsTable.setModel( new ExistingPermissionsTableModel() );
         Application application = ( Application ) ( ( DefaultMutableTreeNode ) node.getParent() ).getUserObject();
-        applicationNameTextField.setText( application.getAppRdn() );
+        applicationNameTextField.setText( application.getAppName() );
     }
 
 
@@ -385,21 +384,19 @@
         {
             return;
         }
-        
+
         DefaultMutableTreeNode appNode = ( DefaultMutableTreeNode ) node.getParent();
         Application application = ( Application ) appNode.getUserObject();
-        Permission permission;
-        PermissionModifier modifier = application.modifier().newPermission( permissionNameTextField.getText() )
-            .setDescription( descriptionTextArea.getText() );
+        Permission permission = new Permission(permissionNameTextField.getText(), descriptionTextArea.getText(), null, null, null);
         try
         {
-            permission = modifier.add();
+            application.addPermission( permission);
             DefaultMutableTreeNode permissionNode = new DefaultMutableTreeNode( permission );
             DefaultTreeModel model = ( DefaultTreeModel ) leftTreeNavigation.getTree().getModel();
             model.insertNodeInto( permissionNode, node, 0 );
             existingPermissionsTableModel.fireTableDataChanged();
         }
-        catch ( DataAccessException e )
+        catch ( PCException e )
         {
             JOptionPane.showMessageDialog( this,
                 UiUtils.wrap( "Failed to create permission:\n" + e.getMessage(), 79 ),
@@ -414,7 +411,7 @@
     /**
      * This method initializes jTabbedPane	
      * 	
-     * @return javax.swing.JTabbedPane	
+     * @return javax.swing.JTabbedPane
      */
     private JTabbedPane getCenterTabbedPane()
     {
@@ -431,7 +428,7 @@
     /**
      * This method initializes jPanel3	
      * 	
-     * @return javax.swing.JPanel	
+     * @return javax.swing.JPanel
      */
     private JPanel getExistingPanelTab()
     {
@@ -454,7 +451,7 @@
     /**
      * This method initializes jScrollPane	
      * 	
-     * @return javax.swing.JScrollPane	
+     * @return javax.swing.JScrollPane
      */
     private JScrollPane getJScrollPane()
     {
@@ -470,7 +467,7 @@
     /**
      * This method initializes jTable	
      * 	
-     * @return javax.swing.JTable	
+     * @return javax.swing.JTable
      */
     private JTable getExistingPermissionsTable()
     {
@@ -488,7 +485,7 @@
                         return;
                     }
                     Permission permission = ( Permission ) existingPermissionsTableModel.getValueAt( index, 0 );
-                    permissionNameTextField.setText( "CopyOf" + permission.getName() );
+                    permissionNameTextField.setText( "CopyOf" + permission.getPermissionId() );
                     descriptionTextArea.setText( permission.getDescription() );
                 }
             } );
@@ -501,7 +498,7 @@
     /**
      * This method initializes defaultTableModel	
      * 	
-     * @return javax.swing.table.DefaultTableModel	
+     * @return javax.swing.table.DefaultTableModel
      */
     private ExistingPermissionsTableModel getExistingPermissionsTableModel()
     {
@@ -511,7 +508,7 @@
         }
         return existingPermissionsTableModel;
     }
-    
+
 
     class ExistingPermissionsTableModel extends AbstractTableModel
     {
@@ -554,7 +551,7 @@
             return child.getUserObject();
         }
 
-    
+
         public String getColumnName( int columnIndex )
         {
             switch ( columnIndex )
@@ -575,7 +572,7 @@
     /**
      * This method initializes jTextField	
      * 	
-     * @return javax.swing.JTextField	
+     * @return javax.swing.JTextField
      */
     private JTextField getStatusTextField()
     {
@@ -591,7 +588,7 @@
     /**
      * This method initializes jTextField1	
      * 	
-     * @return javax.swing.JTextField	
+     * @return javax.swing.JTextField
      */
     private JTextField getPermissionNameTextField()
     {
@@ -606,7 +603,7 @@
     /**
      * This method initializes jTextField	
      * 	
-     * @return javax.swing.JTextField	
+     * @return javax.swing.JTextField
      */
     private JTextField getApplicationNameTextField()
     {

Modified: directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewProfilePanel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewProfilePanel.java?view=diff&rev=496902&r1=496901&r2=496902
==============================================================================
--- directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewProfilePanel.java (original)
+++ directory/sandbox/triplesec-jacc2/swing-admin/src/main/java/org/safehaus/triplesec/admin/swing/NewProfilePanel.java Tue Jan 16 16:29:24 2007
@@ -25,6 +25,9 @@
 import java.awt.GridBagLayout;
 import java.util.Collections;
 import java.util.Enumeration;
+import java.util.Collection;
+import java.util.Set;
+import java.util.HashSet;
 
 import javax.swing.DefaultComboBoxModel;
 import javax.swing.ImageIcon;
@@ -45,10 +48,11 @@
 import javax.swing.tree.DefaultTreeModel;
 
 import org.safehaus.triplesec.admin.Application;
-import org.safehaus.triplesec.admin.DataAccessException;
 import org.safehaus.triplesec.admin.Profile;
-import org.safehaus.triplesec.admin.ProfileModifier;
 import org.safehaus.triplesec.admin.User;
+import org.safehaus.triplesec.admin.Permission;
+import org.safehaus.triplesec.admin.Role;
+import org.safehaus.triplesec.admin.persistence.PCException;
 
 import javax.swing.JComboBox;
 
@@ -87,8 +91,8 @@
     private ProfilePermissionsPanel profileGrantsPanel;
     private ProfilePermissionsPanel profileDenialsPanel;
     private ProfileRolesPanel profileRolesPanel;
-    
-    
+
+
     public void setLeftTreeNavigation( LeftTreeNavigation leftTreeNavigation )
     {
         this.leftTreeNavigation = leftTreeNavigation;
@@ -107,8 +111,6 @@
 
     /**
      * This method initializes this
-     * 
-     * @return void
      */
     private void initialize()
     {
@@ -122,16 +124,16 @@
         this.setLayout( new GridBagLayout() );
         this.setSize( 550, 417 );
         this.setBorder( javax.swing.BorderFactory.createTitledBorder( null, "New Profile",
-            javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION,
-            null, null ) );
+                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION,
+                null, null ) );
         this.add( getMainPanel(), gridBagConstraints );
     }
 
 
     /**
-     * This method initializes jPanel	
-     * 	
-     * @return javax.swing.JPanel	
+     * This method initializes jPanel
+     *
+     * @return javax.swing.JPanel
      */
     private JPanel getMainPanel()
     {
@@ -147,9 +149,9 @@
 
 
     /**
-     * This method initializes jPanel	
-     * 	
-     * @return javax.swing.JPanel	
+     * This method initializes jPanel
+     *
+     * @return javax.swing.JPanel
      */
     private JPanel getButtonPanel()
     {
@@ -165,9 +167,9 @@
 
 
     /**
-     * This method initializes jButton	
-     * 	
-     * @return javax.swing.JButton	
+     * This method initializes jButton
+     *
+     * @return javax.swing.JButton
      */
     private JButton getCopyButton()
     {
@@ -187,9 +189,9 @@
 
 
     /**
-     * This method initializes jButton	
-     * 	
-     * @return javax.swing.JButton	
+     * This method initializes jButton
+     *
+     * @return javax.swing.JButton
      */
     private JButton getCreateButton()
     {
@@ -210,9 +212,9 @@
 
 
     /**
-     * This method initializes jPanel	
-     * 	
-     * @return javax.swing.JPanel	
+     * This method initializes jPanel
+     *
+     * @return javax.swing.JPanel
      */
     private JPanel getAboveButtonPanel()
     {
@@ -229,9 +231,9 @@
 
 
     /**
-     * This method initializes jPanel	
-     * 	
-     * @return javax.swing.JPanel	
+     * This method initializes jPanel
+     *
+     * @return javax.swing.JPanel
      */
     private JPanel getNorthPanel()
     {
@@ -256,9 +258,9 @@
 
 
     /**
-     * This method initializes jPanel	
-     * 	
-     * @return javax.swing.JPanel	
+     * This method initializes jPanel
+     *
+     * @return javax.swing.JPanel
      */
     private JPanel getSouthPanel()
     {
@@ -267,8 +269,8 @@
             southPanel = new JPanel();
             southPanel.setLayout( new BorderLayout() );
             southPanel.setBorder( javax.swing.BorderFactory.createTitledBorder( null, "Description",
-                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
-                javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null ) );
+                    javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+                    javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null ) );
             southPanel.add( getDescriptionTextArea(), java.awt.BorderLayout.NORTH );
         }
         return southPanel;
@@ -277,8 +279,8 @@
 
     /**
      * This method initializes iconLabel
-     * 	
-     * @return javax.swing.JLabel	
+     *
+     * @return javax.swing.JLabel
      */
     private JLabel getIconLabel()
     {
@@ -286,7 +288,7 @@
         {
             iconLabel = new JLabel();
             iconLabel.setIcon( new ImageIcon( getClass().getResource(
-                "/org/safehaus/triplesec/admin/swing/new_profile2_48x48.png" ) ) );
+                    "/org/safehaus/triplesec/admin/swing/new_profile2_48x48.png" ) ) );
             iconLabel.setPreferredSize( new java.awt.Dimension( 48, 48 ) );
             iconLabel.setText( "" );
             iconLabel.setVerticalTextPosition( javax.swing.SwingConstants.BOTTOM );
@@ -298,9 +300,9 @@
 
 
     /**
-     * This method initializes jPanel	
-     * 	
-     * @return javax.swing.JPanel	
+     * This method initializes jPanel
+     *
+     * @return javax.swing.JPanel
      */
     private JPanel getJPanel()
     {
@@ -309,11 +311,11 @@
             GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
             gridBagConstraints5.gridx = 0;
             gridBagConstraints5.fill = java.awt.GridBagConstraints.HORIZONTAL;
-            gridBagConstraints5.insets = new java.awt.Insets(0,0,0,5);
+            gridBagConstraints5.insets = new java.awt.Insets( 0, 0, 0, 5 );
             gridBagConstraints5.gridy = 2;
             jLabel1 = new JLabel();
-            jLabel1.setText("Profile Id:");
-            jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+            jLabel1.setText( "Profile Id:" );
+            jLabel1.setHorizontalAlignment( javax.swing.SwingConstants.RIGHT );
             GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
             gridBagConstraints3.gridx = 1;
             gridBagConstraints3.gridwidth = 2;
@@ -324,24 +326,24 @@
             gridBagConstraints8.fill = java.awt.GridBagConstraints.HORIZONTAL;
             gridBagConstraints8.gridy = 1;
             gridBagConstraints8.weightx = 1.0;
-            gridBagConstraints8.insets = new java.awt.Insets(0,0,5,0);
+            gridBagConstraints8.insets = new java.awt.Insets( 0, 0, 5, 0 );
             gridBagConstraints8.gridx = 1;
             GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
             gridBagConstraints7.gridx = 0;
             gridBagConstraints7.fill = java.awt.GridBagConstraints.HORIZONTAL;
-            gridBagConstraints7.insets = new java.awt.Insets(0,0,5,5);
+            gridBagConstraints7.insets = new java.awt.Insets( 0, 0, 5, 5 );
             gridBagConstraints7.gridy = 1;
             jLabel2 = new JLabel();
-            jLabel2.setText("Application Name:");
-            jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+            jLabel2.setText( "Application Name:" );
+            jLabel2.setHorizontalAlignment( javax.swing.SwingConstants.RIGHT );
             GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
             gridBagConstraints6.fill = java.awt.GridBagConstraints.HORIZONTAL;
-            gridBagConstraints6.insets = new java.awt.Insets(0,0,5,5);
+            gridBagConstraints6.insets = new java.awt.Insets( 0, 0, 5, 5 );
             GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
             gridBagConstraints2.fill = java.awt.GridBagConstraints.HORIZONTAL;
             gridBagConstraints2.gridy = 0;
             gridBagConstraints2.weightx = 1.0;
-            gridBagConstraints2.insets = new java.awt.Insets(0,0,5,0);
+            gridBagConstraints2.insets = new java.awt.Insets( 0, 0, 5, 0 );
             gridBagConstraints2.gridx = 1;
             jLabel = new JLabel();
             jLabel.setText( "Status:" );
@@ -349,21 +351,21 @@
             jPanel = new JPanel();
             jPanel.setLayout( new GridBagLayout() );
             jPanel.setPreferredSize( new java.awt.Dimension( 131, 88 ) );
-            jPanel.add(jLabel, gridBagConstraints6);
-            jPanel.add(getStatusTextField(), gridBagConstraints2);
-            jPanel.add(jLabel2, gridBagConstraints7);
-            jPanel.add(getApplicationNameTextField(), gridBagConstraints8);
-            jPanel.add(getJPanel1(), gridBagConstraints3);
-            jPanel.add(jLabel1, gridBagConstraints5);
+            jPanel.add( jLabel, gridBagConstraints6 );
+            jPanel.add( getStatusTextField(), gridBagConstraints2 );
+            jPanel.add( jLabel2, gridBagConstraints7 );
+            jPanel.add( getApplicationNameTextField(), gridBagConstraints8 );
+            jPanel.add( getJPanel1(), gridBagConstraints3 );
+            jPanel.add( jLabel1, gridBagConstraints5 );
         }
         return jPanel;
     }
 
 
     /**
-     * This method initializes jTextArea	
-     * 	
-     * @return javax.swing.JTextArea	
+     * This method initializes jTextArea
+     *
+     * @return javax.swing.JTextArea
      */
     private JTextArea getDescriptionTextArea()
     {
@@ -377,9 +379,9 @@
 
 
     /**
-     * This method initializes jPanel4	
-     * 	
-     * @return javax.swing.JPanel	
+     * This method initializes jPanel4
+     *
+     * @return javax.swing.JPanel
      */
     private JPanel getIconPanel()
     {
@@ -387,7 +389,7 @@
         {
             iconPanel = new JPanel();
             iconPanel
-                .setBorder( javax.swing.BorderFactory.createEtchedBorder( javax.swing.border.EtchedBorder.RAISED ) );
+                    .setBorder( javax.swing.BorderFactory.createEtchedBorder( javax.swing.border.EtchedBorder.RAISED ) );
             iconPanel.add( getIconLabel(), null );
         }
         return iconPanel;
@@ -400,8 +402,8 @@
         existingProfilesTable.setModel( new ExistingProfilesTableModel() );
         DefaultMutableTreeNode applicationNode = ( DefaultMutableTreeNode ) node.getParent();
         Application application = ( Application ) ( applicationNode ).getUserObject();
-        applicationNameTextField.setText( application.getAppRdn() );
-        
+        applicationNameTextField.setText( application.getAppName() );
+
         // -------------------------------------------------------------------
         // clear and load users into the user combo box
         // -------------------------------------------------------------------
@@ -420,13 +422,13 @@
                 }
             }
         }
-        
+
         for ( Enumeration ii = usersNode.children(); ii.hasMoreElements(); /**/ )
         {
             DefaultMutableTreeNode userNode = ( DefaultMutableTreeNode ) ii.nextElement();
             usersComboBoxModel.addElement( ( ( User ) userNode.getUserObject() ).getId() );
         }
-        
+
         // -------------------------------------------------------------------
         // Fill up the various panels for grants, denials and roles
         // -------------------------------------------------------------------
@@ -459,43 +461,44 @@
         {
             return;
         }
-        
+
         DefaultMutableTreeNode appNode = ( DefaultMutableTreeNode ) node.getParent();
         Application application = ( Application ) appNode.getUserObject();
-        Profile profile;
-        ProfileModifier modifier = application.modifier().newProfile( profileIdTextField.getText(), 
-            String.valueOf( usersComboBox.getSelectedItem() ) ).setDescription( descriptionTextArea.getText() );
-        
+        Profile profile = new Profile();
+        profile.setProfileId( profileIdTextField.getText() );
+        profile.setUser( String.valueOf( usersComboBox.getSelectedItem() ) );
+        profile.setDescription( descriptionTextArea.getText() );
+
         // -------------------------------------------------------------------
         // Iterate through and add denials, grants, and roles in list panels
         // -------------------------------------------------------------------
 
         for ( Enumeration ii = profileGrantsPanel.getExistingModel().elements(); ii.hasMoreElements(); /**/ )
         {
-            modifier.addGrant( ( String ) ii.nextElement() );
+            profile.addGrant( application.getPermission( ( String ) ii.nextElement() ) );
         }
         for ( Enumeration ii = profileDenialsPanel.getExistingModel().elements(); ii.hasMoreElements(); /**/ )
         {
-            modifier.addDenial( ( String ) ii.nextElement() );
+            profile.addDenial( application.getPermission( ( String ) ii.nextElement() ) );
         }
         for ( Enumeration ii = profileRolesPanel.getProfileRolesModel().elements(); ii.hasMoreElements(); /**/ )
         {
-            modifier.addRole( ( String ) ii.nextElement() );
+            profile.addRole( application.getRole( ( String ) ii.nextElement() ) );
         }
-        
+
         try
         {
-            profile = modifier.add();
+            application.addProfile( profile );
             DefaultMutableTreeNode profileNode = new DefaultMutableTreeNode( profile );
             DefaultTreeModel model = ( DefaultTreeModel ) leftTreeNavigation.getTree().getModel();
             model.insertNodeInto( profileNode, node, 0 );
             existingProfilesTableModel.fireTableDataChanged();
         }
-        catch ( DataAccessException e )
+        catch ( PCException e )
         {
             JOptionPane.showMessageDialog( this,
-                UiUtils.wrap( "Failed to create profile:\n" + e.getMessage(), 79 ),
-                "Profile creation failure!", JOptionPane.ERROR_MESSAGE );
+                    UiUtils.wrap( "Failed to create profile:\n" + e.getMessage(), 79 ),
+                    "Profile creation failure!", JOptionPane.ERROR_MESSAGE );
             return;
         }
         profileIdTextField.setText( null );
@@ -504,9 +507,9 @@
 
 
     /**
-     * This method initializes jTabbedPane	
-     * 	
-     * @return javax.swing.JTabbedPane	
+     * This method initializes jTabbedPane
+     *
+     * @return javax.swing.JTabbedPane
      */
     private JTabbedPane getCenterTabbedPane()
     {
@@ -514,7 +517,7 @@
         {
             centerTabbedPane = new JTabbedPane();
             centerTabbedPane.addTab( "Existing", null, getExistingPanelTab(),
-                "Copy a profile from any one of these existing profiles." );
+                    "Copy a profile from any one of these existing profiles." );
             centerTabbedPane.addTab( "Grants", null, getProfileGrantsPanel() );
             centerTabbedPane.addTab( "Denials", null, getProfileDenialsPanel() );
             centerTabbedPane.addTab( "Roles", null, getProfileRolesPanel() );
@@ -525,7 +528,7 @@
 
     /**
      * This method initializes jPanel5
-     * 
+     *
      * @return javax.swing.JPanel
      */
     private ProfilePermissionsPanel getProfileGrantsPanel()
@@ -540,7 +543,7 @@
 
     /**
      * This method initializes jPanel5
-     * 
+     *
      * @return javax.swing.JPanel
      */
     private ProfilePermissionsPanel getProfileDenialsPanel()
@@ -552,7 +555,7 @@
         return profileDenialsPanel;
     }
 
-    
+
     private ProfileRolesPanel getProfileRolesPanel()
     {
         if ( profileRolesPanel == null )
@@ -561,12 +564,12 @@
         }
         return profileRolesPanel;
     }
-    
+
 
     /**
-     * This method initializes jPanel3	
-     * 	
-     * @return javax.swing.JPanel	
+     * This method initializes jPanel3
+     *
+     * @return javax.swing.JPanel
      */
     private JPanel getExistingPanelTab()
     {
@@ -587,9 +590,9 @@
 
 
     /**
-     * This method initializes jScrollPane	
-     * 	
-     * @return javax.swing.JScrollPane	
+     * This method initializes jScrollPane
+     *
+     * @return javax.swing.JScrollPane
      */
     private JScrollPane getJScrollPane()
     {
@@ -603,9 +606,9 @@
 
 
     /**
-     * This method initializes jTable	
-     * 	
-     * @return javax.swing.JTable	
+     * This method initializes jTable
+     *
+     * @return javax.swing.JTable
      */
     private JTable getExistingProfilesTable()
     {
@@ -623,7 +626,7 @@
                         return;
                     }
                     Profile profile = ( Profile ) existingProfilesTableModel.getValueAt( index, 0 );
-                    profileIdTextField.setText( "CopyOf" + profile.getId() );
+                    profileIdTextField.setText( "CopyOf" + profile.getProfileId() );
                     descriptionTextArea.setText( profile.getDescription() );
                     usersComboBox.setSelectedItem( profile.getUser() );
 
@@ -636,11 +639,12 @@
                     {
                         return;
                     }
-                    
+
                     profileGrantsPanel.populateLists( applicationNode, profile.getGrants() );
                     profileDenialsPanel.populateLists( applicationNode, profile.getDenials() );
                     profileRolesPanel.populateLists( applicationNode, profile.getRoles() );
                 }
+
             } );
             existingProfilesTable.setModel( getExistingProfilesTableModel() );
         }
@@ -649,9 +653,9 @@
 
 
     /**
-     * This method initializes defaultTableModel	
-     * 	
-     * @return javax.swing.table.DefaultTableModel	
+     * This method initializes defaultTableModel
+     *
+     * @return javax.swing.table.DefaultTableModel
      */
     private ExistingProfilesTableModel getExistingProfilesTableModel()
     {
@@ -661,7 +665,7 @@
         }
         return existingProfilesTableModel;
     }
-    
+
 
     class ExistingProfilesTableModel extends AbstractTableModel
     {
@@ -696,15 +700,15 @@
             {
                 case ( 0 ):
                     return child.getUserObject();
-                case ( 1 ):
-                    return ( ( Profile ) child.getUserObject() ).getCreatorsName();
-                case ( 2 ):
-                    return ( ( Profile) child.getUserObject() ).getCreateTimestamp();
+//                case ( 1 ):
+//                    return ( ( Profile ) child.getUserObject() ).getCreatorsName();
+//                case ( 2 ):
+//                    return ( ( Profile) child.getUserObject() ).getCreateTimestamp();
             }
             return child.getUserObject();
         }
 
-    
+
         public String getColumnName( int columnIndex )
         {
             switch ( columnIndex )
@@ -723,9 +727,9 @@
 
 
     /**
-     * This method initializes jTextField	
-     * 	
-     * @return javax.swing.JTextField	
+     * This method initializes jTextField
+     *
+     * @return javax.swing.JTextField
      */
     private JTextField getStatusTextField()
     {
@@ -739,25 +743,25 @@
 
 
     /**
-     * This method initializes jTextField	
-     * 	
-     * @return javax.swing.JTextField	
+     * This method initializes jTextField
+     *
+     * @return javax.swing.JTextField
      */
     private JTextField getApplicationNameTextField()
     {
         if ( applicationNameTextField == null )
         {
             applicationNameTextField = new JTextField();
-            applicationNameTextField.setEditable(false);
+            applicationNameTextField.setEditable( false );
         }
         return applicationNameTextField;
     }
 
 
     /**
-     * This method initializes jPanel1	
-     * 	
-     * @return javax.swing.JPanel	
+     * This method initializes jPanel1
+     *
+     * @return javax.swing.JPanel
      */
     private JPanel getJPanel1()
     {
@@ -770,29 +774,29 @@
             gridBagConstraints11.gridx = 2;
             GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
             gridBagConstraints10.fill = java.awt.GridBagConstraints.HORIZONTAL;
-            gridBagConstraints10.insets = new java.awt.Insets(0,10,0,5);
+            gridBagConstraints10.insets = new java.awt.Insets( 0, 10, 0, 5 );
             jLabel3 = new JLabel();
-            jLabel3.setText("User:");
-            jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+            jLabel3.setText( "User:" );
+            jLabel3.setHorizontalAlignment( javax.swing.SwingConstants.RIGHT );
             GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
             gridBagConstraints9.fill = java.awt.GridBagConstraints.HORIZONTAL;
             gridBagConstraints9.gridx = 0;
             gridBagConstraints9.gridy = 0;
             gridBagConstraints9.weightx = 1.0;
             jPanel1 = new JPanel();
-            jPanel1.setLayout(new GridBagLayout());
-            jPanel1.add(getProfileIdTextField(), gridBagConstraints9);
-            jPanel1.add(jLabel3, gridBagConstraints10);
-            jPanel1.add(getUsersComboBox(), gridBagConstraints11);
+            jPanel1.setLayout( new GridBagLayout() );
+            jPanel1.add( getProfileIdTextField(), gridBagConstraints9 );
+            jPanel1.add( jLabel3, gridBagConstraints10 );
+            jPanel1.add( getUsersComboBox(), gridBagConstraints11 );
         }
         return jPanel1;
     }
 
 
     /**
-     * This method initializes jTextField	
-     * 	
-     * @return javax.swing.JTextField	
+     * This method initializes jTextField
+     *
+     * @return javax.swing.JTextField
      */
     private JTextField getProfileIdTextField()
     {
@@ -805,9 +809,9 @@
 
 
     /**
-     * This method initializes jComboBox	
-     * 	
-     * @return javax.swing.JComboBox	
+     * This method initializes jComboBox
+     *
+     * @return javax.swing.JComboBox
      */
     private JComboBox getUsersComboBox()
     {
@@ -815,8 +819,8 @@
         {
             usersComboBox = new JComboBox();
             usersComboBox.setModel( usersComboBoxModel );
-            usersComboBox.setPreferredSize(new java.awt.Dimension(32,19));
-            usersComboBox.setEditable(false);
+            usersComboBox.setPreferredSize( new java.awt.Dimension( 32, 19 ) );
+            usersComboBox.setEditable( false );
         }
         return usersComboBox;
     }



Mime
View raw message