Allon Mureinik has uploaded a new change for review.

Change subject: engine: VdcActionUtils: method names
......................................................................

engine: VdcActionUtils: method names

Rename methods to start with lower case letters, as per proper Java
convention.

Change-Id: I73dd561cffc4438d8a7014d54a42709cb30ac51e
Signed-off-by: Allon Mureinik <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/RunVmValidator.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcActionUtils.java
M 
backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/VdcActionUtilsTest.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterStorageListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/networks/NetworkVmListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageDataCenterListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalTemplateListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/VmItemBehavior.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditDiskModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java
20 files changed, 65 insertions(+), 65 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/53/18853/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
index 7506fbd..de95898 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
@@ -236,7 +236,7 @@
             return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_REQUESTED_DISK_SIZE_IS_TOO_SMALL);
         }
 
-        if (!VdcActionUtils.CanExecute(getVmsDiskPluggedTo(), VM.class, 
VdcActionType.ExtendImageSize)) {
+        if (!VdcActionUtils.canExecute(getVmsDiskPluggedTo(), VM.class, 
VdcActionType.ExtendImageSize)) {
             return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL);
         }
 
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/RunVmValidator.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/RunVmValidator.java
index 71f3958..3027881 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/RunVmValidator.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/RunVmValidator.java
@@ -221,7 +221,7 @@
     }
 
     public ValidationResult validateVmStatusUsingMatrix(VM vm) {
-        if (!VdcActionUtils.CanExecute(Arrays.asList(vm), VM.class,
+        if (!VdcActionUtils.canExecute(Arrays.asList(vm), VM.class,
                 VdcActionType.RunVm)) {
             return new 
ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL);
         }
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcActionUtils.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcActionUtils.java
index 72e22d5..9087d9b 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcActionUtils.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcActionUtils.java
@@ -294,11 +294,11 @@
         _matrix.put(StorageDomain.class, storageDomainMatrix);
     }
 
-    public static boolean CanExecute(List<?> entities, Class<?> type, 
VdcActionType action) {
+    public static boolean canExecute(List<?> entities, Class<?> type, 
VdcActionType action) {
         if (_matrix.containsKey(type)) {
             for (Object a : entities) {
-                if (a.getClass() == type && 
_matrix.get(type).containsKey(GetStatusProperty(a))
-                        && 
_matrix.get(type).get(GetStatusProperty(a)).contains(action)) {
+                if (a.getClass() == type && 
_matrix.get(type).containsKey(getStatusProperty(a))
+                        && 
_matrix.get(type).get(getStatusProperty(a)).contains(action)) {
                     return false;
                 }
             }
@@ -306,7 +306,7 @@
         return true;
     }
 
-    private static Enum<?> GetStatusProperty(Object entity) {
+    private static Enum<?> getStatusProperty(Object entity) {
         if (entity == null) {
             return null;
         }
diff --git 
a/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/VdcActionUtilsTest.java
 
b/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/VdcActionUtilsTest.java
index e4aba70..daca90b 100644
--- 
a/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/VdcActionUtilsTest.java
+++ 
b/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/VdcActionUtilsTest.java
@@ -75,7 +75,7 @@
 
     @Test
     public void canExecute() {
-        assertEquals(result, 
VdcActionUtils.CanExecute(Collections.singletonList(toTest), toTest.getClass(), 
action));
+        assertEquals(result, 
VdcActionUtils.canExecute(Collections.singletonList(toTest), toTest.getClass(), 
action));
     }
 
 }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterStorageListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterStorageListModel.java
index 95e43bd..5822c96 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterStorageListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterStorageListModel.java
@@ -730,17 +730,17 @@
         getAttachBackupCommand().setIsExecutionAllowed(items.size() > 0 && 
isMasterPresents && !isBackupPresents);
 
         getDetachCommand().setIsExecutionAllowed(selectedItems.size() > 0
-                && VdcActionUtils.CanExecute(selectedItems,
-                        StorageDomain.class,
-                        VdcActionType.DetachStorageDomainFromPool));
+                && VdcActionUtils.canExecute(selectedItems,
+                StorageDomain.class,
+                VdcActionType.DetachStorageDomainFromPool));
 
         getActivateCommand().setIsExecutionAllowed(selectedItems.size() == 1
-                && VdcActionUtils.CanExecute(selectedItems, 
StorageDomain.class, VdcActionType.ActivateStorageDomain));
+                && VdcActionUtils.canExecute(selectedItems, 
StorageDomain.class, VdcActionType.ActivateStorageDomain));
 
         getMaintenanceCommand().setIsExecutionAllowed(selectedItems.size() == 1
-                && VdcActionUtils.CanExecute(selectedItems,
-                        StorageDomain.class,
-                        VdcActionType.DeactivateStorageDomain));
+                && VdcActionUtils.canExecute(selectedItems,
+                StorageDomain.class,
+                VdcActionType.DeactivateStorageDomain));
     }
 
     @Override
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
index 18f6141..3a0a348 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
@@ -1085,7 +1085,7 @@
         setHasReinstallAlertMaintenance(false);
         setHasNICsAlert(false);
         getInstallCommand().setIsExecutionAllowed(true);
-        
getEditHostCommand().setIsExecutionAllowed(VdcActionUtils.CanExecute(new 
ArrayList<VDS>(Arrays.asList(new VDS[] { getEntity() })),
+        
getEditHostCommand().setIsExecutionAllowed(VdcActionUtils.canExecute(new 
ArrayList<VDS>(Arrays.asList(new VDS[]{getEntity()})),
                 VDS.class,
                 VdcActionType.UpdateVds));
         // Check the network alert presense.
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
index f625447..f4f1188 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
@@ -1606,36 +1606,36 @@
         boolean isAllPMEnabled = Linq.findAllVDSByPmEnabled(items).size() == 
items.size();
 
         getEditCommand().setIsExecutionAllowed(items.size() == 1
-                && VdcActionUtils.CanExecute(items, VDS.class, 
VdcActionType.UpdateVds));
+                && VdcActionUtils.canExecute(items, VDS.class, 
VdcActionType.UpdateVds));
 
         getEditWithPMemphasisCommand().setIsExecutionAllowed(items.size() == 1
-                && VdcActionUtils.CanExecute(items, VDS.class, 
VdcActionType.UpdateVds));
+                && VdcActionUtils.canExecute(items, VDS.class, 
VdcActionType.UpdateVds));
 
         getRemoveCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VDS.class, 
VdcActionType.RemoveVds));
+                && VdcActionUtils.canExecute(items, VDS.class, 
VdcActionType.RemoveVds));
 
         getActivateCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VDS.class, 
