com.ibm.commerce.foundation.server.util.version

Class VersionHelper

  • java.lang.Object
    • com.ibm.commerce.foundation.server.util.version.VersionHelper


  • public class VersionHelper
    extends java.lang.Object
    The purpose of this utility class is to provide common methods that deal with the request version. Based on the current version of the request, the service code may need to alter its behaviour to ensure compatibility between version.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String FEP2_BOD_VERSION
      BOD version used in WebSphere Commerce 6, feature pack 2.
      static java.lang.String FEP3_BOD_VERSION
      BOD version used WebSphere Commerce 6, feature pack 3.
      static java.lang.String FEP4_BOD_VERSION
      BOD version used in WebSphere Commerce 6, feature pack 4.
      static java.lang.String FEP5_BOD_VERSION
      BOD version used in WebSphere Commerce 6, feature pack 5.
      static int HIGHER_VERSION
      The source version is higher than the target version
      static int LOWER_VERSION
      The source version is lower than the target version
      static int SAME_VERSION
      The source version is same the target version
      static java.lang.String V7_FEP1_BOD_VERSION
      BOD version used in WebSphere Commerce 7, feature pack 1.
      static java.lang.String V7_GA_BOD_VERSION
      BOD version used in WebSphere Commerce 7.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static int compareRequestVersion(java.lang.String astrVersion)
      Compares the the version found in the request against the specified version.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOWER_VERSION

        public static final int LOWER_VERSION
        The source version is lower than the target version
        See Also:
        Constant Field Values
      • SAME_VERSION

        public static final int SAME_VERSION
        The source version is same the target version
        See Also:
        Constant Field Values
      • HIGHER_VERSION

        public static final int HIGHER_VERSION
        The source version is higher than the target version
        See Also:
        Constant Field Values
      • FEP2_BOD_VERSION

        public static final java.lang.String FEP2_BOD_VERSION
        BOD version used in WebSphere Commerce 6, feature pack 2. Since versioning was only introduced in feature pack 3, the version is an empty string.
        See Also:
        Constant Field Values
      • FEP3_BOD_VERSION

        public static final java.lang.String FEP3_BOD_VERSION
        BOD version used WebSphere Commerce 6, feature pack 3.
        See Also:
        Constant Field Values
      • FEP4_BOD_VERSION

        public static final java.lang.String FEP4_BOD_VERSION
        BOD version used in WebSphere Commerce 6, feature pack 4.
        See Also:
        Constant Field Values
      • FEP5_BOD_VERSION

        public static final java.lang.String FEP5_BOD_VERSION
        BOD version used in WebSphere Commerce 6, feature pack 5.
        See Also:
        Constant Field Values
      • V7_GA_BOD_VERSION

        public static final java.lang.String V7_GA_BOD_VERSION
        BOD version used in WebSphere Commerce 7.
        See Also:
        Constant Field Values
      • V7_FEP1_BOD_VERSION

        public static final java.lang.String V7_FEP1_BOD_VERSION
        BOD version used in WebSphere Commerce 7, feature pack 1.
        See Also:
        Constant Field Values
    • Method Detail

      • compareRequestVersion

        public static int compareRequestVersion(java.lang.String astrVersion)
        Compares the the version found in the request against the specified version. The method will indicate whether the request version is less than, equal to or greater then the version specified.
        Parameters:
        astrVersion - the base version to compare the request version against.
        Returns:
      • LOWER_VERSION if target version is lower than base version.
      • SAME_VERSION if target version is the same as the base version.
      • HIGHER_VERSION if target version is higher than base version.