directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r376623 [33/38] - in /directory/sandbox/akarasulu/rc1/apacheds: core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/ core-plugin/src/test/java/org/apache/directory/server/core/tools/schema/ core-shared/src/main/java/org/...
Date Fri, 10 Feb 2006 10:49:57 GMT
Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java Fri Feb 10 02:48:07 2006
@@ -52,7 +52,7 @@
 
     /** the set of client contexts */
     private final Map contexts = new HashMap();
-    
+
     /** outstanding requests for a session */
     private final Map requests = new HashMap();
 
@@ -88,7 +88,7 @@
      *
      * @param env the properties associated with this SessionRegistry
      */
-    SessionRegistry( Hashtable env )
+    SessionRegistry(Hashtable env)
     {
         if ( s_singleton == null )
         {
@@ -99,7 +99,6 @@
             throw new IllegalStateException( "there can only be one singlton" );
         }
 
-
         if ( env == null )
         {
             this.env = new Hashtable();
@@ -158,7 +157,7 @@
     {
         return removeOutstandingRequest( session, new Integer( messageId ) );
     }
-    
+
 
     /**
      * Removes an outstanding request from the session's outstanding request map.
@@ -173,12 +172,13 @@
         synchronized ( requests )
         {
             Map reqmap = ( Map ) requests.get( session );
-            if ( reqmap == null ) return null;
+            if ( reqmap == null )
+                return null;
             return ( Request ) reqmap.remove( id );
         }
     }
 
-    
+
     /**
      * Returns a shallow copied map of all outstanding requests for an IoSession.
      * 
@@ -194,7 +194,7 @@
         }
         return new HashMap( reqmap );
     }
-    
+
 
     /**
      * Overload that does not require boxing of primitive messageId.
@@ -208,6 +208,7 @@
         return getOutstandingRequest( session, new Integer( abandonedId ) );
     }
 
+
     /**
      * Gets an outstanding request by messageId for a session.
      * 
@@ -218,11 +219,12 @@
     public Request getOutstandingRequest( IoSession session, Integer id )
     {
         Map reqmap = ( Map ) requests.get( session );
-        if ( reqmap == null ) return null;
+        if ( reqmap == null )
+            return null;
         return ( Request ) reqmap.get( id );
     }
-    
-    
+
+
     public IoSession[] getSessions()
     {
         IoSession[] sessions;
@@ -233,8 +235,8 @@
         }
         return sessions;
     }
-    
-    
+
+
     /**
      * Gets the InitialContext to the root of the system that was gotten for
      * client.  If the context is not present then there was no bind operation
@@ -251,11 +253,11 @@
      * @return the InitialContext or null
      */
     public LdapContext getLdapContext( IoSession session, Control[] connCtls, boolean allowAnonymous )
-            throws NamingException
+        throws NamingException
     {
         LdapContext ctx = null;
 
-        synchronized( contexts )
+        synchronized ( contexts )
         {
             ctx = ( LdapContext ) contexts.get( session );
         }
@@ -293,7 +295,7 @@
         else if ( ctx != null && allowAnonymous )
         {
             ServerLdapContext slc = null;
-            if ( ! ( ctx instanceof ServerLdapContext ) )
+            if ( !( ctx instanceof ServerLdapContext ) )
             {
                 slc = ( ServerLdapContext ) ctx.lookup( "" );
             }
@@ -325,12 +327,11 @@
      * @param connCtls connection controls if any to use if creating anon context
      * @return the InitialContext or null
      */
-    public LdapContext getLdapContextOnRootDSEAccess( IoSession session, Control[] connCtls )
-            throws NamingException
+    public LdapContext getLdapContextOnRootDSEAccess( IoSession session, Control[] connCtls ) throws NamingException
     {
         LdapContext ctx = null;
 
-        synchronized( contexts )
+        synchronized ( contexts )
         {
             ctx = ( LdapContext ) contexts.get( session );
         }
@@ -370,7 +371,7 @@
      */
     public void setLdapContext( IoSession session, LdapContext ictx )
     {
-        synchronized( contexts )
+        synchronized ( contexts )
         {
             contexts.put( session, ictx );
         }
@@ -384,27 +385,27 @@
      */
     public void remove( IoSession session )
     {
-        synchronized( contexts )
+        synchronized ( contexts )
         {
             contexts.remove( session );
         }
-        
+
         Map reqmap = null;
-        synchronized( requests )
+        synchronized ( requests )
         {
             reqmap = ( Map ) requests.remove( session );
         }
-        
+
         if ( reqmap == null || reqmap.isEmpty() )
         {
             return;
         }
-        
+
         Iterator list = reqmap.values().iterator();
         while ( list.hasNext() )
         {
             Object request = list.next();
-            
+
             if ( request instanceof AbandonableRequest )
             {
                 ( ( AbandonableRequest ) request ).abandon();

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsDialog.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsDialog.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsDialog.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsDialog.java Fri Feb 10 02:48:07 2006
@@ -37,11 +37,11 @@
     private JButton jButton1 = null;
     private JButton jButton2 = null;
 
-    
+
     /**
      * This is the default constructor
      */
-    public OutstandingRequestsDialog( JFrame owner, IoSession session )
+    public OutstandingRequestsDialog(JFrame owner, IoSession session)
     {
         super( owner, true );
         this.session = session;
@@ -62,7 +62,7 @@
      */
     private void initialize()
     {
-        this.setSize(549, 341);
+        this.setSize( 549, 341 );
         this.setContentPane( getJContentPane() );
     }
 
@@ -78,7 +78,7 @@
         {
             jContentPane = new JPanel();
             jContentPane.setLayout( new BorderLayout() );
-            jContentPane.add(getJPanel(), java.awt.BorderLayout.CENTER);
+            jContentPane.add( getJPanel(), java.awt.BorderLayout.CENTER );
         }
         return jContentPane;
     }
@@ -94,10 +94,10 @@
         if ( jPanel == null )
         {
             jPanel = new JPanel();
-            jPanel.setLayout(new BorderLayout());
-            jPanel.add(getJScrollPane(), java.awt.BorderLayout.CENTER);
-            jPanel.add(getJPanel1(), java.awt.BorderLayout.SOUTH);
-            jPanel.add(getJPanel2(), java.awt.BorderLayout.NORTH);
+            jPanel.setLayout( new BorderLayout() );
+            jPanel.add( getJScrollPane(), java.awt.BorderLayout.CENTER );
+            jPanel.add( getJPanel1(), java.awt.BorderLayout.SOUTH );
+            jPanel.add( getJPanel2(), java.awt.BorderLayout.NORTH );
         }
         return jPanel;
     }
@@ -113,7 +113,7 @@
         if ( jScrollPane == null )
         {
             jScrollPane = new JScrollPane();
-            jScrollPane.setViewportView(getJTable());
+            jScrollPane.setViewportView( getJTable() );
         }
         return jScrollPane;
     }
@@ -132,14 +132,16 @@
         }
 
         setRequestsModel();
-        jTable.getSelectionModel().addListSelectionListener( new ListSelectionListener() {
-            public void valueChanged(ListSelectionEvent e)
+        jTable.getSelectionModel().addListSelectionListener( new ListSelectionListener()
+        {
+            public void valueChanged( ListSelectionEvent e )
             {
                 int row = jTable.getSelectedRow();
                 if ( row > -1 )
                 {
                     jButton2.setEnabled( true );
-                    AbandonableRequest req = ( ( OutstandingRequestsModel ) jTable.getModel() ).getAbandonableRequest( row );
+                    AbandonableRequest req = ( ( OutstandingRequestsModel ) jTable.getModel() )
+                        .getAbandonableRequest( row );
                     jTextArea.setText( req.toString() );
                     jTextArea.setEnabled( true );
                 }
@@ -149,14 +151,15 @@
                     jTextArea.setText( "" );
                     jTextArea.setEnabled( false );
                 }
-            }});
+            }
+        } );
         return jTable;
     }
 
-    
+
     private void setRequestsModel()
     {
-        AbandonableRequest[] requests; 
+        AbandonableRequest[] requests;
         Map reqsMap = SessionRegistry.getSingleton().getOutstandingRequests( session );
         if ( reqsMap != null )
         {
@@ -167,7 +170,7 @@
         {
             requests = EMPTY_REQUEST_ARRAY;
         }
-        
+
         jTable.setModel( new OutstandingRequestsModel( requests ) );
     }
 
@@ -182,8 +185,8 @@
         if ( jPanel1 == null )
         {
             jPanel1 = new JPanel();
-            jPanel1.add(getJButton(), null);
-            jPanel1.add(getJButton1(), null);
+            jPanel1.add( getJButton(), null );
+            jPanel1.add( getJButton1(), null );
         }
         return jPanel1;
     }
@@ -199,10 +202,10 @@
         if ( jButton == null )
         {
             jButton = new JButton();
-            jButton.setText("Done");
+            jButton.setText( "Done" );
             jButton.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     OutstandingRequestsDialog.this.setVisible( false );
                     OutstandingRequestsDialog.this.dispose();
@@ -223,12 +226,12 @@
         if ( jPanel2 == null )
         {
             jPanel2 = new JPanel();
-            jPanel2.setLayout(new BorderLayout());
-            jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Request", 
-                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, 
-                javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
-            jPanel2.add(getJButton2(), java.awt.BorderLayout.WEST);
-            jPanel2.add(getJTextArea(), java.awt.BorderLayout.CENTER);
+            jPanel2.setLayout( new BorderLayout() );
+            jPanel2.setBorder( javax.swing.BorderFactory.createTitledBorder( null, "Request",
+                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+                javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null ) );
+            jPanel2.add( getJButton2(), java.awt.BorderLayout.WEST );
+            jPanel2.add( getJTextArea(), java.awt.BorderLayout.CENTER );
         }
         return jPanel2;
     }
@@ -245,7 +248,7 @@
         {
             jTextArea = new JTextArea();
         }
-        
+
         jTextArea.setEnabled( false );
         jTextArea.setEditable( false );
         return jTextArea;
@@ -262,10 +265,10 @@
         if ( jButton1 == null )
         {
             jButton1 = new JButton();
-            jButton1.setText("Refresh");
+            jButton1.setText( "Refresh" );
             jButton1.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     setRequestsModel();
                     jTextArea.setText( "" );
@@ -288,14 +291,15 @@
         if ( jButton2 == null )
         {
             jButton2 = new JButton();
-            jButton2.setText("Abandon");
+            jButton2.setText( "Abandon" );
             jButton2.setEnabled( false );
             jButton2.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     int row = jTable.getSelectedRow();
-                    AbandonableRequest req = ( ( OutstandingRequestsModel ) jTable.getModel() ).getAbandonableRequest( row );
+                    AbandonableRequest req = ( ( OutstandingRequestsModel ) jTable.getModel() )
+                        .getAbandonableRequest( row );
                     req.abandon();
                     SessionRegistry.getSingleton().removeOutstandingRequest( session, req.getMessageId() );
                     setRequestsModel();
@@ -304,4 +308,4 @@
         }
         return jButton2;
     }
-}  //  @jve:decl-index=0:visual-constraint="10,10"
+} //  @jve:decl-index=0:visual-constraint="10,10"

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java Fri Feb 10 02:48:07 2006
@@ -9,71 +9,83 @@
 
 public class OutstandingRequestsModel implements TableModel
 {
-    final String[] columns = new String[] { "messageId", "type" };
-    final Class[] columnClasses = new Class[] { Integer.class, String.class };
+    final String[] columns = new String[]
+        { "messageId", "type" };
+    final Class[] columnClasses = new Class[]
+        { Integer.class, String.class };
     final AbandonableRequest[] requests;
 
-    
-    OutstandingRequestsModel( AbandonableRequest[] requests )
+
+    OutstandingRequestsModel(AbandonableRequest[] requests)
     {
         this.requests = requests;
     }
 
+
     AbandonableRequest getAbandonableRequest( int row )
     {
         return requests[row];
     }
-    
+
+
     public int getRowCount()
     {
         return requests.length;
     }
 
+
     public int getColumnCount()
     {
         return columns.length;
     }
 
+
     public String getColumnName( int columnIndex )
     {
         return columns[columnIndex];
     }
 
+
     public Class getColumnClass( int columnIndex )
     {
         return columnClasses[columnIndex];
     }
 
+
     public boolean isCellEditable( int rowIndex, int columnIndex )
     {
         return false;
     }
 
+
     public Object getValueAt( int rowIndex, int columnIndex )
     {
         AbandonableRequest req = requests[rowIndex];
-        
-        switch( columnIndex )
+
+        switch ( columnIndex )
         {
-            case( 0 ):
+            case ( 0 ):
                 return new Integer( req.getMessageId() );
-            case( 1 ):
+            case ( 1 ):
                 return req.getType().toString();
             default:
                 throw new IndexOutOfBoundsException( "column index max is " + ( columns.length - 1 ) );
         }
     }
 
-    public void setValueAt(Object aValue, int rowIndex, int columnIndex)
+
+    public void setValueAt( Object aValue, int rowIndex, int columnIndex )
     {
         throw new UnsupportedOperationException();
     }
 
-    public void addTableModelListener(TableModelListener l)
+
+    public void addTableModelListener( TableModelListener l )
     {
     }
 
-    public void removeTableModelListener(TableModelListener l)
+
+    public void removeTableModelListener( TableModelListener l )
     {
     }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java Fri Feb 10 02:48:07 2006
@@ -42,7 +42,6 @@
 import org.slf4j.LoggerFactory;
 
 
-
 public class SessionsFrame extends JFrame
 {
     private static final Logger log = LoggerFactory.getLogger( SessionsFrame.class );
@@ -72,19 +71,20 @@
     private JMenuItem strongAuthRequiredItem = null;
     private JPanel southPanel = null;
     private JMenuItem showRequests = null;
-//    private JPopupMenu popupMenu = null;
-//    private JMenuItem jMenuItem = null;
-//    private JMenu jMenu = null;
-//    private JMenuItem jMenuItem1 = null;
-//    private JMenuItem jMenuItem2 = null;
-//    private JMenuItem jMenuItem3 = null;
-//    private JMenuItem jMenuItem4 = null;
+    //    private JPopupMenu popupMenu = null;
+    //    private JMenuItem jMenuItem = null;
+    //    private JMenu jMenu = null;
+    //    private JMenuItem jMenuItem1 = null;
+    //    private JMenuItem jMenuItem2 = null;
+    //    private JMenuItem jMenuItem3 = null;
+    //    private JMenuItem jMenuItem4 = null;
     private JButton refreshButton = null;
-    
-    
+
     private IoSession selected;
     private JMenuItem unbindItem = null;
     private JMenuItem bindItem = null;
+
+ 
     /**
      * This is the default constructor
      */
@@ -102,13 +102,13 @@
      */
     private void initialize()
     {
-        this.setSize(789, 436);
+        this.setSize( 789, 436 );
         this.setJMenuBar( getMainMenuBar() );
         this.setContentPane( getJContentPane() );
-        this.setTitle("Sessions");
+        this.setTitle( "Sessions" );
         this.addWindowListener( new java.awt.event.WindowAdapter()
         {
-            public void windowClosing(java.awt.event.WindowEvent e)
+            public void windowClosing( java.awt.event.WindowEvent e )
             {
                 SessionsFrame.this.setVisible( false );
                 SessionsFrame.this.dispose();
@@ -128,7 +128,7 @@
         {
             jContentPane = new JPanel();
             jContentPane.setLayout( new BorderLayout() );
-            jContentPane.add(getMainPanel(), java.awt.BorderLayout.CENTER);
+            jContentPane.add( getMainPanel(), java.awt.BorderLayout.CENTER );
         }
         return jContentPane;
     }
@@ -144,10 +144,10 @@
         if ( mainPanel == null )
         {
             mainPanel = new JPanel();
-            mainPanel.setLayout(new BorderLayout());
-            mainPanel.add(getFilterPanel(), java.awt.BorderLayout.NORTH);
-            mainPanel.add(getSessionsPane(), java.awt.BorderLayout.CENTER);
-            mainPanel.add(getSouthPanel(), java.awt.BorderLayout.SOUTH);
+            mainPanel.setLayout( new BorderLayout() );
+            mainPanel.add( getFilterPanel(), java.awt.BorderLayout.NORTH );
+            mainPanel.add( getSessionsPane(), java.awt.BorderLayout.CENTER );
+            mainPanel.add( getSouthPanel(), java.awt.BorderLayout.SOUTH );
         }
         return mainPanel;
     }
@@ -163,8 +163,8 @@
         if ( sessionsPane == null )
         {
             sessionsPane = new JScrollPane();
-            sessionsPane.setName("jScrollPane");
-            sessionsPane.setViewportView(getSessionsTable());
+            sessionsPane.setName( "jScrollPane" );
+            sessionsPane.setViewportView( getSessionsTable() );
         }
         return sessionsPane;
     }
@@ -180,45 +180,46 @@
         if ( sessionsTable == null )
         {
             sessionsTable = new JTable();
-            sessionsTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
-//            sessionsTable.addMouseListener( new java.awt.event.MouseAdapter()
-//            {
-//                public void mouseReleased(java.awt.event.MouseEvent e)
-//                {
-//                    if ( e.getButton() == MouseEvent.BUTTON3 )
-//                    {
-//                        if ( popupMenu == null )
-//                        {
-//                            popupMenu = SessionsFrame.this.getSessionsPopupMenu();
-//                        }
-//                        popupMenu.setVisible( false );
-//                    }
-//                }
-//
-//                public void mousePressed(java.awt.event.MouseEvent e)
-//                {
-//                    if ( e.getButton() == MouseEvent.BUTTON3 )
-//                    {
-//                        if ( popupMenu == null )
-//                        {
-//                            popupMenu = SessionsFrame.this.getSessionsPopupMenu();
-//                        }
-//                        Point location = e.getComponent().getLocationOnScreen();
-//                        popupMenu.setLocation( location.x + e.getPoint().x, location.y + e.getPoint().y );
-//                        popupMenu.setVisible( true );
-//                    }
-//                }
-//            } );
+            sessionsTable.setSelectionMode( javax.swing.ListSelectionModel.SINGLE_SELECTION );
+            //            sessionsTable.addMouseListener( new java.awt.event.MouseAdapter()
+            //            {
+            //                public void mouseReleased(java.awt.event.MouseEvent e)
+            //                {
+            //                    if ( e.getButton() == MouseEvent.BUTTON3 )
+            //                    {
+            //                        if ( popupMenu == null )
+            //                        {
+            //                            popupMenu = SessionsFrame.this.getSessionsPopupMenu();
+            //                        }
+            //                        popupMenu.setVisible( false );
+            //                    }
+            //                }
+            //
+            //                public void mousePressed(java.awt.event.MouseEvent e)
+            //                {
+            //                    if ( e.getButton() == MouseEvent.BUTTON3 )
+            //                    {
+            //                        if ( popupMenu == null )
+            //                        {
+            //                            popupMenu = SessionsFrame.this.getSessionsPopupMenu();
+            //                        }
+            //                        Point location = e.getComponent().getLocationOnScreen();
+            //                        popupMenu.setLocation( location.x + e.getPoint().x, location.y + e.getPoint().y );
+            //                        popupMenu.setVisible( true );
+            //                    }
+            //                }
+            //            } );
             sessionsTable.setModel( new SessionsModel( SessionRegistry.getSingleton().getSessions() ) );
-            sessionsTable.getSelectionModel().addListSelectionListener( new ListSelectionListener() {
-                public void valueChanged(ListSelectionEvent e)
+            sessionsTable.getSelectionModel().addListSelectionListener( new ListSelectionListener()
+            {
+                public void valueChanged( ListSelectionEvent e )
                 {
                     int row = sessionsTable.getSelectedRow();
                     if ( row == -1 )
                     {
                         selected = null;
                     }
-                    else 
+                    else
                     {
                         selected = ( ( SessionsModel ) sessionsTable.getModel() ).getIoSession( row );
                         closeItem.setEnabled( true );
@@ -226,7 +227,7 @@
                         showRequests.setEnabled( true );
                     }
                 }
-            });
+            } );
         }
         return sessionsTable;
     }
@@ -242,10 +243,11 @@
         if ( filterPanel == null )
         {
             filterPanel = new JPanel();
-            filterPanel.setLayout(new BoxLayout(getFilterPanel(), BoxLayout.X_AXIS));
-            filterPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
-            filterPanel.add(getFilterButton(), null);
-            filterPanel.add(getFilterText(), null);
+            filterPanel.setLayout( new BoxLayout( getFilterPanel(), BoxLayout.X_AXIS ) );
+            filterPanel.setBorder( javax.swing.BorderFactory
+                .createEtchedBorder( javax.swing.border.EtchedBorder.RAISED ) );
+            filterPanel.add( getFilterButton(), null );
+            filterPanel.add( getFilterText(), null );
         }
         return filterPanel;
     }
@@ -261,7 +263,7 @@
         if ( filterButton == null )
         {
             filterButton = new JButton();
-            filterButton.setText("Filter");
+            filterButton.setText( "Filter" );
         }
         return filterButton;
     }
@@ -292,8 +294,8 @@
         if ( menuBar == null )
         {
             menuBar = new JMenuBar();
-            menuBar.add(getMenuFile());
-            menuBar.add(getMenuSession());
+            menuBar.add( getMenuFile() );
+            menuBar.add( getMenuSession() );
         }
         return menuBar;
     }
