Vojtech Szocs has posted comments on this change. Change subject: userportal,webadmin: list models managed by GIN ......................................................................
Patch Set 15: (1 comment) http://gerrit.ovirt.org/#/c/34193/15/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/gin/UiCommonModule.java File frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/gin/UiCommonModule.java: Line 54: bind(UserPortalBasicListProvider.class).in(Singleton.class); Line 55: Line 56: // Extended tab: Virtual Machine Line 57: bind(UserPortalListProvider.class).in(Singleton.class); Line 58: bind(new TypeLiteral<UserPortalDetailModelProvider<UserPortalListModel, VmGeneralModel>>(){}) > I got rid of the @Provides methods in favor of this, a lot less code. Agreed on using TypeLiteral, also @Provides methods push the responsibility of instance creation, i.e. new Something() to user code, which yields even more verbosity (passing @Inject'ed dependencies into constructor/setters of created instance). Line 59: .in(Singleton.class); Line 60: bind(new TypeLiteral<UserPortalDetailModelProvider<UserPortalListModel, PoolGeneralModel>>(){}) Line 61: .in(Singleton.class); Line 62: bind(VmInterfaceListModelProvider.class).in(Singleton.class); -- To view, visit http://gerrit.ovirt.org/34193 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3a2f8915203f4a2b9868767419351ef7ac702891 Gerrit-PatchSet: 15 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches