Alon Bar-Lev has posted comments on this change. Change subject: core: introduce context pattern ......................................................................
Patch Set 18: (2 comments) http://gerrit.ovirt.org/#/c/28829/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java: Line 172: protected CommandBase(T parameters, CommandContext cmdContext) { Line 173: if (cmdContext == null) { Line 174: cmdContext = Line 175: new CommandContext().setEngineContext(new EngineContext(parameters.getSessionId())) Line 176: .setExecutionContext(new ExecutionContext()); won't new CommandContext() already sets some execution context context by default? also, I would like to avoid setEngineContext if possible, this should be in constructor of CommandContext, for the same reasons there is not setContext() Line 177: } Line 178: this.context = cmdContext; Line 179: _parameters = parameters; Line 180: DbUser user = http://gerrit.ovirt.org/#/c/28829/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/context/EngineContext.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/context/EngineContext.java: Line 11: public String getSessionId() { Line 12: return sessionId; Line 13: } Line 14: Line 15: public EngineContext setSessionId(String sessionId) { so you can remove the parameter from the constructor Line 16: this.sessionId = sessionId; Line 17: return this; Line 18: } Line 19: -- To view, visit http://gerrit.ovirt.org/28829 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I310f5f77fff78b3232ee77fe63791425fd521516 Gerrit-PatchSet: 18 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Arik Hadas <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: Ravi Nori <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[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
