1
2
3
4
5
6
7 package com.atlassian.plugin;
8
9 import com.atlassian.plugin.util.JavaVersionUtils;
10
11 import java.util.HashMap;
12 import java.util.Map;
13
14 public class PluginInformation
15 {
16 private String description;
17 private String descriptionKey;
18 private String version;
19 private String vendorName;
20 private String vendorUrl;
21 private float maxVersion;
22 private float minVersion;
23 private Float minJavaVersion;
24 private Map parameters = new HashMap();
25
26 public String getDescription()
27 {
28 return description;
29 }
30
31 public void setDescription(String description)
32 {
33 this.description = description;
34 }
35
36 public String getVersion()
37 {
38 return version;
39 }
40
41 public void setVersion(String version)
42 {
43 this.version = version;
44 }
45
46 public void setVendorName(String vendorName)
47 {
48 this.vendorName = vendorName;
49 }
50
51 public void setVendorUrl(String vendorUrl)
52 {
53 this.vendorUrl = vendorUrl;
54 }
55
56 public String getVendorName()
57 {
58 return vendorName;
59 }
60
61 public String getVendorUrl()
62 {
63 return vendorUrl;
64 }
65
66
67 public void setMaxVersion(float maxVersion)
68 {
69 this.maxVersion = maxVersion;
70 }
71
72 public void setMinVersion(float minVersion)
73 {
74 this.minVersion = minVersion;
75 }
76
77 public float getMaxVersion()
78 {
79 return maxVersion;
80 }
81
82 public float getMinVersion()
83 {
84 return minVersion;
85 }
86
87 public Float getMinJavaVersion()
88 {
89 return minJavaVersion;
90 }
91
92 public void setMinJavaVersion(Float minJavaVersion)
93 {
94 this.minJavaVersion = minJavaVersion;
95 }
96
97 public Map getParameters()
98 {
99 return parameters;
100 }
101
102 public void addParameter(Object key, Object value)
103 {
104 this.parameters.put(key, value);
105 }
106
107 public boolean satisfiesMinJavaVersion()
108 {
109 if(minJavaVersion != null)
110 {
111 return JavaVersionUtils.satisfiesMinVersion(minJavaVersion.floatValue());
112 }
113 return true;
114 }
115
116 public void setDescriptionKey(String descriptionKey)
117 {
118 this.descriptionKey = descriptionKey;
119 }
120
121 public String getDescriptionKey()
122 {
123 return descriptionKey;
124 }
125 }