protected BoxWatermark applyWatermark(URLTemplate itemUrl, String imprint) {
        URL watermarkUrl = itemUrl.build(this.getAPI().getBaseURL(), this.getID());
        URL url = WATERMARK_URL_TEMPLATE.build(watermarkUrl.toString());
        BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");
        JsonObject body = new JsonObject()
                .add(BoxWatermark.WATERMARK_JSON_KEY, new JsonObject()
                        .add(BoxWatermark.WATERMARK_IMPRINT_JSON_KEY, imprint));
        request.setBody(body.toString());
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        return new BoxWatermark(response.getJSON());
    }
protected BoxWatermark applyWatermark ( URLTemplate itemUrl , String imprint ) { URL watermarkUrl = itemUrl . build ( this . getAPI ( ) . getBaseURL ( ) , this . getID ( ) ) ; URL url = WATERMARK_URL_TEMPLATE . build ( watermarkUrl . toString ( ) ) ; BoxJSONRequest request = new BoxJSONRequest ( this . getAPI ( ) , url , "PUT" ) ; JsonObject body = new JsonObject ( ) . add ( BoxWatermark . WATERMARK_JSON_KEY , new JsonObject ( ) . add ( BoxWatermark . WATERMARK_IMPRINT_JSON_KEY , imprint ) ) ; request . setBody ( body . toString ( ) ) ; BoxJSONResponse response = ( BoxJSONResponse ) request . send ( ) ; return new BoxWatermark ( response . getJSON ( ) ) ; }
Used to apply or update the watermark for the item.
@param itemUrl url template for the item.
@param imprint the value must be "default", as custom watermarks is not yet supported.
@return the watermark associated with the item.