-
Notifications
You must be signed in to change notification settings - Fork 72
add the Data Service anyDocument data type #1296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
ehennum
pushed a commit
that referenced
this issue
May 5, 2021
ehennum
pushed a commit
that referenced
this issue
Jul 2, 2021
ehennum
pushed a commit
that referenced
this issue
Jul 2, 2021
This was referenced Jul 2, 2021
Merged
ehennum
pushed a commit
that referenced
this issue
Jul 16, 2021
ehennum
pushed a commit
that referenced
this issue
Jul 16, 2021
ehennum
pushed a commit
that referenced
this issue
Jul 16, 2021
@llinggit , I've merged the refactoring into develop which also implements the changes in the generated interfaces. I believe the remaining task is to add the new factories from the description to the Input, Output, and InputOutput callers and one unit test each with an anyDocument type. |
ehennum
pushed a commit
that referenced
this issue
Aug 6, 2021
llinggit
pushed a commit
to llinggit/java-client-api
that referenced
this issue
Sep 24, 2021
georgeajit
pushed a commit
that referenced
this issue
Oct 1, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Document values for the anyDocument data type can have any of the four document formats (binary, JSON, text, or XML).
When calling a Data Service endpoint with a parameter having the anyDocument data type, the caller must specify the format of each document value so the Java API can set the Content Type header that communicates the format of the document value to the appserver.
Similarly, when a Data Service endpoint returns document values with the anyDocument data type, the appserver must communicate the format of the document value to the Java API. The appserver sets the Content Type header for the document value. In turn, the Java API must set the equivalent format when returning the document value to the caller.
In both cases, the Java API associates a document value with a format by wrapping the document value with a handle, which has a getter and setter for the format. In particular, the document value are represented with any subclass that implements the BufferableContentHandle interface (which includes most of the out-of-the-box handles provided by the Java API). Additional considerations:
When generating a Data Service interface using the Gradle plugin provided by the ml-development-tools, the $javaClass annotation for an anyDocument type can specify a BufferableContentHandle subclass. If no $javaClass is provided, the default is InputStreamHandle. (An invalid $javaClass annotation throws an error at the start of code generation.)
The predefined IO Data Service classes (InputCaller, OutputCaller, and InputOutputCaller) must also be able to support anyDocument for either input or output. These classes can each add a static factory that takes handles for the input and / or output similar to:
The text was updated successfully, but these errors were encountered: