Skip to main content
summaryrefslogtreecommitdiffstats
blob: 412834ba1155c4c47ea1b21a6f88261d715265c2 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*******************************************************************************
 * Copyright (c) 2004, 2008 Eugene Kuleshov 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:
 *     Eugene Kuleshov - initial API and implementation
 *     Tasktop Technologies - improvements
 *******************************************************************************/

package org.eclipse.mylyn.tasks.core;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * Specifies attributes for a task repository.
 * 
 * @author Eugene Kuleshov
 * @author Steffen Pingel
 * @since 2.0
 */
public final class RepositoryTemplate {

	public final Map<String, String> genericAttributes = new LinkedHashMap<String, String>();

	public final String label;

	public final String repositoryUrl;

	public final String newTaskUrl;

	public final String taskPrefixUrl;

	public final String taskQueryUrl;

	public final String newAccountUrl;

	public final boolean anonymous;

	public final String version;

	public final boolean addAutomatically;

	public final String characterEncoding;

	public RepositoryTemplate(String label, String repositoryUrl, String characterEncoding, String version,
			String newTaskUrl, String taskPrefix, String taskQuery, String newAccountUrl, boolean anonymous,
			boolean addAutomatically) {
		this.label = label;
		this.repositoryUrl = repositoryUrl;
		this.newTaskUrl = newTaskUrl;
		this.taskPrefixUrl = taskPrefix;
		this.taskQueryUrl = taskQuery;
		this.newAccountUrl = newAccountUrl;
		this.version = version;
		this.anonymous = anonymous;
		this.characterEncoding = characterEncoding;
		this.addAutomatically = addAutomatically;
	}

	public void addAttribute(String name, String value) {
		genericAttributes.put(name, value);
	}

	public String getAttribute(String name) {
		return genericAttributes.get(name);
	}

	public Map<String, String> getAttributes() {
		return this.genericAttributes;
	}
}

Back to the top