Author: xor Date: 2008-10-27 22:54:16 +0000 (Mon, 27 Oct 2008) New Revision: 23122
Modified: trunk/plugins/FMSPlugin/FMSIdentity.java trunk/plugins/FMSPlugin/FMSIdentityManager.java trunk/plugins/FMSPlugin/FMSOwnIdentity.java Log: Change the interfaces to make them compatible with a WoT implementation of theirselves. Modified: trunk/plugins/FMSPlugin/FMSIdentity.java =================================================================== --- trunk/plugins/FMSPlugin/FMSIdentity.java 2008-10-27 22:24:24 UTC (rev 23121) +++ trunk/plugins/FMSPlugin/FMSIdentity.java 2008-10-27 22:54:16 UTC (rev 23122) @@ -3,23 +3,23 @@ * http://www.gnu.org/ for further details of the GPL. */ package plugins.FMSPlugin; +import java.util.Date; + import freenet.keys.FreenetURI; -public abstract class FMSIdentity { +public interface FMSIdentity { + + /** + * @return The requestURI ({@link FreenetURI}) to fetch this Identity + */ + public FreenetURI getRequestURI(); - private final String mNickname; - private final FreenetURI mRequestURI; + public String getNickName(); - public FMSIdentity(String newNickname, FreenetURI newRequestURI) { - mNickname = newNickname; - mRequestURI = newRequestURI; - } + public Date getLastChange(); - public String getNickName() { - return mNickname; - } - - public FreenetURI getRequestURI() { - return mRequestURI; - } + /** + * @return Whether this Identity publishes its trustList or not + */ + public boolean doesPublishTrustList(); } Modified: trunk/plugins/FMSPlugin/FMSIdentityManager.java =================================================================== --- trunk/plugins/FMSPlugin/FMSIdentityManager.java 2008-10-27 22:24:24 UTC (rev 23121) +++ trunk/plugins/FMSPlugin/FMSIdentityManager.java 2008-10-27 22:54:16 UTC (rev 23122) @@ -11,12 +11,12 @@ * @author saces, xor * */ -public abstract class FMSIdentityManager implements Set<FMSIdentity> { +public abstract class FMSIdentityManager { - private final Executor _executor; + private final Executor mExecutor; - public FMSIdentityManager(Executor executor) { - _executor = executor; + public FMSIdentityManager(Executor newExecutor) { + mExecutor = newExecutor; } Modified: trunk/plugins/FMSPlugin/FMSOwnIdentity.java =================================================================== --- trunk/plugins/FMSPlugin/FMSOwnIdentity.java 2008-10-27 22:24:24 UTC (rev 23121) +++ trunk/plugins/FMSPlugin/FMSOwnIdentity.java 2008-10-27 22:54:16 UTC (rev 23122) @@ -10,29 +10,12 @@ * @author saces, xor * */ -public abstract class FMSOwnIdentity extends FMSIdentity { +public interface FMSOwnIdentity extends FMSIdentity { - private final FreenetURI mInsertURI; - private final boolean mPublishTrustList; + public FreenetURI getInsertURI(); - public FMSOwnIdentity(String newNickname, FreenetURI newRequestURI, FreenetURI newInsertURI, boolean bPublishTrustList) { - super(newNickname, newRequestURI); - mInsertURI = newInsertURI; - mPublishTrustList = bPublishTrustList; - } - - public FreenetURI getInsertURI() { - return mInsertURI; - } + public Date getLastInsert(); - public boolean doesPublishTrustList() { - return mPublishTrustList; - } - - public abstract Date getLastChange(); - - public abstract Date getLastInsert(); - /* public final void exportXML(OutputStream out) throws IOException { Writer w = new BufferedWriter(new OutputStreamWriter(out));
