/*
- * 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
*/
public class PostPart implements Part {
- /** The post this part refers to. */
private final Post post;
+ private final boolean usesDeprecatedLink;
- /**
- * Creates a new post part.
- *
- * @param post
- * The referenced post
- */
public PostPart(Post post) {
- this.post = post;
+ this(post, false);
}
- //
- // ACCESSORS
- //
+ public PostPart(Post post, boolean usesDeprecatedLink) {
+ this.post = post;
+ this.usesDeprecatedLink = usesDeprecatedLink;
+ }
- /**
- * Returns the post referenced by this part.
- *
- * @return The post referenced by this part
- */
public Post getPost() {
return post;
}
+ public boolean usesDeprecatedLink() {
+ return usesDeprecatedLink;
+ }
+
+ @Override
+ public String getText() {
+ return post.getText();
+ }
+
}