@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(serviceClass.getName()); sb.append(':'); sb.append(getVersionString()); return sb.toString(); } }
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(serviceClass.getName()); sb.append(':'); sb.append(getVersionString()); return sb.toString(); } }
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(serviceClass.getName()); sb.append(':'); sb.append(getVersionString()); return sb.toString(); } }
/** * Sets the GoogleService associated with the request. */ public void setService(GoogleService service) { this.service = service; // This undocumented system property can be used to disable version headers. // It exists only to support some unit test scenarios for query-parameter // version configuration and back-compat defaulting when no version // information is sent by the client library. if (Boolean.getBoolean("GoogleGDataRequest.disableVersionHeader")) { return; } // Look up the active version for the type of service initiating the // request, and set the version header if found. try { Version requestVersion = service.getProtocolVersion(); if (requestVersion != null) { setHeader(GDataProtocol.Header.VERSION, requestVersion.getVersionString()); } } catch (IllegalStateException iae) { // Service may not be versioned. } }
/** * Sets the GoogleService associated with the request. */ public void setService(GoogleService service) { this.service = service; // This undocumented system property can be used to disable version headers. // It exists only to support some unit test scenarios for query-parameter // version configuration and back-compat defaulting when no version // information is sent by the client library. if (Boolean.getBoolean("GoogleGDataRequest.disableVersionHeader")) { return; } // Look up the active version for the type of service initiating the // request, and set the version header if found. try { Version requestVersion = service.getProtocolVersion(); if (requestVersion != null) { setHeader(GDataProtocol.Header.VERSION, requestVersion.getVersionString()); } } catch (IllegalStateException iae) { // Service may not be versioned. } }
/** * Sets the GoogleService associated with the request. */ public void setService(GoogleService service) { this.service = service; // This undocumented system property can be used to disable version headers. // It exists only to support some unit test scenarios for query-parameter // version configuration and back-compat defaulting when no version // information is sent by the client library. if (Boolean.getBoolean("GoogleGDataRequest.disableVersionHeader")) { return; } // Look up the active version for the type of service initiating the // request, and set the version header if found. try { Version requestVersion = service.getProtocolVersion(); if (requestVersion != null) { setHeader(GDataProtocol.Header.VERSION, requestVersion.getVersionString()); } } catch (IllegalStateException iae) { // Service may not be versioned. } }