VdcActionType.ActivateVds));
+                && VdcActionUtils.canExecute(items, VDS.class, 
VdcActionType.ActivateVds));
 
         // or special case where its installation failed but its oVirt node
         boolean approveAvailability =
                 items.size() == 1
-                        && (VdcActionUtils.CanExecute(items, VDS.class, 
VdcActionType.ApproveVds) || (items.get(0)
+                        && (VdcActionUtils.canExecute(items, VDS.class, 
VdcActionType.ApproveVds) || (items.get(0)
                                 .getStatus() == VDSStatus.InstallFailed && 
items.get(0).getVdsType() == VDSType.oVirtNode));
         getApproveCommand().setIsExecutionAllowed(approveAvailability);
         getApproveCommand().setIsAvailable(approveAvailability);
 
         getMaintenanceCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VDS.class, 
VdcActionType.MaintenanceVds));
+                && VdcActionUtils.canExecute(items, VDS.class, 
VdcActionType.MaintenanceVds));
 
         getRestartCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VDS.class, 
VdcActionType.RestartVds) && isAllPMEnabled);
+                && VdcActionUtils.canExecute(items, VDS.class, 
VdcActionType.RestartVds) && isAllPMEnabled);
 
         getStartCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VDS.class, 
VdcActionType.StartVds) && isAllPMEnabled);
+                && VdcActionUtils.canExecute(items, VDS.class, 
VdcActionType.StartVds) && isAllPMEnabled);
 
         getStopCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VDS.class, 
VdcActionType.StopVds) && isAllPMEnabled);
+                && VdcActionUtils.canExecute(items, VDS.class, 
VdcActionType.StopVds) && isAllPMEnabled);
 
         setIsPowerManagementEnabled(getRestartCommand().getIsExecutionAllowed()
                 || getStartCommand().getIsExecutionAllowed() || 
getStopCommand().getIsExecutionAllowed());
@@ -1655,7 +1655,7 @@
 
         updateConfigureLocalStorageCommandAvailability();
 