@@ -309,8 +311,8 @@
         if ( menuFile == null )
         {
             menuFile = new JMenu();
-            menuFile.setText("File");
-            menuFile.add(getExitItem());
+            menuFile.setText( "File" );
+            menuFile.add( getExitItem() );
         }
         return menuFile;
     }
@@ -326,10 +328,10 @@
         if ( exitItem == null )
         {
             exitItem = new JMenuItem();
-            exitItem.setText("exit");
+            exitItem.setText( "exit" );
             exitItem.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     SessionsFrame.this.setVisible( false );
                     SessionsFrame.this.dispose();
@@ -350,14 +352,14 @@
         if ( menuSession == null )
         {
             menuSession = new JMenu();
-            menuSession.setText("Session");
-            menuSession.add(getCloseItem());
+            menuSession.setText( "Session" );
+            menuSession.add( getCloseItem() );
             closeItem.setEnabled( false );
-            menuSession.add(getMenuSendNoD());
+            menuSession.add( getMenuSendNoD() );
             menuSendNoD.setEnabled( false );
-            menuSession.add(getShowRequests());
-            menuSession.add(getUnbindItem());
-            menuSession.add(getBindItem());
+            menuSession.add( getShowRequests() );
+            menuSession.add( getUnbindItem() );
+            menuSession.add( getBindItem() );
             showRequests.setEnabled( false );
         }
         return menuSession;
@@ -374,10 +376,10 @@
         if ( closeItem == null )
         {
             closeItem = new JMenuItem();
-            closeItem.setText("close");
+            closeItem.setText( "close" );
             closeItem.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     SessionRegistry.getSingleton().terminateSession( selected );
                     try
@@ -395,7 +397,7 @@
         return closeItem;
     }
 
-    
+
     /**
      * This method initializes jMenu	
      * 	
@@ -406,10 +408,10 @@
         if ( menuSendNoD == null )
         {
             menuSendNoD = new JMenu();
-            menuSendNoD.setText("Send NoD");
-            menuSendNoD.add(getUnavailableItem());
-            menuSendNoD.add(getProtocolErrorItem());
-            menuSendNoD.add(getStrongAuthRequiredItem());
+            menuSendNoD.setText( "Send NoD" );
+            menuSendNoD.add( getUnavailableItem() );
+            menuSendNoD.add( getProtocolErrorItem() );
+            menuSendNoD.add( getStrongAuthRequiredItem() );
         }
         return menuSendNoD;
     }
@@ -425,12 +427,12 @@
         if ( unavailableItem == null )
         {
             unavailableItem = new JMenuItem();
-            unavailableItem.setText("unavailable");
+            unavailableItem.setText( "unavailable" );
             unavailableItem.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
-                    selected.write( NoticeOfDisconnect.UNAVAILABLE ); 
+                    selected.write( NoticeOfDisconnect.UNAVAILABLE );
                     try
                     {
                         Thread.sleep( 250 );
@@ -457,12 +459,12 @@
         if ( protocolErrorItem == null )
         {
             protocolErrorItem = new JMenuItem();
-            protocolErrorItem.setText("protocolError");
+            protocolErrorItem.setText( "protocolError" );
             protocolErrorItem.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
-                    selected.write( NoticeOfDisconnect.PROTOCOLERROR ); 
+                    selected.write( NoticeOfDisconnect.PROTOCOLERROR );
                     try
                     {
                         Thread.sleep( 250 );
@@ -489,12 +491,12 @@
         if ( strongAuthRequiredItem == null )
         {
             strongAuthRequiredItem = new JMenuItem();
-            strongAuthRequiredItem.setText("strongAuthRequired");
+            strongAuthRequiredItem.setText( "strongAuthRequired" );
             strongAuthRequiredItem.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
-                    WriteFuture future = selected.write( NoticeOfDisconnect.STRONGAUTHREQUIRED ); 
+                    WriteFuture future = selected.write( NoticeOfDisconnect.STRONGAUTHREQUIRED );
                     try
                     {
                         future.join( 1000 );
@@ -513,23 +515,22 @@
     }
 
 
-//    /**
-//     * This method initializes jPopupMenu	
-//     * 	
-//     * @return javax.swing.JPopupMenu	
-//     */
-//    private JPopupMenu getSessionsPopupMenu()
-//    {
-//        if ( popupMenu == null )
-//        {
-//            popupMenu = new JPopupMenu();
-//            popupMenu.add(getJMenuItem());
-//            popupMenu.add(getJMenu());
-//            popupMenu.add(getJMenuItem4());
-//        }
-//        return popupMenu;
-//    }
-
+    //    /**
+    //     * This method initializes jPopupMenu	
+    //     * 	
+    //     * @return javax.swing.JPopupMenu	
+    //     */
+    //    private JPopupMenu getSessionsPopupMenu()
+    //    {
+    //        if ( popupMenu == null )
+    //        {
+    //            popupMenu = new JPopupMenu();
+    //            popupMenu.add(getJMenuItem());
+    //            popupMenu.add(getJMenu());
+    //            popupMenu.add(getJMenuItem4());
+    //        }
+    //        return popupMenu;
+    //    }
 
     /**
      * This method initializes jPanel	
@@ -541,8 +542,9 @@
         if ( southPanel == null )
         {
             southPanel = new JPanel();
-            southPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
-            southPanel.add(getRefreshButton(), null);
+            southPanel
+                .setBorder( javax.swing.BorderFactory.createEtchedBorder( javax.swing.border.EtchedBorder.RAISED ) );
+            southPanel.add( getRefreshButton(), null );
         }
         return southPanel;
     }
@@ -558,18 +560,19 @@
         if ( showRequests == null )
         {
             showRequests = new JMenuItem();
-            showRequests.setText("show requests");
+            showRequests.setText( "show requests" );
             showRequests.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     OutstandingRequestsDialog dialog = new OutstandingRequestsDialog( SessionsFrame.this, selected );
-                    dialog.addWindowListener( new WindowAdapter() {
-                        public void windowClosed(WindowEvent e)
+                    dialog.addWindowListener( new WindowAdapter()
+                    {
+                        public void windowClosed( WindowEvent e )
                         {
                             e.getWindow().dispose();
                         }
-                    });
+                    } );
                     dialog.setVisible( true );
                 }
             } );
@@ -578,103 +581,103 @@
     }
 
 
-//    /**
-//     * This method initializes jMenuItem	
-//     * 	
-//     * @return javax.swing.JMenuItem	
-//     */
-//    private JMenuItem getJMenuItem()
-//    {
-//        if ( jMenuItem == null )
-//        {
-//            jMenuItem = new JMenuItem();
-//            jMenuItem.setText("close");
-//        }
-//        return jMenuItem;
-//    }
-//
-//
-//    /**
-//     * This method initializes jMenu	
-//     * 	
-//     * @return javax.swing.JMenu	
-//     */
-//    private JMenu getJMenu()
-//    {
-//        if ( jMenu == null )
-//        {
-//            jMenu = new JMenu();
-//            jMenu.setText("Send NoD");
-//            jMenu.add(getJMenuItem1());
-//            jMenu.add(getJMenuItem2());
-//            jMenu.add(getJMenuItem3());
-//        }
-//        return jMenu;
-//    }
-//
-//
-//    /**
-//     * This method initializes jMenuItem1	
-//     * 	
-//     * @return javax.swing.JMenuItem	
-//     */
-//    private JMenuItem getJMenuItem1()
-//    {
-//        if ( jMenuItem1 == null )
-//        {
-//            jMenuItem1 = new JMenuItem();
-//            jMenuItem1.setText("unavailable");
-//        }
-//        return jMenuItem1;
-//    }
-//
-//
-//    /**
-//     * This method initializes jMenuItem2	
-//     * 	
-//     * @return javax.swing.JMenuItem	
-//     */
-//    private JMenuItem getJMenuItem2()
-//    {
-//        if ( jMenuItem2 == null )
-//        {
-//            jMenuItem2 = new JMenuItem();
-//            jMenuItem2.setText("protocolError");
-//        }
-//        return jMenuItem2;
-//    }
-//
-//
-//    /**
-//     * This method initializes jMenuItem3	
-//     * 	
-//     * @return javax.swing.JMenuItem	
-//     */
-//    private JMenuItem getJMenuItem3()
-//    {
-//        if ( jMenuItem3 == null )
-//        {
-//            jMenuItem3 = new JMenuItem();
-//            jMenuItem3.setText("strongAuthRequired");
-//        }
-//        return jMenuItem3;
-//    }
-//
-//
-//    /**
-//     * This method initializes jMenuItem4	
-//     * 	
-//     * @return javax.swing.JMenuItem	
-//     */
-//    private JMenuItem getJMenuItem4()
-//    {
-//        if ( jMenuItem4 == null )
-//        {
-//            jMenuItem4 = new JMenuItem();
-//            jMenuItem4.setText("show requests");
-//        }
-//        return jMenuItem4;
-//    }
+    //    /**
+    //     * This method initializes jMenuItem	
+    //     * 	
+    //     * @return javax.swing.JMenuItem	
+    //     */
+    //    private JMenuItem getJMenuItem()
+    //    {
+    //        if ( jMenuItem == null )
+    //        {
+    //            jMenuItem = new JMenuItem();
+    //            jMenuItem.setText("close");
+    //        }
+    //        return jMenuItem;
+    //    }
+    //
+    //
+    //    /**
+    //     * This method initializes jMenu	
+    //     * 	
+    //     * @return javax.swing.JMenu	
+    //     */
+    //    private JMenu getJMenu()
+    //    {
+    //        if ( jMenu == null )
+    //        {
+    //            jMenu = new JMenu();
+    //            jMenu.setText("Send NoD");
+    //            jMenu.add(getJMenuItem1());
+    //            jMenu.add(getJMenuItem2());
+    //            jMenu.add(getJMenuItem3());
+    //        }
+    //        return jMenu;
+    //    }
+    //
+    //
+    //    /**
+    //     * This method initializes jMenuItem1	
+    //     * 	
+    //     * @return javax.swing.JMenuItem	
+    //     */
+    //    private JMenuItem getJMenuItem1()
+    //    {
+    //        if ( jMenuItem1 == null )
+    //        {
+    //            jMenuItem1 = new JMenuItem();
+    //            jMenuItem1.setText("unavailable");
+    //        }
+    //        return jMenuItem1;
+    //    }
+    //
+    //
+    //    /**
+    //     * This method initializes jMenuItem2	
+    //     * 	
+    //     * @return javax.swing.JMenuItem	
+    //     */
+    //    private JMenuItem getJMenuItem2()
+    //    {
+    //        if ( jMenuItem2 == null )
+    //        {
+    //            jMenuItem2 = new JMenuItem();
+    //            jMenuItem2.setText("protocolError");
+    //        }
+    //        return jMenuItem2;
+    //    }
+    //
+    //
+    //    /**
+    //     * This method initializes jMenuItem3	
+    //     * 	
+    //     * @return javax.swing.JMenuItem	
+    //     */
+    //    private JMenuItem getJMenuItem3()
+    //    {
+    //        if ( jMenuItem3 == null )
+    //        {
+    //            jMenuItem3 = new JMenuItem();
+    //            jMenuItem3.setText("strongAuthRequired");
+    //        }
+    //        return jMenuItem3;
+    //    }
+    //
+    //
+    //    /**
+    //     * This method initializes jMenuItem4	
+    //     * 	
+    //     * @return javax.swing.JMenuItem	
+    //     */
+    //    private JMenuItem getJMenuItem4()
+    //    {
+    //        if ( jMenuItem4 == null )
+    //        {
+    //            jMenuItem4 = new JMenuItem();
+    //            jMenuItem4.setText("show requests");
+    //        }
+    //        return jMenuItem4;
+    //    }
 
     /**
      * This method initializes jButton2	
@@ -689,7 +692,7 @@
             refreshButton.setText( REFRESH_COMMAND );
             refreshButton.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     if ( e.getActionCommand() == REFRESH_COMMAND )
                     {
@@ -701,7 +704,7 @@
         return refreshButton;
     }
 
-    
+
     private void refresh()
     {
         log.info( "Refreshing Sessions UI" );
@@ -710,7 +713,7 @@
         menuSendNoD.setEnabled( false );
         showRequests.setEnabled( false );
         unbindItem.setEnabled( isServiceBound );
-        bindItem.setEnabled( ! isServiceBound );
+        bindItem.setEnabled( !isServiceBound );
     }
 
 
@@ -724,8 +727,8 @@
     {
         this.ldapService = ldapService;
     }
-    
-    
+
+
     public void setRequestor( IoSession requestor )
     {
         this.requestor = requestor;
@@ -742,37 +745,36 @@
         if ( unbindItem == null )
         {
             unbindItem = new JMenuItem();
-            unbindItem.setText("Unbind Service");
+            unbindItem.setText( "Unbind Service" );
             unbindItem.setEnabled( isServiceBound );
             unbindItem.addActionListener( new java.awt.event.ActionListener()
             {
                 public void actionPerformed( java.awt.event.ActionEvent e )
                 {
-                    int input = JOptionPane.showConfirmDialog( SessionsFrame.this, 
-                        "Selecting no will send a notice of disconnect ONLY.  " +
-                        "\nSelecting yes will send both.  Cancel will abort unbind.", 
-                        "Send graceful disconnect before disconnect notice?", 
-                        JOptionPane.YES_NO_CANCEL_OPTION );
+                    int input = JOptionPane.showConfirmDialog( SessionsFrame.this,
+                        "Selecting no will send a notice of disconnect ONLY.  "
+                            + "\nSelecting yes will send both.  Cancel will abort unbind.",
+                        "Send graceful disconnect before disconnect notice?", JOptionPane.YES_NO_CANCEL_OPTION );
                     IoAcceptor acceptor = minaRegistry.getAcceptor( ldapService.getTransportType() );
                     List sessions = new ArrayList( acceptor.getManagedSessions( ldapService.getAddress() ) );
-//                    ServerLdapContext ctx;
-//                    try
-//                    {
-//                        ctx = ( ServerLdapContext ) SessionRegistry.getSingleton()
-//                            .getLdapContext( requestor, null, false );
-//                    }
-//                    catch ( NamingException ne )
-//                    {
-//                        JOptionPane.showInternalMessageDialog( SessionsFrame.this, 
-//                            ne.getMessage(), "Encountered an Error", JOptionPane.ERROR_MESSAGE );
-//                        log.warn( "Could not access requestor's context.", ne );
-//                        return;
-//                    }
-//                    DirectoryService service = ctx.getService();
-//                    StartupConfiguration cfg = service.getConfiguration().getStartupConfiguration();
+                    //                    ServerLdapContext ctx;
+                    //                    try
+                    //                    {
+                    //                        ctx = ( ServerLdapContext ) SessionRegistry.getSingleton()
+                    //                            .getLdapContext( requestor, null, false );
+                    //                    }
+                    //                    catch ( NamingException ne )
+                    //                    {
+                    //                        JOptionPane.showInternalMessageDialog( SessionsFrame.this, 
+                    //                            ne.getMessage(), "Encountered an Error", JOptionPane.ERROR_MESSAGE );
+                    //                        log.warn( "Could not access requestor's context.", ne );
+                    //                        return;
+                    //                    }
+                    //                    DirectoryService service = ctx.getService();
+                    //                    StartupConfiguration cfg = service.getConfiguration().getStartupConfiguration();
                     // might add an exit vm feature using the default from the 
                     // configuration property
-                    
+
                     if ( input == JOptionPane.CANCEL_OPTION )
                     {
                         return;
@@ -783,10 +785,10 @@
                         minaRegistry.unbind( ldapService );
                         isServiceBound = false;
                         unbindItem.setEnabled( isServiceBound );
-                        bindItem.setEnabled( ! isServiceBound );
-                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service for " + 
-                            ldapService.getAddress() + " has been successfully unbound.", 
-                            "Success!", JOptionPane.INFORMATION_MESSAGE );
+                        bindItem.setEnabled( !isServiceBound );
+                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service for "
+                            + ldapService.getAddress() + " has been successfully unbound.", "Success!",
+                            JOptionPane.INFORMATION_MESSAGE );
                         refresh();
                         return;
                     }
@@ -796,16 +798,15 @@
                         setCenteredPosition( SessionsFrame.this, dialog );
                         dialog.setModal( true );
                         dialog.setVisible( true );
-                        
 
                         if ( dialog.isSendCanceled() )
                         {
                             log.debug( "GracefulShutdown was canceled." );
-                            JOptionPane.showMessageDialog( SessionsFrame.this, "Shutdown has been canceled.", 
+                            JOptionPane.showMessageDialog( SessionsFrame.this, "Shutdown has been canceled.",
                                 "Graceful Shutdown Aborted", JOptionPane.OK_OPTION );
                             return;
                         }
-                        
+
                         log.debug( "GracefulShutdown parameters captured." );
                         int timeOffline = dialog.getTimeOffline();
                         int delay = dialog.getDelay();
@@ -814,8 +815,8 @@
                         minaRegistry.unbind( ldapService );
                         isServiceBound = false;
                         unbindItem.setEnabled( isServiceBound );
-                        bindItem.setEnabled( ! isServiceBound ); 
-                        
+                        bindItem.setEnabled( !isServiceBound );
+
                         // do progress dialog with bypass button to wait for delay time
                         if ( delay > 0 )
                         {
@@ -827,12 +828,12 @@
                             t.start();
                             progress.setVisible( true );
                         }
-                        
+
                         // now send the notice of disconnect
                         GracefulShutdownHandler.sendNoticeOfDisconnect( sessions, requestor );
-                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service for " + 
-                            ldapService.getAddress() + " has been successfully unbound.", 
-                            "Success!", JOptionPane.OK_OPTION );
+                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service for "
+                            + ldapService.getAddress() + " has been successfully unbound.", "Success!",
+                            JOptionPane.OK_OPTION );
                         refresh();
                     }
                 }
@@ -841,7 +842,7 @@
         return unbindItem;
     }
 
-    
+
     private void setCenteredPosition( JFrame frame, Component comp )
     {
         Point pt = new Point();
@@ -849,9 +850,9 @@
         Dimension screenSize = tk.getScreenSize();
         pt.x = ( screenSize.width - frame.getWidth() ) / 2;
         pt.y = ( screenSize.height - frame.getHeight() ) / 2;
-        
-        pt.x += ( frame.getWidth() - comp.getWidth() )/2;
-        pt.y += ( frame.getHeight() - comp.getHeight() )/2;
+
+        pt.x += ( frame.getWidth() - comp.getWidth() ) / 2;
+        pt.y += ( frame.getHeight() - comp.getHeight() ) / 2;
         comp.setLocation( pt );
     }
 
@@ -866,31 +867,30 @@
         if ( bindItem == null )
         {
             bindItem = new JMenuItem();
-            bindItem.setText("Bind Service");
+            bindItem.setText( "Bind Service" );
             unbindItem.setEnabled( !isServiceBound );
             bindItem.addActionListener( new java.awt.event.ActionListener()
+            {
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
-                    public void actionPerformed( java.awt.event.ActionEvent e )
+                    try
                     {
-                        try
-                        {
-                            minaRegistry.bind( ldapService, getLdapProvider() );
-                            JOptionPane.showMessageDialog( SessionsFrame.this, 
-                                "Ldap service " + ldapService.getAddress() + " has been successfully bound.\n"
-                                + " Clients may now connect to the server once again.", 
-                                "Success!", JOptionPane.INFORMATION_MESSAGE );  
-                            isServiceBound = true;
-                            unbindItem.setEnabled( isServiceBound );
-                            bindItem.setEnabled( ! isServiceBound );
-                        }
-                        catch ( IOException e1 )
-                        {
-                            log.error( "failed to rebind ldap service", e1 );
-                            JOptionPane.showMessageDialog( SessionsFrame.this, e1.getMessage(), "Error encountered!", 
-                                JOptionPane.ERROR_MESSAGE );
-                        }
+                        minaRegistry.bind( ldapService, getLdapProvider() );
+                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service " + ldapService.getAddress()
+                            + " has been successfully bound.\n" + " Clients may now connect to the server once again.",
+                            "Success!", JOptionPane.INFORMATION_MESSAGE );
+                        isServiceBound = true;
+                        unbindItem.setEnabled( isServiceBound );
+                        bindItem.setEnabled( !isServiceBound );
                     }
-                });
+                    catch ( IOException e1 )
+                    {
+                        log.error( "failed to rebind ldap service", e1 );
+                        JOptionPane.showMessageDialog( SessionsFrame.this, e1.getMessage(), "Error encountered!",
+                            JOptionPane.ERROR_MESSAGE );
+                    }
+                }
+            } );
         }
         return bindItem;
     }
@@ -906,4 +906,4 @@
     {
         return ldapProvider;
     }
-}  //  @jve:decl-index=0:visual-constraint="10,10"
+} //  @jve:decl-index=0:visual-constraint="10,10"

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java Fri Feb 10 02:48:07 2006
@@ -11,75 +11,87 @@
 
 public class SessionsModel implements TableModel
 {
-    final String[] columns = new String[] { "client address", "client port", "server address", "server port" };
-    final Class[] columnClasses = new Class[] { String.class, Integer.class, String.class, Integer.class };
+    final String[] columns = new String[]
+        { "client address", "client port", "server address", "server port" };
+    final Class[] columnClasses = new Class[]
+        { String.class, Integer.class, String.class, Integer.class };
     final IoSession[] sessions;
 
-    
-    SessionsModel( IoSession[] sessions )
+
+    SessionsModel(IoSession[] sessions)
     {
         this.sessions = sessions;
     }
 
+
     IoSession getIoSession( int row )
     {
         return sessions[row];
     }
-    
+
+
     public int getRowCount()
     {
         return sessions.length;
     }
 
+
     public int getColumnCount()
     {
         return columns.length;
     }
 
+
     public String getColumnName( int columnIndex )
     {
         return columns[columnIndex];
     }
 
+
     public Class getColumnClass( int columnIndex )
     {
         return columnClasses[columnIndex];
     }
 
+
     public boolean isCellEditable( int rowIndex, int columnIndex )
     {
         return false;
     }
 
+
     public Object getValueAt( int rowIndex, int columnIndex )
     {
         IoSession session = sessions[rowIndex];
-        
-        switch( columnIndex )
+
+        switch ( columnIndex )
         {
-            case( 0 ):
+            case ( 0 ):
                 return ( ( InetSocketAddress ) session.getRemoteAddress() ).getHostName();
-            case( 1 ):
+            case ( 1 ):
                 return new Integer( ( ( InetSocketAddress ) session.getRemoteAddress() ).getPort() );
-            case( 2 ):
+            case ( 2 ):
                 return ( ( InetSocketAddress ) session.getLocalAddress() ).getHostName();
-            case( 3 ):
+            case ( 3 ):
                 return new Integer( ( ( InetSocketAddress ) session.getLocalAddress() ).getPort() );
             default:
                 throw new IndexOutOfBoundsException( "column index max is " + ( columns.length - 1 ) );
         }
     }
 
-    public void setValueAt(Object aValue, int rowIndex, int columnIndex)
+
+    public void setValueAt( Object aValue, int rowIndex, int columnIndex )
     {
         throw new UnsupportedOperationException();
     }
 
-    public void addTableModelListener(TableModelListener l)
+
+    public void addTableModelListener( TableModelListener l )
     {
     }
 
-    public void removeTableModelListener(TableModelListener l)
+
+    public void removeTableModelListener( TableModelListener l )
     {
     }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownDialog.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownDialog.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownDialog.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownDialog.java Fri Feb 10 02:48:07 2006
@@ -29,7 +29,7 @@
     private JTextField delayField = null;
     private boolean canceled = true;
 
-    
+
     /**
      * This is the default constructor
      */
@@ -39,30 +39,30 @@
         initialize();
     }
 
