/*
- * Sone - PostLinkPart.java - Copyright © 2011 David Roden
+ * Sone - PostPart.java - Copyright © 2011–2013 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
import net.pterodactylus.sone.data.Post;
/**
- * TODO
+ * {@link Part} implementation that stores a reference to a {@link Post}.
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
public class PostPart implements Part {
private final Post post;
+ private final boolean usesDeprecatedLink;
public PostPart(Post post) {
+ this(post, false);
+ }
+
+ public PostPart(Post post, boolean usesDeprecatedLink) {
this.post = post;
+ this.usesDeprecatedLink = usesDeprecatedLink;
}
public Post getPost() {
return post;
}
+ public boolean usesDeprecatedLink() {
+ return usesDeprecatedLink;
+ }
+
+ @Override
+ public String getText() {
+ return post.getText();
+ }
+
}