Hello all,
I am interested in submitting a class file for your review.
This class file will allow users to get version and build information
for the Jakarta-Oro project.
I was unsure if I am allowed to send attachments to the list, as
I am new to the dev list, so I simply copied my version of this class
below. Hopefully you find it amusing :-).
I'm not sure if I 'named' the various pieces of the version
correctly, so please change to taste. This class can go in
org.apache.oro or org.apache.oro.util. Also, the getFullVersion()
method text should be changed to return a String more to your liking,
maybe with a reference to the license? I'm kinda winging it here....
Thank you for your consideration,
Tom Mitchell
****************BEGIN CLASS FILE*******************
/*
************* ADD ID HERE *******************
*
* Copyright 2000-2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.oro;
/**
* The Version class is a utility for obtaining version and
* build information.
*
*
*
***************NOTE TO DEVELOPERS********************
* I am assuming that given the present version, 2.0.8,
* 2 is the major version.
* 0 is the minor version.
* 8 is the revision.
* Please change the methods and variables to your verbage.
* Also, please add product information to the getFullVersion()
* method to your liking.
*****************************************************
*
* @version @version@
* @since 2.1
*/
public class Version
{
/** Major version. For example, in version 2.0.8; 2. */
private static final int majorVersion = 2;
/** Minor version. For example, in version 2.0.8; 0. */
private static final int minorVersion = 1;
/** Revision. For example, in version 2.0.8; 8. */
private static final int revision = 0;
/** Specific build number. */
private static final int buildNumber = 1234;
/**
* Gets a user-friendly version String.
*
* @return <code>"Jakarta-Oro version "</code> plus the version
* currently running.
*/
public static String getFullVersion()
{
StringBuffer s = new StringBuffer("Jakarta-Oro version: ");
s.append(majorVersion);
s.append(".");
s.append(minorVersion);
s.append(".");
s.append(revision);
return s.toString();
}
/**
* Gets the major version. For example, in version 2.0.8; 2
* is the major version.
*
* @return integer representing the major version.
*/
public static int getMajorVersion()
{
return majorVersion;
}
/**
* Gets the minor version. For example, in version 2.0.8; 0
* is the minor version.
*
* @return integer representing the minor version.
*/
public static int getMinorVersion()
{
return minorVersion;
}
/**
* Gets the revision. For example, in version 2.0.8; 8
* is the revision number.
*
* @return integer representing the revision number.
*/
public static int getRevision()
{
return revision;
}
/**
* Gets the specific build number.
*
* @return integer representing the build number.
*/
public static int getBuildNumber()
{
return buildNumber;
}
}
****************END CLASS FILE*******************
=============================
Tom Mitchell,Jr.
Fathom Development Team
Progress Software
One Indian Head Plaza
Nashua, NH 03060
603.594.6905
www.progress.com <http://www.progress.com/>
=============================
I close my eyes
And feel the water rise around me
Drown the beat of time
Let my senses fall away
I can see much clearer now,
I'm blind.
Find all you need in your mind
If you take the time.
-Dream Theater
=============================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]