-    
+
     public boolean isSendCanceled()
     {
         return canceled;
     }
-    
-    
+
+
     public int getTimeOffline()
     {
         return Integer.parseInt( timeOfflineField.getText() );
     }
-    
+
 
     public int getDelay()
     {
         return Integer.parseInt( delayField.getText() );
     }
-    
-    
+
+
     public boolean isCanceled()
     {
         return canceled;
     }
-    
+
 
     /**
      * This method initializes this
@@ -71,8 +71,8 @@
      */
     private void initialize()
     {
-        this.setSize(248, 171);
-        this.setTitle("Shutdown Parameters");
+        this.setSize( 248, 171 );
+        this.setTitle( "Shutdown Parameters" );
         this.setContentPane( getJContentPane() );
     }
 
@@ -88,8 +88,8 @@
         {
             jContentPane = new JPanel();
             jContentPane.setLayout( new BorderLayout() );
-            jContentPane.add(getJPanel(), java.awt.BorderLayout.CENTER);
-            jContentPane.add(getJPanel2(), java.awt.BorderLayout.SOUTH);
+            jContentPane.add( getJPanel(), java.awt.BorderLayout.CENTER );
+            jContentPane.add( getJPanel2(), java.awt.BorderLayout.SOUTH );
         }
         return jContentPane;
     }
