com.filenet.api.constants

Class ConfigurationParameter

  • java.lang.Object
    • com.filenet.api.constants.ConfigurationParameter
  • All Implemented Interfaces:
    java.io.Serializable


    public final class ConfigurationParameter
    extends java.lang.Object
    implements java.io.Serializable
    Specifies the parameters that can be used when configuring the Content Engine API.

    This class provides a set of constants to specify values for:

    • Configuring connections to the IBM FileNet P8 domain.
    • Specifying client metadata cache (CMC) configuration options.
    • Specifying configuration options for the Enterprise Java™Beans (EJB) transport of the API.

    Note: Some constant names are prefixed with "WSI". This prefix refers to the web services transport of the API.

    This class includes support for parsing configuration values. With one exception, comparisons and lookups are case-insensitive, so the case of string key equivalents is not significant. The exception is when you set a configuration parameter with a Java system property. In that case, the name you specify must exactly match the case of the property name or it must be the all-lowercase version (for example, –DFileNet.EJB.ContextProperties=FooBar or –Dfilenet.ejb.contextproperties=FooBar). Internally, the exact match is checked first, and only when it is not found is the all-lowercase version checked. (If a configuration item is not found either way, a hard-coded default is used.) Once the system property becomes a ConfigurationParameter instance, case insensitivity is again the normal behavior for comparisons and lookups.

    This class also includes an array of valid types, such as {Integer.class, Boolean.class}, to assist you in parsing and validating parameter values. The list is null if not applicable, or is dependent on the context of where the parameter is used. A non-null list always has a length of at least one.

    To set parameter values, create an instance of ConfigurationParameters, call ConfigurationParameters.setParameter, passing in the desired parameter values, and then call Configuration.init. The code snippet below sets the block size for retrieving content:

          ConfigurationParameters parameters = new ConfigurationParameters();
          Object value = new Integer(64);
          parameters.setParameter(ConfigurationParameter.CONTENT_GET_BLOCK_SIZE_KB, value);
          Configuration.init(parameters);

    You can also set configuration parameters on the Connection object, or in the FileNet.properties file.

    See Also:
    ConfigurationParameters, Configuration, Connection, Serialized Form
    • Field Detail

      • CONNECTION_PARTICIPATES_IN_TRANSACTION_AS_INT

        public static final int CONNECTION_PARTICIPATES_IN_TRANSACTION_AS_INT
        An integer associated with the CONNECTION_PARTICIPATES_IN_TRANSACTION instance of this class.
        See Also:
        Constant Field Values
      • CONNECTION_PARTICIPATES_IN_TRANSACTION_AS_STRING

        public static final java.lang.String CONNECTION_PARTICIPATES_IN_TRANSACTION_AS_STRING
        A Property name associated with the CONNECTION_PARTICIPATES_IN_TRANSACTION instance of this class.
        See Also:
        Constant Field Values
      • CONNECTION_PARTICIPATES_IN_TRANSACTION

        public static final ConfigurationParameter CONNECTION_PARTICIPATES_IN_TRANSACTION
        A constant representing a ConfigurationParameter instance of type CONNECTION_PARTICIPATES_IN_TRANSACTION.

        There are several ways in which a transaction might have been started. Regardless of how a transaction is started, you may choose whether or not the server participates in the client transaction. By default, the Content Engine server does not participate in client transactions (that is, the default is Boolean.FALSE). For the client to participate in a distributed transaction, you must explicitly set this configuration parameter to Boolean.TRUE when establishing a connection.

        When setting transaction participation, the following constraints apply:

        • Transaction participation is not supported for updating GCD objects, such as ObjectStore, Marking, and MarkingSet objects. You can only set transaction participation for updating objects that support the RepositoryObject interface.
        • Do not mix connections that have different values for CONNECTION_PARTICIPATES_IN_TRANSACTION. Doing so can result in a hang condition. As an example, assume the API is participating in a transaction and updates an object. A hang will occur if, from inside the transaction, and prior to database commit or rollback, the API attempts to fetch the same object with a connection that does not participate in a transaction.

        For EJB connections, setting CONNECTION_PARTICIPATES_IN_TRANSACTION to true when the client is not in a transaction does not produce an error. For Content Engine web services (SOAP-based) connections, doing so causes an EngineRuntimeException to be thrown. (The Content Engine web services transport does not support transactions.)

      • CONNECTION_CLIENT_METADATA_CACHE_AS_INT

        public static final int CONNECTION_CLIENT_METADATA_CACHE_AS_INT
        An integer associated with the CONNECTION_CLIENT_METADATA_CACHE instance of this class.
        See Also:
        Constant Field Values
      • CONNECTION_CLIENT_METADATA_CACHE_AS_STRING

        public static final java.lang.String CONNECTION_CLIENT_METADATA_CACHE_AS_STRING
        A Property name associated with the CONNECTION_CLIENT_METADATA_CACHE instance of this class.
        See Also:
        Constant Field Values
      • CONNECTION_CLIENT_METADATA_CACHE

        public static final ConfigurationParameter CONNECTION_CLIENT_METADATA_CACHE
        A constant representing a ConfigurationParameter instance of type CONNECTION_CLIENT_METADATA_CACHE. This configuration parameter specifies whether to use caching for operations with the given connection. The default is Factory.MetadataCache.getDefaultInstance(), equivalent to Boolean.TRUE, which specifies that caching is used.
      • CMC_ENABLED_AS_INT

        public static final int CMC_ENABLED_AS_INT
        An integer associated with the CMC_ENABLED instance of this class.
        See Also:
        Constant Field Values
      • CMC_ENABLED_AS_STRING

        public static final java.lang.String CMC_ENABLED_AS_STRING
        A Property name associated with the CMC_ENABLED instance of this class.
        See Also:
        Constant Field Values
      • CMC_ENABLED

        public static final ConfigurationParameter CMC_ENABLED
        A constant representing a ConfigurationParameter instance of type CMC_ENABLED. The default is Boolean.TRUE, which enables client metadata caching.

        Refer to Boolean.valueOf(String) for parsing.

        Note: This setting can only be configured during initialization. (See Configuration.init.) This setting affects global client metadata caching. For example, if set to Boolean.FALSE at initialization, you cannot subsequently use ConfigurationParameter.CONNECTION_CLIENT_METADATA_CACHE to enable client metadata caching for a connection.

      • CMC_TIME_TO_LIVE_AS_INT

        public static final int CMC_TIME_TO_LIVE_AS_INT
        An integer associated with the CMC_TIME_TO_LIVE instance of this class.
        See Also:
        Constant Field Values
      • CMC_TIME_TO_LIVE_AS_STRING

        public static final java.lang.String CMC_TIME_TO_LIVE_AS_STRING
        A Property name associated with the CMC_TIME_TO_LIVE instance of this class.
        See Also:
        Constant Field Values
      • CMC_TIME_TO_LIVE

        public static final ConfigurationParameter CMC_TIME_TO_LIVE
        A constant representing a ConfigurationParameter instance of type CMC_TIME_TO_LIVE. The Time-To-Live (TTL) value is specified in milliseconds; the default is 10 hours. Items are removed from the cache when their TTL expires.

        Note: This can only be configured during initialization. See Configuration.init.

      • WSI_SYSTINET_HOME_AS_INT

        public static final int WSI_SYSTINET_HOME_AS_INT
        Deprecated. This constant is not supported.
        See Also:
        Constant Field Values
      • WSI_SYSTINET_HOME_AS_STRING

        public static final java.lang.String WSI_SYSTINET_HOME_AS_STRING
        Deprecated. This constant is not supported.
        See Also:
        Constant Field Values
      • WSI_SYSTINET_HOME

        public static final ConfigurationParameter WSI_SYSTINET_HOME
        Deprecated. This constant is not supported.
      • WSI_SYSTINET_LOGGING_LEVEL_AS_INT

        public static final int WSI_SYSTINET_LOGGING_LEVEL_AS_INT
        Deprecated. This constant is not supported.
        See Also:
        Constant Field Values
      • WSI_SYSTINET_LOGGING_LEVEL_AS_STRING

        public static final java.lang.String WSI_SYSTINET_LOGGING_LEVEL_AS_STRING
        Deprecated. This constant is not supported.
        See Also:
        Constant Field Values
      • WSI_SYSTINET_LOGGING_LEVEL

        public static final ConfigurationParameter WSI_SYSTINET_LOGGING_LEVEL
        Deprecated. This constant is not supported.
      • CONTENT_MAX_UPLOAD_THREADS_AS_INT

        public static final int CONTENT_MAX_UPLOAD_THREADS_AS_INT
        An integer associated with the CONTENT_MAX_UPLOAD_THREADS instance of this class.
        See Also:
        Constant Field Values
      • CONTENT_MAX_UPLOAD_THREADS_AS_STRING

        public static final java.lang.String CONTENT_MAX_UPLOAD_THREADS_AS_STRING
        A Property name associated with the CONTENT_MAX_UPLOAD_THREADS instance of this class.
        See Also:
        Constant Field Values
      • CONTENT_MAX_UPLOAD_THREADS

        public static final ConfigurationParameter CONTENT_MAX_UPLOAD_THREADS
        A constant representing a ConfigurationParameter instance of type CONTENT_MAX_UPLOAD_THREADS. This value is the maximum number of threads per document that can be used to upload content to the Content Engine server. The default value is 3.
      • CONTENT_PUT_BLOCK_SIZE_KB_AS_INT

        public static final int CONTENT_PUT_BLOCK_SIZE_KB_AS_INT
        An integer associated with the CONTENT_PUT_BLOCK_SIZE_KB instance of this class.
        See Also:
        Constant Field Values
      • CONTENT_PUT_BLOCK_SIZE_KB_AS_STRING

        public static final java.lang.String CONTENT_PUT_BLOCK_SIZE_KB_AS_STRING
        A Property name associated with the CONTENT_PUT_BLOCK_SIZE_KB instance of this class.
        See Also:
        Constant Field Values
      • CONTENT_PUT_BLOCK_SIZE_KB

        public static final ConfigurationParameter CONTENT_PUT_BLOCK_SIZE_KB
        A constant representing a ConfigurationParameter instance of type CONTENT_PUT_BLOCK_SIZE_KB. This value is the size of the buffer used for each PutContent request to upload content to the Content Engine Server, measured in kilobytes. The default value is 1024. The maximum limit on chunk size for PutContent is 10*1024 (10MB).
      • CONTENT_GET_BLOCK_SIZE_KB_AS_INT

        public static final int CONTENT_GET_BLOCK_SIZE_KB_AS_INT
        An integer associated with the CONTENT_GET_BLOCK_SIZE_KB instance of this class.
        See Also:
        Constant Field Values
      • CONTENT_GET_BLOCK_SIZE_KB_AS_STRING

        public static final java.lang.String CONTENT_GET_BLOCK_SIZE_KB_AS_STRING
        A Property name associated with the CONTENT_GET_BLOCK_SIZE_KB instance of this class.
        See Also:
        Constant Field Values
      • CONTENT_GET_BLOCK_SIZE_KB

        public static final ConfigurationParameter CONTENT_GET_BLOCK_SIZE_KB
        A constant representing a ConfigurationParameter instance of type CONTENT_GET_BLOCK_SIZE_KB. This value is the number of bytes to get from the Content Engine server on each GetContent request, measured in kilobytes. The default value is 1024 (1 MB).

        As an example, if this value is set to 64, then 64*1024 bytes of content are requested from the Content Engine server for each GetContent request.

      • WSI_TRANSPORT_CONNECTION_TIMEOUT_AS_INT

        public static final int WSI_TRANSPORT_CONNECTION_TIMEOUT_AS_INT
        An integer associated with the WSI_TRANSPORT_CONNECTION_TIMEOUT instance of this class.
        See Also:
        Constant Field Values
      • WSI_TRANSPORT_CONNECTION_TIMEOUT_AS_STRING

        public static final java.lang.String WSI_TRANSPORT_CONNECTION_TIMEOUT_AS_STRING
        A Property name associated with the WSI_TRANSPORT_CONNECTION_TIMEOUT instance of this class.
        See Also:
        Constant Field Values
      • WSI_TRANSPORT_CONNECTION_TIMEOUT

        public static final ConfigurationParameter WSI_TRANSPORT_CONNECTION_TIMEOUT
        A constant representing a ConfigurationParameter instance of type WSI_TRANSPORT_CONNECTION_TIMEOUT. This value determines the amount of time, in milliseconds, allowed before a connection timeout occurs when using the WSI transport. There is no default for this setting. If not set, there will be no timeout; that is, an infinite amount of time is allowed for the API call to complete.
      • EJB_CONTEXT_PROPERTIES_AS_INT

        public static final int EJB_CONTEXT_PROPERTIES_AS_INT
        An integer associated with the EJB_CONTEXT_PROPERTIES instance of this class.
        See Also:
        Constant Field Values
      • EJB_CONTEXT_PROPERTIES_AS_STRING

        public static final java.lang.String EJB_CONTEXT_PROPERTIES_AS_STRING
        A Property name associated with the EJB_CONTEXT_PROPERTIES instance of this class.
        See Also:
        Constant Field Values
      • EJB_CONTEXT_PROPERTIES

        public static final ConfigurationParameter EJB_CONTEXT_PROPERTIES
        A constant representing a ConfigurationParameter instance of type EJB_CONTEXT_PROPERTIES. The value of this parameter is used to override the default environment for the java.naming.InitialContext that is used to locate the internal EJB used by the API EJB transport. If EJB_CONTEXT_PROPERTIES is not defined, the InitialContext is created with an environment consisting of only a calculated provider URL. JNDI has its own defaulting mechanism used in the absence of explicit environment values.

        The value of this parameter is a string which is itself treated as a collection of properties in the same format as a properties file understood by the java.util.Properties.load() method. Except as described below, all of the properties are then put into the environment for the InitialContext. No case conversion, filtering, or value manipulation is done. java.naming.Context.PROVIDER_URL (java.naming.provider.url) is treated as a special case:

        • If no value is supplied via EJB_CONTEXT_PROPERTIES (including when EJB_CONTEXT_PROPERTIES is not defined at all), then Context.PROVIDER_URL is computed and supplied by taking the scheme, host, and port number portions of the URI supplied to the Connection object.
        • If the value supplied via EJB_CONTEXT_PROPERTIES is literally an exclamation mark ("!"), then no value for Context.PROVIDER_URL is placed into the environment for the InitialContext.
        • Otherwise, any value supplied via EJB_CONTEXT_PROPERTIES is used as-is.

        Here is an example of a setting for this parameter as it might appear in a traditional properties file. Note the convention for embedded newlines.

             FileNet.EJB.ContextProperties = java.naming.factory.initial=com.example.InitialContextFactory\n\
               java.naming.referral=follow\n\
               something.else=vendor.value
               
      • CONTENT_DOWNLOAD_SERVER_AFFINITY_ENABLED_AS_INT

        public static final int CONTENT_DOWNLOAD_SERVER_AFFINITY_ENABLED_AS_INT
        A boolean associated with the CONTENT_DOWNLOAD_SERVER_AFFINITY_ENABLED instance of this class.
        See Also:
        Constant Field Values
      • CONTENT_DOWNLOAD_SERVER_AFFINITY_ENABLED_AS_STRING

        public static final java.lang.String CONTENT_DOWNLOAD_SERVER_AFFINITY_ENABLED_AS_STRING
        A Property name associated with the CONTENT_DOWNLOAD_SERVER_AFFINITY_ENABLED instance of this class.
        See Also:
        Constant Field Values
      • CONTENT_DOWNLOAD_SERVER_AFFINITY_ENABLED

        public static final ConfigurationParameter CONTENT_DOWNLOAD_SERVER_AFFINITY_ENABLED
        A constant representing a ConfigurationParameter instance of type CONTENT_DOWNLOAD_SERVER_AFFINITY_ENABLED. This parameter applies to a connection using the EJB transport in a Content Engine server farm.

        Content that is greater than the size specified by the CONTENT_GET_BLOCK_SIZE_KB parameter requires multiple server round trips to retrieve. When the value of this parameter is true, the full download of large content requiring multiple server round trips is handled by the same CE server in the farm. When the value of this parameter is false, the download requests are distributed among multiple servers in the farm, increasing overhead.

        The default value is true.

      • CONTENT_UPLOAD_SERVER_AFFINITY_ENABLED_AS_INT

        public static final int CONTENT_UPLOAD_SERVER_AFFINITY_ENABLED_AS_INT
        A boolean associated with the CONTENT_UPLOAD_SERVER_AFFINITY_ENABLED instance of this class.
        See Also:
        Constant Field Values
      • CONTENT_UPLOAD_SERVER_AFFINITY_ENABLED_AS_STRING

        public static final java.lang.String CONTENT_UPLOAD_SERVER_AFFINITY_ENABLED_AS_STRING
        A Property name associated with the CONTENT_UPLOAD_SERVER_AFFINITY_ENABLED instance of this class.
        See Also:
        Constant Field Values
      • CONTENT_UPLOAD_SERVER_AFFINITY_ENABLED

        public static final ConfigurationParameter CONTENT_UPLOAD_SERVER_AFFINITY_ENABLED
        A constant representing a ConfigurationParameter instance of type CONTENT_UPLOAD_SERVER_AFFINITY_ENABLED. This parameter applies to a connection using the EJB transport in a Content Engine server farm.

        Content that is greater than the size specified by the CONTENT_GET_BLOCK_SIZE_KB parameter requires multiple server round trips to upload. When the value of this parameter is true, the full upload of large content requring multiple server round trips is handled by the same CE server in the farm. When the value of this parameter is false, the upload requests are distributed among multiple servers in the farm, increasing overhead.

        The default value is true.

    • Method Detail

      • getIntValue

        public int getIntValue()
        Returns a constant's internal integer value.
        Returns:
        The integer value of the constant, such as CMC_ENABLED_AS_INT.
      • getStringValue

        public java.lang.String getStringValue()
        Returns a constant's string key equivalent.
        Returns:
        A String value.
      • getValueTypes

        public java.lang.Class[] getValueTypes()
        Returns an array of valid types, such as {Integer.class, Boolean.class}, to assist you in parsing and validating parameter values. The list is null if not applicable or if dependent on the context of where the parameter is used. A non-null list always has a length of at least one.
        Returns:
        An array of Class objects.
      • toString

        public java.lang.String toString()
        Returns the name of a given constant.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A String containing the constant name.
      • getInstanceFromInt

        public static ConfigurationParameter getInstanceFromInt(int value)
        Returns an instance of this class using its associated integer value (the *_AS_INT fields).
        Parameters:
        value - An integer representing a particular static instance of this class.
        Returns:
        The ConfigurationParameter instance referenced.

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