(The following is from the end of
this thread)
| To the original question, there is an XML based query syntax that you can use to filter things like tasks, files and workflows. It is not documented very well, but check the wfquery.dtd and taskquery.dtd files located in iw-home/local/config/wft for more information. |
I'm playing around with CSSDK (using an ExternalTask to run it, since I cannot figure out how to do it from the command line) - and I came across the following in the CSSDK docs:[indent]
getFilesCSAreaRelativePath[] getFiles()
throws ...
Gets files attached to the task.
Returns:
array of CSAreaRelativePaths of files attached to the task A file may not actually exist, but still be attached to the task. For example, if a file is attached to the task and then deleted, getFiles will still return the file path for it.
Throws:
...
getFilesCSFile[] getFiles(java.lang.String query)
throws ...
Gets files attached to the task, and fetch data specified in the query for the files.
Parameters:
query - a query specifying the fields that are to be returned for the files
Returns:
array of CSAreaRelativePaths of files attached to the task A file may not ...
Throws:
...
[/indent]Clearly the
Returns section of the second entry was just copy/pasted - but I think it's reasonably obvious that the the return is an array of
CSFile's.
What I'm
not able to figure out is what the
query parameter is supposed to be.
Based on the above quote - it's an XML query string ala iwquerytasks - however, that doesn't really make sense to me - those queries return taskids not files (which I assume CSFile[]'s represent).
I'm essentially trying to somehow get CSSimpleFile objects for the file(s) attached to my task so that I can then do things like check the EAs on them with getExtendedAttribute() - I tried going a slightly circuitous route by using the first specification for getFiles() and creating a full vpath for the files having gotten the areavpath from the CSTask object too - but CSSimpleFile is an interface, no constructors, and while I can create a CSVPath object using its constructor, there don't appear to be any methods for deriving CSSimpleFile's from a CSVPath object.
Is there some connecting tissue here that I'm missing? Is there a simpler way to get a CSSimpleFile (or some type of object from which I can then do things like getting EAs)?