@@ -105,10 +105,11 @@
         if ( inputsPanel == null )
         {
             inputsPanel = new JPanel();
-            inputsPanel.setLayout(null);
-            inputsPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
-            inputsPanel.add(getJPanel3(), null);
-            inputsPanel.add(getJPanel1(), null);
+            inputsPanel.setLayout( null );
+            inputsPanel.setBorder( javax.swing.BorderFactory
+                .createEtchedBorder( javax.swing.border.EtchedBorder.RAISED ) );
+            inputsPanel.add( getJPanel3(), null );
+            inputsPanel.add( getJPanel1(), null );
         }
         return inputsPanel;
     }
@@ -124,8 +125,8 @@
         if ( buttonsPanel == null )
         {
             buttonsPanel = new JPanel();
-            buttonsPanel.add(getJButton(), null);
-            buttonsPanel.add(getJButton2(), null);
+            buttonsPanel.add( getJButton(), null );
+            buttonsPanel.add( getJButton2(), null );
         }
         return buttonsPanel;
     }
@@ -141,7 +142,7 @@
         if ( sendButton == null )
         {
             sendButton = new JButton();
-            sendButton.setText("Send");
+            sendButton.setText( "Send" );
             sendButton.addActionListener( new java.awt.event.ActionListener()
             {
                 public void actionPerformed( java.awt.event.ActionEvent e )
@@ -158,7 +159,7 @@
                             return;
                         }
                     }
-                    catch( NumberFormatException nfe )
+                    catch ( NumberFormatException nfe )
                     {
                         JOptionPane.showMessageDialog( ShutdownDialog.this,
                             "The value for Time Offline is not a number", "Not a Number", JOptionPane.ERROR_MESSAGE );
@@ -171,16 +172,16 @@
                         delay = Integer.parseInt( delayField.getText() );
                         if ( delay > 86400 || delay < 0 )
                         {
-                            JOptionPane.showMessageDialog( ShutdownDialog.this,
-                                "Delay is out of range: 0 ... 86400", "Range Problem", JOptionPane.ERROR_MESSAGE );
+                            JOptionPane.showMessageDialog( ShutdownDialog.this, "Delay is out of range: 0 ... 86400",
+                                "Range Problem", JOptionPane.ERROR_MESSAGE );
                             delayField.setText( "" );
                             return;
                         }
                     }
-                    catch( NumberFormatException nfe )
+                    catch ( NumberFormatException nfe )
                     {
-                        JOptionPane.showMessageDialog( ShutdownDialog.this,
-                            "Delay is not a number", "Not a Number", JOptionPane.ERROR_MESSAGE );
+                        JOptionPane.showMessageDialog( ShutdownDialog.this, "Delay is not a number", "Not a Number",
+                            JOptionPane.ERROR_MESSAGE );
                         delayField.setText( "" );
                         return;
                     }
@@ -204,8 +205,8 @@
         if ( cancelButton == null )
         {
             cancelButton = new JButton();
-            cancelButton.setText("Cancel");
-            cancelButton.setSelected(true);
+            cancelButton.setText( "Cancel" );
+            cancelButton.setSelected( true );
             cancelButton.addActionListener( new java.awt.event.ActionListener()
             {
                 public void actionPerformed( java.awt.event.ActionEvent e )
@@ -231,12 +232,12 @@
         if ( jPanel == null )
         {
             jLabel = new JLabel();
-            jLabel.setText("Minutes Offline: ");
+            jLabel.setText( "Minutes Offline: " );
             jPanel = new JPanel();
-            jPanel.setLayout(new BoxLayout(getJPanel3(), BoxLayout.X_AXIS));
-            jPanel.setBounds(new java.awt.Rectangle(35,28,163,16));
-            jPanel.add(jLabel, null);
-            jPanel.add(getJTextField(), null);
+            jPanel.setLayout( new BoxLayout( getJPanel3(), BoxLayout.X_AXIS ) );
+            jPanel.setBounds( new java.awt.Rectangle( 35, 28, 163, 16 ) );
+            jPanel.add( jLabel, null );
+            jPanel.add( getJTextField(), null );
         }
         return jPanel;
     }
@@ -252,12 +253,12 @@
         if ( jPanel1 == null )
         {
             jLabel1 = new JLabel();
-            jLabel1.setText("Seconds Delay: ");
+            jLabel1.setText( "Seconds Delay: " );
             jPanel1 = new JPanel();
-            jPanel1.setLayout(new BoxLayout(getJPanel1(), BoxLayout.X_AXIS));
-            jPanel1.setBounds(new java.awt.Rectangle(42,57,156,16));
-            jPanel1.add(jLabel1, null);
-            jPanel1.add(getJTextField1(), null);
+            jPanel1.setLayout( new BoxLayout( getJPanel1(), BoxLayout.X_AXIS ) );
+            jPanel1.setBounds( new java.awt.Rectangle( 42, 57, 156, 16 ) );
+            jPanel1.add( jLabel1, null );
+            jPanel1.add( getJTextField1(), null );
         }
         return jPanel1;
     }
@@ -292,4 +293,4 @@
         return delayField;
     }
 
-}  //  @jve:decl-index=0:visual-constraint="10,10"
+} //  @jve:decl-index=0:visual-constraint="10,10"

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownProgress.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownProgress.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownProgress.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownProgress.java Fri Feb 10 02:48:07 2006
@@ -19,14 +19,14 @@
     private JProgressBar jProgressBar = null;
     private long timeMillis = 0;
     private boolean bypass = false;
