Moti Asayag has uploaded a new change for review. Change subject: engine: Add constructor to ValidationResult for collections ......................................................................
engine: Add constructor to ValidationResult for collections The patch adds a c'tor which gets a Collection of strings in order to extend the instantiation method of the class. Change-Id: I7de4dcb823b10a20135c1af1e5cb32d9bdf04082 Signed-off-by: Moti Asayag <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ValidationResult.java 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/60/10760/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ValidationResult.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ValidationResult.java index dfb7cbd..111e174 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ValidationResult.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ValidationResult.java @@ -1,6 +1,7 @@ package org.ovirt.engine.core.bll; import java.util.Arrays; +import java.util.Collection; import java.util.Collections; import java.util.List; @@ -64,6 +65,19 @@ } /** + * Validation result for failure with a given message. + * + * @param message + * The validation failure message. + * @param variableReplacements + * Replacements for variables that appear in the message, in syntax: "$var text" where $var is the + * variable to be replaced, and the text is the replacement. + */ + public ValidationResult(VdcBllMessages message, Collection<String> variableReplacements) { + this(message, variableReplacements.toArray(new String[variableReplacements.size()])); + } + + /** * @return Did the validation succeed or not? */ public boolean isValid() { -- To view, visit http://gerrit.ovirt.org/10760 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7de4dcb823b10a20135c1af1e5cb32d9bdf04082 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
