Methods Summary |
---|
public int | getMajor()Get the majr version, for example.
If the addon is named as am_components_installer_01_02_03.jar
then the value of 1 will be returned.
return this.major;
|
public int | getMinor()Get the minor version, for example.
If the addon is named as am_components_installer_01_02_03.jar
then the value of 2 will be returned.
return this.minor;
|
protected java.lang.String | getName()
return addonName;
|
protected java.lang.String | getNamePart()
return namePart;
|
public int | getPatch()Get the patch version, for example.
If the addon is named as am_components_installer_01_02_03.jar
then the value of 3 will be returned.
return this.patch;
|
public java.lang.String | getVersion()Get the full version as string, for example.
If the addon is named as am_components_installer_01_02_03.jar
then the version output will be "01_02_03" in String format.
return version;
|
protected boolean | isHigher(com.sun.enterprise.addons.AddonVersionImpl newVersion)
if (newVersion.getMajor() > getMajor()) {
return true;
} else if (newVersion.getMajor() < getMajor()) {
return false;
}
if (newVersion.getMinor() > getMinor()) {
return true;
} else if (newVersion.getMinor() < getMinor()) {
return false;
}
if (newVersion.getPatch() > getPatch()) {
return true;
}
return false;
|
protected boolean | isLower(com.sun.enterprise.addons.AddonVersionImpl newVersion)
if (newVersion.getMajor() < getMajor()) {
return true;
} else if (newVersion.getMajor() > getMajor()) {
return false;
}
if (newVersion.getMinor() < getMinor()) {
return true;
} else if (newVersion.getMinor() > getMinor()) {
return false;
}
if (newVersion.getPatch() < getPatch()) {
return true;
}
return false;
|
private void | parseVersion(java.lang.String versionPart)
String [] strArr = versionPart.split(VERSION_SEPARATOR);
setMajor(strArr[0]);
setMinor(strArr[1]);
setPatch(strArr[2]);
|
private void | setMajor(java.lang.String major)
try {
this.major = (Integer.valueOf(major)).intValue();
} catch (Exception e) {
throw new AddonException(e);
}
|
private void | setMinor(java.lang.String minor)
try {
this.minor = (Integer.valueOf(minor)).intValue();
} catch (Exception e) {
throw new AddonException(e);
}
|
private void | setPatch(java.lang.String patch)
try {
this.patch = (Integer.valueOf(patch)).intValue();
} catch (Exception e) {
throw new AddonException(e);
}
|
public java.lang.String | toString()
StringBuffer sb = new StringBuffer("");
try {
sb.append("Version details for the AddOn " + addonName + ":");
sb.append("version = " + getVersion() + ":");
sb.append("major = " + getMajor() + ":");
sb.append("minor = " + getMinor() + ":");
sb.append("patch = " + getPatch());
} catch (Exception e) {
}
return sb.toString();
|