-    
-    
+
+
     public void setTime( long millis )
     {
         this.timeMillis = millis;
     }
-    
-    
+
+
     public void run()
     {
         setCursor( Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) );
@@ -36,7 +36,7 @@
         jProgressBar.setValue( 0 );
         jProgressBar.setStringPainted( true );
         final long startTime = System.currentTimeMillis();
-        while ( System.currentTimeMillis() - startTime < timeMillis && ! bypass )
+        while ( System.currentTimeMillis() - startTime < timeMillis && !bypass )
         {
             try
             {
@@ -47,17 +47,18 @@
                 // TODO Auto-generated catch block
                 e.printStackTrace();
             }
-            jProgressBar.setString( ( timeMillis - ( System.currentTimeMillis() - startTime ) )/1000 + " seconds remaining ..." );
+            jProgressBar.setString( ( timeMillis - ( System.currentTimeMillis() - startTime ) ) / 1000
+                + " seconds remaining ..." );
             jProgressBar.setValue( jProgressBar.getValue() + 100 );
             this.repaint();
         }
-        
+
         setCursor( null );
         setVisible( false );
         dispose();
     }
-    
-    
+
+
     /**
      * This is the default constructor
      */
@@ -75,11 +76,11 @@
      */
     private void initialize()
     {
-        this.setSize(300, 104);
+        this.setSize( 300, 104 );
         this.setContentPane( getJContentPane() );
     }
 
