Source code: javax/ide/extension/spi/Feature.java
1 package javax.ide.extension.spi;
2
3 /**
4 * Feature information gathered from processing the <b>feature-hook</b> section
5 * of the extension manifest. The information recorder here describes the
6 * functionality an extension provides in a user visible way.
7 */
8 public final class Feature
9 {
10 private String _copyright;
11 private String _description;
12 private String _iconPath;
13 private String _license;
14 private String _partOf;
15 private boolean _isOptional;
16
17 void setLicense( String license )
18 {
19 _license = license;
20 }
21
22 void setCopyright( String copyright )
23 {
24 _copyright = copyright;
25 }
26
27
28 void setIconPath( String iconPath )
29 {
30 _iconPath = iconPath;
31 }
32
33
34
35 void setDescription( String description )
36 {
37 _description = description;
38 }
39
40
41 void setOptional( boolean optional )
42 {
43 _isOptional = optional;
44 }
45
46 void setPartOf( String partOf )
47 {
48 _partOf = partOf;
49 }
50
51 /**
52 * Gets the text of any license for this feature.
53 *
54 * @return the text of any license for this feature. May return null if this
55 * feature does not have a license.
56 */
57 public String getLicense()
58 {
59 return _license;
60 }
61
62 /**
63 * Gets a copyright message for this feature.
64 *
65 * @return a copyright message for this feature. May return null if this
66 * feature does not have a copyright message.
67 */
68 public String getCopyright()
69 {
70 return _copyright;
71 }
72
73 /**
74 * Gets the path of an icon for this feature.
75 *
76 * @return an icon used to represent this feature. May return null if this
77 * feature does not have an icon.
78 */
79 public String getIconPath()
80 {
81 return _iconPath;
82 }
83
84 /**
85 * Gets a description of this feature.
86 *
87 * @return a description of this feature. May return null.
88 */
89 public String getDescription()
90 {
91 return _description;
92 }
93
94 /**
95 * Get whether this feature is optional. An optional feature is one which the
96 * user can choose to switch off.
97 *
98 * @return true if this feature is optional.
99 */
100 public boolean isOptional()
101 {
102 return _isOptional;
103 }
104
105 /**
106 * Gets the id of another extension which this feature forms a part of.
107 *
108 * @return the id of another extension which this feature belongs to. May
109 * return null if this feature is a standalone feature.
110 */
111 public String getPartOf()
112 {
113 return _partOf;
114 }
115 }