Explanatory names for MessageFactory methods.

This commit is contained in:
akwizgran
2013-02-28 13:08:35 +00:00
parent bfd4ee5e9f
commit 43c8cfa248
5 changed files with 46 additions and 33 deletions

View File

@@ -7,25 +7,27 @@ import java.security.PrivateKey;
public interface MessageFactory {
/** Creates a private message. */
Message createMessage(MessageId parent, String subject, byte[] body)
throws IOException, GeneralSecurityException;
Message createPrivateMessage(MessageId parent, String subject, byte[] body)
throws IOException, GeneralSecurityException;
/** Creates an anonymous message to an unrestricted group. */
Message createMessage(MessageId parent, Group group, String subject,
byte[] body) throws IOException, GeneralSecurityException;
/** Creates an anonymous message to a restricted group. */
Message createMessage(MessageId parent, Group group, PrivateKey groupKey,
Message createAnonymousGroupMessage(MessageId parent, Group group,
String subject, byte[] body) throws IOException,
GeneralSecurityException;
/** Creates an anonymous message to a restricted group. */
Message createAnonymousGroupMessage(MessageId parent, Group group,
PrivateKey groupKey, String subject, byte[] body)
throws IOException, GeneralSecurityException;
/** Creates a pseudonymous message to an unrestricted group. */
Message createMessage(MessageId parent, Group group, Author author,
PrivateKey authorKey, String subject, byte[] body)
throws IOException, GeneralSecurityException;
Message createPseudonymousMessage(MessageId parent, Group group,
Author author, PrivateKey authorKey, String subject, byte[] body)
throws IOException, GeneralSecurityException;
/** Creates a pseudonymous message to a restricted group. */
Message createMessage(MessageId parent, Group group, PrivateKey groupKey,
Author author, PrivateKey authorKey, String subject, byte[] body)
throws IOException, GeneralSecurityException;
Message createPseudonymousMessage(MessageId parent, Group group,
PrivateKey groupKey, Author author, PrivateKey authorKey,
String subject, byte[] body) throws IOException,
GeneralSecurityException;
}