Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders In directory sc8-pr-cvs1:/tmp/cvs-serv1921/src/java/org/neuclear/id/builders Modified Files: AuthenticationTicketBuilder.java IdentityBuilder.java NamedObjectBuilder.java SignatureRequestBuilder.java TargetReference.java Log Message: Did some cleaning up in the builders Fixed some stuff in IdentityCreator New maven goal to create executable jarapp We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons. Will release shortly. Index: AuthenticationTicketBuilder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/AuthenticationTicketBuilder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AuthenticationTicketBuilder.java 6 Dec 2003 00:17:03 -0000 1.4 --- AuthenticationTicketBuilder.java 10 Dec 2003 23:58:51 -0000 1.5 *************** *** 31,34 **** --- 31,41 ---- $Id$ $Log$ + Revision 1.5 2003/12/10 23:58:51 pelle + Did some cleaning up in the builders + Fixed some stuff in IdentityCreator + New maven goal to create executable jarapp + We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons. + Will release shortly. + Revision 1.4 2003/12/06 00:17:03 pelle Updated various areas in NSTools. *************** *** 52,56 **** Revision 1.1 2003/11/06 20:01:53 pelle Implemented AuthenticationTicket and friends to comply with the newer model. ! Created SignatureRequest and friends to send unsigned NamedObjectBuilders to interactive signing services. */ --- 59,63 ---- Revision 1.1 2003/11/06 20:01:53 pelle Implemented AuthenticationTicket and friends to comply with the newer model. ! Created SignatureRequest and friends to receive unsigned NamedObjectBuilders to interactive signing services. */ Index: IdentityBuilder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/IdentityBuilder.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** IdentityBuilder.java 8 Dec 2003 19:32:31 -0000 1.9 --- IdentityBuilder.java 10 Dec 2003 23:58:51 -0000 1.10 *************** *** 2,5 **** --- 2,12 ---- * $Id$ * $Log$ + * Revision 1.10 2003/12/10 23:58:51 pelle + * Did some cleaning up in the builders + * Fixed some stuff in IdentityCreator + * New maven goal to create executable jarapp + * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons. + * Will release shortly. + * * Revision 1.9 2003/12/08 19:32:31 pelle * Added support for the http scheme into ID. See http://neuclear.org/archives/000195.html *************** *** 62,66 **** * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. * The NamedObject has a new log() method that logs it's contents at it's parent NameSpace's logger. ! * The NameSpace object also has a new method send() which allows one to send a named object to the NameSpace's * default receiver. * --- 69,73 ---- * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. * The NamedObject has a new log() method that logs it's contents at it's parent NameSpace's logger. ! * The NameSpace object also has a new method receive() which allows one to receive a named object to the NameSpace's * default receiver. * *************** *** 174,182 **** import org.dom4j.Element; import org.dom4j.QName; - import org.neuclear.id.Identity; - import org.neuclear.id.NSTools; - import org.neuclear.commons.Utility; import org.neuclear.commons.NeuClearException; ! import org.neuclear.xml.XMLException; import org.neuclear.xml.xmlsec.XMLSecTools; import org.neuclear.xml.xmlsec.XMLSecurityException; --- 181,187 ---- import org.dom4j.Element; import org.dom4j.QName; import org.neuclear.commons.NeuClearException; ! import org.neuclear.commons.Utility; ! import org.neuclear.id.NSTools; import org.neuclear.xml.xmlsec.XMLSecTools; import org.neuclear.xml.xmlsec.XMLSecurityException; *************** *** 184,191 **** import java.security.PublicKey; ! public class IdentityBuilder extends NamedObjectBuilder { /** * It creates a Standard Identity document, but doesn't sign it. * @param name The Name of Identity * @param allow PublicKey allowed to sign in here --- 189,197 ---- import java.security.PublicKey; ! public class IdentityBuilder extends NamedObjectBuilder { /** * It creates a Standard Identity document, but doesn't sign it. + * * @param name The Name of Identity * @param allow PublicKey allowed to sign in here *************** *** 196,204 **** public IdentityBuilder(final String name, final PublicKey allow, final String repository, final String signer, final String logger, final String receiver) throws NeuClearException { ! this(DocumentHelper.createQName("Identity",NSTools.NS_NEUID), name,allow,repository,signer,logger,receiver); } /** * 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 name The Name of Identity --- 202,212 ---- public IdentityBuilder(final String name, final PublicKey allow, final String repository, final String signer, final String logger, final String receiver) throws NeuClearException { ! this(DocumentHelper.createQName("Identity", NSTools.NS_NEUID), name, allow, repository, signer, logger, receiver); } + /** * 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 name The Name of Identity *************** *** 208,212 **** * @param receiver URL of default receiver for namespace */ ! protected IdentityBuilder(final QName tag,final String name, final PublicKey allow, final String repository, final String signer, final String logger, final String receiver) throws NeuClearException { super(name, tag); --- 216,220 ---- * @param receiver URL of default receiver for namespace */ ! protected IdentityBuilder(final QName tag, final String name, final PublicKey allow, final String repository, final String signer, final String logger, final String receiver) throws NeuClearException { super(name, tag); Index: NamedObjectBuilder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/NamedObjectBuilder.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** NamedObjectBuilder.java 8 Dec 2003 19:32:31 -0000 1.15 --- NamedObjectBuilder.java 10 Dec 2003 23:58:51 -0000 1.16 *************** *** 2,5 **** --- 2,12 ---- * $Id$ * $Log$ + * Revision 1.16 2003/12/10 23:58:51 pelle + * Did some cleaning up in the builders + * Fixed some stuff in IdentityCreator + * New maven goal to create executable jarapp + * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons. + * Will release shortly. + * * Revision 1.15 2003/12/08 19:32:31 pelle * Added support for the http scheme into ID. See http://neuclear.org/archives/000195.html *************** *** 33,37 **** * Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit. * SignedNamedObject now contains the full xml which is returned with getEncoded() ! * This means that it is now possible to further send on or process a SignedNamedObject, leaving * NamedObjectBuilder for its original purposes of purely generating new Contracts. * NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it. --- 40,44 ---- * Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit. * SignedNamedObject now contains the full xml which is returned with getEncoded() ! * This means that it is now possible to further receive on or process a SignedNamedObject, leaving * NamedObjectBuilder for its original purposes of purely generating new Contracts. * NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it. *************** *** 83,87 **** * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. * The NamedObject has a new log() method that logs it's contents at it's parent NameSpace's logger. ! * The NameSpace object also has a new method send() which allows one to send a named object to the NameSpace's * default receiver. * --- 90,94 ---- * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. * The NamedObject has a new log() method that logs it's contents at it's parent NameSpace's logger. ! * The NameSpace object also has a new method receive() which allows one to receive a named object to the NameSpace's * default receiver. * *************** *** 205,211 **** import java.sql.Timestamp; - import java.util.Iterator; - import java.util.LinkedList; - import java.util.List; /** --- 212,215 ---- *************** *** 213,217 **** */ public class NamedObjectBuilder extends SignedElement implements Named, Cloneable { ! public NamedObjectBuilder(final String name, final String tagName, final String prefix, final String nsURI) throws NeuClearException { super(tagName, prefix, nsURI); createDocument(); --- 217,221 ---- */ public class NamedObjectBuilder extends SignedElement implements Named, Cloneable { ! protected NamedObjectBuilder(final String name, final String tagName, final String prefix, final String nsURI) throws NeuClearException { super(tagName, prefix, nsURI); createDocument(); *************** *** 219,223 **** } ! public NamedObjectBuilder(final String name, final String tagName, final Namespace ns) throws NeuClearException { super(tagName, ns); createDocument(); --- 223,227 ---- } ! protected NamedObjectBuilder(final String name, final String tagName, final Namespace ns) throws NeuClearException { super(tagName, ns); createDocument(); *************** *** 225,229 **** } ! public NamedObjectBuilder(final String name, final String tagName) throws NeuClearException { super(tagName, NSTools.NS_NEUID); createDocument(); --- 229,233 ---- } ! protected NamedObjectBuilder(final String name, final String tagName) throws NeuClearException { super(tagName, NSTools.NS_NEUID); createDocument(); *************** *** 231,235 **** } ! public NamedObjectBuilder(final String name, final QName qname) throws NeuClearException { super(qname); createDocument(); --- 235,239 ---- } ! protected NamedObjectBuilder(final String name, final QName qname) throws NeuClearException { super(qname); createDocument(); *************** *** 239,243 **** public NamedObjectBuilder(final Element elem) throws XMLSecurityException { super(elem); ! //TODO Load targets } --- 243,247 ---- public NamedObjectBuilder(final Element elem) throws XMLSecurityException { super(elem); ! } *************** *** 254,258 **** final public SignedNamedObject sign(final Signer signer) throws NeuClearException, XMLException { ! sign(getParent().getName(), signer); //Sign with parent key return VerifyingReader.getInstance().read(getElement()); } --- 258,267 ---- final public SignedNamedObject sign(final Signer signer) throws NeuClearException, XMLException { ! sign(getSignatory().getName(), signer); //Sign with parent key ! return convert(); ! } ! ! private SignedNamedObject convert() throws NeuClearException, XMLException { ! return VerifyingReader.getInstance().read(getElement()); } *************** *** 272,279 **** * @return Parent Name */ ! public final String getLocalName() { ! final String fullName = getName(); ! final int i = fullName.lastIndexOf('/'); ! return fullName.substring(i + 1); } --- 281,286 ---- * @return Parent Name */ ! public final String getLocalName() throws NeuClearException { ! return NSTools.getLocalName(getName()); } *************** *** 328,331 **** --- 335,339 ---- * @param target object */ + /* public final void addTarget(final TargetReference target) throws NeuClearException { if (target == null) *************** *** 346,349 **** --- 354,358 ---- return targets; } + */ /** *************** *** 352,362 **** --- 361,388 ---- * @return Iterator of targets */ + /* public final Iterator listTargets() throws NeuClearException { return targetList().iterator(); } + */ /** * Sends copy of object to all targets within + * <p/> + * public final void sendObject() throws NeuClearException { + * System.out.println("NEUDIST: Sending Object " + getName()); + * <p/> + * if (this.isSigned()) { + * final Iterator iter = listTargets(); + * while (iter.hasNext()) { + * final TargetReference tg = ((TargetReference) iter.next()); + * System.out.println("NEUDIST: Sent to " + tg.getHref()); + * } + * <p/> + * } + * <p/> + * } */ + /* public final void sendObject() throws NeuClearException { System.out.println("NEUDIST: Sending Object " + getName()); *************** *** 372,375 **** --- 398,402 ---- } + */ public final Timestamp getTimeStamp() throws NeuClearException { *************** *** 389,394 **** ! public final Identity getParent() throws NeuClearException { ! return NSResolver.resolveIdentity(NSTools.getParentNSURI(getName())); } --- 416,421 ---- ! public final Identity getSignatory() throws NeuClearException { ! return NSResolver.resolveIdentity(NSTools.getSignatoryURI(getName())); } *************** *** 455,461 **** } } - - private List targets; - } --- 482,485 ---- Index: SignatureRequestBuilder.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/SignatureRequestBuilder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SignatureRequestBuilder.java 6 Dec 2003 00:17:03 -0000 1.4 --- SignatureRequestBuilder.java 10 Dec 2003 23:58:51 -0000 1.5 *************** *** 28,31 **** --- 28,38 ---- $Id$ $Log$ + Revision 1.5 2003/12/10 23:58:51 pelle + Did some cleaning up in the builders + Fixed some stuff in IdentityCreator + New maven goal to create executable jarapp + We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons. + Will release shortly. + Revision 1.4 2003/12/06 00:17:03 pelle Updated various areas in NSTools. *************** *** 49,53 **** Revision 1.1 2003/11/06 20:01:54 pelle Implemented AuthenticationTicket and friends to comply with the newer model. ! Created SignatureRequest and friends to send unsigned NamedObjectBuilders to interactive signing services. */ --- 56,60 ---- Revision 1.1 2003/11/06 20:01:54 pelle Implemented AuthenticationTicket and friends to comply with the newer model. ! Created SignatureRequest and friends to receive unsigned NamedObjectBuilders to interactive signing services. */ Index: TargetReference.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/TargetReference.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TargetReference.java 21 Nov 2003 04:45:10 -0000 1.6 --- TargetReference.java 10 Dec 2003 23:58:51 -0000 1.7 *************** *** 2,5 **** --- 2,12 ---- * $Id$ * $Log$ + * Revision 1.7 2003/12/10 23:58:51 pelle + * Did some cleaning up in the builders + * Fixed some stuff in IdentityCreator + * New maven goal to create executable jarapp + * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons. + * Will release shortly. + * * Revision 1.6 2003/11/21 04:45:10 pelle * EncryptedFileStore now works. It uses the PBECipher with DES3 afair. *************** *** 12,16 **** * Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit. * SignedNamedObject now contains the full xml which is returned with getEncoded() ! * This means that it is now possible to further send on or process a SignedNamedObject, leaving * NamedObjectBuilder for its original purposes of purely generating new Contracts. * NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it. --- 19,23 ---- * Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit. * SignedNamedObject now contains the full xml which is returned with getEncoded() ! * This means that it is now possible to further receive on or process a SignedNamedObject, leaving * NamedObjectBuilder for its original purposes of purely generating new Contracts. * NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it. *************** *** 45,49 **** * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. * The NamedObject has a new log() method that logs it's contents at it's parent NameSpace's logger. ! * The NameSpace object also has a new method send() which allows one to send a named object to the NameSpace's * default receiver. * --- 52,56 ---- * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. * The NamedObject has a new log() method that logs it's contents at it's parent NameSpace's logger. ! * The NameSpace object also has a new method receive() which allows one to receive a named object to the NameSpace's * default receiver. * |