1 | // Copyright 2004-2007 Jean-Francois Poilpret |
2 | // |
3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | // you may not use this file except in compliance with the License. |
5 | // You may obtain a copy of the License at |
6 | // |
7 | // http://www.apache.org/licenses/LICENSE-2.0 |
8 | // |
9 | // Unless required by applicable law or agreed to in writing, software |
10 | // distributed under the License is distributed on an "AS IS" BASIS, |
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | // See the License for the specific language governing permissions and |
13 | // limitations under the License. |
14 | |
15 | package net.sourceforge.hiveutils.service.impl; |
16 | |
17 | import org.apache.hivemind.impl.BaseLocatable; |
18 | import org.apache.hivemind.util.ToStringBuilder; |
19 | |
20 | import net.sourceforge.hiveevents.Consumer; |
21 | import net.sourceforge.hiveutils.util.PrefType; |
22 | |
23 | /** |
24 | * @author Jean-Francois Poilpret |
25 | */ |
26 | public class PreferenceContribution extends BaseLocatable |
27 | { |
28 | public void setName(String name) |
29 | { |
30 | _name = name; |
31 | } |
32 | public String getName() |
33 | { |
34 | return _name; |
35 | } |
36 | |
37 | public void setBeanClass(Class beanClass) |
38 | { |
39 | _beanClass = beanClass; |
40 | } |
41 | public Class getBeanClass() |
42 | { |
43 | return _beanClass; |
44 | } |
45 | |
46 | public void setType(PrefType type) |
47 | { |
48 | _type = type; |
49 | } |
50 | public PrefType getType() |
51 | { |
52 | return _type; |
53 | } |
54 | |
55 | public void setEventChannel(Consumer eventChannel) |
56 | { |
57 | _eventChannel = eventChannel; |
58 | } |
59 | public Consumer getEventChannel() |
60 | { |
61 | return _eventChannel; |
62 | } |
63 | |
64 | public String toString() |
65 | { |
66 | ToStringBuilder builder = new ToStringBuilder(this); |
67 | builder.append("name", _name); |
68 | builder.append("beanClass", _beanClass); |
69 | return builder.toString(); |
70 | } |
71 | |
72 | private String _name; |
73 | private Class _beanClass; |
74 | private PrefType _type; |
75 | private Consumer _eventChannel; |
76 | } |