directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [04/10] directory-fortress-commander git commit: o Removed the warning caused by the missing serialVersionUID (FC-24)
Date Tue, 25 Nov 2014 19:56:30 GMT
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/39c304ec/src/main/java/org/apache/directory/fortress/web/panel/PermDetailPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/PermDetailPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/PermDetailPanel.java
index 0344dda..bc77532 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/PermDetailPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/PermDetailPanel.java
@@ -20,6 +20,7 @@
 
 package org.apache.directory.fortress.web.panel;
 
+
 import com.googlecode.wicket.kendo.ui.form.button.AjaxButton;
 import com.googlecode.wicket.kendo.ui.form.combobox.ComboBox;
 import org.apache.log4j.Logger;
@@ -54,6 +55,7 @@ import org.apache.directory.fortress.core.util.attr.VUtil;
 import java.util.ArrayList;
 import java.util.List;
 
+
 /**
  * Created with IntelliJ IDEA.
  * User: kpmckinn
@@ -63,10 +65,12 @@ import java.util.List;
  */
 public class PermDetailPanel extends FormComponentPanel
 {
+    /** Default serialVersionUID */
+    private static final long serialVersionUID = 1L;
     @SpringBean
     private AdminMgr adminMgr;
     private static final String ROLES_SELECTION = "rolesSelection";
-    private static final Logger log = Logger.getLogger(PermDetailPanel.class.getName());
+    private static final Logger log = Logger.getLogger( PermDetailPanel.class.getName() );
     private Form editForm;
     private Displayable display;
     private boolean isAdmin;
@@ -74,23 +78,28 @@ public class PermDetailPanel extends FormComponentPanel
     @SpringBean
     private DelAdminMgr delAdminMgr;
 
+
     public Form getForm()
     {
         return this.editForm;
     }
 
-    public PermDetailPanel(String id, Displayable display, final boolean isAdmin)
+
+    public PermDetailPanel( String id, Displayable display, final boolean isAdmin )
     {
-        super(id);
+        super( id );
         this.isAdmin = isAdmin;
         this.adminMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
-        this.editForm = new PermDetailForm(GlobalIds.EDIT_FIELDS, new CompoundPropertyModel<Permission>(new Permission()));
+        this.editForm = new PermDetailForm( GlobalIds.EDIT_FIELDS, new CompoundPropertyModel<Permission>(
+            new Permission() ) );
         this.display = display;
-        add(editForm);
+        add( editForm );
     }
 
     public class PermDetailForm extends Form
     {
+        /** Default serialVersionUID */
+        private static final long serialVersionUID = 1L;
         private ComboBox<String> rolesCB;
         private Component component;
         private String rolesSelection;
@@ -99,49 +108,61 @@ public class PermDetailPanel extends FormComponentPanel
         private TextField objectTF;
 
 
-        public PermDetailForm(String id, final IModel<Permission> model)
+        public PermDetailForm( String id, final IModel<Permission> model )
         {
-            super(id, model);
+            super( id, model );
             add( new SecureIndicatingAjaxButton( GlobalIds.ADD, GlobalIds.ADMIN_MGR, "addPermission" )
             {
+                /** Default serialVersionUID */
+                private static final long serialVersionUID = 1L;
+
+
                 @Override
-                protected void onSubmit(AjaxRequestTarget target, Form form)
+                protected void onSubmit( AjaxRequestTarget target, Form form )
                 {
-                    log.debug(".onSubmit Add");
-                    Permission perm = (Permission)form.getModel().getObject();
+                    log.debug( ".onSubmit Add" );
+                    Permission perm = ( Permission ) form.getModel().getObject();
                     perm.setAdmin( isAdmin );
-                    updateEntityWithComboData(perm);
+                    updateEntityWithComboData( perm );
                     try
                     {
-                        adminMgr.addPermission(perm);
+                        adminMgr.addPermission( perm );
                         roles.add( rolesSelection );
                         rolesSelection = "";
                         component = editForm;
-                        SaveModelEvent.send(getPage(), this, perm, target, SaveModelEvent.Operations.ADD);
-                        String msg = "Perm objName: " + perm.getObjName() + " opName: " + perm.getOpName() + " has been added";
-                        display.setMessage(msg);
+                        SaveModelEvent.send( getPage(), this, perm, target, SaveModelEvent.Operations.ADD );
+                        String msg = "Perm objName: " + perm.getObjName() + " opName: " + perm.getOpName()
+                            + " has been added";
+                        display.setMessage( msg );
                     }
-                    catch (org.apache.directory.fortress.core.SecurityException se)
+                    catch ( org.apache.directory.fortress.core.SecurityException se )
                     {
                         String error = ".onSubmit caught SecurityException=" + se;
-                        log.error(error);
-                        display.setMessage(error);
+                        log.error( error );
+                        display.setMessage( error );
                         display.display();
                     }
                 }
 
+
                 @Override
-                public void onError(AjaxRequestTarget target, Form form)
+                public void onError( AjaxRequestTarget target, Form form )
                 {
-                    log.info("PermDetailPanel.add.onError caught");
+                    log.info( "PermDetailPanel.add.onError caught" );
                     target.add();
                 }
+
+
                 @Override
                 protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
                 {
                     super.updateAjaxAttributes( attributes );
                     AjaxCallListener ajaxCallListener = new AjaxCallListener()
                     {
+                        /** Default serialVersionUID */
+                        private static final long serialVersionUID = 1L;
+
+
                         @Override
                         public CharSequence getFailureHandler( Component component )
                         {
@@ -150,60 +171,72 @@ public class PermDetailPanel extends FormComponentPanel
                     };
                     attributes.getAjaxCallListeners().add( ajaxCallListener );
                 }
-            });
+            } );
             add( new SecureIndicatingAjaxButton( GlobalIds.COMMIT, GlobalIds.ADMIN_MGR, "updatePermission" )
             {
+                /** Default serialVersionUID */
+                private static final long serialVersionUID = 1L;
+
+
                 @Override
-                protected void onSubmit(AjaxRequestTarget target, Form form)
+                protected void onSubmit( AjaxRequestTarget target, Form form )
                 {
-                    log.debug(".onSubmit Commit");
-                    Permission perm = (Permission)form.getModel().getObject();
+                    log.debug( ".onSubmit Commit" );
+                    Permission perm = ( Permission ) form.getModel().getObject();
                     perm.setAdmin( isAdmin );
-                    updateEntityWithComboData(perm);
+                    updateEntityWithComboData( perm );
                     try
                     {
-                        if(isAdmin )
+                        if ( isAdmin )
                         {
-                            if(VUtil.isNotNullOrEmpty( rolesSelection ) )
+                            if ( VUtil.isNotNullOrEmpty( rolesSelection ) )
                             {
-                                delAdminMgr.grantPermission( perm, new AdminRole(rolesSelection) );
+                                delAdminMgr.grantPermission( perm, new AdminRole( rolesSelection ) );
                             }
                             else
                             {
-                                delAdminMgr.updatePermission(perm);
+                                delAdminMgr.updatePermission( perm );
                             }
                         }
                         else
                         {
-                            adminMgr.updatePermission(perm);
+                            adminMgr.updatePermission( perm );
                         }
                         roles.add( rolesSelection );
-                        String msg = "Perm objName: " + perm.getObjName() + " opName: " + perm.getOpName() + " has been updated";
-                        SaveModelEvent.send(getPage(), this, perm, target, SaveModelEvent.Operations.UPDATE);
+                        String msg = "Perm objName: " + perm.getObjName() + " opName: " + perm.getOpName()
+                            + " has been updated";
+                        SaveModelEvent.send( getPage(), this, perm, target, SaveModelEvent.Operations.UPDATE );
                         rolesSelection = "";
                         component = editForm;
-                        display.setMessage(msg);
+                        display.setMessage( msg );
                     }
-                    catch (org.apache.directory.fortress.core.SecurityException se)
+                    catch ( org.apache.directory.fortress.core.SecurityException se )
                     {
                         String error = ".onSubmit caught SecurityException=" + se;
-                        log.error(error);
-                        display.setMessage(error);
+                        log.error( error );
+                        display.setMessage( error );
                         display.display();
                     }
                 }
 
+
                 @Override
-                public void onError(AjaxRequestTarget target, Form form)
+                public void onError( AjaxRequestTarget target, Form form )
                 {
-                    log.warn("PermDetailPanel.commit.onError");
+                    log.warn( "PermDetailPanel.commit.onError" );
                 }
+
+
                 @Override
                 protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
                 {
                     super.updateAjaxAttributes( attributes );
                     AjaxCallListener ajaxCallListener = new AjaxCallListener()
                     {
+                        /** Default serialVersionUID */
+                        private static final long serialVersionUID = 1L;
+
+
                         @Override
                         public CharSequence getFailureHandler( Component component )
                         {
@@ -212,49 +245,62 @@ public class PermDetailPanel extends FormComponentPanel
                     };
                     attributes.getAjaxCallListeners().add( ajaxCallListener );
                 }
-            });
+            } );
             add( new SecureIndicatingAjaxButton( GlobalIds.DELETE, GlobalIds.ADMIN_MGR, "deletePermission" )
             {
+                /** Default serialVersionUID */
+                private static final long serialVersionUID = 1L;
+
+
                 @Override
-                protected void onSubmit(AjaxRequestTarget target, Form form)
+                protected void onSubmit( AjaxRequestTarget target, Form form )
                 {
-                    log.debug(".onSubmit Delete");
-                    Permission perm = (Permission)form.getModel().getObject();
+                    log.debug( ".onSubmit Delete" );
+                    Permission perm = ( Permission ) form.getModel().getObject();
                     perm.setAdmin( isAdmin );
                     try
                     {
-                        adminMgr.deletePermission(perm);
+                        adminMgr.deletePermission( perm );
                         form.setModelObject( new Permission() );
                         rolesSelection = "";
                         roles = new ArrayList<String>();
-                        rolesCB = new ComboBox<String>( "roles", new PropertyModel<String>( editForm, ROLES_SELECTION ),roles );
-                        editForm.addOrReplace(rolesCB);
+                        rolesCB = new ComboBox<String>( "roles",
+                            new PropertyModel<String>( editForm, ROLES_SELECTION ), roles );
+                        editForm.addOrReplace( rolesCB );
                         modelChanged();
-                        String msg = "Perm objName: " + perm.getObjName() + " opName: " + perm.getOpName() + " has been deleted";
-                        SaveModelEvent.send(getPage(), this, perm, target, SaveModelEvent.Operations.DELETE);
+                        String msg = "Perm objName: " + perm.getObjName() + " opName: " + perm.getOpName()
+                            + " has been deleted";
+                        SaveModelEvent.send( getPage(), this, perm, target, SaveModelEvent.Operations.DELETE );
                         component = editForm;
-                        display.setMessage(msg);
+                        display.setMessage( msg );
                     }
-                    catch (org.apache.directory.fortress.core.SecurityException se)
+                    catch ( org.apache.directory.fortress.core.SecurityException se )
                     {
                         String error = ".onSubmit caught SecurityException=" + se;
-                        log.error(error);
-                        display.setMessage(error);
+                        log.error( error );
+                        display.setMessage( error );
                         display.display();
                     }
                 }
 
+
                 @Override
-                public void onError(AjaxRequestTarget target, Form form)
+                public void onError( AjaxRequestTarget target, Form form )
                 {
-                    log.warn("ControlPanel.delete.onError");
+                    log.warn( "ControlPanel.delete.onError" );
                 }
+
+
                 @Override
                 protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
                 {
                     super.updateAjaxAttributes( attributes );
                     AjaxCallListener ajaxCallListener = new AjaxCallListener()
                     {
+                        /** Default serialVersionUID */
+                        private static final long serialVersionUID = 1L;
+
+
                         @Override
                         public CharSequence getFailureHandler( Component component )
                         {
@@ -263,34 +309,46 @@ public class PermDetailPanel extends FormComponentPanel
                     };
                     attributes.getAjaxCallListeners().add( ajaxCallListener );
                 }
-            });
-            add(new AjaxSubmitLink(GlobalIds.CANCEL)
+            } );
+            add( new AjaxSubmitLink( GlobalIds.CANCEL )
             {
+                /** Default serialVersionUID */
+                private static final long serialVersionUID = 1L;
+
+
                 @Override
-                protected void onSubmit(AjaxRequestTarget target, Form form)
+                protected void onSubmit( AjaxRequestTarget target, Form form )
                 {
-                    setModelObject(new Permission());
+                    setModelObject( new Permission() );
                     modelChanged();
                     rolesSelection = "";
                     roles = new ArrayList<String>();
-                    rolesCB = new ComboBox<String>( "roles", new PropertyModel<String>( editForm, ROLES_SELECTION ),roles );
-                    editForm.addOrReplace(rolesCB);
+                    rolesCB = new ComboBox<String>( "roles", new PropertyModel<String>( editForm, ROLES_SELECTION ),
+                        roles );
+                    editForm.addOrReplace( rolesCB );
                     String msg = "Perm cancelled input form";
                     component = editForm;
-                    display.setMessage(msg);
+                    display.setMessage( msg );
                 }
 
+
                 @Override
-                public void onError(AjaxRequestTarget target, Form form)
+                public void onError( AjaxRequestTarget target, Form form )
                 {
-                    log.warn("ControlPanel.cancel.onError");
+                    log.warn( "ControlPanel.cancel.onError" );
                 }
+
+
                 @Override
                 protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
                 {
                     super.updateAjaxAttributes( attributes );
                     AjaxCallListener ajaxCallListener = new AjaxCallListener()
                     {
+                        /** Default serialVersionUID */
+                        private static final long serialVersionUID = 1L;
+
+
                         @Override
                         public CharSequence getFailureHandler( Component component )
                         {
@@ -299,7 +357,7 @@ public class PermDetailPanel extends FormComponentPanel
                     };
                     attributes.getAjaxCallListeners().add( ajaxCallListener );
                 }
-            });
+            } );
 
             objectTF = new TextField( GlobalIds.OBJ_NAME );
             // making this required prevents the object modal from opening when field empty:
