Examples of Post


Examples of app.Post

public class Summary extends WizardFrameContent
{
    public WizardActionTarget actionClicked (WizardAction action)
    {
        if ("save".equals(action.getName())) {
            Post post = (Post)getContext();
            PostService.addPost(post);
            return mainPageActionTarget();
        }
        return super.actionClicked(action);
    }
View Full Code Here

Examples of app.Post

{
    public WizardActionTarget actionClicked (WizardAction action)
    {
        Wizard wizard = getFrame().getWizard();
        if (wizard.next == action) {
            Post post = (Post)getContext();
            if (post.isPrivate) {
                return wizard.getFrameWithName("summaryFrame");
            }
        }
        return super.actionClicked(action);
View Full Code Here

Examples of chirp.model.Post

    this.userRepository = userRepository;
  }

  @POST
  public Response createPost(@PathParam("username") String username, @FormParam("content") String content) {
    Post post = userRepository.getUser(username).createPost(content);

    URI uri = UriBuilder.fromPath(post.getTimestamp().toString()).build();
    return Response.created(uri).build();
  }
View Full Code Here

Examples of cn.edu.zju.acm.onlinejudge.bean.Post

            try {
                ps = conn.prepareStatement(ForumPersistenceImpl.GET_POST);
                ps.setLong(1, id);
                ResultSet rs = ps.executeQuery();
                if (rs.next()) {
                    Post post = new Post();
                    post.setId(rs.getLong(DatabaseConstants.POST_POST_ID));
                    post.setThreadId(rs.getLong(DatabaseConstants.POST_THREAD_ID));
                    post.setUserProfileId(rs.getLong(DatabaseConstants.POST_USER_PROFILE_ID));
                    post.setContent(rs.getString(DatabaseConstants.POST_CONTENT));
                    return post;
                } else {
                    return null;
                }
            } finally {
View Full Code Here

Examples of cn.iver.model.Post

        render("/post/post.html");
    }

    @Before({LoginInterceptor.class, PostValidator.class})
    public void save(){
        Post post = getModel(Post.class);
        post.set("userID", getSessionAttr("userID")).mySave();
        redirect("/post/" + post.getInt("topicID"));
    }
View Full Code Here

Examples of com.barsoft.memepost.entities.Post

        //максимальный размер данных который разрешено загружать в байтах
        //по умолчанию -1, без ограничений. Устанавливаем 10 мегабайт.
        upload.setSizeMax(1024 * 1024 * 10);

        Post p = new Post();

        try {
            RequestContext ctx = new ServletRequestContext(request);
            final List items = upload.parseRequest(ctx);
            Iterator iter = items.iterator();
View Full Code Here

Examples of com.extjs.gxt.samples.client.examples.model.Post

      for (int s = 0; s < nodeList.getLength(); s++) {
        Node fstNode = nodeList.item(s);
        if (fstNode.getNodeType() == Node.ELEMENT_NODE) {
          Element fstElmnt = (Element) fstNode;
          NodeList fields = fstElmnt.getElementsByTagName("field");
          Post p = new Post();
          p.setForum(getValue(fields, 0));
          p.setDate(sf.parse(getValue(fields, 1)));
          p.setSubject(getValue(fields, 2));
          p.setUsername(getValue(fields, 4));
          posts.add(p);

          BeanPost beanPost = new BeanPost();
          beanPost.setForum(getValue(fields, 0));
          beanPost.setDate(sf.parse(getValue(fields, 1)));
View Full Code Here

Examples of com.freewebsys.blog.pojo.Post

    log.info("saveComment:" + comment);
    try {
      if (comment.getPostId() != null) {
        baseDao.save(comment);

        Post post = (Post) baseDao.findById(Post.class,
            comment.getPostId());
        // 所有评论数据.
        List<Comment> commentList = findAllCommentByPostId(post.getId());
        // 循环展示页面.
        String url = post.getUrl();
        url = url.substring(0, url.lastIndexOf("/") + 1);
        // 生成评论文件夹路径。
        String filePath = FreemakerTemplateEngine.WEBAPP_PATH + url
            + "article_" + post.getId() + "/";
        // 如果文件夹不存在,创建.
        File fileDir = new File(filePath);
        if (!fileDir.exists()) {
          fileDir.mkdirs();
        }
View Full Code Here

Examples of com.google.code.http4j.impl.Post

*/
public final class PostTestCase extends RequestTestCase {
 
  @Test(expectedExceptions = MalformedURLException.class)
  public void construct_cause_exception() throws MalformedURLException, URISyntaxException {
    new Post("code.google.com");
  }
View Full Code Here

Examples of com.google.code.http4j.impl.Post

    assertion("http://localhost:8080/index.jsp;jsessionid=ABCDE?u=colin&pwd=http4j","POST /index.jsp;jsessionid=ABCDE HTTP/1.1\r\nHost:localhost:8080\r\n" + getDefaultHeaderString() + "Content-Length:18\r\n\r\nu=colin&pwd=http4j");
  }
 
  @Test(dependsOnMethods = "toMessage")
  public void addParameter_string_strings() throws URISyntaxException, IOException {
    Post post = new Post("http://www.google.com/search");
    post.addParameter("q", "http4j");
    assertion(post, "POST /search HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "Content-Length:8\r\n\r\nq=http4j");
    post.addParameter("m", "GET", "POST");
    assertion(post, "POST /search HTTP/1.1\r\nHost:www.google.com\r\n" + getDefaultHeaderString() + "Content-Length:21\r\n\r\nq=http4j&m=GET&m=POST");
  }
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.