return new Version(serviceClass, versionProperty); } catch (IllegalArgumentException iae) { throw new IllegalStateException(
return new Version(serviceClass, versionProperty); } catch (IllegalArgumentException iae) { throw new IllegalStateException(
return new Version(serviceClass, versionProperty); } catch (IllegalArgumentException iae) { throw new IllegalStateException(
@Override public void execute() throws IOException, ServiceException { // Set the current active service, so cookie handling will be enabled. try { activeService.set(service); // Propagate redirects to our layer to add URL specific data to the // request (like URL dependant authentication headers) httpConn.setInstanceFollowRedirects(false); super.execute(); // Capture the version used to process the request String versionHeader = httpConn.getHeaderField(GDataProtocol.Header.VERSION); if (versionHeader != null) { GoogleService service = activeService.get(); if (service != null) { responseVersion = new Version(service.getClass(), versionHeader); } } } finally { activeService.set(null); } }
@Override public void execute() throws IOException, ServiceException { // Set the current active service, so cookie handling will be enabled. try { activeService.set(service); // Propagate redirects to our layer to add URL specific data to the // request (like URL dependant authentication headers) httpConn.setInstanceFollowRedirects(false); super.execute(); // Capture the version used to process the request String versionHeader = httpConn.getHeaderField(GDataProtocol.Header.VERSION); if (versionHeader != null) { GoogleService service = activeService.get(); if (service != null) { responseVersion = new Version(service.getClass(), versionHeader); } } } finally { activeService.set(null); } }
@Override public void execute() throws IOException, ServiceException { // Set the current active service, so cookie handling will be enabled. try { activeService.set(service); // Propagate redirects to our layer to add URL specific data to the // request (like URL dependant authentication headers) httpConn.setInstanceFollowRedirects(false); super.execute(); // Capture the version used to process the request String versionHeader = httpConn.getHeaderField(GDataProtocol.Header.VERSION); if (versionHeader != null) { GoogleService service = activeService.get(); if (service != null) { responseVersion = new Version(service.getClass(), versionHeader); } } } finally { activeService.set(null); } }
/** * Returns a version that matches the input service type and major version but * {@link #ANY} minor version. * * @param v input version type * @return equivalent version with any minor version */ public static Version anyMinorVersionOf(Version v) { return new Version(v.getServiceClass(), v.getMajor(), Version.ANY); }
/** * Returns a version that matches the input service type and major version but * {@link #ANY} minor version. * * @param v input version type * @return equivalent version with any minor version */ public static Version anyMinorVersionOf(Version v) { return new Version(v.getServiceClass(), v.getMajor(), Version.ANY); }
/** * Returns a version that matches the input service type and major version but * {@link #ANY} minor version. * * @param v input version type * @return equivalent version with any minor version */ public static Version anyMinorVersionOf(Version v) { return new Version(v.getServiceClass(), v.getMajor(), Version.ANY); }