com.filenet.download.api
Class ServerVersion
- java.lang.Object
-
- com.filenet.download.api.ServerVersion
-
public class ServerVersion extends java.lang.ObjectUsed to make requests to the Client Download Servlet to obtain server version information. Use the static methodfetchInstanceand specify theServerConnectionDataobject 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 FeaturecheckForNewFeature(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 ServerVersionfetchInstance(ServerConnectionData serverConnectionData)Returns an instance of the class for obtaining server version information.FeaturegetLatestFeature(java.lang.String packageId, java.lang.String featureId)A convenience method that is equivalent to callingcheckForNewFeature(null, packageId, featureId).java.lang.StringgetServerBuildNumber()Returns the build number of the server on which the Client Download Servlet is running, for example, "dap452.154".java.lang.StringgetVersion()Returns the version number of the server on which the Client Download Servlet is running, for example, "5.0.0".booleanisCompatibleWithServer(java.io.File directory, java.lang.String packageId, java.lang.String featureId)Returns abooleanvalue indicating whether or not the existing client API files are compatible with the server.
-
-
-
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- AServerConnectionDataobject 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
Stringindicating 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
Stringindicating 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.IOExceptionReturns abooleanvalue indicating whether or not the existing client API files are compatible with the server.- Parameters:
directory- AFiledirectory 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 isIBM_FILENET_CONTENT_MANAGER_PACKAGE_ID, and the feature id parameter isJAVA_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- AStringspecifying the package id. Use constant values provided by thePackageclass.featureId- AStringspecifying the feature id. Use constant values provided by theFeatureclass.- Returns:
trueif the current client API files are compatible with the server. Otherwise, it returnsfalseif 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 callingcheckForNewFeature(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- AStringspecifying the package id.featureId- AStringspecifying the feature id.- Returns:
- The latest
Featureavailable 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 aFeatureis available from the server, then it will be provided to the caller within the return value. Otherwise, anullvalue is returned if there is no newerFeatureavailable. AFiledirectory containing existing client API files.- Parameters:
directory- AFiledirectory 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 isIBM_FILENET_CONTENT_MANAGER_PACKAGE_ID, and the feature id parameter isJAVA_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
Featureto be returned by setting this parameter to anullvalue. If this parameter isnull, or if the client API files are older than what is available on the server, then the latestFeatureis returned.packageId- AStringspecifying the package id.featureId- AStringspecifying the feature id.- Returns:
- The latest
Featureavailable on the server if all criteria are satisfied, otherwise, anull - Throws:
java.io.IOException
-
-