//# 0 errors, 103 messages
//#
/*
    //#trackbackautodiscoverydecorator.java:1:1: class: net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator
    //#trackbackautodiscoverydecorator.java:1:1: method: net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator.net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init
 * Copyright (c) 2003-2006, Simon Brown
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in
 *     the documentation and/or other materials provided with the
 *     distribution.
 *
 *   - Neither the name of Pebble nor the names of its contributors may
 *     be used to endorse or promote products derived from this software
 *     without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package net.sourceforge.pebble.decorator;

import net.sourceforge.pebble.api.decorator.ContentDecoratorContext;
import net.sourceforge.pebble.domain.BlogEntry;

/**
 * Generates TrackBack Auto-Discovery links for blog entries. See
 * http://www.sixapart.com/pronet/docs/trackback_spec for more details.
 *
 * @author Simon Brown
 */
public class TrackBackAutoDiscoveryDecorator extends ContentDecoratorSupport {
    //#trackbackautodiscoverydecorator.java:43: method: void net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator.net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator()
    //#input(void net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator()): this
    //#trackbackautodiscoverydecorator.java:43: end of method: void net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator.net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator()

  /**
   * Decorates the specified blog entry.
   *
   * @param context   the context in which the decoration is running
   * @param blogEntry the blog entry to be decorated
   */
  public void decorate(ContentDecoratorContext context, BlogEntry blogEntry) {
    StringBuffer html = new StringBuffer();
    //#trackbackautodiscoverydecorator.java:52: method: void net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator.decorate(ContentDecoratorContext, BlogEntry)
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.__Tag
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.blog
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.blog.__Tag
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.blog.id
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.blog.permalinkProvider
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.blog.permalinkProvider.__Tag
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.body
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.id
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.permalink
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.propertyChangeSupport
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.title
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/Configuration.__Descendant_Table[net/sourceforge/pebble/Configuration]
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/Configuration.__Descendant_Table[others]
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/Configuration.__Dispatch_Table.getUrl()Ljava/lang/String;
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/Configuration.__Dispatch_Table.isVirtualHostingEnabled()Z
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/api/permalink/PermalinkProvider.__Descendant_Table[net/sourceforge/pebble/api/permalink/PermalinkProvider]
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/api/permalink/PermalinkProvider.__Descendant_Table[others]
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/api/permalink/PermalinkProvider.__Dispatch_Table.getPermalink(Lnet/sourceforge/pebble/domain/BlogEntry;)Ljava/lang/String;
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/Blog.__Descendant_Table[net/sourceforge/pebble/domain/Blog]
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/Blog.__Descendant_Table[others]
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/Blog.__Dispatch_Table.getId()Ljava/lang/String;
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/Blog.__Dispatch_Table.getPermalinkProvider()Lnet/sourceforge/pebble/api/permalink/PermalinkProvider;
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/Blog.__Dispatch_Table.getUrl()Ljava/lang/String;
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogEntry.__Descendant_Table[net/sourceforge/pebble/domain/BlogEntry]
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogEntry.__Descendant_Table[others]
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogEntry.__Dispatch_Table.getBlog()Lnet/sourceforge/pebble/domain/Blog;
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogEntry.__Dispatch_Table.getBody()Ljava/lang/String;
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogEntry.__Dispatch_Table.getId()Ljava/lang/String;
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogEntry.__Dispatch_Table.getLocalPermalink()Ljava/lang/String;
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogEntry.__Dispatch_Table.getTitle()Ljava/lang/String;
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogEntry.__Dispatch_Table.getTrackBackLink()Ljava/lang/String;
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogEntry.__Dispatch_Table.setBody(Ljava/lang/String;)V
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogManager.__Descendant_Table[net/sourceforge/pebble/domain/BlogManager]
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogManager.__Descendant_Table[others]
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogManager.__Dispatch_Table.isMultiBlog()Z
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogManager.instance
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogManager.instance.__Tag
    //#input(void decorate(ContentDecoratorContext, BlogEntry)): net/sourceforge/pebble/domain/BlogManager.instance.multiBlog
    //#output(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.body
    //#output(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.permalink
    //#pre[1] (void decorate(ContentDecoratorContext, BlogEntry)): blogEntry != null
    //#pre[2] (void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.__Tag == net/sourceforge/pebble/domain/BlogEntry
    //#pre[8] (void decorate(ContentDecoratorContext, BlogEntry)): init'ed(blogEntry.id)
    //#pre[9] (void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.propertyChangeSupport != null
    //#pre[10] (void decorate(ContentDecoratorContext, BlogEntry)): init'ed(blogEntry.title)
    //#pre[14] (void decorate(ContentDecoratorContext, BlogEntry)): init'ed(blogEntry.body)
    //#pre[15] (void decorate(ContentDecoratorContext, BlogEntry)): init'ed(blogEntry.permalink)
    //#pre[3] (void decorate(ContentDecoratorContext, BlogEntry)): (soft) blogEntry.blog != null
    //#pre[4] (void decorate(ContentDecoratorContext, BlogEntry)): (soft) blogEntry.blog.__Tag == net/sourceforge/pebble/domain/Blog
    //#pre[5] (void decorate(ContentDecoratorContext, BlogEntry)): (soft) init'ed(blogEntry.blog.id)
    //#pre[6] (void decorate(ContentDecoratorContext, BlogEntry)): (soft) blogEntry.blog.permalinkProvider != null
    //#pre[7] (void decorate(ContentDecoratorContext, BlogEntry)): (soft) blogEntry.blog.permalinkProvider.__Tag == net/sourceforge/pebble/api/permalink/PermalinkProvider
    //#pre[11] (void decorate(ContentDecoratorContext, BlogEntry)): (soft) net/sourceforge/pebble/domain/BlogManager.instance != null
    //#pre[12] (void decorate(ContentDecoratorContext, BlogEntry)): (soft) net/sourceforge/pebble/domain/BlogManager.instance.__Tag == net/sourceforge/pebble/domain/BlogManager
    //#pre[13] (void decorate(ContentDecoratorContext, BlogEntry)): (soft) init'ed(net/sourceforge/pebble/domain/BlogManager.instance.multiBlog)
    //#post(void decorate(ContentDecoratorContext, BlogEntry)): blogEntry.body != null
    //#post(void decorate(ContentDecoratorContext, BlogEntry)): init'ed(blogEntry.permalink)
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:java.lang.String:valueOf
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:getUrl
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:getPermalinkProvider
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:getPermalink
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:net.sourceforge.pebble.trackback.TrackBackTokenManager:getInstance
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:net.sourceforge.pebble.trackback.TrackBackTokenManager:generateToken
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:java.lang.StringBuffer:toString
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:java.beans.PropertyChangeSupport:firePropertyChange
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:java.lang.String:indexOf
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:net.sourceforge.pebble.PebbleContext:getInstance
    //#unanalyzed(void decorate(ContentDecoratorContext, BlogEntry)): Effects-of-calling:net.sourceforge.pebble.PebbleContext:getConfiguration
    html.append("\n<!--\n");
    html.append("<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n");
    html.append("         xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n");
    html.append("         xmlns:trackback=\"http://madskills.com/public/xml/rss/module/trackback/\">\n");
    html.append("<rdf:Description\n");
    html.append("    rdf:about=\"");
    html.append(blogEntry.getLocalPermalink());
    html.append("\"\n");
    html.append("    dc:identifier=\"");
    html.append(blogEntry.getLocalPermalink());
    html.append("\"\n");
    html.append("    dc:title=\"");
    html.append(blogEntry.getTitle());
    html.append("\"\n");
    html.append("    trackback:ping=\"");
    html.append(blogEntry.getTrackBackLink());
    html.append("\" />\n");
    html.append("</rdf:RDF>\n");
    html.append("-->");

    blogEntry.setBody(blogEntry.getBody() + html);
  }
    //#trackbackautodiscoverydecorator.java:74: end of method: void net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator.decorate(ContentDecoratorContext, BlogEntry)

}
    //#output(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Descendant_Table[net/sourceforge/pebble/decorator/TrackBackAutoDiscoveryDecorator]
    //#output(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.decorate(Lnet/sourceforge/pebble/api/decorator/ContentDecoratorContext;Lnet/sourceforge/pebble/domain/BlogEntry;)V
    //#output(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.decorate(Lnet/sourceforge/pebble/api/decorator/ContentDecoratorContext;Lnet/sourceforge/pebble/domain/Comment;)V
    //#output(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.decorate(Lnet/sourceforge/pebble/api/decorator/ContentDecoratorContext;Lnet/sourceforge/pebble/domain/StaticPage;)V
    //#output(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.decorate(Lnet/sourceforge/pebble/api/decorator/ContentDecoratorContext;Lnet/sourceforge/pebble/domain/TrackBack;)V
    //#output(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.getBlog()Lnet/sourceforge/pebble/domain/Blog;
    //#output(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.setBlog(Lnet/sourceforge/pebble/domain/Blog;)V
    //#output(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): net/sourceforge/pebble/api/decorator/ContentDecorator.__Descendant_Table[net/sourceforge/pebble/decorator/TrackBackAutoDiscoveryDecorator]
    //#output(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): net/sourceforge/pebble/decorator/ContentDecoratorSupport.__Descendant_Table[net/sourceforge/pebble/decorator/TrackBackAutoDiscoveryDecorator]
    //#post(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Descendant_Table[net/sourceforge/pebble/decorator/TrackBackAutoDiscoveryDecorator] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): net/sourceforge/pebble/api/decorator/ContentDecorator.__Descendant_Table[net/sourceforge/pebble/decorator/TrackBackAutoDiscoveryDecorator] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): net/sourceforge/pebble/decorator/ContentDecoratorSupport.__Descendant_Table[net/sourceforge/pebble/decorator/TrackBackAutoDiscoveryDecorator] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.decorate(Lnet/sourceforge/pebble/api/decorator/ContentDecoratorContext;Lnet/sourceforge/pebble/domain/BlogEntry;)V == &decorate
    //#post(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.decorate(Lnet/sourceforge/pebble/api/decorator/ContentDecoratorContext;Lnet/sourceforge/pebble/domain/Comment;)V == &net/sourceforge/pebble/decorator/ContentDecoratorSupport.decorate
    //#post(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.decorate(Lnet/sourceforge/pebble/api/decorator/ContentDecoratorContext;Lnet/sourceforge/pebble/domain/StaticPage;)V == &net/sourceforge/pebble/decorator/ContentDecoratorSupport.decorate
    //#post(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.decorate(Lnet/sourceforge/pebble/api/decorator/ContentDecoratorContext;Lnet/sourceforge/pebble/domain/TrackBack;)V == &net/sourceforge/pebble/decorator/ContentDecoratorSupport.decorate
    //#post(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.getBlog()Lnet/sourceforge/pebble/domain/Blog; == &net/sourceforge/pebble/decorator/ContentDecoratorSupport.getBlog
    //#post(net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init): __Dispatch_Table.setBlog(Lnet/sourceforge/pebble/domain/Blog;)V == &net/sourceforge/pebble/decorator/ContentDecoratorSupport.setBlog
    //#trackbackautodiscoverydecorator.java:: end of method: net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator.net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator__static_init
    //#trackbackautodiscoverydecorator.java:: end of class: net.sourceforge.pebble.decorator.TrackBackAutoDiscoveryDecorator
