Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 5aa5b88ba9861dc93dc3afc125c6e6c451d625c4 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*******************************************************************************
 * Copyright (c) 2010 Tasktop Technologies 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:
 *     Tasktop Technologies - initial API and implementation
 *******************************************************************************/

package org.eclipse.equinox.internal.p2.ui.discovery.wizards;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.eclipse.equinox.internal.p2.discovery.model.Tag;

/**
 * A configuration for the discovery wizard that affects its presentation and behavior.
 * 
 * @author David Green
 */
public class CatalogConfiguration {

	private final List<CatalogFilter> filters = new ArrayList<CatalogFilter>();

	private boolean showInstalled = false;

	private boolean showInstalledFilter = true;

	private boolean showTagFilter = true;

	private boolean showTextFilter = true;

	private boolean verifyUpdateSiteAvailability = true;

	private Set<Tag> selectedTags;

	public List<CatalogFilter> getFilters() {
		return filters;
	}

	public Set<Tag> getSelectedTags() {
		return selectedTags;
	}

	public boolean isShowInstalled() {
		return showInstalled;
	}

	public boolean isShowInstalledFilter() {
		return showInstalledFilter;
	}

	public boolean isShowTagFilter() {
		return showTagFilter;
	}

	/**
	 * indicate if a text field should be provided to allow the user to filter connector descriptors
	 */
	public boolean isShowTextFilter() {
		return showTextFilter;
	}

	public boolean isVerifyUpdateSiteAvailability() {
		return verifyUpdateSiteAvailability;
	}

	public void setShowInstalled(boolean showInstalled) {
		this.showInstalled = showInstalled;
	}

	public void setShowInstalledFilter(boolean showInstalledFilter) {
		this.showInstalledFilter = showInstalledFilter;
	}

	public void setShowTagFilter(boolean showTagFilter) {
		this.showTagFilter = showTagFilter;
	}

	/**
	 * indicate if a text field should be provided to allow the user to filter connector descriptors
	 */
	public void setShowTextFilter(boolean showTextFilter) {
		this.showTextFilter = showTextFilter;
	}

	public void setVerifyUpdateSiteAvailability(boolean verifyUpdateSiteAvailability) {
		this.verifyUpdateSiteAvailability = verifyUpdateSiteAvailability;
	}

	public void setSelectedTags(Collection<Tag> selectedTags) {
		if (selectedTags != null) {
			this.selectedTags = new HashSet<Tag>(selectedTags);
		} else {
			this.selectedTags = null;
		}
	}

}

Back to the top