-    
+
     /**
      * This method initializes jContentPane
      * 
@@ -91,8 +92,8 @@
         {
             jContentPane = new JPanel();
             jContentPane.setLayout( new BorderLayout() );
-            jContentPane.add(getJPanel(), java.awt.BorderLayout.SOUTH);
-            jContentPane.add(getJProgressBar(), java.awt.BorderLayout.CENTER);
+            jContentPane.add( getJPanel(), java.awt.BorderLayout.SOUTH );
+            jContentPane.add( getJProgressBar(), java.awt.BorderLayout.CENTER );
         }
         return jContentPane;
     }
@@ -108,7 +109,7 @@
         if ( jPanel == null )
         {
             jPanel = new JPanel();
-            jPanel.add(getJButton(), null);
+            jPanel.add( getJButton(), null );
         }
         return jPanel;
     }
@@ -124,8 +125,8 @@
         if ( jButton == null )
         {
             jButton = new JButton();
-            jButton.setText("Bypass Delay");
-            jButton.setText("Bypass Delay");
+            jButton.setText( "Bypass Delay" );
+            jButton.setText( "Bypass Delay" );
             jButton.addActionListener( new java.awt.event.ActionListener()
             {
                 public void actionPerformed( java.awt.event.ActionEvent e )
@@ -152,4 +153,4 @@
         return jProgressBar;
     }
 
-}  //  @jve:decl-index=0:visual-constraint="10,10"
+} //  @jve:decl-index=0:visual-constraint="10,10"

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java Fri Feb 10 02:48:07 2006
@@ -37,6 +37,7 @@
 {
     private static final Logger log = LoggerFactory.getLogger( AbandonHandler.class );
 
+
     public void messageReceived( IoSession session, Object request )
     {
         AbandonRequest req = ( AbandonRequest ) request;
@@ -48,29 +49,30 @@
         }
 
         Request abandonedRequest = SessionRegistry.getSingleton().getOutstandingRequest( session, abandonedId );
-        
+
         if ( abandonedRequest == null )
         {
             if ( log.isWarnEnabled() )
             {
-                log.warn( "Got abandon request from client " + session + " but request must have already " +
-                        "terminated.  Abandon request "+req+" had no effect." );
+                log.warn( "Got abandon request from client " + session + " but request must have already "
+                    + "terminated.  Abandon request " + req + " had no effect." );
             }
             return;
         }
-        
+
         if ( abandonedRequest instanceof AbandonableRequest )
         {
-            log.warn( "Abandon, Bind, Unbind, and StartTLS operations cannot be abandoned.  Abandon request will be ignored." );
+            log
+                .warn( "Abandon, Bind, Unbind, and StartTLS operations cannot be abandoned.  Abandon request will be ignored." );
         }
-        
+
         ( ( AbandonableRequest ) abandonedRequest ).abandon();
         if ( SessionRegistry.getSingleton().removeOutstandingRequest( session, abandonedId ) == null )
         {
             if ( log.isWarnEnabled() )
             {
-                log.warn( "Got abandon request from client " + session + " but request must have already " +
-                        "terminated." );
+                log.warn( "Got abandon request from client " + session + " but request must have already "
+                    + "terminated." );
             }
         }
         else

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java Fri Feb 10 02:48:07 2006
@@ -49,12 +49,12 @@
     private static final Logger log = LoggerFactory.getLogger( AddHandler.class );
     private static Control[] EMPTY_CONTROLS = new Control[0];
 
-    
+
     public void messageReceived( IoSession session, Object request )
     {
         AddRequest req = ( AddRequest ) request;
         LdapResult result = req.getResultResponse().getLdapResult();
-        
+
         if ( log.isDebugEnabled() )
         {
             log.debug( "Received a Add message : " + req.toString() );
@@ -74,7 +74,7 @@
             ctx.setRequestControls( ( Control[] ) req.getControls().values().toArray( EMPTY_CONTROLS ) );
             ctx.createSubcontext( req.getEntry(), req.getAttributes() );
         }
-        catch( ReferralException e )
+        catch ( ReferralException e )
         {
             ReferralImpl refs = new ReferralImpl();
             result.setReferral( refs );
@@ -86,11 +86,11 @@
             {
                 refs.addLdapUrl( ( String ) e.getReferralInfo() );
             }
-            while( e.skipReferral() );
+            while ( e.skipReferral() );
             session.write( req.getResultResponse() );
             return;
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             String msg = "failed to add entry " + req.getEntry();
 
@@ -112,12 +112,10 @@
 
             result.setResultCode( code );
             result.setErrorMessage( msg );
-            
-            if ( ( e.getResolvedName() != null ) &&
-                    ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                      ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                      ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                      ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+
+            if ( ( e.getResolvedName() != null )
+                && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                    || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
             {
                 result.setMatchedDn( e.getResolvedName().toString() );
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java Fri Feb 10 02:48:07 2006
@@ -61,7 +61,7 @@
         Hashtable env = SessionRegistry.getSingleton().getEnvironment();
 
         // if the bind request is not simple then we freak: no strong auth yet
-        if ( ! req.isSimple() )
+        if ( !req.isSimple() )
         {
             result.setResultCode( ResultCodeEnum.AUTHMETHODNOTSUPPORTED );
             result.setErrorMessage( "Only simple binds currently supported" );
@@ -109,10 +109,10 @@
                 ctx = new InitialLdapContext( cloned, connCtls );
             }
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             ResultCodeEnum code;
-            
+
             if ( e instanceof LdapException )
             {
                 code = ( ( LdapException ) e ).getResultCode();
@@ -131,15 +131,13 @@
                 msg += "\n\nBindRequest = \n" + req.toString();
             }
 
-            if ( ( e.getResolvedName() != null ) &&
-                    ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                      ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                      ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                      ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+            if ( ( e.getResolvedName() != null )
+                && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                    || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
             {
                 result.setMatchedDn( e.getResolvedName().toString() );
             }
-            
+
             result.setErrorMessage( msg );
             session.write( req.getResultResponse() );
             return;

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java Fri Feb 10 02:48:07 2006
@@ -51,7 +51,7 @@
     private static final Logger log = LoggerFactory.getLogger( CompareHandler.class );
     private static Control[] EMPTY_CONTROLS = new Control[0];
 
-    
+
     public void messageReceived( IoSession session, Object request )
     {
         CompareRequest req = ( CompareRequest ) request;
@@ -81,7 +81,7 @@
                 result.setResultCode( ResultCodeEnum.COMPAREFALSE );
             }
         }
-        catch( ReferralException e )
+        catch ( ReferralException e )
         {
             ReferralImpl refs = new ReferralImpl();
             result.setReferral( refs );
@@ -93,7 +93,7 @@
             {
                 refs.addLdapUrl( ( String ) e.getReferralInfo() );
             }
-            while( e.skipReferral() );
+            while ( e.skipReferral() );
             session.write( req.getResultResponse() );
             return;
         }
@@ -107,10 +107,10 @@
             }
 
             ResultCodeEnum code;
-            
+
             if ( e instanceof LdapException )
             {
-                code = ( ( LdapException ) e ).getResultCode() ;
+                code = ( ( LdapException ) e ).getResultCode();
             }
             else
             {
@@ -122,13 +122,11 @@
 
             if ( e instanceof NamingException )
             {
-            	NamingException ne = (NamingException)e;
-            	
-                if ( ( ne.getResolvedName() != null ) &&
-                        ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                          ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                          ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                          ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+                NamingException ne = ( NamingException ) e;
+
+                if ( ( ne.getResolvedName() != null )
+                    && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                        || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
                 {
                     result.setMatchedDn( ne.getResolvedName().toString() );
                 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java Fri Feb 10 02:48:07 2006
@@ -49,11 +49,11 @@
     private static final Logger log = LoggerFactory.getLogger( DeleteHandler.class );
     private static Control[] EMPTY_CONTROLS = new Control[0];
 
-    
+
     public void messageReceived( IoSession session, Object request )
     {
         DeleteRequest req = ( DeleteRequest ) request;
-        LdapResult result = req.getResultResponse().getLdapResult(); 
+        LdapResult result = req.getResultResponse().getLdapResult();
 
         try
         {
@@ -69,7 +69,7 @@
             ctx.setRequestControls( ( Control[] ) req.getControls().values().toArray( EMPTY_CONTROLS ) );
             ctx.destroySubcontext( req.getName() );
         }
-        catch( ReferralException e )
+        catch ( ReferralException e )
         {
             ReferralImpl refs = new ReferralImpl();
             result.setReferral( refs );
@@ -81,11 +81,11 @@
             {
                 refs.addLdapUrl( ( String ) e.getReferralInfo() );
             }
-            while( e.skipReferral() );
+            while ( e.skipReferral() );
             session.write( req.getResultResponse() );
             return;
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             String msg = "failed to delete entry " + req.getName();
 
@@ -95,7 +95,7 @@
             }
 
             ResultCodeEnum code;
-            if( e instanceof LdapException )
+            if ( e instanceof LdapException )
             {
                 code = ( ( LdapException ) e ).getResultCode();
             }
@@ -106,11 +106,9 @@
 
             result.setResultCode( code );
             result.setErrorMessage( msg );
-            if ( ( e.getResolvedName() != null ) &&
-                    ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                      ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                      ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                      ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+            if ( ( e.getResolvedName() != null )
+                && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                    || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
             {
                 result.setMatchedDn( e.getResolvedName().toString() );
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java Fri Feb 10 02:48:07 2006
@@ -15,7 +15,7 @@
  *
  */
 package org.apache.directory.server.ldap.support;
