Package com.google.gdata.util

Examples of com.google.gdata.util.ServiceException


          new ClientOutputProperties(request, entry), mediaMultipart);
      request.execute();
      return parseResponseData(request, classOf(entry));

    } catch (MessagingException e) {
      throw new ServiceException(
          CoreErrorDomain.ERR.cantWriteMimeMultipart, e);
    } finally {
      endVersionScope();
      if (request != null) {
        request.end();
View Full Code Here


          new ClientOutputProperties(request, entry), mediaMultipart);
      request.execute();
      return parseResponseData(request, classOf(entry));

    } catch (MessagingException e) {
      throw new ServiceException(
          CoreErrorDomain.ERR.cantWriteMimeMultipart, e);
    } finally {
      endVersionScope();
      if (request != null) {
        request.end();
View Full Code Here

        }
      }
    } while (!attrToRetrieve.isEmpty() && numResults <= MAX_MAXRESULTS);
   
    if (!attrToRetrieve.isEmpty()) {
      throw new ServiceException("The retrieved histograms do not contain" +
          "some of the attributes. The most used values of these attributes " +
          "have not been refreshed.");
    }
  }
View Full Code Here

   * @return the current state of the feed.
   */
  @SuppressWarnings("unchecked")
  public F getSelf() throws IOException, ServiceException {
    if (feedState.service == null) {
      throw new ServiceException(
         CoreErrorDomain.ERR.feedNotAssociated);
    }
    Link selfLink = getSelfLink();
    if (selfLink == null) {
      throw new UnsupportedOperationException("Feed cannot be retrieved");
View Full Code Here

   *           If there is an error communicating with the GData service.
   */
  public <T extends E> T insert(T newEntry)
      throws ServiceException, IOException {
    if (feedState.service == null) {
      throw new ServiceException(
          CoreErrorDomain.ERR.entryNotAssociated);
    }
    Link postLink = getEntryPostLink();
    if (postLink == null) {
      throw new UnsupportedOperationException("Media cannot be inserted");
View Full Code Here

  protected URL handleRedirectException(RedirectRequiredException redirect)
      throws ServiceException {
    try {
      return new URL(redirect.getRedirectLocation());
    } catch (MalformedURLException e) {
      ServiceException se = new ServiceException(
          CoreErrorDomain.ERR.invalidRedirectedToUrl);
      se.setInternalReason("Invalid redirected-to URL - "
          + redirect.getRedirectLocation());
      throw se;
    }
  }
View Full Code Here

      case HttpURLConnection.HTTP_GONE:
        throw new NoLongerAvailableException(httpConn);

      default:
        throw new ServiceException(httpConn);
    }
  }
View Full Code Here

      case HttpURLConnection.HTTP_GONE:
        throw new NoLongerAvailableException(httpConn);

      default:
        throw new ServiceException(httpConn);
    }
  }
View Full Code Here

   *
   * @return the current version of the entry.
   */
  public E getSelf() throws IOException, ServiceException {
    if (state.service == null) {
      throw new ServiceException(
          CoreErrorDomain.ERR.entryNotAssociated);
    }
    Link selfLink = getSelfLink();
    if (selfLink == null) {
      throw new UnsupportedOperationException("Entry cannot be retrieved");
View Full Code Here

   *           If there is an error communicating with the GData service.
   */
  public E update() throws IOException, ServiceException {

    if (state.service == null) {
      throw new ServiceException(
          CoreErrorDomain.ERR.entryNotAssociated);
    }
    Link editLink = getEditLink();
    if (editLink == null) {
      throw new UnsupportedOperationException("Entry cannot be updated");
View Full Code Here

TOP

Related Classes of com.google.gdata.util.ServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.