RFR: 8314070: javax.print: Support IPP output-bin attribute extension [v9]

Phil Race prr at openjdk.org
Mon May 20 19:00:07 UTC 2024


On Mon, 20 May 2024 06:25:53 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Alexander Scherbatiy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make OutputBin class sealed
>
> src/java.desktop/share/classes/javax/print/attribute/standard/OutputBin.java line 46:
> 
>> 44:  * <p>
>> 45:  * <b>IPP Compatibility:</b> This attribute is not an IPP 1.1 attribute; it is
>> 46:  * an attribute in the "output-bin" attribute extension
> 
> Are we also supporting "output-destination" attribute to specify printing to a destination as per the IPP doc
> 
>> 
>> Since the destination may also
>> be electronic and have a method associated with it, also allow the uri attribute syntax. Probably call this
>> other attribute “output-destination” with an attribute syntax of (1setOf uri | name). Or possibly the output-
>> destination should be a parameter on the URL?
>>

That attribute doesn't exist, does it ? You are quoting from a note in the IPP spec which speculates about such an attribute, but that is all.

> src/java.desktop/share/classes/javax/print/attribute/standard/OutputBin.java line 137:
> 
>> 135:             "face-up",
>> 136:             "face-down",
>> 137:             "large-capacity",
> 
> Are we considering this from IPP doc for the internationalization of this keywords?
> 
>> Normally a client will provide localization of the keywords values of this attribute to the language of the
>> user,

We don't do that for any existing API attribute classes. But these instances aren't something a "user" normally sees.
The dialog presents names to the user which map to these, and those names are localisable as you can see elswhere in the PR.

> src/java.desktop/unix/classes/sun/print/CUPSPrinter.java line 65:
> 
>> 63:     private static synchronized native String[] getMedia(String printer);
>> 64:     private static synchronized native float[] getPageSizes(String printer);
>> 65:     private static synchronized native String[] getOutputBins(String printer);
> 
> Will it return all the output-bins or only the supported ones? Iguess it's the latter, then I think it's better to rename it as "getSupportedOutputBins" as this follows "“output-bin-supported” attribute of IPP document..

the same is true of the other calls right above. It is implicit, I don't think we need to make the name longer.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16166#discussion_r1607152972
PR Review Comment: https://git.openjdk.org/jdk/pull/16166#discussion_r1607151385
PR Review Comment: https://git.openjdk.org/jdk/pull/16166#discussion_r1607153908


More information about the client-libs-dev mailing list