Examples of BlogManager


Examples of evolaris.framework.blog.business.BlogManager

    if (searchResults == null) {
      searchResults = new ArrayList<Long>();
    }
   
    GroupManager groupMgr = new GroupManager(locale, session);
    BlogManager blogMgr = new BlogManager(locale, session);
    Group mgblGroup = groupMgr.getGroup("mgbl");
    Blog gameBlog = blogMgr.getBlog("mgblgameinstances", mgblGroup);
    List<DisplayableApplicationType> entries = new ArrayList<DisplayableApplicationType>();
    for (Long id : searchResults) {
      Article blogArticle = blogMgr.getArticle(id);
      DisplayableApplicationType entry = new DisplayableApplicationType(blogArticle);
      Label label = blogMgr.getLabel(gameBlog, blogArticle.getTitle());
      Collection<Article> gameList = label != null ? blogMgr.getArchivedArticles(gameBlog, label) : null;
      entry.setGameCount(gameList != null ? gameList.size() : 0);
      entries.add(entry);
    }
    req.setAttribute("articleList", entries);
    return mapping.findForward("display");
View Full Code Here

Examples of manager.BlogManager

    public void test_AT_CacheResult()
    {
        String testBody = "" + System.currentTimeMillis();
        String testTitle = "title a";
        Blog blog = new Blog(testTitle, testBody);
        BlogManager blogManager = getBlogManager();
        blogManager.createEntry(blog);

        Blog entryCached = blogManager.getEntryCached(testTitle);
        assertEquals(entryCached.getBody(), testBody);

        /* clear from map, but not from cache */
        blogManager.clearEntry(testTitle);
        entryCached = blogManager.getEntryCached(testTitle);
        assertNotNull("Item should still be in the cache thus not null", entryCached);
        assertEquals(
                "Item should still be in the cache and the title should be the same as before",
                entryCached.getBody(), testBody);

View Full Code Here

Examples of manager.BlogManager

    public void test_AT_CacheResult_UsingAt_CacheKeyParam()
    {
        String testBody = "" + System.currentTimeMillis();
        String testTitle = "title abc";
        Blog blog = new Blog(testTitle, testBody);
        BlogManager blogManager = getBlogManager();
        blogManager.createEntry(blog);

        Blog entryCached = blogManager.getEntryCached("asdf", testTitle, "adsfa");
        assertEquals(entryCached.getBody(), testBody);

        /* clear from map, but not from cache */
        blogManager.clearEntry(testTitle);
        entryCached = blogManager.getEntryCached(testTitle);
        assertNotNull("Item should still be in the cache thus not null", entryCached);
        assertEquals(
                "Item should still be in the cache and the title should be the same as before",
                entryCached.getBody(), testBody);

View Full Code Here

Examples of manager.BlogManager

    public void test_AT_CacheRemoveEntry()
    {
        String testBody = "" + System.currentTimeMillis();
        String testTitle = "title b";
        Blog blog = new Blog(testTitle, testBody);
        BlogManager blogManager = getBlogManager();
        blogManager.createEntry(blog);

        Blog entryCached = blogManager.getEntryCached(testTitle);
        assertEquals(entryCached.getBody(), testBody);

        /* clear from cache using annotation @CacheRemove */
        blogManager.clearEntryFromCache(testTitle);

        /* clear from map, but not from cache */
        blogManager.clearEntry(testTitle);

        entryCached = blogManager.getEntryCached(testTitle);
        assertNull("Item should removed from the cache and the map", entryCached);

    }
View Full Code Here

Examples of manager.BlogManager

    {
        String testBody = "" + System.currentTimeMillis();
        String testTitle = "title b";

        Blog blog = new Blog(testTitle, testBody);
        BlogManager blogManager = getBlogManager();
        blogManager.createEntry(blog);

        Blog entryCached = blogManager.getEntryCached(testTitle);
        assertEquals(entryCached.getBody(), testBody);

        /* clear from map, but not from cache */
        blogManager.clearEntry(testTitle);

        /* clear from cache using annotation @CacheRemoveAll */
        blogManager.clearCache();

        entryCached = blogManager.getEntryCached(testTitle);

        assertNull("Item should removed from the cache and the map", entryCached);

    }
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogManager

   * @param response the HttpServletResponse instance
   * @return the name of the next view
   */
  public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    AbstractBlog blog = (AbstractBlog)getModel().get(Constants.BLOG_KEY);
    BlogManager blogManager = BlogManager.getInstance();
    String blogId = request.getParameter("id");

    if (blogId != null && blogId.length() > 0 && blogId.matches("[\\w-~]*") && blogManager.getBlog(blogId) == null) {
      blogManager.addBlog(blogId);
    }

    return new RedirectView(blog.getUrl() + "viewBlogs.secureaction");
  }
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogManager

   * @param request  the HttpServletRequest instance
   * @param response the HttpServletResponse instance
   * @return the name of the next view
   */
  public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    BlogManager blogManager = BlogManager.getInstance();
    getModel().put(Constants.BLOGS, blogManager.getBlogs());

    return new BlogsView();
  }
View Full Code Here

Examples of net.sourceforge.pebble.domain.BlogManager

   * @param response the HttpServletResponse instance
   * @return the name of the next view
   */
  public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    AbstractBlog blog = (AbstractBlog)getModel().get(Constants.BLOG_KEY);
    BlogManager blogManager = BlogManager.getInstance();
    String blogId = request.getParameter("id");

    Configuration config = PebbleContext.getInstance().getConfiguration();
    String regex = (config.isVirtualHostingEnabled() && !config.isVirtualHostingSubdomain()) ? "[\\.\\w-~]*" : "[\\w-~]*";
   
    if (blogId != null && blogId.length() > 0 && blogId.matches(regex) && blogManager.getBlog(blogId) == null) {
      blogManager.addBlog(blogId);
    }

    return new RedirectView(blog.getUrl() + "viewBlogs.secureaction");
  }
View Full Code Here

Examples of org.mapache.business.blog.BlogManager

        }
        return _replyManager;
    }
    private BlogManager getBlogManager(){
        if(_blogManager == null){
            _blogManager = new BlogManager();
        }
        return _blogManager;
    }
View Full Code Here

Examples of org.mapache.business.blog.BlogManager

        }
        return _replyManager;
    }
    private BlogManager getBlogManager(){
        if(_blogManager == null){
            _blogManager = new BlogManager();
        }
        return _blogManager;
    }
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.