|
From: <pe...@us...> - 2003-12-16 15:05:03
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv10766/src/java/org/neuclear/id
Modified Files:
Identity.java
Added Files:
SignedMessage.java
Log Message:
Added SignedMessage contract for signing simple textual contracts.
Added NeuSender, updated SmtpSender and Sender to take plain email addresses (without the mailto:)
Added AbstractObjectCreationTest to make it quicker to write unit tests to verify
NamedObjectBuilder/SignedNamedObject Pairs.
Sample application has been expanded with a basic email application.
Updated docs for sample web app.
Added missing LGPL LICENSE.txt files to signer and sample app
--- NEW FILE: SignedMessage.java ---
package org.neuclear.id;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.xml.xmlsec.XMLSecurityException;
import org.neuclear.auth.AuthenticationTicket;
import org.dom4j.Element;
import org.dom4j.DocumentHelper;
import java.sql.Timestamp;
/**
* Created by IntelliJ IDEA.
* User: pelleb
* Date: Dec 15, 2003
* Time: 11:48:34 PM
* To change this template use Options | File Templates.
*/
public class SignedMessage extends SignedNamedObject{
private SignedMessage(SignedNamedCore core, String recipient,String subject, String message) throws NeuClearException {
super(core);
this.recipient=recipient;
this.subject=subject;
this.message=message;
}
public String getRecipient() {
return recipient;
}
public String getSubject() {
return subject;
}
public String getMessage() {
return message;
}
public final static class Reader implements NamedObjectReader {
/**
* Read object from Element and fill in its details
*
* @param elem
* @return
*/
public final SignedNamedObject read(final SignedNamedCore core, final Element elem) throws NeuClearException, XMLSecurityException {
final String to=elem.attributeValue("recipient");
final String subject=elem.element("subject").getText();
final String message=elem.element("message").getText();
return new SignedMessage(core, to,subject,message);
}
}
private final String recipient;
private final String subject;
private final String message;
public static final String TAG_NAME="SignedMessage";
}
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** Identity.java 10 Dec 2003 23:58:51 -0000 1.23
--- Identity.java 16 Dec 2003 15:05:00 -0000 1.24
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.24 2003/12/16 15:05:00 pelle
+ * Added SignedMessage contract for signing simple textual contracts.
+ * Added NeuSender, updated SmtpSender and Sender to take plain email addresses (without the mailto:)
+ * Added AbstractObjectCreationTest to make it quicker to write unit tests to verify
+ * NamedObjectBuilder/SignedNamedObject Pairs.
+ * Sample application has been expanded with a basic email application.
+ * Updated docs for sample web app.
+ * Added missing LGPL LICENSE.txt files to signer and sample app
+ *
* Revision 1.23 2003/12/10 23:58:51 pelle
* Did some cleaning up in the builders
***************
*** 341,344 ****
--- 350,357 ----
public final String getLogger() {
return logger;
+ }
+
+ public final String getReceiver() {
+ return receiver;
}
|