summaryrefslogtreecommitdiffstats
blob: 9e3397387140d9eae37285435abbf6dc8644e6b7 (plain)
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
/*
 * Copyright (c) 2010-2015, Isode Limited, London, England.
 * All rights reserved.
 */
package com.isode.stroke.elements;

import java.util.ArrayList;
import java.util.List;

import com.isode.stroke.jid.JID;

public class SecurityLabelsCatalog extends Payload {
	private JID to_;
	private String name_ = "";
	private String description_ = "";
	private List<Item> items_ = new ArrayList<Item>();

	public static class Item {
		private SecurityLabel label_;
		private String selector_ = "";
		private boolean default_;

		public SecurityLabel getLabel() {
			return label_;
		}

		public void setLabel(SecurityLabel label) {
			label_ = label;
		}

		public final String getSelector() { return selector_; }

		public void setSelector(final String selector) {
			selector_ = selector;
		}

		public boolean getIsDefault() { return default_; }

		public void setIsDefault(boolean isDefault) {
			default_ = isDefault;
		}
	};
	
	public SecurityLabelsCatalog() {
		this(new JID());
	}

	public SecurityLabelsCatalog(final JID to) {
		to_ = to;
	}

	public final List<Item> getItems() {
		return items_;
	}

	public void addItem(final Item item) {
		items_.add(item);
	}

	public final JID getTo() {
		return to_;
	}

	public void setTo(final JID to) {
		to_ = to;
	}

	public final String getName() {
		return name_;
	}

	public void setName(final String name) {
		name_ = name;
	}

	public final String getDescription() {
		return description_;
	}

	public void setDescription(final String description) {
		description_ = description;
	}

}