Change in ovirt-engine[master]: webadmin: removed caching from EnumTranslator.
lvernia at redhat.com
lvernia at redhat.com
Thu Jul 10 09:47:40 UTC 2014
Lior Vernia has submitted this change and it was merged.
Change subject: webadmin: removed caching from EnumTranslator.
......................................................................
webadmin: removed caching from EnumTranslator.
* org.ovirt.engine.ui.uicompat.Translator changed to be generic.
* org.ovirt.engine.ui.uicompat.EnumTranslator extends generic
Translator using Enum<?> as type parameter. Doing so there's guarantee
that only enum values are passed to 'get' method, which removed the
need to instantiate EnumTranslator with Class<?> type, because passed
'key' parameter will always have same (class) type as 'type' field.
* Two static factories in EnumTranslator removed and replace by
default constructor.
* Note that key to access resourcebundle is calculated from
Enum.getDeclaringClass() and not Enum.getClass(); when using
polymorphic enum name your resourcebundle keys appropriately.
Change-Id: I3df424d8e7a35ed249b2760da79deba7db31b785
Signed-off-by: Martin Mucha <mmucha at redhat.com>
---
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/FrontendEventsHandlerImpl.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/renderer/EnumRenderer.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/renderer/VolumeTransportTypeRenderer.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/DiskContainersColumn.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/ImageResourceColumn.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/ImageWithDecoratorColumn.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/configure/roles_ui/RoleNode.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/pools/PoolGeneralModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/NeutronPluginTranslator.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateGeneralModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserEventNotifierListModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGeneralModel.java
M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/EnumTranslator.java
M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Translator.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/host/SubTabHostGeneralPresenter.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/scheduling/ManagePolicyUnitPopupView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabStorageView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabVolumeView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/gluster/SubTabVolumeGeneralView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VmStatusCell.java
24 files changed, 57 insertions(+), 118 deletions(-)
Approvals:
Lior Vernia: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/26048
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3df424d8e7a35ed249b2760da79deba7db31b785
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Lior Vernia <lvernia at redhat.com>
Gerrit-Reviewer: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list