You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(119) |
Oct
(111) |
Nov
(238) |
Dec
(395) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(239) |
Feb
(59) |
Mar
(354) |
Apr
(489) |
May
(23) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(5) |
Jun
(2) |
Jul
|
Aug
|
Sep
(3) |
Oct
(14) |
Nov
(17) |
Dec
(9) |
| 2007 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(7) |
May
(3) |
Jun
(6) |
Jul
(4) |
Aug
(3) |
Sep
(15) |
Oct
(13) |
Nov
(35) |
Dec
(40) |
| 2009 |
Jan
(19) |
Feb
(21) |
Mar
(16) |
Apr
(18) |
May
(36) |
Jun
(20) |
Jul
(32) |
Aug
(11) |
Sep
(3) |
Oct
(2) |
Nov
(2) |
Dec
(13) |
| 2010 |
Jan
(5) |
Feb
(5) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(3) |
| 2012 |
Jan
(3) |
Feb
(3) |
Mar
(1) |
Apr
(4) |
May
(8) |
Jun
(4) |
Jul
(9) |
Aug
(2) |
Sep
(8) |
Oct
(3) |
Nov
(8) |
Dec
(4) |
| 2013 |
Jan
(2) |
Feb
(1) |
Mar
(5) |
Apr
(6) |
May
(10) |
Jun
(5) |
Jul
(6) |
Aug
(7) |
Sep
(5) |
Oct
(2) |
Nov
(4) |
Dec
(4) |
| 2014 |
Jan
(13) |
Feb
(4) |
Mar
(7) |
Apr
(9) |
May
(20) |
Jun
(13) |
Jul
(10) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(2) |
Dec
(2) |
| 2015 |
Jan
(3) |
Feb
(3) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(3) |
Nov
(4) |
Dec
(2) |
| 2017 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Pelle B. <pe...@us...> - 2004-04-18 01:06:14
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22163/src/java/org/neuclear/asset/contracts/builders Modified Files: AssetBuilder.java Log Message: Asset now parses the xhtml file for its details. Index: AssetBuilder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/AssetBuilder.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** AssetBuilder.java 17 Apr 2004 19:27:59 -0000 1.12 --- AssetBuilder.java 18 Apr 2004 01:06:05 -0000 1.13 *************** *** 5,12 **** --- 5,17 ---- import org.neuclear.commons.crypto.signers.JCESigner; import org.neuclear.commons.crypto.signers.TestCaseSigner; + import org.neuclear.id.Service; import org.neuclear.id.builders.ServiceBuilder; + import org.neuclear.id.verifier.VerifyingReader; import org.neuclear.xml.XMLTools; + import java.io.BufferedInputStream; import java.io.File; + import java.io.FileInputStream; + import java.io.InputStream; import java.security.PublicKey; *************** *** 31,34 **** --- 36,42 ---- $Id$ $Log$ + Revision 1.13 2004/04/18 01:06:05 pelle + Asset now parses the xhtml file for its details. + Revision 1.12 2004/04/17 19:27:59 pelle Identity is now fully html based as is the ServiceBuilder. *************** *** 144,147 **** --- 152,157 ---- final JCESigner signer = new TestCaseSigner(); + AssetGlobals.registerReaders(); + final AssetBuilder assetraw = new AssetBuilder("Bux", "http://bux.neuclear.org", *************** *** 156,160 **** out.getParentFile().mkdirs(); XMLTools.writeFile(out, assetraw.getElement()); ! // final Service asset = (Service) assetraw.convert("neu://bob@test", signer); --- 166,171 ---- out.getParentFile().mkdirs(); XMLTools.writeFile(out, assetraw.getElement()); ! final InputStream is = new BufferedInputStream(new FileInputStream(out)); ! final Service asset = (Service) VerifyingReader.getInstance().read(is); |
|
From: Pelle B. <pe...@us...> - 2004-04-18 01:05:29
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22052/src/java/org/neuclear/id Modified Files: InvalidNamedObjectException.java Log Message: Forgot to add the <meta name="neu:type" content="Identity"/> tag to files generated by IdentityBuilder and it's sub classes. Index: InvalidNamedObjectException.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/InvalidNamedObjectException.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** InvalidNamedObjectException.java 19 Dec 2003 18:03:34 -0000 1.3 --- InvalidNamedObjectException.java 18 Apr 2004 01:05:16 -0000 1.4 *************** *** 2,5 **** --- 2,8 ---- * $Id$ * $Log$ + * Revision 1.4 2004/04/18 01:05:16 pelle + * Forgot to add the <meta name="neu:type" content="Identity"/> tag to files generated by IdentityBuilder and it's sub classes. + * * Revision 1.3 2003/12/19 18:03:34 pelle * Revamped a lot of exception handling throughout the framework, it has been simplified in most places: *************** *** 114,120 **** package org.neuclear.id; - import org.neuclear.commons.NeuClearException; import org.dom4j.Element; import org.dom4j.QName; /** --- 117,124 ---- package org.neuclear.id; import org.dom4j.Element; import org.dom4j.QName; + import org.neuclear.commons.NeuClearException; + import org.neuclear.xml.XMLTools; /** *************** *** 122,136 **** */ public final class InvalidNamedObjectException extends NeuClearException { ! public InvalidNamedObjectException(final String name,final String message) { ! super(name+" is an invalid Identity\nCause: "+message); ! this.name=name; } ! public InvalidNamedObjectException(final String name,Throwable e) { ! super(name+" is an invalid Identity\nCause: "+e.getLocalizedMessage(),e); ! this.name=name; } public InvalidNamedObjectException(final String name) { ! super(name+" is an invalid Identity"); ! this.name=name; } --- 126,142 ---- */ public final class InvalidNamedObjectException extends NeuClearException { ! public InvalidNamedObjectException(final String name, final String message) { ! super(name + " is an invalid Identity\nCause: " + message); ! this.name = name; } ! ! public InvalidNamedObjectException(final String name, Throwable e) { ! super(name + " is an invalid Identity\nCause: " + e.getLocalizedMessage(), e); ! this.name = name; } + public InvalidNamedObjectException(final String name) { ! super(name + " is an invalid Identity"); ! this.name = name; } *************** *** 139,176 **** } ! public static void assertElementQName(SignedNamedCore core,Element elem,QName qname) throws InvalidNamedObjectException{ if (!elem.getQName().equals(qname)) ! throw new InvalidNamedObjectException(core.getName(),"Element: "+elem.getQualifiedName()+ " should be: "+qname.getQualifiedName()); } ! public static Element assertContainsElementQName(SignedNamedCore core,Element elem,QName qname) throws InvalidNamedObjectException{ final Element sub = elem.element(qname); ! if (sub==null) ! throw new InvalidNamedObjectException(core.getName(),"Element: "+elem.getQualifiedName()+ " should be: "+qname.getQualifiedName()); return sub; } ! public static String assertAttributeQName(SignedNamedCore core,Element elem,QName qname) throws InvalidNamedObjectException{ ! if (elem.attribute(qname)==null) ! throw new InvalidNamedObjectException(core.getName(),"Element: "+elem.getQualifiedName()+ " should contain attribute: "+qname.getQualifiedName()); return elem.attributeValue(qname); } ! public static void assertElementQName(Element elem,QName qname) throws InvalidNamedObjectException{ if (!elem.getQName().equals(qname)) ! throw new InvalidNamedObjectException("unknown","Element: "+elem.getQualifiedName()+ " should be: "+qname.getQualifiedName()); } ! public static Element assertContainsElementQName(Element elem,QName qname) throws InvalidNamedObjectException{ final Element sub = elem.element(qname); ! if (sub==null) ! throw new InvalidNamedObjectException("unknown","Element: "+elem.getQualifiedName()+ " should be: "+qname.getQualifiedName()); return sub; } ! public static String assertAttributeQName(Element elem,QName qname) throws InvalidNamedObjectException{ ! if (elem.attribute(qname)==null) ! throw new InvalidNamedObjectException("unknown","Element: "+elem.getQualifiedName()+ " should contain attribute: "+qname.getQualifiedName()); return elem.attributeValue(qname); } private final String name; } --- 145,191 ---- } ! public static void assertElementQName(SignedNamedCore core, Element elem, QName qname) throws InvalidNamedObjectException { if (!elem.getQName().equals(qname)) ! throw new InvalidNamedObjectException(core.getName(), "Element: " + elem.getQualifiedName() + " should be: " + qname.getQualifiedName()); } ! public static Element assertContainsElementQName(SignedNamedCore core, Element elem, QName qname) throws InvalidNamedObjectException { final Element sub = elem.element(qname); ! if (sub == null) ! throw new InvalidNamedObjectException(core.getName(), "Element: " + elem.getQualifiedName() + " should be: " + qname.getQualifiedName()); return sub; } ! public static Element assertContainsElementId(SignedNamedCore core, Element elem, String id) throws InvalidNamedObjectException { ! final Element sub = XMLTools.getByID(elem, id); ! if (sub == null) ! throw new InvalidNamedObjectException(core.getName(), "Element: " + elem.getQualifiedName() + " doesnt contain an element with id: " + id); ! return sub; ! } ! ! public static String assertAttributeQName(SignedNamedCore core, Element elem, QName qname) throws InvalidNamedObjectException { ! if (elem.attribute(qname) == null) ! throw new InvalidNamedObjectException(core.getName(), "Element: " + elem.getQualifiedName() + " should contain attribute: " + qname.getQualifiedName()); return elem.attributeValue(qname); } ! ! public static void assertElementQName(Element elem, QName qname) throws InvalidNamedObjectException { if (!elem.getQName().equals(qname)) ! throw new InvalidNamedObjectException("unknown", "Element: " + elem.getQualifiedName() + " should be: " + qname.getQualifiedName()); } ! public static Element assertContainsElementQName(Element elem, QName qname) throws InvalidNamedObjectException { final Element sub = elem.element(qname); ! if (sub == null) ! throw new InvalidNamedObjectException("unknown", "Element: " + elem.getQualifiedName() + " should be: " + qname.getQualifiedName()); return sub; } ! public static String assertAttributeQName(Element elem, QName qname) throws InvalidNamedObjectException { ! if (elem.attribute(qname) == null) ! throw new InvalidNamedObjectException("unknown", "Element: " + elem.getQualifiedName() + " should contain attribute: " + qname.getQualifiedName()); return elem.attributeValue(qname); } + private final String name; } |
|
From: Pelle B. <pe...@us...> - 2004-04-18 01:05:24
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22052/src/java/org/neuclear/id/builders Modified Files: IdentityBuilder.java Log Message: Forgot to add the <meta name="neu:type" content="Identity"/> tag to files generated by IdentityBuilder and it's sub classes. Index: IdentityBuilder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/IdentityBuilder.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** IdentityBuilder.java 17 Apr 2004 19:28:21 -0000 1.22 --- IdentityBuilder.java 18 Apr 2004 01:05:15 -0000 1.23 *************** *** 2,5 **** --- 2,8 ---- * $Id$ * $Log$ + * Revision 1.23 2004/04/18 01:05:15 pelle + * Forgot to add the <meta name="neu:type" content="Identity"/> tag to files generated by IdentityBuilder and it's sub classes. + * * Revision 1.22 2004/04/17 19:28:21 pelle * Identity is now fully html based as is the ServiceBuilder. *************** *** 272,277 **** --- 275,285 ---- protected IdentityBuilder(String type) { super("html"); + head = getElement().addElement("head"); body = getElement().addElement("body"); + Element meta = head.addElement("meta"); + meta.addAttribute("name", "neu:type"); + meta.addAttribute("content", type); + } |
|
From: Pelle B. <pe...@us...> - 2004-04-18 01:03:58
|
Update of /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21784/src/java/org/neuclear/xml Modified Files: XMLTools.java Log Message: Added another varient of the id attribute to the getElementById method. Index: XMLTools.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/XMLTools.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** XMLTools.java 14 Jan 2004 16:34:27 -0000 1.6 --- XMLTools.java 18 Apr 2004 01:03:48 -0000 1.7 *************** *** 2,5 **** --- 2,8 ---- * $Id$ * $Log$ + * Revision 1.7 2004/04/18 01:03:48 pelle + * Added another varient of the id attribute to the getElementById method. + * * Revision 1.6 2004/01/14 16:34:27 pelle * New model of references and signatures now pretty much works. *************** *** 183,193 **** return DocumentHelper.createDocument(); } ! public static Document loadDocument(final String url) throws XMLException{ try { return loadDocument(new URL(url)); } catch (MalformedURLException e) { ! throw new XMLException(e); } } public static Document loadDocument(final URL url) throws XMLException { try { --- 186,198 ---- return DocumentHelper.createDocument(); } ! ! public static Document loadDocument(final String url) throws XMLException { try { return loadDocument(new URL(url)); } catch (MalformedURLException e) { ! throw new XMLException(e); } } + public static Document loadDocument(final URL url) throws XMLException { try { *************** *** 198,201 **** --- 203,207 ---- } } + public static Document loadDocument(final InputStream is) throws XMLException { try { *************** *** 298,326 **** throw new XMLException(e); } /** * This is used to find an Elemente with a given ID. * This is necessary because of Dom4j's use of the ID attribute * and not the more common in XMLSignature Id attribute. * @param elem * @param id * @return */ ! public static Element getByID(Element elem,String id){ ! return getByID(elem.getDocument(),id); } /** * This is used to find an Elemente with a given ID. * This is necessary because of Dom4j's use of the ID attribute * and not the more common in XMLSignature Id attribute. * @param doc * @param id * @return */ ! public static Element getByID(Document doc,String id){ ! Element object=doc.elementByID(id); ! if (object!=null) return object; ! XPath xp=DocumentHelper.createXPath("//*[@Id='"+id+"']"); ! return (Element) xp.selectSingleNode(doc); } --- 304,341 ---- throw new XMLException(e); } + /** * This is used to find an Elemente with a given ID. * This is necessary because of Dom4j's use of the ID attribute * and not the more common in XMLSignature Id attribute. + * * @param elem * @param id * @return */ ! public static Element getByID(Element elem, String id) { ! return getByID(elem.getDocument(), id); } + /** * This is used to find an Elemente with a given ID. * This is necessary because of Dom4j's use of the ID attribute * and not the more common in XMLSignature Id attribute. + * * @param doc * @param id * @return */ ! public static Element getByID(Document doc, String id) { ! Element object = doc.elementByID(id); ! if (object != null) return object; ! XPath xp = DocumentHelper.createXPath("//*[@Id='" + id + "']"); ! object = (Element) xp.selectSingleNode(doc); ! if (object != null) ! return object; ! xp = DocumentHelper.createXPath("//*[@id='" + id + "']"); ! object = (Element) xp.selectSingleNode(doc); ! return object; } |
|
From: <bug...@ve...> - 2004-04-18 01:03:52
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/PAY-43 Here is an overview of the issue: --------------------------------------------------------------------- Key: PAY-43 Summary: Create support for XHTML Asset Descriptors Type: New Feature Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Payments Components: Data Objects Fix Fors: 0.3 Versions: 0.3 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 6 Apr 2004 9:39 AM Updated: Sat, 17 Apr 2004 6:02 PM Description: Asset Descriptors should be able to be written in human readable xhtml with the important elements highlighted using ID's. The xhtml should be digitally signed. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-17 19:32:47
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/NEU-30 Here is an overview of the issue: --------------------------------------------------------------------- Key: NEU-30 Summary: Allow Identity Objects to be described in XHTML Type: New Feature Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Identity Fix Fors: 0.9 Versions: 0.9 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 6 Apr 2004 9:40 AM Updated: Sat, 17 Apr 2004 12:31 PM Description: People should be able to describe them selves in xhtml with foaf,rdf etc and sign it for use as an Identity descriptor. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:29:00
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/java/org/neuclear/id/builders Modified Files: Builder.java IdentityBuilder.java ServiceBuilder.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: IdentityBuilder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/IdentityBuilder.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** IdentityBuilder.java 1 Apr 2004 23:19:47 -0000 1.21 --- IdentityBuilder.java 17 Apr 2004 19:28:21 -0000 1.22 *************** *** 2,5 **** --- 2,12 ---- * $Id$ * $Log$ + * Revision 1.22 2004/04/17 19:28:21 pelle + * Identity is now fully html based as is the ServiceBuilder. + * VerifyingReader correctly identifies html files and parses them as such. + * Targets and Target now parse html link tags + * AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + * The Asset.Reader and ExchangeAgent.Reader still need to be updated. + * * Revision 1.21 2004/04/01 23:19:47 pelle * Split Identity into Signatory and Identity class. *************** *** 235,276 **** import org.dom4j.Element; - import org.dom4j.QName; import org.neuclear.commons.Utility; - import org.neuclear.id.Identity; - import org.neuclear.id.InvalidNamedObjectException; public class IdentityBuilder extends Builder { ! public IdentityBuilder() throws InvalidNamedObjectException { ! this(Identity.DEFAULT_SIGNER); ! } ! ! /** ! * It creates a Standard Identity document, but doesn't sign it. ! * ! * @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing ! * @param receiver URL of default receiver for namespace ! */ ! ! public IdentityBuilder(final String signer, final String logger, final String receiver) throws InvalidNamedObjectException { ! this(createNEUIDQName(TAGNAME), signer, logger, receiver); } - public IdentityBuilder(final String signer) throws InvalidNamedObjectException { - this(createNEUIDQName(TAGNAME), signer); - } /** * This constructor should be used by subclasses of Identity. It creates a Standard Identity document, but doesn't sign it. * - * @param tag The Tag used by this sub class - * @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing * @param receiver URL of default receiver for namespace */ ! protected IdentityBuilder(final QName tag, final String signer, final String logger, final String receiver) throws InvalidNamedObjectException { ! this(tag, signer); - addTarget(logger, "logger"); - addTarget(receiver, "inbox"); } --- 242,266 ---- import org.dom4j.Element; import org.neuclear.commons.Utility; public class IdentityBuilder extends Builder { ! public IdentityBuilder() { ! this(TYPENAME); } /** * This constructor should be used by subclasses of Identity. It creates a Standard Identity document, but doesn't sign it. * * @param receiver URL of default receiver for namespace */ ! public IdentityBuilder(final String name, final String receiver, final String message) { ! this(); ! addTarget(receiver, "receiver"); ! head.addElement("title").setText(name); ! body.addElement("h1").setText(name); ! body.addElement("p").setText(message); } *************** *** 278,301 **** * This constructor should be used by subclasses of Identity. It creates a Standard Identity document, but doesn't sign it. * ! * @param tag The Tag used by this sub class ! * @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing */ ! protected IdentityBuilder(final QName tag, final String signer) throws InvalidNamedObjectException { ! super(tag); ! ! final Element root = getElement(); ! addLineBreak(); ! if (!Utility.isEmpty(signer)) ! addElement("Signer", signer); } ! private void addTarget(final String href, final String type) { ! if (!Utility.isEmpty(href)) ! addElement("Target", href).addAttribute("type", type); } ! private static final String TAGNAME = "Identity"; --- 268,293 ---- * This constructor should be used by subclasses of Identity. It creates a Standard Identity document, but doesn't sign it. * ! * @param type The type identifier */ ! protected IdentityBuilder(String type) { ! super("html"); ! head = getElement().addElement("head"); ! body = getElement().addElement("body"); } ! protected final void addTarget(final String href, final String type) { ! if (!Utility.isEmpty(href)) { ! final Element target = head.addElement("link"); ! target.addAttribute("rel", "neu:" + type); ! target.addAttribute("href", href); ! } } ! protected final Element head; ! protected final Element body; ! ! private static final String TYPENAME = "Identity"; Index: Builder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/Builder.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Builder.java 12 Apr 2004 15:00:54 -0000 1.7 --- Builder.java 17 Apr 2004 19:28:21 -0000 1.8 *************** *** 27,30 **** --- 27,34 ---- } + public Builder(final String name) { + super(name); + } + public Builder(final String name, final Namespace ns) { super(name, ns); Index: ServiceBuilder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/ServiceBuilder.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ServiceBuilder.java 5 Apr 2004 16:32:52 -0000 1.1 --- ServiceBuilder.java 17 Apr 2004 19:28:21 -0000 1.2 *************** *** 1,7 **** package org.neuclear.id.builders; - import org.dom4j.DocumentHelper; import org.dom4j.Element; ! import org.dom4j.QName; import org.neuclear.id.InvalidNamedObjectException; import org.neuclear.xml.xmlsec.KeyInfo; --- 1,8 ---- package org.neuclear.id.builders; import org.dom4j.Element; ! import org.neuclear.commons.crypto.Base32; ! import org.neuclear.commons.crypto.Base64; ! import org.neuclear.commons.crypto.CryptoTools; import org.neuclear.id.InvalidNamedObjectException; import org.neuclear.xml.xmlsec.KeyInfo; *************** *** 12,15 **** --- 13,23 ---- $Id$ $Log$ + Revision 1.2 2004/04/17 19:28:21 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.1 2004/04/05 16:32:52 pelle Created new ServiceBuilder class for creating services. A service is an identity that has a seperate service URL and Service Public Key. *************** *** 23,35 **** */ public class ServiceBuilder extends IdentityBuilder { ! public ServiceBuilder(final QName tag, final String serviceUrl, PublicKey serviceKey) throws InvalidNamedObjectException { ! super(tag, null); ! final Element serviceElem = DocumentHelper.createElement(createNEUIDQName("Service")); ! serviceElem.add(new KeyInfo(serviceKey).getElement()); ! final Element urlElem = DocumentHelper.createElement(createNEUIDQName("Url")); ! urlElem.setText(serviceUrl); ! serviceElem.add(urlElem); ! getElement().add(serviceElem); } } --- 31,101 ---- */ public class ServiceBuilder extends IdentityBuilder { ! public ServiceBuilder(final String type, final String title, final String serviceUrl, PublicKey serviceKey) throws InvalidNamedObjectException { ! super(type); ! addTarget(serviceUrl, "controller"); ! ! body.addElement("h1").setText(title); ! description = body.addElement("div"); ! description.addAttribute("id", "rules"); ! ! body.addElement("h3").setText("Features"); ! ! proptable = body.addElement("table"); ! Element tr = proptable.addElement("tr"); ! tr.addElement("th").setText("Type"); ! tr.addElement("th").setText("Value"); ! tr.addElement("th").setText("Description"); ! ! body.addElement("h3").setText("Keys"); ! pktable = body.addElement("table"); ! // pktable.addAttribute("class","pktable"); ! tr = pktable.addElement("tr"); ! // tr.addAttribute("class","tablehead"); ! tr.addElement("th").setText("Type"); ! tr.addElement("th").setText("Key ID"); ! tr.addElement("th").setText("PublicKey"); ! + body.addElement("h3").setText("Rules"); + rules = body.addElement("div"); + rules.addAttribute("id", "rules"); + addKeyInfo("controller.publickey", serviceKey, "Service Controllers Public Key"); + addFeature("controller.url", "Controller", serviceUrl, "The address of the service control server."); + } + + protected void addKeyInfo(final String label, final PublicKey pub, final String description) { + KeyInfo ki = new KeyInfo(pub); + ki.getElement().addAttribute("id", label); + ki.getElement().addAttribute("style", "display:none"); + body.add(ki.getElement()); + Element tr = pktable.addElement("tr"); + // tr.addAttribute("class","pktablehead"); + tr.addElement("td").setText(description); + tr.addElement("td").addElement("pre").setText(Base32.encode(CryptoTools.digest(pub.getEncoded()))); + tr.addElement("td").addElement("pre").setText(Base64.encodeClean(pub.getEncoded())); } + + protected void addFeature(final String id, final String name, final String value, final String description) { + Element tr = proptable.addElement("tr"); + // tr.addAttribute("class","pktablehead"); + tr.addElement("td").setText(name); + final Element val = tr.addElement("td"); + val.setText(value); + val.addAttribute("id", id); + tr.addElement("td").setText(description); + } + + public Element getDescription() { + return description; + } + + public Element getRules() { + return rules; + } + + protected final Element pktable; + protected final Element proptable; + protected final Element description; + protected final Element rules; } + |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:32
|
Update of /cvsroot/neuclear/neuclear-id/src/testdata/targettests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/testdata/targettests Added Files: notargets.html targetlist.html unknowntargets.html Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. --- NEW FILE: notargets.html --- <html> <head> <title>Targets</title> </head> <body> This contains no targets </body> </html> --- NEW FILE: targetlist.html --- <html> <head> <title>Targets</title> <link rel="neu:receiver" href="http://portfolio.neuclear.org"/> <!--Ignore this one--> <link rel="neureceiver" href="http://portfolio.neuclear.org"/> <link rel="neu:receiver" href="mailto:pe...@ne..."/> <link rel="neu:logger" href="http://logger.neuclear.org"/> <link rel="neu:auditor" href="http://auditor.neuclear.org"/> <link rel="neu:misc" href="http://misc.neuclear.org"/> <link rel="neu:controller" href="http://controller.neuclear.org"/> </head> <body> This contains 6 targets </body> </html> --- NEW FILE: unknowntargets.html --- <html> <head> <title>Targets</title> <link rel="neu:foo" href="http://portfolio.neuclear.org"/> <link rel="neu:foo" href="http://portfolio.neuclear.org"/> <link rel="neu:foo" href="http://portfolio.neuclear.org"/> <link rel="neu:foo" href="http://portfolio.neuclear.org"/> <link rel="neu:foo" href="http://portfolio.neuclear.org"/> <link rel="neu:foo" href="http://portfolio.neuclear.org"/> <link rel="neu:foo" href="http://portfolio.neuclear.org"/> <link rel="neu:foo" href="http://portfolio.neuclear.org"/> </head> <body> This contains 8 unknown targets </body> </html> |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:32
|
Update of /cvsroot/neuclear/neuclear-id/src/testdata/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/testdata/simple Added Files: bobsmith.html Removed Files: test.id Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. --- NEW FILE: bobsmith.html --- <html> <head> <meta content="HTML Tidy, see www.w3.org" name="generator"/> <title>Bob Smith</title> <link rel="neu:receiver" href="mailto:pe...@ne..."/> <link rel="neu:logger" href="http://logger.neuclear.org"/> <meta content="Identity" name="neu:type"/> </head> <body> <h1 id="name">Bob Smith</h1> <p>Hi I am Bob.</p> <p id="dsigtitle" style="background:#00B; font-family:sans-serif; font-size: small;color:white">This page has been digitally signed.</p> </body> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo style="background:#FEE; font-family:monospace; font-size: xx-small; color:#400;display:block"> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <ds:Reference> <ds:Transforms> <ds:Transform ds:Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> <ds:Transform ds:Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> </ds:Transforms> <ds:DigestMethod ds:Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <ds:DigestValue> Z4wp3sv1DCzQzXAkuwI33GjR+as= </ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue style="background:#EEF; font-family:monospace; font-size: xx-small; color:#004;display:block"> lWUzcCL/6W5tgdSWuPdntP6EgaTOCCBUZDdvTr0aobhLZszOyscKHQheMWSdKjTmq8dVQkikPK1o bmqGUNHKLUPRF7cIRG2p+DbNhgWBQD0PQkA2yuR8cA4ibEPi312wfCRHAXdhBJBi9gKSlI2lSBUu oOI/3KvAm4LDp+2HtRs= </ds:SignatureValue> <ds:KeyInfo style="display:none"> <ds:KeyValue> <ds:RSAKeyValue> <ds:Modulus> tB+Eulrq1ap2r8LGoMQWauOvcL5sxJeWu5Oo10DZkvDKx3HHTZrOK9i9lBlGajmnYHuJVhUrKCQX WV3xaHEGplZKEgxDIh+BAOAT7FQ8gWYqCUup4GVZuP7bcuJ5HEQKVtAvcZfLp9/VRFb/YwB0dOS4 G7u6wqciv8yO1v9dLQE= </ds:Modulus> <ds:Exponent> AQAB </ds:Exponent> </ds:RSAKeyValue> </ds:KeyValue> </ds:KeyInfo> </ds:Signature> </html> --- test.id DELETED --- |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:31
|
Update of /cvsroot/neuclear/neuclear-id/src/testdata/fakes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/testdata/fakes Added Files: evilbobsmith.html Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. --- NEW FILE: evilbobsmith.html --- <html> <head> <meta content="HTML Tidy, see www.w3.org" name="generator"/> <title>Evil Bob Smith</title> <meta content="Identity" name="neu:type"/> <link type="neu:receiver" href="mailto:pe...@ne..."/> <link rel="stylesheet" href="http://neuclear.org/sig.css" type="text/css"/> </head> <body> <h1 id="name">Bob Smith</h1> <p>Hi I am Bob.</p> <p id="dsigtitle">This page has been digitally signed.</p> </body> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo id="dsdigestvalue"> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <ds:Reference> <ds:Transforms> <ds:Transform ds:Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> <ds:Transform ds:Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> </ds:Transforms> <ds:DigestMethod ds:Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <ds:DigestValue> xtrl3jlrXz39TurJJHCB2rd7eNY= </ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue id="dssigvalue"> GLg6OoLB6ar1tz82U/itMkOV7bYGuwZLrddtZ77I+CSPkLqB+ghsVN2y6i0RtwkYwrm2gpYQ+rUM VZzmPtqqkSOK8H0XrBHBVmfomu9gLBjL+J1v419bwuWT4RKe4yYP1T7o3vvJn9XwFcR30dyk1ek5 gnnRWbRMj+n1ai2T9SQ= </ds:SignatureValue> <ds:KeyInfo id="dskeyinfo"> <ds:KeyValue> <ds:RSAKeyValue> <ds:Modulus> tB+Eulrq1ap2r8LGoMQWauOvcL5sxJeWu5Oo10DZkvDKx3HHTZrOK9i9lBlGajmnYHuJVhUrKCQX WV3xaHEGplZKEgxDIh+BAOAT7FQ8gWYqCUup4GVZuP7bcuJ5HEQKVtAvcZfLp9/VRFb/YwB0dOS4 G7u6wqciv8yO1v9dLQE= </ds:Modulus> <ds:Exponent> AQAB </ds:Exponent> </ds:RSAKeyValue> </ds:KeyValue> </ds:KeyInfo> </ds:Signature> </html> |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:31
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/test/org/neuclear/id Modified Files: IdentityTests.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: IdentityTests.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/IdentityTests.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** IdentityTests.java 14 Apr 2004 23:44:46 -0000 1.10 --- IdentityTests.java 17 Apr 2004 19:28:23 -0000 1.11 *************** *** 41,45 **** assertEquals(new String(CryptoTools.digest(signer.getPublicKey(NAME).getEncoded())), new String(Base32.decode(obj.getName().substring(4, 36)))); - assertEquals(id.getSigner(), SIGNER); assertNotNull(id.getSignatory().getPublicKey()); } --- 41,44 ---- |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:31
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/verifier In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/test/org/neuclear/id/verifier Modified Files: VerificationTest.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: VerificationTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/verifier/VerificationTest.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** VerificationTest.java 20 Jan 2004 17:39:13 -0000 1.11 --- VerificationTest.java 17 Apr 2004 19:28:23 -0000 1.12 *************** *** 31,34 **** --- 31,41 ---- $Id$ $Log$ + Revision 1.12 2004/04/17 19:28:23 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.11 2004/01/20 17:39:13 pelle Further updates to unit tests *************** *** 110,113 **** --- 117,124 ---- } + public final void testSamples() throws IOException, DocumentException, NeuClearException, XMLException { + runDirectoryTest("src/testdata/simple", true); + } + public final void runDirectoryTest(final String path, final boolean wantValid) throws DocumentException, IOException, FileNotFoundException, NeuClearException, XMLException { final File dir = new File(path); *************** *** 119,123 **** filter = new FilenameFilter() { public boolean accept(final File dirf, final String name) { ! return name.endsWith(".id"); } }; --- 130,134 ---- filter = new FilenameFilter() { public boolean accept(final File dirf, final String name) { ! return name.endsWith(".id") || name.endsWith(".xml") || name.endsWith(".html"); } }; |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:31
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/targets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/test/org/neuclear/id/targets Added Files: TargetsTestCase.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. --- NEW FILE: TargetsTestCase.java --- package org.neuclear.id.targets; import junit.framework.TestCase; import org.dom4j.Document; import org.neuclear.xml.XMLException; import org.neuclear.xml.XMLTools; import java.io.File; /* * The NeuClear Project and it's libraries are * (c) 2002-2004 Antilles Software Ventures SA * For more information see: http://neuclear.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** * User: pelleb * Date: Apr 17, 2004 * Time: 11:14:41 AM */ public class TargetsTestCase extends TestCase { public TargetsTestCase(String name) { super(name); } public void testReadTargetList() throws XMLException { Targets targets = parseTargets("src/testdata/targettests/targetlist.html", 6); assertEquals(2, targets.getTargets()[0].getType()); assertEquals("http://portfolio.neuclear.org", targets.getTargets()[0].getHref()); assertEquals(2, targets.getTargets()[1].getType()); assertEquals("mailto:pe...@ne...", targets.getTargets()[1].getHref()); assertEquals(3, targets.getTargets()[2].getType()); assertEquals("http://logger.neuclear.org", targets.getTargets()[2].getHref()); assertEquals(1, targets.getTargets()[3].getType()); assertEquals("http://auditor.neuclear.org", targets.getTargets()[3].getHref()); assertEquals(0, targets.getTargets()[4].getType()); assertEquals("http://misc.neuclear.org", targets.getTargets()[4].getHref()); assertEquals(4, targets.getTargets()[5].getType()); assertEquals("http://controller.neuclear.org", targets.getTargets()[5].getHref()); } public void testReadEmptyTargetList() throws XMLException { Targets targets = parseTargets("src/testdata/targettests/notargets.html", 0); } public void testEmptyTargetListWithUnknownTargetTypes() throws XMLException { Targets targets = parseTargets("src/testdata/targettests/unknowntargets.html", 8); Target tg[] = targets.getTargets(); for (int i = 0; i < tg.length; i++) { Target target = tg[i]; assertEquals(0, target.getType()); assertEquals("http://portfolio.neuclear.org", target.getHref()); } } private static Targets parseTargets(final String file, final int count) throws XMLException { Document doc = XMLTools.loadDocument(new File(file)); assertNotNull(doc); Targets targets = Targets.parseList(doc.getRootElement()); assertNotNull(targets); assertEquals(count, targets.getSize()); return targets; } } |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:31
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/java/org/neuclear/id Modified Files: Identity.java Service.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: Service.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Service.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Service.java 5 Apr 2004 16:32:52 -0000 1.1 --- Service.java 17 Apr 2004 19:28:22 -0000 1.2 *************** *** 11,14 **** --- 11,21 ---- $Id$ $Log$ + Revision 1.2 2004/04/17 19:28:22 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.1 2004/04/05 16:32:52 pelle Created new ServiceBuilder class for creating services. A service is an identity that has a seperate service URL and Service Public Key. *************** *** 23,27 **** public class Service extends Identity { public Service(final SignedNamedCore core, String serviceUrl, PublicKey serviceKey, Targets targets) { ! super(core, null, targets); this.serviceKey = serviceKey; this.serviceUrl = serviceUrl; --- 30,34 ---- public class Service extends Identity { public Service(final SignedNamedCore core, String serviceUrl, PublicKey serviceKey, Targets targets) { ! super(core, targets); this.serviceKey = serviceKey; this.serviceUrl = serviceUrl; Index: Identity.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Identity.java 1 Apr 2004 23:19:49 -0000 1.32 --- Identity.java 17 Apr 2004 19:28:22 -0000 1.33 *************** *** 2,5 **** --- 2,12 ---- * $Id$ * $Log$ + * Revision 1.33 2004/04/17 19:28:22 pelle + * Identity is now fully html based as is the ServiceBuilder. + * VerifyingReader correctly identifies html files and parses them as such. + * Targets and Target now parse html link tags + * AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + * The Asset.Reader and ExchangeAgent.Reader still need to be updated. + * * Revision 1.32 2004/04/01 23:19:49 pelle * Split Identity into Signatory and Identity class. *************** *** 326,330 **** import org.dom4j.Element; import org.neuclear.commons.NeuClearException; - import org.neuclear.commons.Utility; import org.neuclear.id.targets.Targets; --- 333,336 ---- *************** *** 349,360 **** */ public class Identity extends SignedNamedObject implements Principal { ! protected Identity(final SignedNamedCore core, String signer, Targets targets) { super(core); this.targets = (targets != null) ? targets : Targets.EMPTY; - this.signer = Utility.denullString(signer, DEFAULT_SIGNER); - } - - public final String getSigner() { - return signer; } --- 355,361 ---- */ public class Identity extends SignedNamedObject implements Principal { ! protected Identity(final SignedNamedCore core, Targets targets) { super(core); this.targets = (targets != null) ? targets : Targets.EMPTY; } *************** *** 370,374 **** private final Targets targets; - private final String signer; public static final String DEFAULT_SIGNER = "http://localhost:11870/Signer"; --- 371,374 ---- *************** *** 383,389 **** public final SignedNamedObject read(final SignedNamedCore core, final Element elem) throws InvalidNamedObjectException { final Targets targets = Targets.parseList(elem); ! final Element se = elem.element("Signer"); ! final String signer = (se != null) ? se.getTextTrim() : null; ! return new Identity(core, signer, targets); } --- 383,387 ---- public final SignedNamedObject read(final SignedNamedCore core, final Element elem) throws InvalidNamedObjectException { final Targets targets = Targets.parseList(elem); ! return new Identity(core, targets); } |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:31
|
Update of /cvsroot/neuclear/neuclear-id/src/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/samples Removed Files: bobsmith.html identity.xml Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. --- bobsmith.html DELETED --- --- identity.xml DELETED --- |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:30
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/java/org/neuclear/id/verifier Modified Files: VerifyingReader.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: VerifyingReader.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier/VerifyingReader.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** VerifyingReader.java 2 Apr 2004 17:33:31 -0000 1.23 --- VerifyingReader.java 17 Apr 2004 19:28:22 -0000 1.24 *************** *** 1,4 **** --- 1,5 ---- package org.neuclear.id.verifier; + import org.dom4j.Attribute; import org.dom4j.Element; import org.neuclear.id.*; *************** *** 32,35 **** --- 33,43 ---- $Id$ $Log$ + Revision 1.24 2004/04/17 19:28:22 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.23 2004/04/02 17:33:31 pelle Added automatic caching of SignedNamedObject *************** *** 204,208 **** private NamedObjectReader resolveReader(final Element elem) { ! NamedObjectReader reader = (NamedObjectReader) readers.get(elem.getName()); if (reader == null) reader = defaultReader; --- 212,216 ---- private NamedObjectReader resolveReader(final Element elem) { ! NamedObjectReader reader = (NamedObjectReader) readers.get(extractName(elem)); if (reader == null) reader = defaultReader; *************** *** 210,213 **** --- 218,231 ---- } + private String extractName(final Element elem) { + if (elem.getName().equals("html")) { + Attribute type = (Attribute) elem.selectSingleNode("//html/head/meta[@name='neu:type']/@content"); + if (type != null && type.getValue() != null) + return type.getValue(); + return "Identity"; //default to identity + } + return elem.getName(); + } + public final void registerReader(final String name, final NamedObjectReader reader) { |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:30
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/targets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/java/org/neuclear/id/targets Modified Files: Target.java Targets.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: Target.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/targets/Target.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Target.java 19 Feb 2004 15:30:20 -0000 1.2 --- Target.java 17 Apr 2004 19:28:21 -0000 1.3 *************** *** 25,28 **** --- 25,35 ---- $Id$ $Log$ + Revision 1.3 2004/04/17 19:28:21 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.2 2004/02/19 15:30:20 pelle Various cleanups and corrections *************** *** 64,68 **** final static Target parseElement(Element elem) { ! return make(elem.attributeValue("type"), elem.getTextTrim()); } --- 71,80 ---- final static Target parseElement(Element elem) { ! ! return make(extractType(elem), elem.attributeValue("href")); ! } ! ! private static String extractType(Element elem) { ! return elem.attributeValue("rel").substring(4); } *************** *** 70,81 **** private final int type; ! private final static HashMap TYPEMAP = new HashMap(); // Add further standard TYPES here - private final static String[] TYPES = new String[]{"misc", "auditor", "receiver", "logger"}; ! { for (byte i = 0; i < TYPES.length; i++) ! TYPEMAP.put(TYPES[i], new Byte(i)); } } --- 82,96 ---- private final int type; ! private final static String[] TYPES = new String[]{"misc", "auditor", "receiver", "logger", "controller"}; ! ! private final static HashMap TYPEMAP = makeTypeMap(); // Add further standard TYPES here ! private static HashMap makeTypeMap() { ! HashMap map = new HashMap(); for (byte i = 0; i < TYPES.length; i++) ! map.put(TYPES[i], new Byte(i)); ! return map; } } Index: Targets.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/targets/Targets.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Targets.java 2 Mar 2004 18:59:10 -0000 1.2 --- Targets.java 17 Apr 2004 19:28:22 -0000 1.3 *************** *** 28,31 **** --- 28,38 ---- $Id$ $Log$ + Revision 1.3 2004/04/17 19:28:22 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.2 2004/03/02 18:59:10 pelle Further cleanups in neuclear-id. Moved everything under id. *************** *** 43,72 **** */ public final class Targets { ! private Targets(Target list[]){ ! targetlist=list; } public final void send(SignedNamedObject obj) throws NeuClearException { ! for (int i=0;i<targetlist.length;i++){ ! Sender.quickSend(targetlist[i].getHref(),obj); } } ! public final void send(String type,SignedNamedObject obj) throws NeuClearException { ! final int ti=Target.getType(type); ! for (int i=0;i<targetlist.length;i++){ ! if (targetlist[i].getType()==ti) ! Sender.quickSend(targetlist[i].getHref(),obj); } } public final void log(SignedNamedObject obj) throws NeuClearException { ! send("logger",obj); } ! public final static Targets parseList(Element elem){ ! List list=elem.elements("Target"); ! Target targets[]=new Target[list.size()]; ! Target signer=null; ! for (int i=0;i<list.size();i++){ ! targets[i]=Target.parseElement((Element) list.get(i)); } return new Targets(targets); --- 50,89 ---- */ public final class Targets { ! private Targets(Target list[]) { ! targetlist = list; } + public final void send(SignedNamedObject obj) throws NeuClearException { ! for (int i = 0; i < targetlist.length; i++) { ! Sender.quickSend(targetlist[i].getHref(), obj); } } ! ! public final void send(String type, SignedNamedObject obj) throws NeuClearException { ! final int ti = Target.getType(type); ! for (int i = 0; i < targetlist.length; i++) { ! if (targetlist[i].getType() == ti) ! Sender.quickSend(targetlist[i].getHref(), obj); } } + public final void log(SignedNamedObject obj) throws NeuClearException { ! send("logger", obj); } + public final int getSize() { + return targetlist.length; + } ! Target[] getTargets() { ! return targetlist; ! } ! ! public final static Targets parseList(Element elem) { ! List list = elem.selectNodes("//html/head/link[starts-with(@rel,'neu:')]"); ! Target targets[] = new Target[list.size()]; ! Target signer = null; ! for (int i = 0; i < list.size(); i++) { ! targets[i] = Target.parseElement((Element) list.get(i)); } return new Targets(targets); *************** *** 75,79 **** private final Target[] targetlist; ! public static final Targets EMPTY=new Targets(new Target[0]); } --- 92,96 ---- private final Target[] targetlist; ! public static final Targets EMPTY = new Targets(new Target[0]); } |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:30
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/tools/commandline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30148/src/java/org/neuclear/id/tools/commandline Modified Files: CommandLineSigner.java IdentityCreator.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: CommandLineSigner.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/tools/commandline/CommandLineSigner.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CommandLineSigner.java 15 Apr 2004 16:10:24 -0000 1.14 --- CommandLineSigner.java 17 Apr 2004 19:28:22 -0000 1.15 *************** *** 1,4 **** --- 1,11 ---- /* $Id$ * $Log$ + * Revision 1.15 2004/04/17 19:28:22 pelle + * Identity is now fully html based as is the ServiceBuilder. + * VerifyingReader correctly identifies html files and parses them as such. + * Targets and Target now parse html link tags + * AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + * The Asset.Reader and ExchangeAgent.Reader still need to be updated. + * * Revision 1.14 2004/04/15 16:10:24 pelle * Got rid of unnecessary catch clause for InvalidPassphrase *************** *** 277,281 **** System.out.println("was signed at: " + TimeTools.formatTimeStamp(id.getTimeStamp())); System.out.println("Is of type: " + id.getClass().getName()); - System.out.println("signer: " + id.getSigner()); } else { System.out.println("Couldnt Resolve or Verify the object."); --- 284,287 ---- Index: IdentityCreator.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/tools/commandline/IdentityCreator.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** IdentityCreator.java 1 Apr 2004 23:19:49 -0000 1.11 --- IdentityCreator.java 17 Apr 2004 19:28:22 -0000 1.12 *************** *** 1,4 **** --- 1,11 ---- /* $Id$ * $Log$ + * Revision 1.12 2004/04/17 19:28:22 pelle + * Identity is now fully html based as is the ServiceBuilder. + * VerifyingReader correctly identifies html files and parses them as such. + * Targets and Target now parse html link tags + * AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + * The Asset.Reader and ExchangeAgent.Reader still need to be updated. + * * Revision 1.11 2004/04/01 23:19:49 pelle * Split Identity into Signatory and Identity class. *************** *** 262,289 **** return super.build(); } ! try { ! final String defaultsigner = Utility.denullString(cmd.getOptionValue("s"), "http://localhost:11870/Signer"); ! final String defaultlogger = Utility.denullString(cmd.getOptionValue("l"), LogSender.LOGGER); ! final String defaultreceiver = cmd.getOptionValue("b"); ! if (!sig.canSignFor(alias)) { ! System.out.println("You do not currently have a key matching this name. Do you with to create one?"); ! if (!Utility.getAffirmative(true)) { ! System.out.println("OK, Bye"); ! System.exit(0); ! } ! System.out.println("Generating Keys for " + alias + "... "); ! PublicKey pub = sig.generateKey(alias); ! System.out.println("DONE"); ! System.out.println("STORING Keys"); ! sig.save(); ! } - return new IdentityBuilder(defaultsigner, defaultlogger, defaultreceiver); - } catch (InvalidNamedObjectException e) { - System.err.println("The name: " + e.getName() + " is not valid. "); - System.exit(1); } ! return null; } --- 269,290 ---- return super.build(); } ! final String defaultsigner = Utility.denullString(cmd.getOptionValue("s"), "http://localhost:11870/Signer"); ! final String defaultlogger = Utility.denullString(cmd.getOptionValue("l"), LogSender.LOGGER); ! final String defaultreceiver = cmd.getOptionValue("b"); ! if (!sig.canSignFor(alias)) { ! System.out.println("You do not currently have a key matching this name. Do you with to create one?"); ! if (!Utility.getAffirmative(true)) { ! System.out.println("OK, Bye"); ! System.exit(0); } + System.out.println("Generating Keys for " + alias + "... "); + PublicKey pub = sig.generateKey(alias); + System.out.println("DONE"); + System.out.println("STORING Keys"); + sig.save(); } ! ! return new IdentityBuilder(defaultsigner, defaultlogger, defaultreceiver); } |
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/orders/builders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30025/src/test/org/neuclear/asset/orders/builders Modified Files: IssueOrderBuilderTest.java IssueReceiptBuilderTest.java TransferOrderBuilderTest.java TransferReceiptBuilderTest.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: IssueOrderBuilderTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/orders/builders/IssueOrderBuilderTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IssueOrderBuilderTest.java 6 Apr 2004 16:24:35 -0000 1.1 --- IssueOrderBuilderTest.java 17 Apr 2004 19:28:00 -0000 1.2 *************** *** 35,38 **** --- 35,45 ---- $Id$ $Log$ + Revision 1.2 2004/04/17 19:28:00 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.1 2004/04/06 16:24:35 pelle Added two new Data Objects IssuerOrder and IssueReceipt for managing the issuance process. *************** *** 100,104 **** public Service createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", getSigner().getPublicKey("neu://test/bux"), getSigner().getPublicKey(NAME), --- 107,111 ---- public Service createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", "bux", getSigner().getPublicKey("neu://test/bux"), getSigner().getPublicKey(NAME), Index: TransferReceiptBuilderTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/orders/builders/TransferReceiptBuilderTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TransferReceiptBuilderTest.java 5 Apr 2004 16:31:43 -0000 1.2 --- TransferReceiptBuilderTest.java 17 Apr 2004 19:28:00 -0000 1.3 *************** *** 37,40 **** --- 37,47 ---- $Id$ $Log$ + Revision 1.3 2004/04/17 19:28:00 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.2 2004/04/05 16:31:43 pelle Created new ServiceBuilder class for creating services. A service is an identity that has a seperate service URL and Service Public Key. *************** *** 103,107 **** public Service createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", getSigner().getPublicKey("neu://test/bux"), getAlice().getPublicKey(), --- 110,114 ---- public Service createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", "bux", getSigner().getPublicKey("neu://test/bux"), getAlice().getPublicKey(), Index: IssueReceiptBuilderTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/orders/builders/IssueReceiptBuilderTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IssueReceiptBuilderTest.java 6 Apr 2004 16:24:35 -0000 1.1 --- IssueReceiptBuilderTest.java 17 Apr 2004 19:28:00 -0000 1.2 *************** *** 37,40 **** --- 37,47 ---- $Id$ $Log$ + Revision 1.2 2004/04/17 19:28:00 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.1 2004/04/06 16:24:35 pelle Added two new Data Objects IssuerOrder and IssueReceipt for managing the issuance process. *************** *** 108,112 **** public Service createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", getSigner().getPublicKey("neu://test/bux"), getSigner().getPublicKey("neu://test"), --- 115,119 ---- public Service createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", "bux", getSigner().getPublicKey("neu://test/bux"), getSigner().getPublicKey("neu://test"), Index: TransferOrderBuilderTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/orders/builders/TransferOrderBuilderTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TransferOrderBuilderTest.java 5 Apr 2004 16:31:43 -0000 1.7 --- TransferOrderBuilderTest.java 17 Apr 2004 19:28:00 -0000 1.8 *************** *** 35,38 **** --- 35,45 ---- $Id$ $Log$ + Revision 1.8 2004/04/17 19:28:00 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.7 2004/04/05 16:31:43 pelle Created new ServiceBuilder class for creating services. A service is an identity that has a seperate service URL and Service Public Key. *************** *** 95,99 **** public Service createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", getSigner().getPublicKey("neu://test/bux"), getAlice().getPublicKey(), --- 102,106 ---- public Service createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", "bux", getSigner().getPublicKey("neu://test/bux"), getAlice().getPublicKey(), |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:10
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/exchange/orders/builders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30025/src/test/org/neuclear/exchange/orders/builders Modified Files: AbstractExchangeOrderTest.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: AbstractExchangeOrderTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/exchange/orders/builders/AbstractExchangeOrderTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractExchangeOrderTest.java 14 Apr 2004 23:51:12 -0000 1.2 --- AbstractExchangeOrderTest.java 17 Apr 2004 19:28:01 -0000 1.3 *************** *** 13,16 **** --- 13,23 ---- $Id$ $Log$ + Revision 1.3 2004/04/17 19:28:01 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.2 2004/04/14 23:51:12 pelle Fixed Exchange tests and Cactus tests working on web app. *************** *** 35,39 **** public Asset createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", getSigner().getPublicKey("bux"), getSigner().getPublicKey("buxissuer"), --- 42,46 ---- public Asset createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", "bux", getSigner().getPublicKey("bux"), getSigner().getPublicKey("buxissuer"), *************** *** 44,48 **** public Asset createShoeAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://shoes.neuclear.org", getSigner().getPublicKey("shoes"), getSigner().getPublicKey("shoesissuer"), --- 51,55 ---- public Asset createShoeAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://shoes.neuclear.org", "shoes", getSigner().getPublicKey("shoes"), getSigner().getPublicKey("shoesissuer"), *************** *** 53,57 **** public ExchangeAgent createTestExchangeAgent() throws NeuClearException { ! ExchangeAgentBuilder builder = new ExchangeAgentBuilder("http://tradex.neuclear.org", getSigner().getPublicKey("exchange")); return (ExchangeAgent) builder.convert("carol", getSigner()); --- 60,64 ---- public ExchangeAgent createTestExchangeAgent() throws NeuClearException { ! ExchangeAgentBuilder builder = new ExchangeAgentBuilder("http://tradex.neuclear.org", "tradex", getSigner().getPublicKey("exchange")); return (ExchangeAgent) builder.convert("carol", getSigner()); |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:10
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/exchange/contracts/builders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30025/src/test/org/neuclear/exchange/contracts/builders Modified Files: ExchangeAgentBuilderTest.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: ExchangeAgentBuilderTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/exchange/contracts/builders/ExchangeAgentBuilderTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ExchangeAgentBuilderTest.java 5 Apr 2004 16:31:44 -0000 1.1 --- ExchangeAgentBuilderTest.java 17 Apr 2004 19:28:01 -0000 1.2 *************** *** 12,15 **** --- 12,22 ---- $Id$ $Log$ + Revision 1.2 2004/04/17 19:28:01 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.1 2004/04/05 16:31:44 pelle Created new ServiceBuilder class for creating services. A service is an identity that has a seperate service URL and Service Public Key. *************** *** 44,48 **** protected Builder createBuilder() throws Exception { ! return new ExchangeAgentBuilder(URL, getSigner().getPublicKey("neu://test/bux")); } --- 51,55 ---- protected Builder createBuilder() throws Exception { ! return new ExchangeAgentBuilder(URL, "bux", getSigner().getPublicKey("neu://test/bux")); } |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:10
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/contracts/builders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30025/src/test/org/neuclear/asset/contracts/builders Modified Files: AssetBuilderTest.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: AssetBuilderTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/contracts/builders/AssetBuilderTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AssetBuilderTest.java 2 Apr 2004 16:58:55 -0000 1.1 --- AssetBuilderTest.java 17 Apr 2004 19:28:00 -0000 1.2 *************** *** 12,15 **** --- 12,22 ---- $Id$ $Log$ + Revision 1.2 2004/04/17 19:28:00 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.1 2004/04/02 16:58:55 pelle Updated Asset and Asset Builder with semi fully featured functionality. *************** *** 45,50 **** protected Builder createBuilder() throws Exception { ! return new AssetBuilder(URL, ! getSigner().getPublicKey("neu://test/bux"), getAlice().getPublicKey(), DECIMAL, MINIMUM); --- 52,57 ---- protected Builder createBuilder() throws Exception { ! return new AssetBuilder(URL, "bux", ! getSigner().getPublicKey("bux"), getAlice().getPublicKey(), DECIMAL, MINIMUM); |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:10
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/contracts/builders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30025/src/java/org/neuclear/exchange/contracts/builders Modified Files: ExchangeAgentBuilder.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: ExchangeAgentBuilder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/contracts/builders/ExchangeAgentBuilder.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ExchangeAgentBuilder.java 5 Apr 2004 16:31:42 -0000 1.1 --- ExchangeAgentBuilder.java 17 Apr 2004 19:28:00 -0000 1.2 *************** *** 27,30 **** --- 27,37 ---- $Id$ $Log$ + Revision 1.2 2004/04/17 19:28:00 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.1 2004/04/05 16:31:42 pelle Created new ServiceBuilder class for creating services. A service is an identity that has a seperate service URL and Service Public Key. *************** *** 119,124 **** * */ ! public ExchangeAgentBuilder(final String serviceUrl, final PublicKey serviceKey) throws NeuClearException { ! super(ExchangeAgentGlobals.createQName(ExchangeAgentGlobals.EXCHANGEAGENT_TAGNAME), serviceUrl, serviceKey); } --- 126,131 ---- * */ ! public ExchangeAgentBuilder(final String title, final String serviceUrl, final PublicKey serviceKey) throws NeuClearException { ! super(ExchangeAgentGlobals.EXCHANGEAGENT_TAGNAME, title, serviceUrl, serviceKey); } |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:10
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/controllers/currency In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30025/src/test/org/neuclear/asset/controllers/currency Modified Files: CurrencyTests.java IssuanceTests.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: CurrencyTests.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/controllers/currency/CurrencyTests.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CurrencyTests.java 12 Apr 2004 19:29:53 -0000 1.12 --- CurrencyTests.java 17 Apr 2004 19:28:00 -0000 1.13 *************** *** 289,294 **** public Asset createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", ! getSigner().getPublicKey("neu://test/bux"), getIssuer().getPublicKey(), 2, 0); --- 289,294 ---- public Asset createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", "bux", ! getSigner().getPublicKey("bux"), getIssuer().getPublicKey(), 2, 0); *************** *** 298,303 **** public Asset createShoeAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://shoes.neuclear.org", ! getSigner().getPublicKey("neu://test/bux"), getIssuer().getPublicKey(), 2, 0); --- 298,303 ---- public Asset createShoeAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://shoes.neuclear.org", "shoes", ! getSigner().getPublicKey("shoes"), getIssuer().getPublicKey(), 2, 0); *************** *** 307,311 **** public ExchangeAgent createTestExchangeAgent() throws NeuClearException { ! ExchangeAgentBuilder builder = new ExchangeAgentBuilder("http://tradex.neuclear.org", getSigner().getPublicKey("neu://bob@test")); return (ExchangeAgent) builder.convert("neu://test", getSigner()); --- 307,311 ---- public ExchangeAgent createTestExchangeAgent() throws NeuClearException { ! ExchangeAgentBuilder builder = new ExchangeAgentBuilder("http://tradex.neuclear.org", "Tradex", getSigner().getPublicKey("neu://bob@test")); return (ExchangeAgent) builder.convert("neu://test", getSigner()); Index: IssuanceTests.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/controllers/currency/IssuanceTests.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IssuanceTests.java 6 Apr 2004 16:24:35 -0000 1.1 --- IssuanceTests.java 17 Apr 2004 19:28:00 -0000 1.2 *************** *** 176,180 **** public Asset createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", getSigner().getPublicKey("neu://test/bux"), getAlice().getPublicKey(), --- 176,180 ---- public Asset createTestAsset() throws NeuClearException { ! AssetBuilder builder = new AssetBuilder("http://bux.neuclear.org", "bux", getSigner().getPublicKey("neu://test/bux"), getAlice().getPublicKey(), |
|
From: Pelle B. <pe...@us...> - 2004-04-17 19:28:09
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30025/src/java/org/neuclear/asset/contracts/builders Modified Files: AssetBuilder.java Log Message: Identity is now fully html based as is the ServiceBuilder. VerifyingReader correctly identifies html files and parses them as such. Targets and Target now parse html link tags AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. The Asset.Reader and ExchangeAgent.Reader still need to be updated. Index: AssetBuilder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/AssetBuilder.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** AssetBuilder.java 5 Apr 2004 16:31:40 -0000 1.11 --- AssetBuilder.java 17 Apr 2004 19:27:59 -0000 1.12 *************** *** 1,13 **** package org.neuclear.asset.contracts.builders; - import org.dom4j.Element; import org.neuclear.asset.contracts.AssetGlobals; import org.neuclear.commons.NeuClearException; import org.neuclear.commons.crypto.signers.JCESigner; import org.neuclear.commons.crypto.signers.TestCaseSigner; - import org.neuclear.id.Service; import org.neuclear.id.builders.ServiceBuilder; ! import org.neuclear.xml.xmlsec.KeyInfo; import java.security.PublicKey; --- 1,12 ---- package org.neuclear.asset.contracts.builders; import org.neuclear.asset.contracts.AssetGlobals; import org.neuclear.commons.NeuClearException; import org.neuclear.commons.crypto.signers.JCESigner; import org.neuclear.commons.crypto.signers.TestCaseSigner; import org.neuclear.id.builders.ServiceBuilder; ! import org.neuclear.xml.XMLTools; + import java.io.File; import java.security.PublicKey; *************** *** 32,35 **** --- 31,41 ---- $Id$ $Log$ + Revision 1.12 2004/04/17 19:27:59 pelle + Identity is now fully html based as is the ServiceBuilder. + VerifyingReader correctly identifies html files and parses them as such. + Targets and Target now parse html link tags + AssetBuilder and ExchangeAgentBuilder have been updated to support it and provide html formatted contracts. + The Asset.Reader and ExchangeAgent.Reader still need to be updated. + Revision 1.11 2004/04/05 16:31:40 pelle Created new ServiceBuilder class for creating services. A service is an identity that has a seperate service URL and Service Public Key. *************** *** 126,141 **** * @throws NeuClearException */ ! public AssetBuilder(final String serviceUrl, final PublicKey serviceKey, final PublicKey issuerKey, final int decimal, final double minimum) throws NeuClearException { ! super(AssetGlobals.createQName(AssetGlobals.ASSET_TAGNAME), serviceUrl, serviceKey); ! final Element elem = getElement(); ! final Element issuerElem = AssetGlobals.createElement("Issuer"); ! issuerElem.add(new KeyInfo(issuerKey).getElement()); ! elem.add(issuerElem); ! final Element dec = AssetGlobals.createElement(AssetGlobals.DECIMAL_POINT_TAGNAME); ! dec.setText(Integer.toString(decimal)); ! elem.add(dec); ! final Element min = AssetGlobals.createElement(AssetGlobals.MINIMUM_TAGNAME); ! min.setText(Double.toString(minimum)); ! elem.add(min); } --- 132,141 ---- * @throws NeuClearException */ ! public AssetBuilder(final String title, final String serviceUrl, final PublicKey serviceKey, final PublicKey issuerKey, final int decimal, final double minimum) throws NeuClearException { ! super(AssetGlobals.ASSET_TAGNAME, title, serviceUrl, serviceKey); ! addKeyInfo("asset.issuer.publickey", issuerKey, "Issuers Key"); ! addFeature("asset.decimalpoints", "Decimal Points", Integer.toString(decimal), "Decimal Points"); ! addFeature("asset.miminmum", "Minimum Transaction", Double.toString(minimum), "The Minumum Transaction size"); ! } *************** *** 144,153 **** final JCESigner signer = new TestCaseSigner(); ! final AssetBuilder assetraw = new AssetBuilder("http://bux.neuclear.org", signer.getPublicKey("neu://test/bux"), signer.getPublicKey("neu://alice@test"), 2, 0.01); ! final Service asset = (Service) assetraw.convert("neu://bob@test", signer); --- 144,160 ---- final JCESigner signer = new TestCaseSigner(); ! final AssetBuilder assetraw = new AssetBuilder("Bux", ! "http://bux.neuclear.org", signer.getPublicKey("neu://test/bux"), signer.getPublicKey("neu://alice@test"), 2, 0.01); ! assetraw.getDescription().setText("NeuClear Test Currency"); ! assetraw.getRules().setText("You know the rules, there are no rules!!!"); ! assetraw.sign("ivan", signer); ! File out = new File("target/testdata/assets/bux.html"); ! out.getParentFile().mkdirs(); ! XMLTools.writeFile(out, assetraw.getElement()); ! // final Service asset = (Service) assetraw.convert("neu://bob@test", signer); |