incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: rev 21651 - incubator/depot/trunk/version/src/java/org/apache/depot/version/impl
Date Thu, 24 Jun 2004 18:36:13 GMT
Author: ajack
Date: Thu Jun 24 11:36:13 2004
New Revision: 21651

Modified:
   incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersion.java
   incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersionMarker.java
Log:
Added a few helper constructors.

Modified: incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersion.java
==============================================================================
--- incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersion.java
(original)
+++ incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersion.java
Thu Jun 24 11:36:13 2004
@@ -115,6 +115,62 @@
 				version.getBuildDate());
 	}
 
+	/*
+	 * Construct a standard version
+	 */
+	public ApacheVersion(int major,int minor,ReleaseLevel releaseLevel, int releaseQualifier,

+					int point, int buildNumber, Date buildDate) throws VersionException {
+		m_specification =
+			VersionSpecificationFactory.createDefaultVersionSpecification();
+		m_data =
+			new VersionData(
+				VersionDataElementSet.DEFAULT,
+				major,
+				minor,
+				releaseLevel,
+				releaseQualifier,
+				point,
+				buildNumber,
+				buildDate);
+	}
+
+	/*
+	 * Construct a standard version
+	 */
+	public ApacheVersion(int major,int minor,ReleaseLevel releaseLevel, int releaseQualifier,

+					int point) {
+		m_specification =
+			VersionSpecificationFactory.createDefaultVersionSpecification();
+		m_data =
+			new VersionData(
+				VersionDataElementSet.DEFAULT,
+				major,
+				minor,
+				releaseLevel,
+				releaseQualifier,
+				point,
+				VersionDataElement.DEFAULT_BUILD_NUMBER,
+				VersionDataElement.DEFAULT_BUILD_DATE);
+	}
+
+	/*
+	 * Construct a standard version
+	 */
+	public ApacheVersion(int major,int minor,ReleaseLevel releaseLevel,int buildNumber) {
+		m_specification =
+			VersionSpecificationFactory.createDefaultVersionSpecification();
+		m_data =
+			new VersionData(
+				VersionDataElementSet.DEFAULT,
+				major,
+				minor,
+				releaseLevel,
+				VersionDataElement.DEFAULT_RELEASE_QUALIFIER,
+				VersionDataElement.DEFAULT_POINT,
+				buildNumber,
+				VersionDataElement.DEFAULT_BUILD_DATE);
+	}
+
 	/**
 	 * Constructor for Version.
 	 * @param other

Modified: incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersionMarker.java
==============================================================================
--- incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersionMarker.java
(original)
+++ incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersionMarker.java
Thu Jun 24 11:36:13 2004
@@ -35,6 +35,7 @@
 import org.apache.depot.version.VersionConstants;
 import org.apache.depot.version.VersionException;
 import org.apache.depot.version.VersionMarker;
+import org.apache.depot.version.impl.data.ReleaseLevel;
 import org.apache.depot.version.specification.VersionSpecification;
 import org.apache.depot.version.specification.formatting.VersionFormat;
 import org.apache.depot.version.specification.formatting.VersionFormatException;
@@ -180,6 +181,12 @@
 				VersionIdentifier.importVersionIdentifier(id),
 				specification,
 				data));
+	}
+	
+	public ApacheVersionMarker(String id,int major,int minor,ReleaseLevel releaseLevel,int buildNumber)

+	{
+		this(VersionIdentifier.importVersionIdentifier(id),
+				new ApacheVersion(major,minor,releaseLevel,buildNumber));		
 	}
 
 	/**

Mime
View raw message