// SONETEMPLATEPAGE METHODS
//
- /**
- * {@inheritDoc}
- */
@Override
@SuppressWarnings("synthetic-access")
protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
*/
private String getPostId(String phrase) {
String postId = phrase.startsWith("post://") ? phrase.substring(7) : phrase;
- return (webInterface.getCore().getPost(postId).isPresent()) ? postId : null;
+ return (webInterface.getCore().getDatabase().getPost(postId).isPresent()) ? postId : null;
}
/**
this.complete = complete;
}
- /**
- * {@inheritDoc}
- */
@Override
public String generateString(Sone sone) {
StringBuilder soneString = new StringBuilder();
*/
private class PostStringGenerator implements StringGenerator<Post> {
- /**
- * {@inheritDoc}
- */
@Override
public String generateString(Post post) {
StringBuilder postString = new StringBuilder();
// OBJECT METHODS
//
- /**
- * {@inheritDoc}
- */
@Override
public int hashCode() {
return phrase.hashCode() ^ ((optionality == Optionality.FORBIDDEN) ? (0xaaaaaaaa) : ((optionality == Optionality.REQUIRED) ? 0x55555555 : 0));
}
- /**
- * {@inheritDoc}
- */
@Override
public boolean equals(Object object) {
if (!(object instanceof Phrase)) {
*/
private static class HitMapper<T> implements Function<Hit<T>, T> {
- /**
- * {@inheritDoc}
- */
@Override
public T apply(Hit<T> input) {
return input.getObject();