Products Downloads


French version


 


This ".properties" file management function is used to retrieve the value of a key.

The key value is a character string.


Context

  • Java client,

  • Java server,

  • Adelia Web client,

  • Adelia Cloud client.


Parameters

ALPHA(n)

FileName

Name of the file.

ALPHA(n)

KeyName

Name of the key whose value is to be retrieved.

ALPHA(n)

KeyValue

Key value.

NUM_BIN_4

KeyValueLength

Length of the KeyValue parameter.

BOOL

ReturnCode

Return code for the operation:

*TRUE   if the operation was successful.

*FALSE  if the operation failed.



The expression local language is used here to refer to a language+country pair.


The search rules for finding the FileName file vary according to how the file's name is specified:

  • Adelia searches for the file in the Java execution context (CLASSPATH), taking the Java/Web local language into account, provided the following two conditions are satisfied:
    •  The file name is specified without the .properties extension.
    • "Java package" notation is used if the file is located in a subdirectory.

  (The search gives priority to the ".properties" file suffixed with the language code - and if applicable the country1 code - corresponding to the local language.)


  • Adelia searches for the file in the specified path, provided the following three conditions are satisfied:

    • The path is an absolute path.
    • The file name is specified with its extension (normally .properties).
    • The conventional "subdirectory path" notation is used (the / and \ characters are permitted).

If the specified path is now a relative path, the file is searched for relatively, either in the current VFS (Adelia Cloud) directory, or in the user.dir directory (normally the directory in which the Java virtual machine (JVM) is run) first, and then in the Java execution context (CLASSPATH).

The Web local language is ignored.


  • If the file name is given in the form [URL]Reference_resource_name;FileName, Adelia first searches for the resource using the specified URL.
    If the resource is not found, Adelia searches for the FileName file using the rules specified in the preceding paragraphs.


Note: This URL notation offers a practical solution for using the file as an external resource if a Websphere server is used.


Click here for more information on using files as external resources.


Example

FileName

= 'Parameters'

KeyName

= 'Version'

KeyValue

= *BLANK

KeyValueLength

= 50

ReturnCode

= *FALSE


CALL_DLL 'vatoolbx.dll' 'VaToolBxJavaQueryValue' FileName KeyName KeyValue KeyValueLength ReturnCode



FileName

= 'Parameters.properties'

KeyName

= 'Version'

KeyValue

= *BLANK

KeyValueLength

= 50

ReturnCode

= *FALSE


CALL_DLL 'vatoolbx.dll' 'VaToolBxJavaQueryValue' FileName KeyName KeyValue KeyValueLength ReturnCode



FileName

= '[URL]url/myapp/parameters;Parameters.properties'

KeyName

= 'Version'

KeyValue

= *BLANK

KeyValueLength

= 50

ReturnCode

= *FALSE


CALL_DLL 'vatoolbx.dll' 'VaToolBxJavaQueryValue' FileName KeyName KeyValue KeyValueLength ReturnCode


List of the VaToolBx functions by topic


↑ Top of page

  • Aucune étiquette