import net.pterodactylus.sone.freenet.fcp.FcpException;
import net.pterodactylus.sone.template.SoneAccessor;
-import com.google.common.base.Optional;
-import com.google.common.collect.Collections2;
-
import freenet.node.FSParseException;
import freenet.support.SimpleFieldSet;
+import com.google.common.base.Optional;
+import com.google.common.collect.Collections2;
+
/**
* Abstract base implementation of a {@link Command} with Sone-related helper
* methods.
protected Post getPost(SimpleFieldSet simpleFieldSet, String parameterName) throws FcpException {
try {
String postId = simpleFieldSet.getString(parameterName);
- Optional<Post> post = core.getPost(postId);
+ Optional<Post> post = core.getDatabase().getPost(postId);
if (!post.isPresent()) {
throw new FcpException("Could not load post from “" + postId + "”.");
}
// OBJECT METHODS
//
- /**
- * {@inheritDoc}
- */
@Override
public String toString() {
return getClass().getName() + "[writeAccess=" + writeAccess + "]";