com.filenet.download.api

Class ServerVersion

  • java.lang.Object
    • com.filenet.download.api.ServerVersion


  • public class ServerVersion
    extends java.lang.Object
    Used to make requests to the Client Download Servlet to obtain server version information. Use the static method fetchInstance and specify the ServerConnectionData object to instantiate this class. The instance passed back will be populated with the data retrieved from the server.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Feature checkForNewFeature(java.io.File directory, java.lang.String packageId, java.lang.String featureId)
      Performs a version comparison between existing client API files and the server.
      static ServerVersion fetchInstance(ServerConnectionData serverConnectionData)
      Returns an instance of the class for obtaining server version information.
      Feature getLatestFeature(java.lang.String packageId, java.lang.String featureId)
      A convenience method that is equivalent to calling checkForNewFeature(null, packageId, featureId).
      java.lang.String getServerBuildNumber()
      Returns the build number of the server on which the Client Download Servlet is running, for example, "dap452.154".
      java.lang.String getVersion()
      Returns the version number of the server on which the Client Download Servlet is running, for example, "5.0.0".
      boolean isCompatibleWithServer(java.io.File directory, java.lang.String packageId, java.lang.String featureId)
      Returns a boolean value indicating whether or not the existing client API files are compatible with the server.
      • Methods inherited from class java.lang.Object

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

      • fetchInstance

        public static ServerVersion fetchInstance(ServerConnectionData serverConnectionData)
                                           throws java.io.IOException
        Returns an instance of the class for obtaining server version information.
        Parameters:
        serverConnectionData - A ServerConnectionData object representing the HTTP or HTTPS connection to the server.
        Returns:
        An instance of ServerVersion.
        Throws:
        java.io.IOException
      • getVersion

        public java.lang.String getVersion()
        Returns the version number of the server on which the Client Download Servlet is running, for example, "5.0.0".
        Returns:
        A String indicating the server version.
      • getServerBuildNumber

        public java.lang.String getServerBuildNumber()
        Returns the build number of the server on which the Client Download Servlet is running, for example, "dap452.154".
        Returns:
        A String indicating the build number of the server.
      • isCompatibleWithServer

        public boolean isCompatibleWithServer(java.io.File directory,
                                              java.lang.String packageId,
                                              java.lang.String featureId)
                                       throws java.io.IOException
        Returns a boolean value indicating whether or not the existing client API files are compatible with the server.
        Parameters:
        directory - A File directory containing existing client API files. The method requires a "key" file in the directory, which is an API file specific to the package and feature that are also specified in this method. For example, if the package id parameter is IBM_FILENET_CONTENT_MANAGER_PACKAGE_ID, and the feature id parameter is JAVA_EJB_CLIENT_FEATURE_ID, then the key file that the Client Download Java API searches for is Jace.jar. If the key file is missing, the method throws an exception.
        packageId - A String specifying the package id. Use constant values provided by the Package class.
        featureId - A String specifying the feature id. Use constant values provided by the Feature class.
        Returns:
        true if the current client API files are compatible with the server. Otherwise, it returns false if the current client API files are incompatible with the server.
        Throws:
        java.io.IOException
      • getLatestFeature

        public Feature getLatestFeature(java.lang.String packageId,
                                        java.lang.String featureId)
                                 throws java.io.IOException
        A convenience method that is equivalent to calling checkForNewFeature(null, packageId, featureId). This method guarantees that the latest version of the specified feature is returned because no client-side comparison with existing client API files is performed.
        Parameters:
        packageId - A String specifying the package id.
        featureId - A String specifying the feature id.
        Returns:
        The latest Feature available on the server that satisfies the filter criteria.
        Throws:
        java.io.IOException
      • checkForNewFeature

        public Feature checkForNewFeature(java.io.File directory,
                                          java.lang.String packageId,
                                          java.lang.String featureId)
                                   throws java.io.IOException
        Performs a version comparison between existing client API files and the server. If a newer version of a Feature is available from the server, then it will be provided to the caller within the return value. Otherwise, a null value is returned if there is no newer Feature available. A File directory containing existing client API files.
        Parameters:
        directory - A File directory containing existing client API files. The method requires a "key" file in the directory, which is an API file specific to the package and feature that are also specified in this method. For example, if the package id parameter is IBM_FILENET_CONTENT_MANAGER_PACKAGE_ID, and the feature id parameter is JAVA_EJB_CLIENT_FEATURE_ID, then the key file that the Client Download Java API searches for is Jace.jar. If the key file is missing, the method throws an exception.

        You can suppress a version comparison and force a Feature to be returned by setting this parameter to a null value. If this parameter is null, or if the client API files are older than what is available on the server, then the latest Feature is returned.

        packageId - A String specifying the package id.
        featureId - A String specifying the feature id.
        Returns:
        The latest Feature available on the server if all criteria are satisfied, otherwise, a null
        Throws:
        java.io.IOException

© Copyright IBM Corporation 2006, 2019. All rights reserved.