/*******************************************************************************
 * Black Duck Software Suite SDK
 * Copyright (C) 2016 Black Duck Software, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 *******************************************************************************/
package com.blackducksoftware.integration.hub.validate;

public class ValidationResult {
	private final ValidationResultEnum resultType;
	private final String message;

	public ValidationResult(final ValidationResultEnum resultType, final String message) {
		this.resultType = resultType;
		this.message = message;
	}

	public ValidationResultEnum getResultType() {
		return resultType;
	}

	public String getMessage() {
		return message;
	}
}

@@ -1035,16 +1035,159 @@
 idate;%0A%0A
+import java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.Vector;%0A%0Aimport org.apache.commons.lang3.StringUtils;%0A%0A
 public c
@@ -1207,16 +1207,19 @@
 onResult
+%3CT%3E
  %7B%0A%09priv
@@ -1261,16 +1261,17 @@
 ltType;%0A
+%0A
 %09private
@@ -1277,30 +1277,84 @@
 e final 
+Map%3C
 String
- message
+, List%3CString%3E%3E messageMap;%0A%0A%09private final T returnObject
 ;%0A%0A%09publ
@@ -1422,22 +1422,22 @@
 nal 
-String message
+T returnObject
 ) %7B%0A
@@ -1479,25 +1479,87 @@
 his.
-message = message
+returnObject = returnObject;%0A%09%09messageMap = new HashMap%3CString, List%3CString%3E%3E()
 ;%0A%09%7D
@@ -1644,47 +1644,833 @@
 lic 
-String getMessage() %7B%0A%09%09return message;
+void addMessage(final String fieldKey, final String message) %7B%0A%0A%09%09List%3CString%3E messageList;%0A%09%09if (messageMap.containsKey(fieldKey)) %7B%0A%09%09%09messageList = messageMap.get(fieldKey);%0A%09%09%7D else %7B%0A%09%09%09messageList = new Vector%3CString%3E();%0A%09%09%09messageMap.put(fieldKey, messageList);%0A%09%09%7D%0A%0A%09%09messageList.add(message);%0A%09%7D%0A%0A%09public T getReturnObject() %7B%0A%09%09return returnObject;%0A%09%7D%0A%0A%09public String getValidationMessages(final String fieldKey) %7B%0A%09%09String message = %22%22;%0A%0A%09%09if (messageMap.containsKey(fieldKey)) %7B%0A%09%09%09final List%3CString%3E messageList = messageMap.get(fieldKey);%0A%0A%09%09%09message = StringUtils.join(messageList, %22 %22);%0A%09%09%7D%0A%09%09return message;%0A%09%7D%0A%0A%09public List%3CString%3E getValidationMessageList(final String fieldKey) %7B%0A%0A%09%09if (messageMap.containsKey(fieldKey)) %7B%0A%09%09%09return messageMap.get(fieldKey);%0A%09%09%7D else %7B%0A%09%09%09return new Vector%3CString%3E();%0A%09%09%7D
 %0A%09%7D%0A

Update the ValidationResult object to contain multiple fields