-        getRefreshCapabilitiesCommand().setIsExecutionAllowed(items.size() > 0 
&& VdcActionUtils.CanExecute(items,
+        getRefreshCapabilitiesCommand().setIsExecutionAllowed(items.size() > 0 
&& VdcActionUtils.canExecute(items,
                 VDS.class,
                 VdcActionType.RefreshHostCapabilities));
     }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/networks/NetworkVmListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/networks/NetworkVmListModel.java
index b55dfae..d3f2cb3 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/networks/NetworkVmListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/networks/NetworkVmListModel.java
@@ -141,7 +141,7 @@
             vms.add(item.getSecond());
         }
 
-        getRemoveCommand().setIsExecutionAllowed(VdcActionUtils.CanExecute(vms,
+        getRemoveCommand().setIsExecutionAllowed(VdcActionUtils.canExecute(vms,
                 VM.class,
                 VdcActionType.RemoveVmInterface) && getSelectedItems() != null 
&& !getSelectedItems().isEmpty()
                 && canRemoveVnics());
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java
index e6cf16d..5ef0cdf 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java
@@ -589,7 +589,7 @@
                 && getSelectedItems().size() == 1 && 
hasVms(getSelectedItem()));
 
         getRemoveCommand().setIsExecutionAllowed(getSelectedItems() != null && 
getSelectedItems().size() > 0
-                && VdcActionUtils.CanExecute(getSelectedItems(), VmPool.class, 
VdcActionType.RemoveVmPool));
+                && VdcActionUtils.canExecute(getSelectedItems(), VmPool.class, 
VdcActionType.RemoveVmPool));
     }
 
     private boolean hasVms(Object selectedItem) {
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageDataCenterListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageDataCenterListModel.java
index 16d70cd..bd4552c 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageDataCenterListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageDataCenterListModel.java
@@ -636,16 +636,16 @@
                         : new ArrayList<StorageDomain>();
 
         getActivateCommand().setIsExecutionAllowed(items.size() == 1
-                && VdcActionUtils.CanExecute(items, StorageDomain.class, 
VdcActionType.ActivateStorageDomain));
+                && VdcActionUtils.canExecute(items, StorageDomain.class, 
VdcActionType.ActivateStorageDomain));
 
         getMaintenanceCommand().setIsExecutionAllowed(items.size() == 1
-                && VdcActionUtils.CanExecute(items, StorageDomain.class, 
VdcActionType.DeactivateStorageDomain));
+                && VdcActionUtils.canExecute(items, StorageDomain.class, 
VdcActionType.DeactivateStorageDomain));
 
         getAttachCommand().setIsExecutionAllowed(getEntity() != null
                 && (getEntity().getStorageDomainSharedStatus() == 
StorageDomainSharedStatus.Unattached || getEntity().getStorageDomainType() == 
StorageDomainType.ISO));
 
         getDetachCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, StorageDomain.class, 
VdcActionType.DetachStorageDomainFromPool));
+                && VdcActionUtils.canExecute(items, StorageDomain.class, 
VdcActionType.DetachStorageDomainFromPool));
     }
 
     @Override
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java
index 4ea27327..04b5de8 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java
@@ -605,7 +605,7 @@
         }
 
         getRemoveCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VmTemplate.class, 
