Examples of Comments


Examples of org.jfree.xml.generator.model.Comments

     * @throws ObjectDescriptionException if there is a problem with the object description.
     */
    protected void handleMultiplexMapping(final String typeName, final String className)
        throws ObjectDescriptionException {
        final TypeInfo info = new TypeInfo(typeName, loadClass(className));
        info.setComments(new Comments(getOpenComment(), getCloseComment()));
        this.multiplexTypeInfos.add (info);
    }
View Full Code Here

Examples of org.jfree.xml.generator.model.Comments

     */
    protected void endMultiplexMapping() throws ObjectDescriptionException {
        final TypeInfo[] typeInfos = (TypeInfo[]) this.multiplexTypeInfos.toArray(
            new TypeInfo[this.multiplexTypeInfos.size()]
        );
        this.multiplexInfo.setComments(new Comments(getOpenComment(), getCloseComment()));
        this.multiplexInfo.setChildClasses(typeInfos);
        this.model.getMappingModel().addMultiplexMapping(this.multiplexInfo);
        this.multiplexInfo = null;
    }
View Full Code Here

Examples of org.jfree.xml.generator.model.Comments

     */
    protected void startIncludeHandling(final URL resource) {
        this.source = IOUtils.getInstance().createRelativeURL(resource, this.baseURL);
        this.model.addSource(this.source);
        this.model.addIncludeComment(
            this.source, new Comments(getOpenComment(), getCloseComment())
        );
    }
View Full Code Here

Examples of org.jfree.xml.generator.model.Comments

    /**
     * Ends the root document.
     */
    protected void endRootDocument() {
        this.model.setModelComments(new Comments(getOpenComment(), getCloseComment()));
    }
View Full Code Here

Examples of org.wicketstuff.facebook.plugins.Comments

   *
   */
  public CommentEventPage()
  {
    add(new FacebookSdk("fb-root"));
    add(new Comments(
      "comments",
      Model.of("http://localhost:8080/wicket/bookmarkable/org.wicketstuff.facebook.plugins.CommentPage")));

    final Model<String> responseModel = new Model<String>();
    final Label responseLabel = new Label("response", responseModel);
View Full Code Here

Examples of org.xwiki.rest.model.jaxb.Comments

        String commentsUri = getUriBuilder(CommentsResource.class).build(getWiki(), SPACE_NAME, PAGE_NAME).toString();

        GetMethod getMethod = executeGet(commentsUri);
        Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());

        Comments comments = (Comments) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());

        int numberOfComments = comments.getComments().size();

        Comment comment = objectFactory.createComment();
        comment.setText("Comment");

        PostMethod postMethod = executePostXml(commentsUri, comment, "Admin", "admin");
        Assert.assertEquals(getHttpMethodInfo(postMethod), HttpStatus.SC_CREATED, postMethod.getStatusCode());

        getMethod = executeGet(commentsUri);
        Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());

        comments = (Comments) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());

        Assert.assertEquals(numberOfComments + 1, comments.getComments().size());
    }
View Full Code Here

Examples of org.xwiki.rest.model.jaxb.Comments

        String commentsUri = getUriBuilder(CommentsResource.class).build(getWiki(), SPACE_NAME, PAGE_NAME).toString();

        GetMethod getMethod = executeGet(commentsUri);
        Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());

        Comments comments = (Comments) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());

        int numberOfComments = comments.getComments().size();

        PostMethod postMethod = executePost(commentsUri, "Comment", MediaType.TEXT_PLAIN, "Admin", "admin");
        Assert.assertEquals(getHttpMethodInfo(postMethod), HttpStatus.SC_CREATED, postMethod.getStatusCode());

        getMethod = executeGet(commentsUri);
        Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());

        comments = (Comments) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());

        Assert.assertEquals(numberOfComments + 1, comments.getComments().size());
    }
View Full Code Here

Examples of org.xwiki.rest.model.jaxb.Comments

        String commentsUri = getUriBuilder(CommentsResource.class).build(getWiki(), SPACE_NAME, PAGE_NAME).toString();

        GetMethod getMethod = executeGet(commentsUri);
        Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());

        Comments comments = (Comments) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());

        for (Comment comment : comments.getComments()) {
            checkLinks(comment);
        }
    }
View Full Code Here

Examples of org.xwiki.rest.model.jaxb.Comments

        String commentsUri = getUriBuilder(CommentsResource.class).build(getWiki(), SPACE_NAME, PAGE_NAME).toString();

        GetMethod getMethod = executeGet(commentsUri);
        Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());

        Comments comments = (Comments) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());

        int numberOfComments = comments.getComments().size();

        NameValuePair[] nameValuePairs = new NameValuePair[1];
        nameValuePairs[0] = new NameValuePair("text", "Comment");

        PostMethod postMethod = executePostForm(commentsUri, nameValuePairs, "Admin", "admin");
        Assert.assertEquals(getHttpMethodInfo(postMethod), HttpStatus.SC_CREATED, postMethod.getStatusCode());

        getMethod = executeGet(commentsUri);
        Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());

        comments = (Comments) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());

        Assert.assertEquals(numberOfComments + 1, comments.getComments().size());
    }
View Full Code Here

Examples of org.xwiki.rest.model.jaxb.Comments

        String commentsUri = getUriBuilder(CommentsResource.class).build(getWiki(), SPACE_NAME, PAGE_NAME).toString();

        GetMethod getMethod = executeGet(commentsUri);
        Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());

        Comments comments = (Comments) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());

        int numberOfComments = comments.getComments().size();

        PostMethod postMethod =
            executePost(commentsUri, "Comment", MediaType.TEXT_PLAIN, TestUtils.ADMIN_CREDENTIALS.getUserName(),
                TestUtils.ADMIN_CREDENTIALS.getPassword());
        Assert.assertEquals(getHttpMethodInfo(postMethod), HttpStatus.SC_CREATED, postMethod.getStatusCode());

        getMethod = executeGet(commentsUri);
        Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());

        comments = (Comments) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());

        Assert.assertEquals(numberOfComments + 1, comments.getComments().size());
    }
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.