Newer
Older
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package dk.gov.oiosi;
/**
* Administrative class to keep track of the version number of the OIORASP
* release.
* <p>
* This class is created to be similar to Version classes in Apache project,
* e.g. org.apache.xalan.Version.
* <p>
* In future it can be used by configuration procedures to check proper library
* related environment update.
* <p>
* Do not mix it with dk.gov.oiosi.common.Version, which is Version of server
* and contains another information.
*
* @since OIORASP 1.2.4
*/
public class Version {
/**
* Get the basic version string for the current OIORASP release. Version
* String formatted like
* <p>
* <CODE>"<B>OIORASP</B> <B>Java</B> v.r.d"</CODE>.
* <p>
* where v - major version number, r - release number, d - maintanance
* version number
*
* @return String denoting our current version
*/
public static String getVersion() {
StringBuilder sb = new StringBuilder();
sb.append(getProduct());
sb.append(" ");
sb.append(getImplementationLanguage());
sb.append(" ");
sb.append(getMajorVersionNum());
sb.append(".");
sb.append(getReleaseVersionNum());
sb.append(".");
sb.append(getMaintenanceVersionNum());
return sb.toString();
}
/**
* Print the processor version to the command line.
*
* @param argv
* command line arguments, unused.
*/
public static void main(String argv[]) {
System.out.println(getVersion());
}
/**
* Name of product: OIORASP.
*/
public static String getProduct() {
return "OIORASP";
}
/**
* Implementation Language: Java.
*/
public static String getImplementationLanguage() {
return "Java";
}
/**
* Major version number. Version number. This changes only when there is a
* significant, externally apparent enhancement from the previous release.
* 'n' represents the n'th version.
*
* Clients should carefully consider the implications of new versions as
* external interfaces and behaviour may have changed.
*/
public static int getMajorVersionNum() {
return 1;
}
/**
* Release Number. Release number. This changes when: - a new set of
* functionality is to be added, eg, implementation of a new W3C
* specification. - API or behaviour change. - its designated as a reference
* release.
*/
public static int getReleaseVersionNum() {
return 3;
}
/**
* Maintenance Drop Number. This identifier is used to designate maintenance
* drop applied to a specific release and contains fixes for defects
* reported. It maintains compatibility with the release and contains no API
* changes.
*/
public static int getMaintenanceVersionNum() {
return 0;
}
}