VdcActionType.RemoveVmTemplate));
+                && VdcActionUtils.canExecute(items, VmTemplate.class, 
VdcActionType.RemoveVmTemplate));
         if (getRemoveCommand().getIsExecutionAllowed() && blankSelected)
         {
             
getRemoveCommand().getExecuteProhibitionReasons().add(ConstantsManager.getInstance()
@@ -615,7 +615,7 @@
         }
 
         getExportCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VmTemplate.class, 
VdcActionType.ExportVmTemplate));
+                && VdcActionUtils.canExecute(items, VmTemplate.class, 
VdcActionType.ExportVmTemplate));
 
         if (getExportCommand().getIsExecutionAllowed() && blankSelected)
         {
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java
index 8f12e80..b04f57e 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java
@@ -690,25 +690,25 @@
 
         getRemoveCommand().setIsExecutionAllowed(selectedItem != null
                 && !selectedItem.isPool()
-                && VdcActionUtils.CanExecute(new 
ArrayList<VM>(Arrays.asList(new VM[] { (VM) selectedItem.getEntity() })),
-                        VM.class,
-                        VdcActionType.RemoveVm));
+                && VdcActionUtils.canExecute(new 
ArrayList<VM>(Arrays.asList(new VM[]{(VM) selectedItem.getEntity()})),
+                VM.class,
+                VdcActionType.RemoveVm));
 
         getRunOnceCommand().setIsExecutionAllowed(selectedItem != null
                 && !selectedItem.isPool()
-                && VdcActionUtils.CanExecute(new 
ArrayList<VM>(Arrays.asList(new VM[] { (VM) selectedItem.getEntity() })),
-                        VM.class,
-                        VdcActionType.RunVmOnce));
+                && VdcActionUtils.canExecute(new 
ArrayList<VM>(Arrays.asList(new VM[]{(VM) selectedItem.getEntity()})),
+                VM.class,
+                VdcActionType.RunVmOnce));
 
         getChangeCdCommand().setIsExecutionAllowed(selectedItem != null
                 && !selectedItem.isPool()
-                && VdcActionUtils.CanExecute(new 
ArrayList<VM>(Arrays.asList(new VM[]{(VM) selectedItem.getEntity()})),
+                && VdcActionUtils.canExecute(new 
ArrayList<VM>(Arrays.asList(new VM[]{(VM) selectedItem.getEntity()})),
                 VM.class,
                 VdcActionType.ChangeDisk));
 
         getNewTemplateCommand().setIsExecutionAllowed(selectedItem != null
                 && !selectedItem.isPool()
-                && VdcActionUtils.CanExecute(new 
ArrayList<VM>(Arrays.asList(new VM[]{(VM) selectedItem.getEntity()})),
+                && VdcActionUtils.canExecute(new 
ArrayList<VM>(Arrays.asList(new VM[]{(VM) selectedItem.getEntity()})),
                 VM.class,
                 VdcActionType.AddVmTemplate));
     }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalTemplateListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalTemplateListModel.java
index 46a272b..71c9606 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalTemplateListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalTemplateListModel.java
@@ -43,7 +43,7 @@
                     item.getStatus() != VmTemplateStatus.Locked &&
                             !isBlankTemplateSelected());
             getRemoveCommand().setIsExecutionAllowed(
-                    VdcActionUtils.CanExecute(items, VmTemplate.class,
+                    VdcActionUtils.canExecute(items, VmTemplate.class,
                             VdcActionType.RemoveVmTemplate) &&
                             !isBlankTemplateSelected()
                     );
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/VmItemBehavior.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/VmItemBehavior.java
index 5323c6f..ba7ff25 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/VmItemBehavior.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/VmItemBehavior.java
@@ -182,16 +182,16 @@
         ArrayList<VM> entities = new ArrayList<VM>();
         entities.add(entity);
 
-        
getItem().getRunCommand().setIsExecutionAllowed(VdcActionUtils.CanExecute(entities,
+        
getItem().getRunCommand().setIsExecutionAllowed(VdcActionUtils.canExecute(entities,
                 VM.class,
                 VdcActionType.RunVm));
-        
getItem().getPauseCommand().setIsExecutionAllowed(VdcActionUtils.CanExecute(entities,
+        
getItem().getPauseCommand().setIsExecutionAllowed(VdcActionUtils.canExecute(entities,
                 VM.class,
                 VdcActionType.HibernateVm));
-        
getItem().getShutdownCommand().setIsExecutionAllowed(VdcActionUtils.CanExecute(entities,
+        
getItem().getShutdownCommand().setIsExecutionAllowed(VdcActionUtils.canExecute(entities,
                 VM.class,
                 VdcActionType.ShutdownVm));
-        
getItem().getStopCommand().setIsExecutionAllowed(VdcActionUtils.CanExecute(entities,
+        
getItem().getStopCommand().setIsExecutionAllowed(VdcActionUtils.canExecute(entities,
                 VM.class,
                 VdcActionType.StopVm));
 
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserListModel.java
index 1f6ae39..c5948e6 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserListModel.java
@@ -611,7 +611,7 @@
                         : new ArrayList();
 
         getRemoveCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, DbUser.class, 
VdcActionType.RemoveUser));
+                && VdcActionUtils.canExecute(items, DbUser.class, 
VdcActionType.RemoveUser));
 
         getAssignTagsCommand().setIsExecutionAllowed(items.size() > 0);
     }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditDiskModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditDiskModel.java
index f299147..b2fdbb4 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditDiskModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditDiskModel.java
@@ -50,7 +50,7 @@
             setVolumeFormat(diskImage.getVolumeFormat());
 
             boolean isExtendImageSizeEnabled = getVm() != null &&
-                    VdcActionUtils.CanExecute(Arrays.asList(getVm()), 
VM.class, VdcActionType.ExtendImageSize);
+                    VdcActionUtils.canExecute(Arrays.asList(getVm()), 
VM.class, VdcActionType.ExtendImageSize);
             getSizeExtend().setIsChangable(isExtendImageSizeEnabled);
 
             Guid storageDomainId = diskImage.getStorageIds().get(0);
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java
index 1968758..9cffc49 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java
@@ -209,7 +209,7 @@
 
     public boolean isExtendImageSizeEnabled() {
         return (getEntity() != null) ?
-                VdcActionUtils.CanExecute(Arrays.asList(getEntity()), 
VM.class, VdcActionType.ExtendImageSize) : false;
+                VdcActionUtils.canExecute(Arrays.asList(getEntity()), 
VM.class, VdcActionType.ExtendImageSize) : false;
     }
 
     public VmDiskListModel()
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceListModel.java
index 760289b..39549a5 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceListModel.java
@@ -199,12 +199,12 @@
         }
 
         getNewCommand().setIsExecutionAllowed(vm != null
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.AddVmInterface));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.AddVmInterface));
         getEditCommand().setIsExecutionAllowed(vm != null
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.UpdateVmInterface)
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.UpdateVmInterface)
                 && (getSelectedItems() != null && getSelectedItems().size() == 
1));
         getRemoveCommand().setIsExecutionAllowed(vm != null
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.RemoveVmInterface) && canRemoveNics()
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.RemoveVmInterface) && canRemoveNics()
                 && (getSelectedItems() != null && getSelectedItems().size() > 
0));
     }
 
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
index c9f19b8..6218f07 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
@@ -2299,31 +2299,31 @@
 
         
getEditCommand().setIsExecutionAllowed(isEditCommandExecutionAllowed(items));
         getRemoveCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.RemoveVm));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.RemoveVm));
         getRunCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.RunVm));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.RunVm));
         getPauseCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.HibernateVm));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.HibernateVm));
         getShutdownCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.ShutdownVm));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.ShutdownVm));
         getStopCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.StopVm));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.StopVm));
         getMigrateCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.MigrateVm));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.MigrateVm));
         getCancelMigrateCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.CancelMigrateVm));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.CancelMigrateVm));
         getNewTemplateCommand().setIsExecutionAllowed(items.size() == 1
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.AddVmTemplate));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.AddVmTemplate));
         getRunOnceCommand().setIsExecutionAllowed(items.size() == 1
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.RunVmOnce));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.RunVmOnce));
         getExportCommand().setIsExecutionAllowed(items.size() > 0
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.ExportVm));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.ExportVm));
         getCreateSnapshotCommand().setIsExecutionAllowed(items.size() == 1
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.CreateAllSnapshotsFromVm));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.CreateAllSnapshotsFromVm));
         getRetrieveIsoImagesCommand().setIsExecutionAllowed(items.size() == 1
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.ChangeDisk));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.ChangeDisk));
         getChangeCdCommand().setIsExecutionAllowed(items.size() == 1
-                && VdcActionUtils.CanExecute(items, VM.class, 
VdcActionType.ChangeDisk));
+                && VdcActionUtils.canExecute(items, VM.class, 
VdcActionType.ChangeDisk));
         getAssignTagsCommand().setIsExecutionAllowed(items.size() > 0);
 
         getGuideCommand().setIsExecutionAllowed(getGuideContext() != null
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java
index 6ec7de6..9717026 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java
@@ -703,7 +703,7 @@
         boolean isCloneVmSupported = getIsCloneVmSupported();
 
         getCanSelectSnapshot().setEntity(!isPreviewing && !isLocked && 
!isStateless
-                && VdcActionUtils.CanExecute(Arrays.asList(vm), VM.class, 
VdcActionType.CreateAllSnapshotsFromVm));
+                && VdcActionUtils.canExecute(Arrays.asList(vm), VM.class, 
VdcActionType.CreateAllSnapshotsFromVm));
         getNewCommand().setIsExecutionAllowed(!isPreviewing && !isLocked && 
!isVmImageLocked && !isStateless);
         getPreviewCommand().setIsExecutionAllowed(isSelected && !isLocked && 
!isPreviewing && isVmDown && !isStateless);
         getCommitCommand().setIsExecutionAllowed(isPreviewing && isVmDown && 
!isStateless);


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

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

Reply via email to