Package net.sourceforge.pebble.domain

Examples of net.sourceforge.pebble.domain.BlogEntry


   * Called when a blog entry has been added.
   *
   * @param event a BlogEntryEvent instance
   */
  public void blogEntryAdded(BlogEntryEvent event) {
    BlogEntry blogEntry = event.getBlogEntry();
    AuditTrail.log("Blog entry \"" + blogEntry.getTitle() + "\" (" + blogEntry.getGuid() + ") added");
  }
View Full Code Here


   * Called when a blog entry has been removed.
   *
   * @param event a BlogEntryEvent instance
   */
  public void blogEntryRemoved(BlogEntryEvent event) {
    BlogEntry blogEntry = event.getBlogEntry();
    AuditTrail.log("Blog entry \"" + blogEntry.getTitle() + "\" (" + blogEntry.getGuid() + ") removed");
  }
View Full Code Here

   * Called when a blog entry has been changed.
   *
   * @param event a BlogEntryEvent instance
   */
  public void blogEntryChanged(BlogEntryEvent event) {
    BlogEntry blogEntry = event.getBlogEntry();
    AuditTrail.log("Blog entry \"" + blogEntry.getTitle() + "\" (" + blogEntry.getGuid() + ") changed");
  }
View Full Code Here

   * Called when a blog entry has been published.
   *
   * @param event a BlogEntryEvent instance
   */
  public void blogEntryPublished(BlogEntryEvent event) {
    BlogEntry blogEntry = event.getBlogEntry();
    AuditTrail.log("Blog entry \"" + blogEntry.getTitle() + "\" (" + blogEntry.getGuid() + ") published");
  }
View Full Code Here

   * Called when a blog entry has been unpublished.
   *
   * @param event a BlogEntryEvent instance
   */
  public void blogEntryUnpublished(BlogEntryEvent event) {
    BlogEntry blogEntry = event.getBlogEntry();
    AuditTrail.log("Blog entry \"" + blogEntry.getTitle() + "\" (" + blogEntry.getGuid() + ") unpublished");
  }
View Full Code Here

  private void matchOnPermalinkProvider(String url,
      PermalinkProvider permalinkProvider) {
    try {
      if (permalinkProvider.isBlogEntryPermalink(url)) {
        BlogEntry blogEntry = permalinkProvider.getBlogEntry(url);
        if (blogEntry != null) {
          setName("Blog Entry : " + blogEntry.getTitle());
          setPageView(true);
        }
      } else if (permalinkProvider.isMonthPermalink(url)) {
        Month month = permalinkProvider.getMonth(url);
        SimpleDateFormat formatter = new SimpleDateFormat("MMMM yyyy", blog
View Full Code Here

   * Called when a blog entry has been added.
   *
   * @param event a BlogEntryEvent instance
   */
  public void blogEntryAdded(BlogEntryEvent event) {
    BlogEntry blogEntry = event.getBlogEntry();
    if (blogEntry.isPublished()) {
      blogEntry.getBlog().getTagIndex().index(blogEntry);
    }
  }
View Full Code Here

   * Called when a blog entry has been removed.
   *
   * @param event a BlogEntryEvent instance
   */
  public void blogEntryRemoved(BlogEntryEvent event) {
    BlogEntry blogEntry = event.getBlogEntry();
    blogEntry.getBlog().getTagIndex().unindex(blogEntry);
  }
View Full Code Here

   * Called when a blog entry has been changed.
   *
   * @param event a BlogEntryEvent instance
   */
  public void blogEntryChanged(BlogEntryEvent event) {
    BlogEntry blogEntry = event.getBlogEntry();

    if (blogEntry.isPublished()) {
      List propertyChangeEvents = event.getPropertyChangeEvents();
      Iterator it = propertyChangeEvents.iterator();
      while (it.hasNext()) {
        PropertyChangeEvent pce = (PropertyChangeEvent)it.next();
        String property = pce.getPropertyName();

        // only if the tags or categories change do we need to reindex the tags
        if (property.equals(BlogEntry.TAGS_PROPERTY) || property.equals(BlogEntry.CATEGORIES_PROPERTY)) {
          blogEntry.getBlog().getTagIndex().unindex(blogEntry);
          blogEntry.getBlog().getTagIndex().index(blogEntry);
        }
      }
    }
  }
View Full Code Here

   * Called when a blog entry has been published.
   *
   * @param event a BlogEntryEvent instance
   */
  public void blogEntryPublished(BlogEntryEvent event) {
    BlogEntry blogEntry = event.getBlogEntry();
    blogEntry.getBlog().getTagIndex().index(blogEntry);
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.pebble.domain.BlogEntry

Copyright © 2018 www.massapicom. 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.