Examples of Post


Examples of org.osforce.connect.entity.blog.Post

  }

  @AfterReturning("execution(* org.osforce.connect.service.blog.PostService.createPost(..)) ||"
      + "execution(* org.osforce.connect.service.blog.PostService.updatePost(..))")
  public void updateBlogPost(JoinPoint jp) {
    Post post = (Post) jp.getArgs()[0];
    Map<Object, Object> context = CollectionUtil.newHashMap();
    context.put("postId", post.getId());
    context.put("template", TEMPLATE_POST_UPDATE);
    postActivityStreamTask.doAsyncTask(context);
  }
View Full Code Here

Examples of org.osforce.connect.entity.blog.Post

  }
 
  @Override
  protected void doTask(Map<Object, Object> context) throws Exception {
    Long postId = (Long) context.get("postId");
    Post post = postService.getPost(postId);
    Statistic statistic = statisticService.getStatistic(Statistic.TYPE_VIEW, postId, Post.NAME);
    if(statistic==null) {
      statistic = new Statistic(Statistic.TYPE_VIEW, postId, Post.NAME);
    }
    statistic.countAdd();
    statistic.setProjectId(post.getProjectId());
    statisticService.createStatistic(statistic);
  }
View Full Code Here

Examples of org.osforce.connect.entity.blog.Post

  }

  @Override
  protected void doTask(Map<Object, Object> context) throws Exception {
    Long postId = (Long) context.get("postId");
    Post post = postService.getPost(postId);
    String templateName = (String) context.get("template");
    Activity activity = new Activity();
    activity.setLinkedId(postId);
    activity.setEntity(Post.NAME);
    activity.setType(Post.NAME);
    activity.setDescription(templateName);
    activity.setFormat(Activity.FORMAT_FTL);
    activity.setProjectId(post.getProjectId());
    activity.setEnteredId(post.getModifiedId());
    activityService.createActivity(activity);
  }
View Full Code Here

Examples of org.pagepress.posts.Post

                    Element eElement = (Element) nNode;
                    Date date = (Date) eElement.getElementsByTagName("date");
                    String title = eElement.getElementsByTagName("title").item(0).getTextContent();
                    String author = eElement.getElementsByTagName("author").item(0).getTextContent();
                    String[] content = eElement.getElementsByTagName("content").item(0).getTextContent().split(" ");
                    importedPosts.add(new Post(date, title, author, content));
                }
            }
        }
        System.out.println("Post have been imported!");
    }
View Full Code Here

Examples of org.qi4j.samples.forum.data.entity.Post

        @Structure
        Module module;

        public Post reply( String message, PostView viewPost )
        {
            Post post = module.currentUnitOfWork().newEntity( Post.class );
            post.message().set( message );
            post.createdBy().set( poster.self() );
            post.createdOn().set( new Date( module.currentUnitOfWork().currentTime() ) );
            post.replyTo().set( viewPost.self() );

            self().lastPost().set( post );
            Numbers.add( self().postCount(), 1 );

            return post;
View Full Code Here

Examples of org.springframework.data.redis.samples.retwisj.Post

  @RequestMapping(value = "/!{name}", method = RequestMethod.GET)
  public String posts(@PathVariable String name, @RequestParam(required = false) String replyto, @RequestParam(required = false) String replypid, @RequestParam(required = false) Integer page, Model model) {
    checkUser(name);
    String targetUid = retwis.findUid(name);
    model.addAttribute("post", new Post());
    model.addAttribute("name", name);
    model.addAttribute("followers", retwis.getFollowers(targetUid));
    model.addAttribute("following", retwis.getFollowing(targetUid));

    if (RetwisSecurity.isSignedIn()) {
View Full Code Here

Examples of org.springframework.social.facebook.api.Post

    assertEquals(3, posts.size());
  }

  @Test
  public void getPost() {
    Post post = fb.feedOperations().getPost(feedIds.get(3));
    assertEquals(PostType.LINK, post.getType());
  }
View Full Code Here

Examples of org.superbiz.rest.model.Post

public class CommentDAO extends DAO {
    @EJB
    private DAO dao;

    public List<Comment> list(long postId) {
        Post post = dao.find(Post.class, postId);
        if (post == null) {
            throw new IllegalArgumentException("post with id " + postId + " not found");
        }
        return Collections.unmodifiableList(post.getComments());
    }
View Full Code Here

Examples of org.superbiz.rest.model.Post

        }
        return Collections.unmodifiableList(post.getComments());
    }

    public Comment create(String author, String content, long postId) {
        Post post = dao.find(Post.class, postId);
        if (post == null) {
            throw new IllegalArgumentException("post with id " + postId + " not found");
        }

        Comment comment = new Comment();
View Full Code Here

Examples of org.superbiz.rest.model.Post

    @EJB
    private DAO dao;

    public Post create(String title, String content, long userId) {
        User user = dao.find(User.class, userId);
        Post post = new Post();
        post.setTitle(title);
        post.setContent(content);
        post.setUser(user);
        return dao.create(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.