|
From: Pelle B. <pe...@us...> - 2004-03-22 20:20:33
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11947/src/java/org/neuclear/id/builders Modified Files: IdentityBuilder.java Log Message: Added simple ledger for unit testing and in memory use Index: IdentityBuilder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/IdentityBuilder.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** IdentityBuilder.java 18 Feb 2004 00:14:30 -0000 1.19 --- IdentityBuilder.java 22 Mar 2004 20:09:43 -0000 1.20 *************** *** 2,5 **** --- 2,8 ---- * $Id$ * $Log$ + * Revision 1.20 2004/03/22 20:09:43 pelle + * Added simple ledger for unit testing and in memory use + * * Revision 1.19 2004/02/18 00:14:30 pelle * Many, many clean ups. I've readded Targets in a new method. *************** *** 36,41 **** * 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.13 2003/12/11 23:57:29 pelle --- 39,44 ---- * NamedObjectBuilder/SignedNamedObject Pairs. * Sample application has been expanded with a basic email application. ! * Updated docs for simple web app. ! * Added missing LGPL LICENSE.txt files to signer and simple app * * Revision 1.13 2003/12/11 23:57:29 pelle *************** *** 241,251 **** /** * It creates a Standard Identity document, but doesn't sign it. ! * ! * @param allow PublicKey allowed to sign in here ! * @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 PublicKey allow, final String signer, final String logger, final String receiver) throws InvalidNamedObjectException { this(createNEUIDQName(TAGNAME), allow, signer, logger, receiver); } --- 244,254 ---- /** * It creates a Standard Identity document, but doesn't sign it. ! * ! * @param allow PublicKey allowed to sign in here ! * @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 PublicKey allow, final String signer, final String logger, final String receiver) throws InvalidNamedObjectException { this(createNEUIDQName(TAGNAME), allow, signer, logger, receiver); } *************** *** 253,263 **** /** * 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 allow PublicKey allowed to sign in here ! * @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 PublicKey allow, final String signer, final String logger, final String receiver) throws InvalidNamedObjectException { super(tag); --- 256,266 ---- /** * 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 allow PublicKey allowed to sign in here ! * @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 PublicKey allow, final String signer, final String logger, final String receiver) throws InvalidNamedObjectException { super(tag); *************** *** 265,275 **** addLineBreak(); if (!Utility.isEmpty(signer)) ! addElement("Signer",signer); ! addTarget(logger,"logger"); ! addTarget(receiver,"inbox"); final QName allowName = DocumentHelper.createQName("Allow", NSTools.NS_NEUID); ! Element pub=getElement().element(allowName); ! if (pub==null) pub = getElement().addElement(allowName); else --- 268,278 ---- addLineBreak(); if (!Utility.isEmpty(signer)) ! addElement("Signer", signer); ! addTarget(logger, "logger"); ! addTarget(receiver, "inbox"); final QName allowName = DocumentHelper.createQName("Allow", NSTools.NS_NEUID); ! Element pub = getElement().element(allowName); ! if (pub == null) pub = getElement().addElement(allowName); else *************** *** 280,292 **** } ! private void addTarget(final String href,final String type) { if (!Utility.isEmpty(href)) ! addElement("Target",href).addAttribute("type",type); } - public IdentityBuilder(final PublicKey allow) throws XMLSecurityException, NeuClearException { ! this( allow, null,null,null); } --- 283,294 ---- } ! private void addTarget(final String href, final String type) { if (!Utility.isEmpty(href)) ! addElement("Target", href).addAttribute("type", type); } public IdentityBuilder(final PublicKey allow) throws XMLSecurityException, NeuClearException { ! this(allow, null, null, null); } *************** *** 295,298 **** - } --- 297,299 ---- |