Requests that Business
Object Wizard retrieve a specified file.
Syntax
public byte[] getClientFile(String srcNodePath, ODKAgentBase2 ODAobj);
Parameters
- srcNodePath
- Is the source-node path of the file to request from Business
Object Wizard.
- ODAobj
- Is the ODA (ODKAgentBase2) object, which is used to
verify that the ODA is authorized to perform the operation; that
is, that the ODA generates file content.
Return values
The contents of the specified operating-system file, as a byte
array.
Exceptions
- UnsupportedContentException
- Thrown if the ODA does not support generation of file
content; that is, it does not implement the
IGeneratesBinFiles interface.
- Java.io.IOException
- Thrown if an error occurs during file retrieval, for example
the file was not found.
Notes
The getClientFile() method requests that Business
Object Wizard return the contents of the operating-system file that
srcNodePath identifies. This srcNodePath path takes
the following form:
fileNodePath:fileLocation
where:
- fileNodePath is the colon (:) separated list of
source-node names for the node that is associated with the file.
For example, Apollo:Vulso:Flavius.xml
- fileLocation is the full operating-system path to the
file. For example, C:\temp\XMLFiles\Flavius.xml
Use the getClientFile() method to access an associated
file for objects that source nodes represent. If a source node can
have a file associated with it, then the ability to interpret the
file's source-node path and to read the contents of this file is
needed at both of the following points:
- During source-node generation, the getTreeNodes()
method must be able to "discover" a child node that is in a
file.
- During content generation, the method that generates content
must be able to access information in nodes that are in a
file.
For more information, see Reading files for source
data.
