|
From: Pelle B. <pe...@us...> - 2004-04-14 00:11:51
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4651/src/java/org/neuclear/id/signers Modified Files: SigningServlet.java Log Message: Added a MessageLabel for handling errors, validation and info Save works well now. It's pretty much there I think. Index: SigningServlet.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signers/SigningServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SigningServlet.java 12 Apr 2004 15:28:08 -0000 1.5 --- SigningServlet.java 14 Apr 2004 00:11:34 -0000 1.6 *************** *** 2,5 **** --- 2,10 ---- * $Id$ * $Log$ + * Revision 1.6 2004/04/14 00:11:34 pelle + * Added a MessageLabel for handling errors, validation and info + * Save works well now. + * It's pretty much there I think. + * * Revision 1.5 2004/04/12 15:28:08 pelle * Added Hibernate and Prevalent tests for Currency Controllers *************** *** 278,284 **** import org.neuclear.commons.Utility; import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; import org.neuclear.commons.crypto.signers.NonExistingSignerException; import org.neuclear.commons.crypto.signers.ServletSignerFactory; - import org.neuclear.commons.crypto.signers.Signer; import org.neuclear.commons.servlets.ServletTools; import org.neuclear.id.InvalidNamedObjectException; --- 283,289 ---- import org.neuclear.commons.Utility; import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; + import org.neuclear.commons.crypto.signers.BrowsableSigner; import org.neuclear.commons.crypto.signers.NonExistingSignerException; import org.neuclear.commons.crypto.signers.ServletSignerFactory; import org.neuclear.commons.servlets.ServletTools; import org.neuclear.id.InvalidNamedObjectException; *************** *** 322,330 **** } ! protected Signer createSigner(ServletConfig config) throws GeneralSecurityException, NeuClearException, IOException { ! return ServletSignerFactory.getInstance().createSigner(config); } ! protected final Signer getSigner() { return signer; } --- 327,335 ---- } ! protected BrowsableSigner createSigner(ServletConfig config) throws GeneralSecurityException, NeuClearException, IOException { ! return (BrowsableSigner) ServletSignerFactory.getInstance().createSigner(config); } ! protected final BrowsableSigner getSigner() { return signer; } *************** *** 377,381 **** out.flush(); try { ! isSigned = sign(named, "test", out); } catch (InvalidNamedObjectException e) { --- 382,386 ---- out.flush(); try { ! isSigned = sign(named, out); } catch (InvalidNamedObjectException e) { *************** *** 419,426 **** } ! private boolean sign(final Builder named, String username, final PrintWriter out) throws NeuClearException, XMLException { boolean isSigned; ! context.log("SIGN: Signing with " + username); ! final SignedNamedObject signed = named.convert(username, signer); isSigned = true; out.println("<li>Signed</li>"); --- 424,431 ---- } ! private boolean sign(final Builder named, final PrintWriter out) throws NeuClearException, XMLException { boolean isSigned; ! context.log("SIGN: Signing with "); ! final SignedNamedObject signed = named.convert(signer); isSigned = true; out.println("<li>Signed</li>"); *************** *** 456,460 **** protected javax.servlet.ServletContext context; ! private Signer signer; private String title; static private Pattern xmlescape = Pattern.compile("(\\<)"); --- 461,465 ---- protected javax.servlet.ServletContext context; ! private BrowsableSigner signer; private String title; static private Pattern xmlescape = Pattern.compile("(\\<)"); |