Alissa Bonas has uploaded a new change for review.

Change subject: uicompat: rename 2 methods in PreparingEnlistment
......................................................................

uicompat: rename 2 methods in PreparingEnlistment

Rename methods to start with lowercase per Java standard.
Resolves findbugs warnings.

Change-Id: I57997edd34600e2a28582c1cd1a0652459f32e7a
Signed-off-by: Alissa Bonas <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddDataCenterRM.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddStorageDomainRM.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/ChangeHostClusterRM.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/PreparingEnlistment.java
5 files changed, 16 insertions(+), 87 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/22/21922/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
index 08843e7..ffef5a1 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddClusterRM.java
@@ -83,7 +83,7 @@
                 enlistmentContext.setClusterId(cluster.getId());
 
                 context.enlistment = null;
-                enlistment.Prepared();
+                enlistment.prepared();
             } else {
 
                 Version version = (Version) 
clusterModel.getVersion().getSelectedItem();
@@ -118,7 +118,7 @@
             
enlistmentContext.setClusterId(configureModel.getCluster().getClusterId());
 
             context.enlistment = null;
-            enlistment.Prepared();
+            enlistment.prepared();
         }
     }
 
@@ -135,63 +135,12 @@
             enlistmentContext.setClusterId((Guid) 
returnValue.getActionReturnValue());
 
             context.enlistment = null;
-            enlistment.Prepared();
+            enlistment.prepared();
 
         } else {
-            enlistment.ForceRollback();
+            enlistment.forceRollback();
         }
     }
-
-    // @Override
-    // public void Prepare(PreparingEnlistment enlistment)
-    // {
-    // ConfigureLocalStorageModel model = (ConfigureLocalStorageModel) 
getModel().getWindow();
-    // if (!model.getDontCreateCluster())
-    // {
-    // ClusterModel m = model.getCluster();
-    //
-    // String name = (String) m.getName().getEntity();
-    //
-    // // Try to find existing cluster with the specified name.
-    // VDSGroup cluster = DataProvider.GetClusterByName(name);
-    // if (cluster != null)
-    // {
-    // getData().setClusterId(cluster.getID());
-    // enlistment.Prepared();
-    // }
-    // else
-    // {
-    // Version version = (Version) m.getVersion().getSelectedItem();
-    //
-    // cluster = new VDSGroup();
-    // cluster.setname(name);
-    // cluster.setdescription((String) m.getDescription().getEntity());
-    // cluster.setstorage_pool_id(getData().getDataCenterId());
-    // cluster.setcpu_name(((ServerCpu) 
m.getCPU().getSelectedItem()).getCpuName());
-    // cluster.setmax_vds_memory_over_commit(m.getMemoryOverCommit());
-    // cluster.setTransparentHugepages(version.compareTo(new Version("3.0")) 
>= 0);
-    // cluster.setcompatibility_version(version);
-    // cluster.setMigrateOnError(m.getMigrateOnErrorOption());
-    //
-    // VdcReturnValueBase returnValue =
-    // Frontend.RunAction(VdcActionType.AddVdsGroup, new 
VdsGroupOperationParameters(cluster));
-    //
-    // if (returnValue != null && returnValue.getSucceeded())
-    // {
-    // getData().setClusterId((Guid) returnValue.getActionReturnValue());
-    // enlistment.Prepared();
-    // }
-    // else
-    // {
-    // enlistment.ForceRollback();
-    // }
-    // }
-    // }
-    // else
-    // {
-    // enlistment.Prepared();
-    // }
-    // }
 
     @Override
     public void commit(Enlistment enlistment) {
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddDataCenterRM.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddDataCenterRM.java
index 3665f41..44bdb65 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddDataCenterRM.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddDataCenterRM.java
@@ -87,7 +87,7 @@
                 enlistmentContext.setDataCenterId(dataCenter.getId());
 
                 context.enlistment = null;
-                enlistment.Prepared();
+                enlistment.prepared();
             } else {
 
                 dataCenter = new StoragePool();
@@ -113,7 +113,7 @@
             
enlistmentContext.setDataCenterId(configureModel.getDataCenter().getDataCenterId());
 
             context.enlistment = null;
-            enlistment.Prepared();
+            enlistment.prepared();
         }
     }
 
@@ -128,10 +128,10 @@
         if (returnValue != null && returnValue.getSucceeded()) {
 
             enlistmentContext.setDataCenterId((Guid) 
returnValue.getActionReturnValue());
-            enlistment.Prepared();
+            enlistment.prepared();
 
         } else {
-            enlistment.ForceRollback();
+            enlistment.forceRollback();
         }
     }
 
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddStorageDomainRM.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddStorageDomainRM.java
index bdf3ebe..db52442 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddStorageDomainRM.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/AddStorageDomainRM.java
@@ -71,7 +71,7 @@
         if (returnValue == null || !returnValue.getSucceeded()) {
 
             context.enlistment = null;
-            enlistment.ForceRollback();
+            enlistment.forceRollback();
         } else {
             prepare3();
         }
@@ -109,7 +109,7 @@
         } else {
 
             context.enlistment = null;
-            enlistment.ForceRollback();
+            enlistment.forceRollback();
         }
     }
 
@@ -228,7 +228,7 @@
             // Don't rollback.
             enlistment.Done();
         } else {
-            enlistment.Prepared();
+            enlistment.prepared();
         }
     }
 
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/ChangeHostClusterRM.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/ChangeHostClusterRM.java
index 502a594..53c84f1 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/ChangeHostClusterRM.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/ChangeHostClusterRM.java
@@ -54,7 +54,7 @@
                     });
         } else {
             context.enlistment = null;
-            enlistment.Prepared();
+            enlistment.prepared();
         }
     }
 
@@ -67,31 +67,11 @@
 
         if (returnValue != null && returnValue.getSucceeded()) {
 
-            enlistment.Prepared();
+            enlistment.prepared();
         } else {
-            enlistment.ForceRollback();
+            enlistment.forceRollback();
         }
     }
-
-    // @Override
-    // public void Prepare(PreparingEnlistment enlistment) {
-    //
-    // ConfigureLocalStorageModel model = (ConfigureLocalStorageModel) 
getModel().getWindow();
-    // if (!model.getDontChangeHostCluster()) {
-    // VDS host = (VDS) getModel().getSelectedItem();
-    // VdcReturnValueBase returnValue =
-    // Frontend.RunAction(VdcActionType.ChangeVDSCluster,
-    // new ChangeVDSClusterParameters(getData().getClusterId(), 
host.getvds_id()));
-    //
-    // if (returnValue != null && returnValue.getSucceeded()) {
-    // enlistment.Prepared();
-    // } else {
-    // enlistment.ForceRollback();
-    // }
-    // } else {
-    // enlistment.Prepared();
-    // }
-    // }
 
     @Override
     public void commit(Enlistment enlistment) {
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/PreparingEnlistment.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/PreparingEnlistment.java
index f517cfa..48f127f 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/PreparingEnlistment.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/PreparingEnlistment.java
@@ -31,11 +31,11 @@
         rollbackEvent = new Event(RollbackEventDefinition);
     }
 
-    public void Prepared() {
+    public void prepared() {
         getPreparedEvent().raise(this, EventArgs.Empty);
     }
 
-    public void ForceRollback() {
+    public void forceRollback() {
         getRollbackEvent().raise(this, EventArgs.Empty);
     }
 }


-- 
To view, visit http://gerrit.ovirt.org/21922
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57997edd34600e2a28582c1cd1a0652459f32e7a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to