Package org.alfresco.repo.module
Class ModuleVersionNumber
java.lang.Object
org.alfresco.repo.module.ModuleVersionNumber
- All Implemented Interfaces:
Externalizable,Serializable
The exising Alfresco VersionNumber can only be numeric. ModuleVersionNumber allows string literals in the version number.
It follows maven conventions and actually uses the ComparableVersion class from the maven code base.
- Author:
- Gethin James
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.maven.artifact.versioning.ComparableVersionstatic final ModuleVersionNumberstatic final ModuleVersionNumber -
Constructor Summary
ConstructorsConstructorDescriptionModuleVersionNumber(String versionString) ModuleVersionNumber(VersionNumber versionCurrent) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ModuleVersionNumber installingVersion) Now that we create internal releases of the formM.m.r-M9(milestone),M.m.r-A9(alpha) andM.m.r-RC9(release candidate) during development and testing, we need to ensure we can upgrade from any of these to any other, as they may occur in any order and also to the final external releaseM.m.r.booleaninthashCode()voidtoString()void
-
Field Details
-
VERSION_ZERO
-
VERSION_BIG
-
delegate
protected org.apache.maven.artifact.versioning.ComparableVersion delegate
-
-
Constructor Details
-
ModuleVersionNumber
public ModuleVersionNumber() -
ModuleVersionNumber
-
ModuleVersionNumber
-
-
Method Details
-
compareTo
Now that we create internal releases of the formM.m.r-M9(milestone),M.m.r-A9(alpha) andM.m.r-RC9(release candidate) during development and testing, we need to ensure we can upgrade from any of these to any other, as they may occur in any order and also to the final external releaseM.m.r. We also will allow a change from the final release back to an internal one for regression testing. The code withinModuleComponentHelperwhich calls this method, checks if it is the same version (0) and then if it is downgrading (> 0), so if they share the sameM.m.rpart matches AND is one of these formats, we return<0.- Parameters:
installingVersion- the new version- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-
hashCode
public int hashCode() -
equals
-
toString
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-