@@ -308,7 +366,7 @@ public class PermDetailPanel extends FormComponentPanel
             add( objectTF );
             addObjectSearchModal();
 
-            if(isAdmin)
+            if ( isAdmin )
             {
                 add( new Label( "permDetailLabel", "Administrative Permission Operation Detail" ) );
             }
@@ -317,21 +375,22 @@ public class PermDetailPanel extends FormComponentPanel
                 add( new Label( "permDetailLabel", "RBAC Permission Operation Detail" ) );
             }
 
-            TextField opName = new TextField(GlobalIds.OP_NAME);
-            add(opName);
-            opName.setRequired(false);
+            TextField opName = new TextField( GlobalIds.OP_NAME );
+            add( opName );
+            opName.setRequired( false );
             TextField objId = new TextField( GlobalIds.OBJECT_ID );
-            add(objId);
-            Label internalId = new Label("internalId");
-            add(internalId);
+            add( objId );
+            Label internalId = new Label( "internalId" );
+            add( internalId );
             rolesCB = new ComboBox<String>( "roles", new PropertyModel<String>( this, ROLES_SELECTION ), roles );
-            add(rolesCB);
-            setOutputMarkupId(true);
+            add( rolesCB );
+            setOutputMarkupId( true );
             addRoleSearchModal();
             add( new AjaxButton( "roles.delete" )
             {
                 private static final long serialVersionUID = 1L;
 
+
                 @Override
                 protected void onSubmit( AjaxRequestTarget target, Form<?> form )
                 {
@@ -343,7 +402,7 @@ public class PermDetailPanel extends FormComponentPanel
                         if ( perm.getRoles() != null )
                         {
                             perm.getRoles().remove( rolesSelection );
-                            roles.remove(  rolesSelection );
+                            roles.remove( rolesSelection );
                             rolesSelection = "";
                             component = editForm;
                             msg += ", was removed from local, commit to persist changes on server";
@@ -360,12 +419,18 @@ public class PermDetailPanel extends FormComponentPanel
                     display.setMessage( msg );
                     log.debug( msg );
                 }
+
+
                 @Override
                 protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
                 {
                     super.updateAjaxAttributes( attributes );
                     AjaxCallListener ajaxCallListener = new AjaxCallListener()
                     {
+                        /** Default serialVersionUID */
+                        private static final long serialVersionUID = 1L;
+
+
                         @Override
                         public CharSequence getFailureHandler( Component component )
                         {
@@ -377,14 +442,20 @@ public class PermDetailPanel extends FormComponentPanel
             } );
         }
 
+
         private void addObjectSearchModal()
         {
             final ModalWindow objectsModalWindow;
             add( objectsModalWindow = new ModalWindow( "objectsmodal" ) );
-            final ObjectSearchModalPanel objectSearchModalPanel = new ObjectSearchModalPanel( objectsModalWindow.getContentId(), objectsModalWindow, isAdmin );
+            final ObjectSearchModalPanel objectSearchModalPanel = new ObjectSearchModalPanel(
+                objectsModalWindow.getContentId(), objectsModalWindow, isAdmin );
             objectsModalWindow.setContent( objectSearchModalPanel );
             objectsModalWindow.setWindowClosedCallback( new ModalWindow.WindowClosedCallback()
             {
+                /** Default serialVersionUID */
+                private static final long serialVersionUID = 1L;
+
+
                 @Override
                 public void onClose( AjaxRequestTarget target )
                 {
@@ -402,6 +473,7 @@ public class PermDetailPanel extends FormComponentPanel
             {
                 private static final long serialVersionUID = 1L;
 
+
                 @Override
                 protected void onSubmit( AjaxRequestTarget target, Form<?> form )
                 {
@@ -415,12 +487,18 @@ public class PermDetailPanel extends FormComponentPanel
                     target.prependJavaScript( GlobalIds.WICKET_WINDOW_UNLOAD_CONFIRMATION_FALSE );
                     objectsModalWindow.show( target );
                 }
+
+
                 @Override
                 protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
                 {
                     super.updateAjaxAttributes( attributes );
                     AjaxCallListener ajaxCallListener = new AjaxCallListener()
                     {
+                        /** Default serialVersionUID */
+                        private static final long serialVersionUID = 1L;
+
+
                         @Override
                         public CharSequence getFailureHandler( Component component )
                         {
@@ -432,7 +510,7 @@ public class PermDetailPanel extends FormComponentPanel
             } );
 
             String modalLabel;
-            if(isAdmin)
+            if ( isAdmin )
             {
                 modalLabel = "Admin Permission Object Selection Modal";
             }
@@ -446,14 +524,20 @@ public class PermDetailPanel extends FormComponentPanel
             objectsModalWindow.setCookieName( "objects-modal" );
         }
 
+
         private void addRoleSearchModal()
         {
             final ModalWindow rolesModalWindow;
             add( rolesModalWindow = new ModalWindow( "permrolesmodal" ) );
-            final RoleSearchModalPanel roleSearchModalPanel = new RoleSearchModalPanel( rolesModalWindow.getContentId(), rolesModalWindow, isAdmin );
+            final RoleSearchModalPanel roleSearchModalPanel = new RoleSearchModalPanel(
+                rolesModalWindow.getContentId(), rolesModalWindow, isAdmin );
             rolesModalWindow.setContent( roleSearchModalPanel );
             rolesModalWindow.setWindowClosedCallback( new ModalWindow.WindowClosedCallback()
             {
+                /** Default serialVersionUID */
+                private static final long serialVersionUID = 1L;
+
+
                 @Override
                 public void onClose( AjaxRequestTarget target )
                 {
@@ -470,6 +554,7 @@ public class PermDetailPanel extends FormComponentPanel
             {
                 private static final long serialVersionUID = 1L;
 
+
                 @Override
                 protected void onSubmit( AjaxRequestTarget target, Form<?> form )
                 {
@@ -481,12 +566,18 @@ public class PermDetailPanel extends FormComponentPanel
                     target.prependJavaScript( GlobalIds.WICKET_WINDOW_UNLOAD_CONFIRMATION_FALSE );
                     rolesModalWindow.show( target );
                 }
+
+
                 @Override
                 protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
                 {
                     super.updateAjaxAttributes( attributes );
                     AjaxCallListener ajaxCallListener = new AjaxCallListener()
                     {
+                        /** Default serialVersionUID */
+                        private static final long serialVersionUID = 1L;
+
+
                         @Override
                         public CharSequence getFailureHandler( Component component )
                         {
@@ -498,7 +589,7 @@ public class PermDetailPanel extends FormComponentPanel
             } );
 
             String modalLabel;
-            if(isAdmin)
+            if ( isAdmin )
             {
                 modalLabel = "Admin Role Selection Modal";
             }
@@ -512,50 +603,53 @@ public class PermDetailPanel extends FormComponentPanel
             rolesModalWindow.setCookieName( "role-assign-modal" );
         }
 
-        private void updateEntityWithComboData(Permission perm)
+
+        private void updateEntityWithComboData( Permission perm )
         {
             String szValue = rolesCB.getModelObject();
-            if(VUtil.isNotNullOrEmpty(szValue))
+            if ( VUtil.isNotNullOrEmpty( szValue ) )
             {
-                perm.setRole(szValue);
+                perm.setRole( szValue );
             }
         }
 
+
         @Override
-        public void onEvent(final IEvent<?> event)
+        public void onEvent( final IEvent<?> event )
         {
-            if (event.getPayload() instanceof SelectModelEvent)
+            if ( event.getPayload() instanceof SelectModelEvent )
             {
-                SelectModelEvent modelEvent = (SelectModelEvent) event.getPayload();
-                Permission perm = (Permission) modelEvent.getEntity();
-                this.setModelObject(perm);
+                SelectModelEvent modelEvent = ( SelectModelEvent ) event.getPayload();
+                Permission perm = ( Permission ) modelEvent.getEntity();
+                this.setModelObject( perm );
                 rolesSelection = "";
-                if(VUtil.isNotNullOrEmpty(perm.getRoles()))
+                if ( VUtil.isNotNullOrEmpty( perm.getRoles() ) )
                 {
-                    roles = new ArrayList<String>(perm.getRoles());
-                    rolesCB = new ComboBox<String>( "roles", new PropertyModel<String>( this, ROLES_SELECTION ),roles );
+                    roles = new ArrayList<String>( perm.getRoles() );
+                    rolesCB = new ComboBox<String>( "roles", new PropertyModel<String>( this, ROLES_SELECTION ), roles );
                 }
                 else
                 {
                     roles = new ArrayList<String>();
-                    rolesCB = new ComboBox<String>( "roles", new PropertyModel<String>( this, ROLES_SELECTION ),roles );
+                    rolesCB = new ComboBox<String>( "roles", new PropertyModel<String>( this, ROLES_SELECTION ), roles );
                 }
-                editForm.addOrReplace(rolesCB);
-                String msg = "Perm objName: " + perm.getObjName() + " opName: " + perm.getOpName() + " has been selected";
-                log.debug(msg);
+                editForm.addOrReplace( rolesCB );
+                String msg = "Perm objName: " + perm.getObjName() + " opName: " + perm.getOpName()
+                    + " has been selected";
+                log.debug( msg );
                 component = editForm;
             }
-            else if (event.getPayload() instanceof AjaxRequestTarget)
+            else if ( event.getPayload() instanceof AjaxRequestTarget )
             {
-                if (component != null)
+                if ( component != null )
                 {
-                    AjaxRequestTarget target = ((AjaxRequestTarget) event.getPayload());
-                    log.debug(".onEvent AjaxRequestTarget: " + target.toString());
-                    target.add(component);
+                    AjaxRequestTarget target = ( ( AjaxRequestTarget ) event.getPayload() );
+                    log.debug( ".onEvent AjaxRequestTarget: " + target.toString() );
+                    target.add( component );
                     component = null;
                 }
 
-                display.display((AjaxRequestTarget) event.getPayload());
+                display.display( ( AjaxRequestTarget ) event.getPayload() );
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/39c304ec/src/main/java/org/apache/directory/fortress/web/panel/PermListPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/PermListPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/PermListPanel.java
index 4ec43e2..70f2724 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/PermListPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/PermListPanel.java
@@ -20,6 +20,7 @@
 
 package org.apache.directory.fortress.web.panel;
 
+
 import com.inmethod.grid.IGridColumn;
 import com.inmethod.grid.SizeUnit;
 import com.inmethod.grid.column.PropertyColumn;
@@ -57,6 +58,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
+
 /**
  *
  * @author Shawn McKinney
@@ -64,8 +66,10 @@ import java.util.List;
  */
 public class PermListPanel extends FormComponentPanel
 {
-    private static final Logger log = Logger.getLogger(PermListPanel.class.getName());
-    private Form listForm;
+    /** Default serialVersionUID */
+    private static final long serialVersionUID = 1L;
+    private static final Logger log = Logger.getLogger( PermListPanel.class.getName() );
+    private Form<?> listForm;
     private DefaultTreeModel treeModel;
     private DefaultMutableTreeNode node;
     private TreeGrid<DefaultTreeModel, DefaultMutableTreeNode, String> grid;
@@ -75,22 +79,25 @@ public class PermListPanel extends FormComponentPanel
     private TextField permObjectFld;
     private boolean isAdmin;
 
-    public PermListPanel(String id, final boolean isAdmin)
+
+    public PermListPanel( String id, final boolean isAdmin )
     {
-        super(id);
+        super( id );
+
         this.isAdmin = isAdmin;
-        PermListModel permListModel = new PermListModel(new Permission("", ""), isAdmin, GlobalUtils.getRbacSession(
-                    this ));
-        setDefaultModel(permListModel);
+        PermListModel permListModel = new PermListModel( new Permission( "", "" ),
+            isAdmin, GlobalUtils.getRbacSession( this ) );
+        setDefaultModel( permListModel );
         List<IGridColumn<DefaultTreeModel, DefaultMutableTreeNode, String>> columns =
             new ArrayList<IGridColumn<DefaultTreeModel, DefaultMutableTreeNode, String>>();
-        PropertyColumn objName = new PropertyColumn(new Model("Object Name"), "userObject.ObjName");
+        PropertyColumn objName = new PropertyColumn( new Model( "Object Name" ), "userObject.ObjName" );
         objName.setInitialSize( 250 );
-        columns.add(objName);
-        columns.add(new PropertyColumn(new Model("Object Id"), "userObject.ObjId"));
-        columns.add(new PropertyColumn(new Model("Operation Name"), "userObject.OpName"));
+        columns.add( objName );
+        columns.add( new PropertyColumn( new Model( "Object Id" ), "userObject.ObjId" ) );
+        columns.add( new PropertyColumn( new Model( "Operation Name" ), "userObject.OpName" ) );
         String roleAssignLabel;
-        if(isAdmin)
+
+        if ( isAdmin )
         {
             roleAssignLabel = "Admin Role Assignments";
         }
@@ -99,133 +106,179 @@ public class PermListPanel extends FormComponentPanel
             roleAssignLabel = "RBAC Role Assignments";
         }
 
-        PropertyColumn roles = new PropertyColumn(new Model(roleAssignLabel), "userObject.Roles");
-        roles.setInitialSize(500);
-        columns.add(roles);
-        PropertyColumn abstractPermName = new PropertyColumn(new Model("Abstract Perm Name"), "userObject.AbstractName");
+        PropertyColumn roles = new PropertyColumn( new Model( roleAssignLabel ), "userObject.Roles" );
+        roles.setInitialSize( 500 );
+        columns.add( roles );
+        PropertyColumn abstractPermName = new PropertyColumn( new Model( "Abstract Perm Name" ),
+            "userObject.AbstractName" );
         abstractPermName.setInitialSize( 300 );
-        columns.add(abstractPermName);
+        columns.add( abstractPermName );
 
-        List<Permission> perms = (List<Permission>) getDefaultModel().getObject();
-        treeModel = createTreeModel(perms);
-        grid = new TreeGrid<DefaultTreeModel, DefaultMutableTreeNode, String>("permtreegrid", treeModel, columns)
+        List<Permission> perms = ( List<Permission> ) getDefaultModel().getObject();
+        treeModel = createTreeModel( perms );
+
+        grid = new TreeGrid<DefaultTreeModel, DefaultMutableTreeNode, String>( "permtreegrid", treeModel, columns )
         {
+            /** Default serialVersionUID */
+            private static final long serialVersionUID = 1L;
+
+
             @Override
-            public void selectItem(IModel itemModel, boolean selected)
+            public void selectItem( IModel itemModel, boolean selected )
             {
-                node = (DefaultMutableTreeNode) itemModel.getObject();
-                if(!node.isRoot())
+                node = ( DefaultMutableTreeNode ) itemModel.getObject();
+
+                if ( !node.isRoot() )
                 {
-                    Permission perm = (Permission) node.getUserObject();
-                    log.debug("TreeGrid.addGrid.selectItem selected perm objNm: " + perm.getObjName() + " opNm: " + perm.getOpName());
-                    if (super.isItemSelected(itemModel))
+                    Permission perm = ( Permission ) node.getUserObject();
+                    log.debug( "TreeGrid.addGrid.selectItem selected perm objNm: " + perm.getObjName() + " opNm: "
+                        + perm.getOpName() );
+
+                    if ( super.isItemSelected( itemModel ) )
                     {
-                        log.debug("TreeGrid.addGrid.selectItem item is selected");
-                        super.selectItem(itemModel, false);
+                        log.debug( "TreeGrid.addGrid.selectItem item is selected" );
+                        super.selectItem( itemModel, false );
                     }
                     else
                     {
-                        super.selectItem(itemModel, true);
-                        SelectModelEvent.send(getPage(), this, perm);
+                        super.selectItem( itemModel, true );
+                        SelectModelEvent.send( getPage(), this, perm );
                     }
                 }
             }
         };
-        grid.setContentHeight(50, SizeUnit.EM);
-        grid.setAllowSelectMultiple(false);
-        grid.setClickRowToSelect(true);
-        grid.setClickRowToDeselect(false);
-        grid.setSelectToEdit(false);
+
+        grid.setContentHeight( 50, SizeUnit.EM );
+        grid.setAllowSelectMultiple( false );
+        grid.setClickRowToSelect( true );
+        grid.setClickRowToDeselect( false );
+        grid.setSelectToEdit( false );
         // expand the root node
-        grid.getTreeState().expandNode((TreeNode) treeModel.getRoot());
-        this.listForm = new Form("form");
-        this.listForm.add(grid);
-        grid.setOutputMarkupId(true);
-        add(this.listForm);
-        permObjectFld = new TextField("permObject", new PropertyModel<String>(this, "permObject"));
+        grid.getTreeState().expandNode( ( TreeNode ) treeModel.getRoot() );
+        listForm = new Form( "form" );
+        listForm.add( grid );
+        grid.setOutputMarkupId( true );
+        add( listForm );
+        permObjectFld = new TextField( "permObject", new PropertyModel<String>( this, "permObject" ) );
         permObjectFld.setOutputMarkupId( true );
-        AjaxFormComponentUpdatingBehavior ajaxUpdater = new AjaxFormComponentUpdatingBehavior(GlobalIds.ONBLUR)
+
+        AjaxFormComponentUpdatingBehavior ajaxUpdater = new AjaxFormComponentUpdatingBehavior( GlobalIds.ONBLUR )
         {
-          @Override
-          protected void onUpdate(final AjaxRequestTarget target)
-          {
-              target.add( permObjectFld );
-          }
+            /** Default serialVersionUID */
+            private static final long serialVersionUID = 1L;
+
+
+            @Override
+            protected void onUpdate( final AjaxRequestTarget target )
+            {
+                target.add( permObjectFld );
+            }
         };
+
         permObjectFld.add( ajaxUpdater );
-        this.listForm.add(permObjectFld);
-        TextField permOperationFld = new TextField("permOperation", new PropertyModel<String>(this, "permOperation"));
-        this.listForm.add(permOperationFld);
+        this.listForm.add( permObjectFld );
+        TextField permOperationFld = new TextField( "permOperation", new PropertyModel<String>( this, "permOperation" ) );
+        this.listForm.add( permOperationFld );
         addObjectSearchModal();
 
-        this.listForm.add( new SecureIndicatingAjaxButton( GlobalIds.SEARCH, GlobalIds.REVIEW_MGR, GlobalIds.FIND_PERMISSIONS )
+        this.listForm.add( new SecureIndicatingAjaxButton( GlobalIds.SEARCH, GlobalIds.REVIEW_MGR,
+            GlobalIds.FIND_PERMISSIONS )
         {
+            /** Default serialVersionUID */
+            private static final long serialVersionUID = 1L;
+
+
             @Override
-            protected void onSubmit( AjaxRequestTarget target, Form form )
+            protected void onSubmit( AjaxRequestTarget target, Form<?> form )
             {
                 log.debug( ".search onSubmit" );
                 info( "Searching Perms..." );
+
                 if ( !VUtil.isNotNullOrEmpty( permObject ) )
                 {
                     permObject = "";
                 }
+
                 if ( !VUtil.isNotNullOrEmpty( permOperation ) )
                 {
                     permOperation = "";
                 }
+
                 Permission srchPerm = new Permission( permObject, permOperation );
                 setDefaultModel( new PermListModel( srchPerm, isAdmin, GlobalUtils.getRbacSession( this ) ) );
                 treeModel.reload();
                 rootNode.removeAllChildren();
                 List<Permission> perms = ( List<Permission> ) getDefaultModelObject();
+
                 if ( VUtil.isNotNullOrEmpty( perms ) )
                 {
                     for ( Permission perm : perms )
+                    {
                         rootNode.add( new DefaultMutableTreeNode( perm ) );
+                    }
+
                     info( "Search returned " + perms.size() + " matching objects" );
                 }
                 else
                 {
                     info( "No matching objects found" );
                 }
+
                 target.add( grid );
             }
 
+
             @Override
-            public void onError( AjaxRequestTarget target, Form form )
+            public void onError( AjaxRequestTarget target, Form<?> form )
             {
                 log.warn( ".search.onError" );
                 target.add();
             }
+
+
             @Override
             protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
             {
                 super.updateAjaxAttributes( attributes );
+
                 AjaxCallListener ajaxCallListener = new AjaxCallListener()
                 {
+                    /** Default serialVersionUID */
+                    private static final long serialVersionUID = 1L;
+
+
                     @Override
                     public CharSequence getFailureHandler( Component component )
                     {
                         return GlobalIds.WINDOW_LOCATION_REPLACE_COMMANDER_HOME_HTML;
                     }
                 };
+
                 attributes.getAjaxCallListeners().add( ajaxCallListener );
             }
         } );
     }
 
+
     private void addObjectSearchModal()
     {
         final ModalWindow objectsModalWindow;
         listForm.add( objectsModalWindow = new ModalWindow( "objectsearchmodal" ) );
-        final ObjectSearchModalPanel objectSearchModalPanel = new ObjectSearchModalPanel( objectsModalWindow.getContentId(), objectsModalWindow, isAdmin );
+        final ObjectSearchModalPanel objectSearchModalPanel = new ObjectSearchModalPanel(
+            objectsModalWindow.getContentId(), objectsModalWindow, isAdmin );
         objectsModalWindow.setContent( objectSearchModalPanel );
+
         objectsModalWindow.setWindowClosedCallback( new ModalWindow.WindowClosedCallback()
         {
+            /** Default serialVersionUID */
+            private static final long serialVersionUID = 1L;
+
+
             @Override
             public void onClose( AjaxRequestTarget target )
             {
                 PermObj permObj = objectSearchModalPanel.getSelection();
+
                 if ( permObj != null )
                 {
                     permObject = permObj.getObjName();
@@ -236,6 +289,10 @@ public class PermListPanel extends FormComponentPanel
 
         listForm.add( new SecureIndicatingAjaxLink( "objectAssignLinkLbl", GlobalIds.REVIEW_MGR, "findPermObjs" )
         {
+            /** Default serialVersionUID */
+            private static final long serialVersionUID = 1L;
+
+
             public void onClick( AjaxRequestTarget target )
             {
                 String msg = "clicked on object search";
@@ -246,24 +303,33 @@ public class PermListPanel extends FormComponentPanel
                 target.prependJavaScript( GlobalIds.WICKET_WINDOW_UNLOAD_CONFIRMATION_FALSE );
                 objectsModalWindow.show( target );
             }
+
+
             @Override
             protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
             {
                 super.updateAjaxAttributes( attributes );
+
                 AjaxCallListener ajaxCallListener = new AjaxCallListener()
                 {
+                    /** Default serialVersionUID */
+                    private static final long serialVersionUID = 1L;
+
+
                     @Override
                     public CharSequence getFailureHandler( Component component )
                     {
                         return GlobalIds.WINDOW_LOCATION_REPLACE_COMMANDER_HOME_HTML;
                     }
                 };
+
                 attributes.getAjaxCallListeners().add( ajaxCallListener );
             }
         } );
 
         String modalLabel;
-        if(isAdmin)
+
+        if ( isAdmin )
         {
             modalLabel = "Admin Permission Object Search Modal";
         }
@@ -271,23 +337,27 @@ public class PermListPanel extends FormComponentPanel
         {
             modalLabel = "RBAC Permission Object Search Modal";
         }
+
         objectsModalWindow.setTitle( modalLabel );
         objectsModalWindow.setInitialWidth( 700 );
         objectsModalWindow.setInitialHeight( 450 );
         objectsModalWindow.setCookieName( "objects-modal" );
     }
 
+
     @Override
-    public void onEvent(IEvent event)
+    public void onEvent( IEvent event )
     {
-        if (event.getPayload() instanceof SaveModelEvent)
+        if ( event.getPayload() instanceof SaveModelEvent )
         {
-            SaveModelEvent modelEvent = (SaveModelEvent) event.getPayload();
-            switch(modelEvent.getOperation())
+            SaveModelEvent modelEvent = ( SaveModelEvent ) event.getPayload();
+
+            switch ( modelEvent.getOperation() )
             {
                 case ADD:
-                    add(modelEvent.getEntity());
+                    add( modelEvent.getEntity() );
                     break;
+
                 case UPDATE:
                     /*
                     grid.markItemDirty(itemThatHasChanged);
@@ -295,69 +365,90 @@ public class PermListPanel extends FormComponentPanel
                      */
                     modelChanged();
                     break;
+
                 case DELETE:
                     prune();
                     break;
+
                 case SEARCH:
-                    setDefaultModel(new PermListModel((Permission) modelEvent.getEntity(), isAdmin, GlobalUtils.getRbacSession( this )));
+                    setDefaultModel( new PermListModel( ( Permission ) modelEvent.getEntity(), isAdmin,
+                        GlobalUtils.getRbacSession( this ) ) );
                     treeModel.reload();
                     rootNode.removeAllChildren();
-                    for (Permission perm : (List<Permission>) getDefaultModelObject())
-                        rootNode.add(new DefaultMutableTreeNode(perm));
+
+                    for ( Permission perm : ( List<Permission> ) getDefaultModelObject() )
+                    {
+                        rootNode.add( new DefaultMutableTreeNode( perm ) );
+                    }
+
                     break;
+
                 default:
                     break;
             }
-            AjaxRequestTarget target = ((SaveModelEvent) event.getPayload()).getAjaxRequestTarget();
-            target.add(grid);
-            log.debug(".onEvent SaveModelEvent: " + target.toString());
+
+            AjaxRequestTarget target = ( ( SaveModelEvent ) event.getPayload() ).getAjaxRequestTarget();
+            target.add( grid );
+            log.debug( ".onEvent SaveModelEvent: " + target.toString() );
         }
     }
 
-    private void removeSelectedItems(TreeGrid<DefaultTreeModel, DefaultMutableTreeNode, String> grid)
+
+    private void removeSelectedItems( TreeGrid<DefaultTreeModel, DefaultMutableTreeNode, String> grid )
     {
         Collection<IModel<DefaultMutableTreeNode>> selected = grid.getSelectedItems();
-        for (IModel<DefaultMutableTreeNode> model : selected)
+
+        for ( IModel<DefaultMutableTreeNode> model : selected )
         {
             DefaultMutableTreeNode node = model.getObject();
-            treeModel.removeNodeFromParent(node);
-            Permission perm = (Permission) node.getUserObject();
-            log.debug(".removeSelectedItems perm objNm: " + perm.getObjName() + " opNm: " + perm.getOpName());
-            List<Permission> perms = ((List<Permission>) getDefaultModel().getObject());
-            perms.remove(perm);
+            treeModel.removeNodeFromParent( node );
+            Permission perm = ( Permission ) node.getUserObject();
+            log.debug( ".removeSelectedItems perm objNm: " + perm.getObjName() + " opNm: " + perm.getOpName() );
+            List<Permission> perms = ( ( List<Permission> ) getDefaultModel().getObject() );
+            perms.remove( perm );
         }
     }
 
-    private DefaultTreeModel createTreeModel(List<Permission> perms)
+
+    private DefaultTreeModel createTreeModel( List<Permission> perms )
     {
         DefaultTreeModel model;
         //Permission root = new Permission("Perms");
         Permission root = new Permission();
-        rootNode = new DefaultMutableTreeNode(root);
-        model = new DefaultTreeModel(rootNode);
-        if (perms == null)
-            log.debug(".createTreeModel no Perms found");
+        rootNode = new DefaultMutableTreeNode( root );
+        model = new DefaultTreeModel( rootNode );
+
+        if ( perms == null )
+        {
+            log.debug( ".createTreeModel no Perms found" );
+        }
         else
         {
-            log.debug(".createTreeModel Perms found:" + perms.size());
-            for (Permission perm : perms)
-                rootNode.add(new DefaultMutableTreeNode(perm));
+            log.debug( ".createTreeModel Perms found:" + perms.size() );
+
+            for ( Permission perm : perms )
+            {
+                rootNode.add( new DefaultMutableTreeNode( perm ) );
+            }
         }
+
         return model;
     }
 
-    public void add(FortEntity entity)
+
+    public void add( FortEntity entity )
     {
-        if (getDefaultModelObject() != null)
+        if ( getDefaultModelObject() != null )
         {
-             List<Permission> perms = ((List<Permission>) getDefaultModelObject());
-            perms.add((Permission) entity);
-            treeModel.insertNodeInto(new DefaultMutableTreeNode(entity), rootNode, perms.size());
+            List<Permission> perms = ( ( List<Permission> ) getDefaultModelObject() );
+            perms.add( ( Permission ) entity );
+            treeModel.insertNodeInto( new DefaultMutableTreeNode( entity ), rootNode, perms.size() );
         }
     }
 
+
     public void prune()
     {
-        removeSelectedItems(grid);
+        removeSelectedItems( grid );
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/39c304ec/src/main/java/org/apache/directory/fortress/web/panel/PermSearchModalPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/PermSearchModalPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/PermSearchModalPanel.java
index 3ce485a..9443535 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/PermSearchModalPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/PermSearchModalPanel.java
@@ -20,6 +20,7 @@
 
 package org.apache.directory.fortress.web.panel;
 
+
 import java.util.List;
 
 import org.apache.log4j.Logger;
@@ -38,6 +39,7 @@ import org.apache.directory.fortress.web.GlobalUtils;
 import org.apache.directory.fortress.core.ReviewMgr;
 import org.apache.directory.fortress.core.rbac.Permission;
 
+
 /**
  *
  * @author Shawn McKinney
@@ -45,15 +47,18 @@ import org.apache.directory.fortress.core.rbac.Permission;
  */
 public class PermSearchModalPanel extends Panel
 {
+    /** Default serialVersionUID */
+    private static final long serialVersionUID = 1L;
     @SpringBean
     private ReviewMgr reviewMgr;
-    private static final Logger LOG = Logger.getLogger(PermSearchModalPanel.class.getName());
+    private static final Logger LOG = Logger.getLogger( PermSearchModalPanel.class.getName() );
     private ModalWindow window;
     private Permission permSelection;
     private String objectSearchVal;
     private String opSearchVal;
     private boolean isAdmin;
 
+
     /**
      * @param id
      */
@@ -66,6 +71,7 @@ public class PermSearchModalPanel extends Panel
         loadPanel();
     }
 
+
     public void loadPanel()
     {
         LoadableDetachableModel requests = getListViewModel();
@@ -74,10 +80,15 @@ public class PermSearchModalPanel extends Panel
         add( new AjaxPagingNavigator( "navigator", ouView ) );
     }
 
+
     private PageableListView createListView( final LoadableDetachableModel requests )
     {
         final PageableListView listView = new PageableListView( "dataview", requests, 16 )
         {
+            /** Default serialVersionUID */
+            private static final long serialVersionUID = 1L;
+
+
             @Override
             protected void populateItem( final ListItem item )
             {
@@ -86,8 +97,9 @@ public class PermSearchModalPanel extends Panel
                 {
                     private static final long serialVersionUID = 1L;
 
+
                     @Override
-                    public void onClick(AjaxRequestTarget target)
+                    public void onClick( AjaxRequestTarget target )
                     {
                         permSelection = modelObject;
                         window.close( target );
@@ -103,10 +115,15 @@ public class PermSearchModalPanel extends Panel
         return listView;
     }
 
+
     private LoadableDetachableModel getListViewModel()
     {
         final LoadableDetachableModel ret = new LoadableDetachableModel()
         {
+            /** Default serialVersionUID */
+            private static final long serialVersionUID = 1L;
+
+
             @Override
             protected Object load()
             {
@@ -114,7 +131,7 @@ public class PermSearchModalPanel extends Panel
                 try
                 {
                     permSelection = null;
-                    if(objectSearchVal == null)
+                    if ( objectSearchVal == null )
                         objectSearchVal = "";
 
                     Permission permission = new Permission( objectSearchVal, "" );
@@ -132,16 +149,19 @@ public class PermSearchModalPanel extends Panel
         return ret;
     }
 
+
     public void setAdmin( boolean admin )
     {
         isAdmin = admin;
     }
 
+
     public Permission getSelection()
     {
         return permSelection;
     }
 
+
     public void setSearchVal( String objectSearchVal )
     {
         this.objectSearchVal = objectSearchVal;

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/39c304ec/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyDetailPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyDetailPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyDetailPanel.java
index d98873d..3952d31 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyDetailPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyDetailPanel.java
@@ -20,6 +20,7 @@
 
 package org.apache.directory.fortress.web.panel;
 
+
 import com.googlecode.wicket.jquery.ui.form.spinner.Spinner;
 import org.apache.log4j.Logger;
 import org.apache.wicket.Component;
@@ -44,6 +45,7 @@ import org.apache.directory.fortress.web.SelectModelEvent;
 import org.apache.directory.fortress.core.PwPolicyMgr;
 import org.apache.directory.fortress.core.rbac.PwPolicy;
 
+
 /**
  * @author Shawn McKinney
  * @version $Rev$
@@ -51,71 +53,90 @@ import org.apache.directory.fortress.core.rbac.PwPolicy;
  */
 public class PwPolicyDetailPanel extends FormComponentPanel
 {
+    /** Default serialVersionUID */
+    private static final long serialVersionUID = 1L;
     @SpringBean
     private PwPolicyMgr pwPolicyMgr;
-    private static final Logger log = Logger.getLogger(PwPolicyDetailPanel.class.getName());
+    private static final Logger log = Logger.getLogger( PwPolicyDetailPanel.class.getName() );
     private Form editForm;
     private Displayable display;
 
+
     public Form getForm()
     {
         return this.editForm;
     }
 
-    public PwPolicyDetailPanel(String id, Displayable display)
+
+    public PwPolicyDetailPanel( String id, Displayable display )
     {
-        super(id);
+        super( id );
         this.pwPolicyMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
-        this.editForm = new PwPolicyDetailForm(GlobalIds.EDIT_FIELDS, new CompoundPropertyModel<PwPolicy>(new PwPolicy()));
+        this.editForm = new PwPolicyDetailForm( GlobalIds.EDIT_FIELDS, new CompoundPropertyModel<PwPolicy>(
+            new PwPolicy() ) );
         this.display = display;
-        add(editForm);
+        add( editForm );
     }
 
     public class PwPolicyDetailForm extends Form
     {
+        /** Default serialVersionUID */
+        private static final long serialVersionUID = 1L;
         private Component component;
 
-        public PwPolicyDetailForm(String id, final IModel<PwPolicy> model)
+
+        public PwPolicyDetailForm( String id, final IModel<PwPolicy> model )
         {
-            super(id, model);
+            super( id, model );
 
             add( new SecureIndicatingAjaxButton( GlobalIds.ADD, GlobalIds.PWPOLICY_MGR, GlobalIds.ADD )
             {
+                /** Default serialVersionUID */
+                private static final long serialVersionUID = 1L;
+
+
                 @Override
-                protected void onSubmit(AjaxRequestTarget target, Form form)
+                protected void onSubmit( AjaxRequestTarget target, Form form )
                 {
-                    log.debug(".onSubmit Add");
-                    PwPolicy policy = (PwPolicy)form.getModel().getObject();
+                    log.debug( ".onSubmit Add" );
+                    PwPolicy policy = ( PwPolicy ) form.getModel().getObject();
                     try
                     {
-                        policy.setCheckQuality( (short)2 );
-                        pwPolicyMgr.add(policy);
-                        SaveModelEvent.send(getPage(), this, policy, target, SaveModelEvent.Operations.ADD);
+                        policy.setCheckQuality( ( short ) 2 );
+                        pwPolicyMgr.add( policy );
+                        SaveModelEvent.send( getPage(), this, policy, target, SaveModelEvent.Operations.ADD );
                         component = editForm;
                         String msg = "Policy: " + policy.getName() + " has been added";
-                        display.setMessage(msg);
+                        display.setMessage( msg );
                     }
-                    catch (org.apache.directory.fortress.core.SecurityException se)
+                    catch ( org.apache.directory.fortress.core.SecurityException se )
                     {
                         String error = ".onSubmit caught SecurityException=" + se;
-                        log.error(error);
-                        display.setMessage(error);
+                        log.error( error );
+                        display.setMessage( error );
                         display.display();
                     }
                 }
 
+
                 @Override
-                public void onError(AjaxRequestTarget target, Form form)
+                public void onError( AjaxRequestTarget target, Form form )
                 {
-                    log.info("PwPolicyPanel.add.onError caught");
+                    log.info( "PwPolicyPanel.add.onError caught" );
                     target.add();
                 }
+
+
                 @Override
                 protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
                 {
                     super.updateAjaxAttributes( attributes );
                     AjaxCallListener ajaxCallListener = new AjaxCallListener()
                     {
+                        /** Default serialVersionUID */
+                        private static final long serialVersionUID = 1L;
+
+
                         @Override
                         public CharSequence getFailureHandler( Component component )
                         {
@@ -124,42 +145,53 @@ public class PwPolicyDetailPanel extends FormComponentPanel
                     };
                     attributes.getAjaxCallListeners().add( ajaxCallListener );
                 }
-            });
+            } );
             add( new SecureIndicatingAjaxButton( GlobalIds.COMMIT, GlobalIds.PWPOLICY_MGR, "update" )
             {
+                /** Default serialVersionUID */
+                private static final long serialVersionUID = 1L;
+
+
                 @Override
-                protected void onSubmit(AjaxRequestTarget target, Form form)
+                protected void onSubmit( AjaxRequestTarget target, Form form )
                 {
-                    log.debug(".onSubmit Commit");
-                    PwPolicy policy = (PwPolicy)form.getModel().getObject();
+                    log.debug( ".onSubmit Commit" );
+                    PwPolicy policy = ( PwPolicy ) form.getModel().getObject();
                     try
                     {
-                        pwPolicyMgr.update(policy);
+                        pwPolicyMgr.update( policy );
                         String msg = "Policy: " + policy.getName() + " has been updated";
-                        SaveModelEvent.send(getPage(), this, policy, target, SaveModelEvent.Operations.UPDATE);
+                        SaveModelEvent.send( getPage(), this, policy, target, SaveModelEvent.Operations.UPDATE );
                         component = editForm;
-                        display.setMessage(msg);
+                        display.setMessage( msg );
                     }
-                    catch (org.apache.directory.fortress.core.SecurityException se)
+                    catch ( org.apache.directory.fortress.core.SecurityException se )
                     {
                         String error = ".onSubmit caught SecurityException=" + se;
-                        log.error(error);
-                        display.setMessage(error);
+                        log.error( error );
+                        display.setMessage( error );
                         display.display();
                     }
                 }
 
+
                 @Override
-                public void onError(AjaxRequestTarget target, Form form)
+                public void onError( AjaxRequestTarget target, Form form )
                 {
-                    log.warn("PwPolicyPanel.update.onError");
+                    log.warn( "PwPolicyPanel.update.onError" );
                 }
+
+
                 @Override
                 protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
                 {
                     super.updateAjaxAttributes( attributes );
                     AjaxCallListener ajaxCallListener = new AjaxCallListener()
                     {
+                        /** Default serialVersionUID */
+                        private static final long serialVersionUID = 1L;
+
+
                         @Override
                         public CharSequence getFailureHandler( Component component )
                         {
@@ -168,45 +200,56 @@ public class PwPolicyDetailPanel extends FormComponentPanel
                     };
                     attributes.getAjaxCallListeners().add( ajaxCallListener );
                 }
-            });
+            } );
             add( new SecureIndicatingAjaxButton( GlobalIds.DELETE, GlobalIds.PWPOLICY_MGR, GlobalIds.DELETE )
             {
+                /** Default serialVersionUID */
+                private static final long serialVersionUID = 1L;
+
+
                 @Override
-                protected void onSubmit(AjaxRequestTarget target, Form form)
+                protected void onSubmit( AjaxRequestTarget target, Form form )
                 {
-                    log.debug(".onSubmit Commit");
-                    PwPolicy role = (PwPolicy)form.getModel().getObject();
+                    log.debug( ".onSubmit Commit" );
+                    PwPolicy role = ( PwPolicy ) form.getModel().getObject();
 
                     try
                     {
-                        pwPolicyMgr.delete(role);
+                        pwPolicyMgr.delete( role );
                         form.setModelObject( new PwPolicy() );
                         modelChanged();
                         String msg = "Role: " + role.getName() + " has been deleted";
-                        SaveModelEvent.send(getPage(), this, role, target, SaveModelEvent.Operations.DELETE);
+                        SaveModelEvent.send( getPage(), this, role, target, SaveModelEvent.Operations.DELETE );
                         component = editForm;
-                        display.setMessage(msg);
+                        display.setMessage( msg );
                     }
-                    catch (org.apache.directory.fortress.core.SecurityException se)
+                    catch ( org.apache.directory.fortress.core.SecurityException se )
                     {
                         String error = ".onSubmit caught SecurityException=" + se;
-                        log.error(error);
-                        display.setMessage(error);
+                        log.error( error );
+                        display.setMessage( error );
                         display.display();
                     }
                 }
 
+
                 @Override
-                public void onError(AjaxRequestTarget target, Form form)
+                public void onError( AjaxRequestTarget target, Form form )
                 {
-                    log.warn("PwPolicyPanel.commit.onError");
+                    log.warn( "PwPolicyPanel.commit.onError" );
                 }
+
+
                 @Override
                 protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
                 {
                     super.updateAjaxAttributes( attributes );
                     AjaxCallListener ajaxCallListener = new AjaxCallListener()
                     {
+                        /** Default serialVersionUID */
+                        private static final long serialVersionUID = 1L;
+
+
                         @Override
                         public CharSequence getFailureHandler( Component component )
                         {
@@ -215,30 +258,41 @@ public class PwPolicyDetailPanel extends FormComponentPanel
                     };
                     attributes.getAjaxCallListeners().add( ajaxCallListener );
                 }
-            });
-            add(new AjaxSubmitLink(GlobalIds.CANCEL)
+            } );
+            add( new AjaxSubmitLink( GlobalIds.CANCEL )
             {
+                /** Default serialVersionUID */
+                private static final long serialVersionUID = 1L;
+
+
                 @Override
-                protected void onSubmit(AjaxRequestTarget target, Form form)
+                protected void onSubmit( AjaxRequestTarget target, Form form )
                 {
-                    setModelObject(new PwPolicy());
+                    setModelObject( new PwPolicy() );
                     modelChanged();
                     component = editForm;
                     String msg = "Role cancelled input form";
-                    display.setMessage(msg);
+                    display.setMessage( msg );
                 }
 
+
                 @Override
-                public void onError(AjaxRequestTarget target, Form form)
+                public void onError( AjaxRequestTarget target, Form form )
                 {
-                    log.warn("ControlPanel.cancel.onError");
+                    log.warn( "ControlPanel.cancel.onError" );
                 }
+
+
                 @Override
                 protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
                 {
                     super.updateAjaxAttributes( attributes );
                     AjaxCallListener ajaxCallListener = new AjaxCallListener()
                     {
+                        /** Default serialVersionUID */
+                        private static final long serialVersionUID = 1L;
+
+
                         @Override
                         public CharSequence getFailureHandler( Component component )
                         {
@@ -247,67 +301,73 @@ public class PwPolicyDetailPanel extends FormComponentPanel
                     };
                     attributes.getAjaxCallListeners().add( ajaxCallListener );
                 }
-            });
-
-            add(new TextField("name").setRequired( true ));
-
-            add(new TextField<Integer>("minAge").add(new RangeValidator<Integer>(0, Integer.MAX_VALUE)).setRequired( true ));
-
-            add(new TextField<Long>("maxAge").add(new RangeValidator<Long>((long)0, Long.MAX_VALUE)).setRequired( true ));
-            final Spinner<Integer> inHistorySP = new Spinner<Integer>("inHistory");
-            inHistorySP.setRequired(false);
-            inHistorySP.add(new RangeValidator<Short>((short)0, (short)100));
-            add(inHistorySP);
-
-            final Spinner<Integer> minLengthSP = new Spinner<Integer>("minLength");
-            minLengthSP.setRequired(false);
-            minLengthSP.add(new RangeValidator<Short>((short)0, (short)100));
-            add(minLengthSP);
-
-            add(new TextField<Long>("expireWarning").add(new RangeValidator<Long>((long)0, Long.MAX_VALUE)).setRequired( true ));
-            final Spinner<Integer> graceLoginLimitSP = new Spinner<Integer>("graceLoginLimit");
-            graceLoginLimitSP.setRequired(false);
-            graceLoginLimitSP.add(new RangeValidator<Short>((short)0, (short)100));
-            add(graceLoginLimitSP);
-
-            add(new CheckBox("lockout").setRequired( true ));
-            add(new TextField<Integer>("lockoutDuration").add(new RangeValidator<Integer>(0, Integer.MAX_VALUE)).setRequired( true ));
-            final Spinner<Integer> maxFailureSP = new Spinner<Integer>("maxFailure");
-            maxFailureSP.setRequired(false);
-            maxFailureSP.add(new RangeValidator<Short>((short)0, (short)100));
-            add(maxFailureSP);
-
-            add(new TextField<Short>("failureCountInterval").add(new RangeValidator<Short>((short)0, Short.MAX_VALUE)).setRequired( true ));
-            add(new CheckBox("mustChange").setRequired( true ));
-            add(new CheckBox("allowUserChange").setRequired( true ));
-            add(new CheckBox("safeModify").setRequired( true ));
-            setOutputMarkupId(true);
+            } );
+
+            add( new TextField( "name" ).setRequired( true ) );
+
+            add( new TextField<Integer>( "minAge" ).add( new RangeValidator<Integer>( 0, Integer.MAX_VALUE ) )
+                .setRequired( true ) );
+
+            add( new TextField<Long>( "maxAge" ).add( new RangeValidator<Long>( ( long ) 0, Long.MAX_VALUE ) )
+                .setRequired( true ) );
+            final Spinner<Integer> inHistorySP = new Spinner<Integer>( "inHistory" );
+            inHistorySP.setRequired( false );
+            inHistorySP.add( new RangeValidator<Short>( ( short ) 0, ( short ) 100 ) );
+            add( inHistorySP );
+
+            final Spinner<Integer> minLengthSP = new Spinner<Integer>( "minLength" );
+            minLengthSP.setRequired( false );
+            minLengthSP.add( new RangeValidator<Short>( ( short ) 0, ( short ) 100 ) );
+            add( minLengthSP );
+
+            add( new TextField<Long>( "expireWarning" ).add( new RangeValidator<Long>( ( long ) 0, Long.MAX_VALUE ) )
+                .setRequired( true ) );
+            final Spinner<Integer> graceLoginLimitSP = new Spinner<Integer>( "graceLoginLimit" );
+            graceLoginLimitSP.setRequired( false );
+            graceLoginLimitSP.add( new RangeValidator<Short>( ( short ) 0, ( short ) 100 ) );
+            add( graceLoginLimitSP );
+
+            add( new CheckBox( "lockout" ).setRequired( true ) );
+            add( new TextField<Integer>( "lockoutDuration" ).add( new RangeValidator<Integer>( 0, Integer.MAX_VALUE ) )
+                .setRequired( true ) );
+            final Spinner<Integer> maxFailureSP = new Spinner<Integer>( "maxFailure" );
+            maxFailureSP.setRequired( false );
+            maxFailureSP.add( new RangeValidator<Short>( ( short ) 0, ( short ) 100 ) );
+            add( maxFailureSP );
+
+            add( new TextField<Short>( "failureCountInterval" ).add(
+                new RangeValidator<Short>( ( short ) 0, Short.MAX_VALUE ) ).setRequired( true ) );
+            add( new CheckBox( "mustChange" ).setRequired( true ) );
+            add( new CheckBox( "allowUserChange" ).setRequired( true ) );
+            add( new CheckBox( "safeModify" ).setRequired( true ) );
+            setOutputMarkupId( true );
         }
 
+
         @Override
-        public void onEvent(final IEvent<?> event)
+        public void onEvent( final IEvent<?> event )
         {
-            if (event.getPayload() instanceof SelectModelEvent)
+            if ( event.getPayload() instanceof SelectModelEvent )
             {
-                SelectModelEvent modelEvent = (SelectModelEvent) event.getPayload();
-                PwPolicy policy = (PwPolicy) modelEvent.getEntity();
-                this.setModelObject(policy);
+                SelectModelEvent modelEvent = ( SelectModelEvent ) event.getPayload();
+                PwPolicy policy = ( PwPolicy ) modelEvent.getEntity();
+                this.setModelObject( policy );
                 String msg = "Policy: " + policy.getName() + " has been selected";
-                log.debug(".onEvent SelectModelEvent: " + policy.getName());
-                display.setMessage(msg);
+                log.debug( ".onEvent SelectModelEvent: " + policy.getName() );
+                display.setMessage( msg );
                 component = editForm;
             }
-            else if (event.getPayload() instanceof AjaxRequestTarget)
+            else if ( event.getPayload() instanceof AjaxRequestTarget )
             {
                 // only add the form to ajax target if something has changed...
-                if (component != null)
+                if ( component != null )
                 {
-                    AjaxRequestTarget target = ((AjaxRequestTarget) event.getPayload());
-                    log.debug(".onEvent AjaxRequestTarget: " + target.toString());
-                    target.add(component);
+                    AjaxRequestTarget target = ( ( AjaxRequestTarget ) event.getPayload() );
+                    log.debug( ".onEvent AjaxRequestTarget: " + target.toString() );
+                    target.add( component );
                     component = null;
                 }
-                display.display((AjaxRequestTarget) event.getPayload());
+                display.display( ( AjaxRequestTarget ) event.getPayload() );
             }
         }
     }


Mime
View raw message