|
Friki example source code file (LocalWikiLink.java)
The Friki LocalWikiLink.java source code
package wiki;
import org.stringtree.factory.AbstractStringFetcher;
import org.stringtree.factory.Container;
import org.stringtree.factory.Fetcher;
import org.stringtree.juicer.Initialisable;
import com.efsol.friki.NamePreserver;
public class LocalWikiLink
extends AbstractStringFetcher
implements Initialisable
{
private Container pages;
public LocalWikiLink(Container pages)
{
this.pages = pages;
}
public LocalWikiLink()
{
this(null);
}
public Object getObject(String key)
{
String ret = "";
if (pages.contains(key))
{
ret = "\nview{" + key + "," + NamePreserver.escape(key) + "}\n";
}
else
{
ret = "\nedit{" + key + "," + NamePreserver.escape(key) + "}\n";
}
return ret;
}
public void init(Fetcher context)
{
pages = (Container)context.getObject("wiki.pages");
}
}
Other Friki examples (source code examples)Here is a short list of links related to this Friki LocalWikiLink.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.