Skip to main content
summaryrefslogtreecommitdiffstats
blob: ccc0abc8ad7a071df91a95216628e42e255352ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*******************************************************************************
 * Copyright (c) 2009 Frank Becker and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Frank Becker - initial API and implementation
 *******************************************************************************/

package org.eclipse.mylyn.internal.bugzilla.core;

import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import org.eclipse.mylyn.tasks.core.RepositoryResponse;

/**
 * @author Frank Becker
 */
public class BugzillaRepositoryResponse extends RepositoryResponse {

	private Map<String, Map<String, List<String>>> responseData = new LinkedHashMap<String, Map<String, List<String>>>();

	public BugzillaRepositoryResponse(ResponseKind reposonseKind, String taskId) {
		super(reposonseKind, taskId);
	}

	public BugzillaRepositoryResponse() {
		// ignore
	}

	public Map<String, Map<String, List<String>>> getResponseData() {
		return responseData;
	}

	public void setResponseData(Map<String, Map<String, List<String>>> responseData) {
		this.responseData = responseData;
	}

	public void addResponseData(String dt1, String dt2, String response) {

		Map<String, List<String>> responseMap = responseData.get(dt1);

		if (responseMap == null) {
			responseMap = new LinkedHashMap<String, List<String>>();
			responseData.put(dt1, responseMap);
		}
		List<String> responseList = responseMap.get(dt2);
		if (responseList == null) {
			responseList = new LinkedList<String>();
			responseMap.put(dt2, responseList);
		}

		responseList.add(response);
	}

}

Back to the top