Package org.apache.shindig.gadgets.rewrite

Examples of org.apache.shindig.gadgets.rewrite.RewritingException


    return new DomWalker.Rewriter() {
      @Override
      public void rewrite(Gadget gadget, MutableContent content)
          throws RewritingException {
        stringBuilder.append("exceptionThrown");
        throw new RewritingException("sad", 404);
      }

      @Override
      public void rewrite(HttpRequest request, HttpResponseBuilder builder, Gadget gadget)
          throws RewritingException {
        stringBuilder.append("exceptionThrown");
        throw new RewritingException("sad", 404);
      }
    };
  }
View Full Code Here


        injectOnLoadHandlers(body);
      }

      mutableContent.documentChanged();
    } catch (GadgetException e) {
      throw new RewritingException(e.getLocalizedMessage(), e, e.getHttpStatusCode());
    }
  }
View Full Code Here

      Document document = mutableContent.getDocument();
      Element head = (Element)DomUtil.getFirstNamedChildNode(document.getDocumentElement(), "head");
      injectI18NConstants(gadget, head);
      mutableContent.documentChanged();
    } catch (GadgetException e) {
      throw new RewritingException(e, e.getHttpStatusCode());
    }
  }
View Full Code Here

          logger.log(Level.WARNING,
              "Caja CSS parse failure: " + ge.getCause().getMessage() + " for " + source);
          writer.write(original);
          return Collections.emptyList();
        } else {
          throw new RewritingException(ge, ge.getHttpStatusCode());
        }
      }
    } catch (IOException ioe) {
      throw new RewritingException(ioe, HttpResponse.SC_INTERNAL_SERVER_ERROR);
    }
  }
View Full Code Here

      if (ge.getCause() instanceof ParseException) {
        logger.log(Level.WARNING,
              "Caja CSS parse failure: " + ge.getCause().getMessage() + " for " + source);
        return Collections.emptyList();
      } else {
        throw new RewritingException(ge, ge.getHttpStatusCode());
      }
    }
  }
View Full Code Here

      injectOnLoadHandlers(body);

      mutableContent.documentChanged();
    } catch (GadgetException e) {
      throw new RewritingException(e.getLocalizedMessage(), e, e.getHttpStatusCode());
    }
  }
View Full Code Here

      final StringBuilder stringBuilder) {
    return new DomWalker.Rewriter() {
      public void rewrite(Gadget gadget, MutableContent content)
          throws RewritingException {
        stringBuilder.append("exceptionThrown");
        throw new RewritingException("sad", 404);
      }

      public void rewrite(HttpRequest request, HttpResponseBuilder builder)
          throws RewritingException {
        stringBuilder.append("exceptionThrown");
        throw new RewritingException("sad", 404);
      }
    };
  }
View Full Code Here

        injectOnLoadHandlers(body);
      }

      mutableContent.documentChanged();
    } catch (GadgetException e) {
      throw new RewritingException(e.getLocalizedMessage(), e, e.getHttpStatusCode());
    }
  }
View Full Code Here

        injectOnLoadHandlers(body);
      }

      mutableContent.documentChanged();
    } catch (GadgetException e) {
      throw new RewritingException(e.getLocalizedMessage(), e, e.getHttpStatusCode());
    }
  }
View Full Code Here

        injectOnLoadHandlers(body);
      }

      mutableContent.documentChanged();
    } catch (GadgetException e) {
      throw new RewritingException(e.getLocalizedMessage(), e, e.getHttpStatusCode());
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.shindig.gadgets.rewrite.RewritingException

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.