View Javadoc

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