- 
+
 
 import java.util.Collections;
 import java.util.HashMap;
@@ -42,48 +42,48 @@
 {
     private Map handlers = new HashMap();
 
-    
+
     public ExtendedOperationHandler addHandler( ExtendedOperationHandler eoh )
     {
-        synchronized( handlers )
+        synchronized ( handlers )
         {
             return ( ExtendedOperationHandler ) handlers.put( eoh.getOid(), eoh );
         }
     }
-    
-    
+
+
     public ExtendedOperationHandler removeHandler( String oid )
     {
-        synchronized( handlers )
+        synchronized ( handlers )
         {
             return ( ExtendedOperationHandler ) handlers.remove( oid );
         }
     }
-    
-    
+
+
     public ExtendedOperationHandler getHandler( String oid )
     {
         return ( ExtendedOperationHandler ) handlers.get( oid );
     }
-    
-    
+
+
     public Map getHandlerMap()
     {
         return Collections.unmodifiableMap( handlers );
     }
-    
-    
+
+
     public void messageReceived( IoSession session, Object request )
     {
         ExtendedRequest req = ( ExtendedRequest ) request;
         ExtendedOperationHandler handler = ( ExtendedOperationHandler ) handlers.get( req.getOid() );
 
-        if( handler == null )
+        if ( handler == null )
         {
             // As long as no extended operations are implemented, send appropriate
             // error back to the client.
             String msg = "Unrecognized extended operation EXTENSION_OID: " + req.getOid();
-            LdapResult result = req.getResultResponse().getLdapResult();        
+            LdapResult result = req.getResultResponse().getLdapResult();
             result.setResultCode( ResultCodeEnum.PROTOCOLERROR );
             result.setErrorMessage( msg );
             session.write( req.getResultResponse() );
@@ -94,15 +94,13 @@
             {
                 handler.handleExtendedOperation( session, SessionRegistry.getSingleton(), req );
             }
-            catch( Exception e )
+            catch ( Exception e )
             {
                 LdapResult result = req.getResultResponse().getLdapResult();
                 result.setResultCode( ResultCodeEnum.UNAVAILABLE );
-                result.setErrorMessage(
-                        "Extended operation handler for the specified EXTENSION_OID (" +
-                        req.getOid() + ") has failed to process your request:\n" +
-                        ExceptionUtils.getStackTrace( e ) );
-                ( ( ExtendedResponse ) req.getResultResponse() ).setResponse( new byte[ 0 ] );
+                result.setErrorMessage( "Extended operation handler for the specified EXTENSION_OID (" + req.getOid()
+                    + ") has failed to process your request:\n" + ExceptionUtils.getStackTrace( e ) );
+                ( ( ExtendedResponse ) req.getResultResponse() ).setResponse( new byte[0] );
                 session.write( req.getResultResponse() );
             }
         }

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java Fri Feb 10 02:48:07 2006
@@ -59,10 +59,10 @@
 
         if ( LOG.isDebugEnabled() )
         {
-        	LOG.debug( "req.getName() == [" + req.getName() +"]" );
+            LOG.debug( "req.getName() == [" + req.getName() + "]" );
         }
-        
-        if (req.getName() == null || req.getName().length() == 0)
+
+        if ( req.getName() == null || req.getName().length() == 0 )
         {
             // it is not allowed to modify the name of the Root DSE
             String msg = "Modify DN is not allowed on Root DSE.";
@@ -87,22 +87,22 @@
                 String deleteRDN = String.valueOf( req.getDeleteOldRdn() );
                 ctx.addToEnvironment( "java.naming.ldap.deleteRDN", deleteRDN );
 
-                if (req.isMove())
+                if ( req.isMove() )
                 {
                     LdapName oldDn = new LdapName( req.getName() );
                     LdapName newDn = null;
-                    
+
                     String newSuperior = req.getNewSuperior();
                     if ( StringTools.isEmpty( newSuperior ) )
                     {
-                    	newDn = (LdapName)oldDn.getPrefix( 1 );
+                        newDn = ( LdapName ) oldDn.getPrefix( 1 );
                     }
                     else
                     {
-                    	newDn = new LdapName( req.getNewSuperior() );
+                        newDn = new LdapName( req.getNewSuperior() );
                     }
-                    
-                    if (req.getNewRdn() != null)
+
+                    if ( req.getNewRdn() != null )
                     {
                         newDn.add( req.getNewRdn() );
                     }
@@ -121,7 +121,7 @@
                     ctx.rename( new LdapName( req.getName() ), newDn );
                 }
             }
-            catch( ReferralException e )
+            catch ( ReferralException e )
             {
                 ReferralImpl refs = new ReferralImpl();
                 result.setReferral( refs );
@@ -133,22 +133,22 @@
                 {
                     refs.addLdapUrl( ( String ) e.getReferralInfo() );
                 }
-                while( e.skipReferral() );
+                while ( e.skipReferral() );
                 session.write( req.getResultResponse() );
                 return;
             }
             catch ( NamingException e )
             {
                 String msg = "failed to modify DN of entry " + req.getName();
-                if (LOG.isDebugEnabled())
+                if ( LOG.isDebugEnabled() )
                 {
                     msg += ":\n" + ExceptionUtils.getStackTrace( e );
                 }
 
                 ResultCodeEnum code;
-                if (e instanceof LdapException)
+                if ( e instanceof LdapException )
                 {
-                    code = ((LdapException) e).getResultCode();
+                    code = ( ( LdapException ) e ).getResultCode();
                 }
                 else
                 {
@@ -158,8 +158,8 @@
                 result.setResultCode( code );
                 result.setErrorMessage( msg );
                 if ( ( e.getResolvedName() != null )
-                        && ((code == ResultCodeEnum.NOSUCHOBJECT) || (code == ResultCodeEnum.ALIASPROBLEM)
-                                || (code == ResultCodeEnum.INVALIDDNSYNTAX) || (code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM)))
+                    && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                        || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
                 {
                     result.setMatchedDn( e.getResolvedName().toString() );
                 }



Mime
View raw message