Examples of Abdera


Examples of org.apache.abdera.Abdera

        String contribution = ContributionLocationHelper.getContributionLocation(ProviderEntryEntityTagsTestCase.class);

        scaProviderNode = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/atom/Provider.composite", new Contribution("provider", contribution));
        scaProviderNode.start();

        abdera = new Abdera();
        client = new AbderaClient(abdera);
        abderaParser = Abdera.getNewParser();
    }
View Full Code Here

Examples of org.apache.abdera.Abdera

    if (!org.apache.xml.security.Init.isInitialized())
      org.apache.xml.security.Init.init();
  }

  public XmlSignature() {
    super(new Abdera());
  }
View Full Code Here

Examples of org.apache.abdera.Abdera

    String method = req.getMethod();
    if (method.equals("POST") || method.equals("PUT")) {
      BufferedRequestWrapper wrapper =
        new BufferedRequestWrapper((HttpServletRequest) request);
      try {
        Abdera abdera = new Abdera();
        AbderaSecurity absec = new AbderaSecurity(abdera);
        Signature sig = absec.getSignature();
        Document<Element> doc = abdera.getParser().parse(wrapper.getInputStream());
        boolean valid = sig.verify(doc.getRoot(), null);
        if (!valid) {
          ((HttpServletResponse)response).sendError(
            400, "A Valid Signature is required");
          return;
View Full Code Here

Examples of org.apache.abdera.Abdera

  protected final Abdera abdera;
  protected final AbderaSecurity security;
 
  protected SecurityFilter() {
    this.abdera = new Abdera();
    this.security = new AbderaSecurity(abdera);
  }
View Full Code Here

Examples of org.apache.abdera.Abdera

  protected final Abdera abdera;
  protected ParserOptions options;
 
  protected AbstractParser() {
    this(new Abdera());
  }
View Full Code Here

Examples of org.apache.abdera.Abdera

  }
 
  public void testContentClone() throws Exception {
    String s = "<entry xmlns='http://www.w3.org/2005/Atom'><content type='html'>test</content></entry>";
    ByteArrayInputStream in = new ByteArrayInputStream(s.getBytes());
    Abdera abdera = new Abdera();
    Parser parser = abdera.getParser();
    Document doc = parser.parse(in);
    Entry entry = (Entry)(doc.getRoot().clone());
    assertEquals(entry.getContentType(), Content.Type.HTML);
  }
View Full Code Here

Examples of org.apache.abdera.Abdera

    Entry entry = (Entry)(doc.getRoot().clone());
    assertEquals(entry.getContentType(), Content.Type.HTML);
  }
 
  public void testSimpleExtension() throws Exception {
    Abdera abdera = new Abdera();
    Entry entry = abdera.newEntry();   
    entry.setDraft(true)// this will create an app:control element
    assertNull(entry.getControl().getSimpleExtension(new QName("urn:foo", "foo")));
  }
View Full Code Here

Examples of org.apache.abdera.Abdera

    entry.setDraft(true)// this will create an app:control element
    assertNull(entry.getControl().getSimpleExtension(new QName("urn:foo", "foo")));
  }
 
  public void testLang() throws Exception {
    Abdera abdera = new Abdera();
    Entry entry = abdera.newEntry();
    entry.setLanguage("en-US");
    assertEquals(entry.getLanguage(),"en-US");
    Lang lang = entry.getLanguageTag();
    assertNotNull(lang);
    assertEquals(lang.getPrimary(),"en");
View Full Code Here

Examples of org.apache.abdera.Abdera

  protected final Abdera abdera;
  protected final Cache cache;

  public Client() {
    this(new Abdera());
  }
View Full Code Here

Examples of org.apache.abdera.Abdera

            //System.out.println(">>>AtomPostTestCase.init entry");

            initTestEnvironment(AtomPostTestCase.class);

            testService = scaConsumerNode.getService(CustomerClient.class, "CustomerClient");
            abdera = new Abdera();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.