Martin Mucha has posted comments on this change.

Change subject: userportal,webadmin: moved duplicate UICommand creation to 
static factory methods
......................................................................


Patch Set 9:

(2 comments)

http://gerrit.ovirt.org/#/c/33317/9/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/UICommandFactory.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/UICommandFactory.java:

Line 1: package org.ovirt.engine.ui.uicommonweb;
Line 2: 
Line 3: import org.ovirt.engine.ui.uicompat.ConstantsManager;
Line 4: 
Line 5: public class UICommandFactory {
> All "createXxxCommand" methods could also accept "title" parameter to cover
all those methods will(was) be moved as static factory to UICommand class, 
which methods was modified to resemble builder pattern. This solves this 
comment.
Line 6: 
Line 7:     private final ICommandTarget target;
Line 8: 
Line 9:     public UICommandFactory(ICommandTarget target) {


http://gerrit.ovirt.org/#/c/33317/9/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/configure/scheduling/NewClusterPolicyModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/configure/scheduling/NewClusterPolicyModel.java:

Line 222:         if (!clusterPolicy.isLocked() || commandType == 
CommandType.Clone) {
Line 223:             UICommand onSaveCommand = new 
UICommandFactory(this).createDefaultOkUiCommand("OnSave"); //$NON-NLS-1$
Line 224:             getCommands().add(onSaveCommand);
Line 225:             UICommand onResetCommand = new UICommand("OnReset", 
this); //$NON-NLS-1$
Line 226:             
onResetCommand.setTitle(ConstantsManager.getInstance().getConstants().resetTitle());
> yes, but this not what I'm trying to achieve. On top of this, this way I ju
all those methods will(was) be moved as static factory to UICommand class, 
which methods was modified to resemble builder pattern. This solves this 
comment.
Line 227:             getCommands().add(onResetCommand);
Line 228:         }
Line 229: 
Line 230:         UICommand cancelCommand = new UICommand("Cancel", this); 
//$NON-NLS-1$


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0b3b1344b1a3819e58de4db5093106bedf5291e6
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Martin Mucha <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to