You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(141) |
Sep
(184) |
Oct
(159) |
Nov
(77) |
Dec
(114) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(212) |
Feb
(302) |
Mar
(323) |
Apr
(360) |
May
(302) |
Jun
(392) |
Jul
(299) |
Aug
(858) |
Sep
(499) |
Oct
(489) |
Nov
(324) |
Dec
(438) |
2008 |
Jan
(449) |
Feb
(388) |
Mar
(811) |
Apr
(583) |
May
(949) |
Jun
(1431) |
Jul
(943) |
Aug
(527) |
Sep
(576) |
Oct
(440) |
Nov
(1046) |
Dec
(658) |
2009 |
Jan
(259) |
Feb
(192) |
Mar
(495) |
Apr
(2322) |
May
(2023) |
Jun
(1387) |
Jul
(722) |
Aug
(771) |
Sep
(167) |
Oct
(142) |
Nov
(384) |
Dec
(884) |
2010 |
Jan
(344) |
Feb
(82) |
Mar
(248) |
Apr
(341) |
May
(389) |
Jun
(289) |
Jul
(19) |
Aug
(478) |
Sep
(274) |
Oct
(431) |
Nov
(322) |
Dec
(207) |
2011 |
Jan
(125) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: John C. <jc...@us...> - 2007-04-07 22:36:47
|
Update of /cvsroot/tolven/tolvenEJB/resources/trim In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18116/resources/trim Modified Files: glucose.trim weight.trim Added Files: lipids.trim diabetes.trim Log Message: Data entry including sharing with other accounts. Also include graph wizard, very rough. --- NEW FILE: lipids.trim --- <?xml version="1.0" encoding="UTF-8"?> <trim xmlns="urn:tolven-org:trim:4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tolven-org:trim:4.0 E:\tolvenWS\tolvenEJB\resources\xsd\trim4.xsd"> <page>graphLipids.xhtml</page> <drilldown>lipidDD.xhtml</drilldown> <application name="ephr"> <instance>ephr:patient:graph</instance> <wip>ephr:activity:all</wip> <menu>ephr:graphMenu</menu> </application> <application name="echr"> <instance>echr:patient:graph</instance> <wip>echr:activity:all</wip> <menu>echr:graphMenu</menu> </application> <act xsi:type="Act"> <!--templateId>urn:wikihit-org:PATIENT-ACT:0</templateId--> <classCode>OBS</classCode> <moodCode>EVN</moodCode> <id> <II extension="abc"/> </id> <code> <CD codeSystemName="UMLS" codeSystemVersion="2006AC" code="C0392201"/> </code> <title> <ST>Lipids Graph</ST> </title> <effectiveTime> <TS>20070101090000</TS> </effectiveTime> <activityTime> <null>ASKU</null> </activityTime> <priorityCode> <CE code="123"> <originalText> <ST>My original text</ST> </originalText> </CE> <CE code="123"/> </priorityCode> <languageCode> <CE code="en"/> </languageCode> <observation> <value> <PQ> <value></value> <unit>mg/dL</unit> </PQ> </value> </observation> <participation typeCode="SBJ"> <role xsi:type="RoleBind"> <classCode>PAT</classCode> <templateId application="ephr">ephr:patient</templateId> <templateId application="echr">echr:patient</templateId> </role> </participation> </act> </trim> Index: glucose.trim =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/resources/trim/glucose.trim,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** glucose.trim 12 Mar 2007 08:47:12 -0000 1.2 --- glucose.trim 7 Apr 2007 22:36:45 -0000 1.3 *************** *** 5,40 **** xsi:schemaLocation="urn:tolven-org:trim:4.0 E:\tolvenWS\tolvenEJB\resources\xsd\trim4.xsd"> <page>glucose.xhtml</page> ! <instance>ephr:patient:observation</instance> ! <menu>ephr:obsMenu</menu> ! <menu>echr:obsMenu</menu> <act xsi:type="Act"> ! <!--templateId>urn:wikihit-org:PATIENT-ACT:0</templateId--> ! <classCode>OBS</classCode> ! <moodCode>EVN</moodCode> ! <code> ! <CD codeSystemName="UMLS" codeSystemVersion="2006AC" code="C00000"/> ! </code> ! <title> ! <ST>Serum Glucose</ST> ! </title> ! <!-- effectiveTime> ! <new datatype="TS"> ! <label language="en">Observation time</label> ! <input type="dateTime"/> ! <default special="now"/> ! </new> ! </effectiveTime --> ! <observation> ! <value> ! <PQ> ! <value></value> <unit>mg/dL</unit> ! </PQ> ! </value> ! </observation> <participation typeCode="SBJ"> <role xsi:type="RoleBind"> <classCode>PAT</classCode> ! <templateId>ephr:patient</templateId> </role> </participation> --- 5,62 ---- xsi:schemaLocation="urn:tolven-org:trim:4.0 E:\tolvenWS\tolvenEJB\resources\xsd\trim4.xsd"> <page>glucose.xhtml</page> ! <drilldown>glucoseDD.xhtml</drilldown> ! <application name="ephr"> ! <instance>ephr:patient:observation</instance> ! <wip>ephr:activity:all</wip> ! <menu>ephr:obsMenu</menu> ! </application> ! <application name="echr"> ! <instance>echr:patient:observation</instance> ! <wip>echr:activity:all</wip> ! <menu>echr:obsMenu</menu> ! </application> <act xsi:type="Act"> ! <!--templateId>urn:wikihit-org:PATIENT-ACT:0</templateId--> ! <classCode>OBS</classCode> ! <moodCode>EVN</moodCode> ! <id> ! <II extension="abc"/> ! </id> ! <code> ! <CD codeSystemName="UMLS" codeSystemVersion="2006AC" code="C0392201"/> ! </code> ! <title> ! <ST>Blood Glucose</ST> ! </title> ! <effectiveTime> ! <TS>20070101090000</TS> ! </effectiveTime> ! <activityTime> ! <null>ASKU</null> ! </activityTime> ! <priorityCode> ! <CE code="123"> ! <originalText> ! <ST>My origianl text</ST> ! </originalText> ! </CE> ! <CE code="123"/> ! </priorityCode> ! <languageCode> ! <CE code="en"/> ! </languageCode> ! <observation> ! <value> ! <PQ> ! <value></value> <unit>mg/dL</unit> ! </PQ> ! </value> ! </observation> <participation typeCode="SBJ"> <role xsi:type="RoleBind"> <classCode>PAT</classCode> ! <templateId application="ephr">ephr:patient</templateId> ! <templateId application="echr">echr:patient</templateId> </role> </participation> Index: weight.trim =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/resources/trim/weight.trim,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** weight.trim 29 Mar 2007 01:00:47 -0000 1.3 --- weight.trim 7 Apr 2007 22:36:45 -0000 1.4 *************** *** 5,8 **** --- 5,9 ---- xsi:schemaLocation="urn:tolven-org:trim:4.0 E:\tolvenWS\tolvenEJB\resources\xsd\trim4.xsd"> <page>weight.xhtml</page> + <drilldown>weightDD.xhtml</drilldown> <instance>ephr:patient:observation</instance> <application name="ephr"> --- NEW FILE: diabetes.trim --- <?xml version="1.0" encoding="UTF-8"?> <trim xmlns="urn:tolven-org:trim:4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tolven-org:trim:4.0 E:\tolvenWS\tolvenEJB\resources\xsd\trim4.xsd"> <page>graphDiabetes.xhtml</page> <drilldown>diabetesDD.xhtml</drilldown> <application name="ephr"> <instance>ephr:patient:graph</instance> <wip>ephr:activity:all</wip> <menu>ephr:graphMenu</menu> </application> <application name="echr"> <instance>echr:patient:graph</instance> <wip>echr:activity:all</wip> <menu>echr:graphMenu</menu> </application> <act xsi:type="Act"> <!--templateId>urn:wikihit-org:PATIENT-ACT:0</templateId--> <classCode>OBS</classCode> <moodCode>EVN</moodCode> <id> <II extension="abc"/> </id> <code> <CD codeSystemName="UMLS" codeSystemVersion="2006AC" code="C0392201"/> </code> <title> <ST>Diabetes Graph</ST> </title> <effectiveTime> <TS>20070101090000</TS> </effectiveTime> <activityTime> <null>ASKU</null> </activityTime> <priorityCode> <CE code="123"> <originalText> <ST>My original text</ST> </originalText> </CE> <CE code="123"/> </priorityCode> <languageCode> <CE code="en"/> </languageCode> <observation> <value> <PQ> <value></value> <unit>mg/dL</unit> </PQ> </value> </observation> <participation typeCode="SBJ"> <role xsi:type="RoleBind"> <classCode>PAT</classCode> <templateId application="ephr">ephr:patient</templateId> <templateId application="echr">echr:patient</templateId> </role> </participation> </act> </trim> |
From: John C. <jc...@us...> - 2007-04-07 22:36:46
|
Update of /cvsroot/tolven/tolvenEJB/resources/xsd In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18116/resources/xsd Modified Files: trim4.xsd Log Message: Data entry including sharing with other accounts. Also include graph wizard, very rough. Index: trim4.xsd =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/resources/xsd/trim4.xsd,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** trim4.xsd 29 Mar 2007 01:00:47 -0000 1.5 --- trim4.xsd 7 Apr 2007 22:36:45 -0000 1.6 *************** *** 12,22 **** <xs:sequence> <xs:element name="page" type="xs:string"/> <xs:element name="instance" type="xs:string"/> - <xs:element name="documentId" type="xs:string"/> <xs:element name="element" type="xs:string"/> <xs:element name="menu" type="xs:string" maxOccurs="unbounded"/> <xs:element name="application" type="Application" maxOccurs="unbounded"/> <xs:element name="act" type="ActSlot"/> </xs:sequence> </xs:complexType> <xs:complexType name="Application" > --- 12,38 ---- <xs:sequence> <xs:element name="page" type="xs:string"/> + <xs:element name="drilldown" type="xs:string"/> <xs:element name="instance" type="xs:string"/> <xs:element name="element" type="xs:string"/> <xs:element name="menu" type="xs:string" maxOccurs="unbounded"/> <xs:element name="application" type="Application" maxOccurs="unbounded"/> + <xs:element name="origin" type="CopyTo" maxOccurs="1"/> + <xs:element name="copyTo" type="CopyTo" maxOccurs="unbounded"/> <xs:element name="act" type="ActSlot"/> + <xs:element name="id" type="TolvenId" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="CopyTo" > + <xs:sequence> + <xs:element name="comment" type="xs:string"/> </xs:sequence> + <xs:attribute name="accountId" type="xs:long"/> + <xs:attribute name="accountName" type="xs:string"/> + <xs:attribute name="copy" type="xs:boolean"/> + </xs:complexType> + <xs:complexType name="TolvenId" > + <xs:attribute name="accountId" type="xs:long"/> + <xs:attribute name="id" type="xs:long"/> + <xs:attribute name="node" type="xs:string"/> </xs:complexType> <xs:complexType name="Application" > |
From: John C. <jc...@us...> - 2007-04-07 22:36:46
|
Update of /cvsroot/tolven/tolvenEJB/resources/rules In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18116/resources/rules Modified Files: echr.drl Log Message: Data entry including sharing with other accounts. Also include graph wizard, very rough. Index: echr.drl =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/resources/rules/echr.drl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** echr.drl 29 Mar 2007 01:00:47 -0000 1.3 --- echr.drl 7 Apr 2007 22:36:45 -0000 1.4 *************** *** 18,21 **** --- 18,31 ---- then assert( $trim.getAct() ); + for (CopyTo copyTo : $trim.getCopyTos() ) { + assert ( copyTo ); + } + end + + rule "Display CopyTo" + when + $copyTo: CopyTo() + then + System.out.println( "CopyTo: " + $copyTo.getAccountId( )); end *************** *** 84,87 **** --- 94,98 ---- System.out.println( "[echr.drl]EffectiveTime " + $act.getEffectiveTime()); mdObs.setDate01($act.getEffectiveTime()); + mdObs.setString02( app.getSourceAccount().getTitle() ); assert( mdObs ); end |
From: John C. <jc...@us...> - 2007-04-07 22:36:46
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/app/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18116/src/org/tolven/app/entity Modified Files: MenuData.java Added Files: PlaceholderID.java Log Message: Data entry including sharing with other accounts. Also include graph wizard, very rough. Index: MenuData.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/entity/MenuData.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** MenuData.java 27 Mar 2007 23:23:57 -0000 1.20 --- MenuData.java 7 Apr 2007 22:36:45 -0000 1.21 *************** *** 18,25 **** --- 18,27 ---- import java.util.Collection; import java.util.Date; + import java.util.HashSet; import java.util.Map; import java.util.Stack; import javax.persistence.Basic; + import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; *************** *** 32,35 **** --- 34,38 ---- import javax.persistence.Lob; import javax.persistence.ManyToOne; + import javax.persistence.OneToMany; import javax.persistence.PrePersist; import javax.persistence.Table; *************** *** 89,92 **** --- 92,98 ---- private long documentId; + @OneToMany(mappedBy = "placeholder", cascade = CascadeType.ALL, fetch = FetchType.LAZY) + protected Collection<PlaceholderID> placeholderIDs; + @ManyToOne(fetch = FetchType.LAZY) private TrimHeader trimHeader; *************** *** 961,964 **** --- 967,974 ---- this.deleted = deleted; } + public Collection<PlaceholderID> getPlaceholderIDs() { + if (placeholderIDs==null) placeholderIDs = new HashSet<PlaceholderID>( 10 ); + return placeholderIDs; + } } --- NEW FILE: PlaceholderID.java --- /* * Copyright (C) 2007 Tolven Inc * * 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. * * Contact: in...@to... */ package org.tolven.app.entity; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.Table; import org.tolven.core.entity.Account; /** * <p> * This entity provides a cross reference between a placeholder in a sending account and a * placehlder in a receiving account. For example, if a patient records their weight in their * ePHR, it might have a placeholder id of ephr:patient-123:observation-456. If that observation * is sent to the patient's provider, then in the provider's account, the patient will have a * different ID at the provider and the observation will also have a different id. * In other words, there is no direct correlation between MenuData in two different accounts. * This entity provides the next best thing which is to consider the source account's ID to be * useful for knowing when the sender is refering to the same patient (or other placeholder) without * having any particular meaning to the receiving account.</p> * <p> * The same ID can then be used when communicating back to the sender. * </p> * * @author John Churin * */ @Entity @Table(name = "PLACEHOLDER_ID", schema="app") public class PlaceholderID implements Serializable { @Id @GeneratedValue(strategy=GenerationType.TABLE, generator="APP_SEQ_GEN") private long id; @ManyToOne(fetch = FetchType.LAZY) private Account account; @ManyToOne(fetch = FetchType.LAZY) private Account sourceAccount; @ManyToOne(fetch = FetchType.LAZY) private MenuData placeholder; @Column( name="ID_ROOT") private String root; @Column( name="ID_EXTENSION") private String extension; public Account getAccount() { return account; } public void setAccount(Account account) { this.account = account; } public String getExtension() { return extension; } public void setExtension(String extension) { this.extension = extension; } public long getId() { return id; } public void setId(long id) { this.id = id; } public MenuData getPlaceholder() { return placeholder; } public void setPlaceholder(MenuData placeholder) { this.placeholder = placeholder; } public String getRoot() { return root; } public void setRoot(String root) { this.root = root; } public Account getSourceAccount() { return sourceAccount; } public void setSourceAccount(Account sourceAccount) { this.sourceAccount = sourceAccount; } } |
From: Joseph I. <jos...@us...> - 2007-04-07 02:33:28
|
Update of /cvsroot/tolven/tolven In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15969 Modified Files: Tag: E_JI_MDBKeys build.xml Log Message: Copy the dependencies sar to the deploy directory Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/build.xml,v retrieving revision 1.77.2.4 retrieving revision 1.77.2.5 diff -C2 -d -r1.77.2.4 -r1.77.2.5 *** build.xml 6 Apr 2007 23:50:48 -0000 1.77.2.4 --- build.xml 7 Apr 2007 02:33:28 -0000 1.77.2.5 *************** *** 192,195 **** --- 192,196 ---- <target name="deploy" depends="packaging"> <copy toDir="${deploy.location}/deploy" verbose="${message.show.copy}"> + <fileset file="build/tolven-dependencies.sar"/> <fileset file="build/tolven.ear"/> </copy> *************** *** 229,232 **** --- 230,234 ---- <ant dir="${tolvenSecurity.location}" antfile="${tolvenSecurity.location}/build.xml" target="packaging"/> <ant dir="${tolvenEJB.location}" antfile="${tolvenEJB.location}/build.xml" target="packaging" /> + <antcall target="tolven-dependencies-sar" /> <ant dir="${tolvenWEB.location}" antfile="${tolvenWEB.location}/build.xml" target="packaging" /> <ant dir="${tolvenMobileClient.location}" antfile="${tolvenMobileClient.location}/build.xml" target="packaging" /> *************** *** 236,240 **** <target name="tolven-dependencies-sar"> - <delete file="build/tolven-dependencies.sar" /> <jar destfile="build/tolven-dependencies.sar"> <fileset dir="jboss-config/tolven-dependencies"> --- 238,241 ---- *************** *** 260,266 **** </fileset> </jar> - <copy toDir="C:/tolvenB20061001-local/tolven-jboss-4.0.4.GA/server/tolven/deploy" overwrite="true" preservelastmodified="true"> - <fileset file="build/tolven-dependencies.sar"/> - </copy> </target> --- 261,264 ---- |
From: John C. <jc...@us...> - 2007-04-07 01:23:46
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/core/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18404/src/org/tolven/core/bean Modified Files: InvitationBean.java Log Message: An incomplete invitation should be obsolete, not completed. Index: InvitationBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/core/bean/InvitationBean.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** InvitationBean.java 20 Jan 2007 22:34:08 -0000 1.19 --- InvitationBean.java 7 Apr 2007 01:23:45 -0000 1.20 *************** *** 21,24 **** --- 21,30 ---- import java.util.Properties; + import java.io.File; + import java.io.FileInputStream; + import java.io.Reader; + import java.io.StringReader; + + import javax.annotation.EJB; import javax.annotation.Resource; *************** *** 95,98 **** --- 101,111 ---- private TemplateGen templateGen = null; private JAXBContext jc; + + boolean body_found = false; + boolean in_body = false; + boolean center = false; + boolean pre = false; + String href = ""; + String body; /** *************** *** 142,147 **** initialize(); // We call back to run the template ! String body = templateGen.expandTemplate( "/invitation/testMessage.jsf"); ! sendNotifyMessage( "Tolven Test Message", new InternetAddress(addressee), body); } --- 155,162 ---- initialize(); // We call back to run the template ! ! String bod = templateGen.expandTemplate( "/invitation/testMessage.jsf"); ! String body = html2text(bod); ! sendNotifyMessage( "Tolven Test Message", new InternetAddress(addressee), body); } *************** *** 331,334 **** --- 346,350 ---- // Note, the user automatically gets account permission since they are the only user on that new account. accountBean.addAccountUser( account, activationBean.findUser( invitation.getTargetEmail()), now, true); + invitation.setStatus(Status.COMPLETED.value()); } if (detail instanceof JoinAccountInvitation) *************** *** 338,341 **** --- 354,358 ---- // Note, the user may or may not be given account permission depending on the wishes of the inviter. accountBean.addAccountUser( account, activationBean.findUser( invitation.getTargetEmail()), now, ja.isAccountPermission()); + invitation.setStatus(Status.COMPLETED.value()); } if (detail instanceof ActivateInvitation) *************** *** 361,370 **** user.setSponsorship(sponsorship); } } } } - invitation.setStatus(Status.COMPLETED.value()); em.merge( invitation ); - } /** --- 378,386 ---- user.setSponsorship(sponsorship); } + invitation.setStatus(Status.COMPLETED.value()); } } } em.merge( invitation ); } /** *************** *** 397,399 **** --- 413,623 ---- } + public String convert(String source) throws Exception + { + StringBuffer result = new StringBuffer(); + StringBuffer result2 = new StringBuffer(); + StringReader input = new StringReader(source); + try + { + String text = null; + int c = input.read(); + while (c != -1) // Convert until EOF + { + text = ""; + if (c == '<') // It's a tag!! + { + String CurrentTag = getTag(input); // Get the rest of the tag + text = convertTag(CurrentTag); + } + else if (c == '&') + { + String specialchar = getSpecial(input); + if (specialchar.equals("lt;") || specialchar.equals("#60")) + text = "<"; + else if (specialchar.equals("gt;") || specialchar.equals("#62")) + text = ">"; + else if (specialchar.equals("amp;") || specialchar.equals("#38")) + text = "&"; + else if (specialchar.equals("nbsp;")) + text = " "; + else if (specialchar.equals("quot;") || specialchar.equals("#34")) + text = " "; + else if (specialchar.equals("copy;") || specialchar.equals("#169")) + text = "[Copyright]"; + else if (specialchar.equals("reg;") || specialchar.equals("#174")) + text = "[Registered]"; + else if (specialchar.equals("trade;") || specialchar.equals("#153")) + text = "[Trademark]"; + else + text = "&" + specialchar; + } + else if (!pre && Character.isWhitespace((char)c)) + { + StringBuffer s = in_body ? result : result2; + if (s.length() > 0 && Character.isWhitespace(s.charAt(s.length()-1))) + text = ""; + else text = " "; + } + else + { + text = "" + (char)c; + } + StringBuffer s = in_body ? result : result2; + s.append(text); + c = input.read(); + } + } + catch (Exception e) + { + input.close(); + throw e; + } + StringBuffer s = body_found ? result : result2; + return s.toString().trim(); + } + String getTag(Reader r) throws IOException + { + StringBuffer result = new StringBuffer(); + int level = 1; + result.append('<'); + while (level > 0) + { + int c = r.read(); + if (c == -1) break; // EOF + result.append((char)c); + if (c == '<') level++; else if (c == '>') level--; + } + return result.toString(); + } + String getSpecial(Reader r) throws IOException + { + StringBuffer result = new StringBuffer(); + r.mark(1);//Mark the present position in the stream + int c = r.read(); + while (Character.isLetter((char)c)) + { + result.append((char)c); + r.mark(1); + c = r.read(); + } + if (c == ';') result.append(';'); + else r.reset(); + return result.toString(); + } + boolean isTag(String s1, String s2) + { + s1 = s1.toLowerCase(); + String t1 = "<" + s2.toLowerCase() + ">"; + String t2 = "<" + s2.toLowerCase() + " "; + return s1.startsWith(t1) || s1.startsWith(t2); + } + String convertTag(String t) throws IOException + { + String result = ""; + if (isTag(t,"body")) + { in_body = true; body_found = true; } + else if (isTag(t,"/body")) + { in_body = false; result = " "; } + else if (isTag(t,"center")) + { result = " "; center = true; } + else if (isTag(t,"/center")) + { result = " "; center = false; } + else if (isTag(t,"pre")) + { result = " "; pre = true; } + else if (isTag(t,"/pre")) + { result = " "; pre = false; } + else if (isTag(t,"p")) + result = "\n "; + else if (isTag(t,"br")) + result = "\n"; + else if (isTag(t,"h1") || isTag(t,"h2") || + isTag(t,"h3") ||isTag(t,"h4") || isTag(t,"h5") || isTag(t,"h6") || + isTag(t,"h7")) + result = " \n"; + else if (isTag(t,"/h1") || isTag(t,"/h2") || + isTag(t,"/h3") ||isTag(t,"/h4") || isTag(t,"/h5") || isTag(t,"/h6") || + isTag(t,"/h7")) + result = " "; + else if (isTag(t,"dl")) + result = " \n"; + else if (isTag(t,"/dl")) + result = " "; + else if (isTag(t,"dd")) + result = " * "; + else if (isTag(t,"dt")) + result = " "; + else if (isTag(t,"li")) + result = " * "; + else if (isTag(t,"/ul")) + result = " "; + else if (isTag(t,"/ol")) + result = " "; + else if (isTag(t,"hr")) + result = "\n____________________________________________________________________________________________\n"; + else if (isTag(t,"table")) + result = " "; + else if (isTag(t,"/table")) + result = " "; + else if (isTag(t,"form")) + result = " "; + else if (isTag(t,"/form")) + result = " "; + else if (isTag(t,"b")) + result = "*"; + else if (isTag(t,"/b")) + result = "*"; + else if (isTag(t,"i")) + result = " "; + else if (isTag(t,"/i")) + result = " " ; + else if (isTag(t,"img")) + { + int idx = t.indexOf("alt="); + if (idx != -1) + { + idx += 5; + int idx2 = t.indexOf("\"",idx); + result = t.substring(idx,idx2); + } + } + else if (isTag(t,"a")) + { + int idx = t.indexOf("href="); + if (idx != -1) + { + idx += 6; + int idx2 = t.indexOf("\"",idx); + href = t.substring(idx,idx2); + } + else + { + href = ""; + } + } + else if (isTag(t,"/a")) + { + if (href.length() > 0) + { + result = " [ " + href + " ]"; + href = ""; + } + } + return result; + } + public String html2text(String a) throws Exception + { + + String converted; + String path = a; + String s = null; + + byte buf[] = path.getBytes(); + + + s = new String(buf); + InvitationBean h = new InvitationBean(); + converted = h.convert(s); + return converted; + } + } |
From: Joseph I. <jos...@us...> - 2007-04-06 23:51:53
|
Update of /cvsroot/tolven/tolvenEJB In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11341 Modified Files: Tag: E_JI_MDBKeys build.xml Log Message: Move dependencies to SAR Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/build.xml,v retrieving revision 1.19.2.1 retrieving revision 1.19.2.2 diff -C2 -d -r1.19.2.1 -r1.19.2.2 *** build.xml 28 Mar 2007 05:13:22 -0000 1.19.2.1 --- build.xml 6 Apr 2007 23:51:53 -0000 1.19.2.2 *************** *** 75,117 **** <target name="packaging" depends="compile" description="tolvenEJB.jar"> <jar destfile="${tolvenEJB.location}/build/tolvenEJB.jar"> - <manifest> - <attribute name="Class-Path" - value="./lib/antlr-2.7.6.jar ./lib/antlr-3.0ea8.jar ./lib/commons-jci-core-1.0-406301.jar ./lib/commons-jci-eclipse-3.2.0.666.jar ./lib/core-3.2.0.666.jar ./lib/stringtemplate-2.3b6.jar ./lib/drools-compiler-3.0.5.jar ./lib/drools-core-3.0.5.jar ./lib/jsr173_1.0_api.jar ./lib/commons-lang-2.1.jar ./lib/commons-math-1.1.jar ./lib/jaxb-api.jar ./lib/jaxb-impl.jar ./lib/jaxb1-impl.jar ./lib/jsr173_1.0_api.jar"/> - </manifest> <zipfileset dir="${httpcore.location}/lib"> <include name="*.jar"/> </zipfileset > <zipfileset dir="${tolvenEJB.location}/build/bin" includes="**/*.class" excludes="**/AccountUserIdCallback.class **/TolvenPrincipal.class **/TolvenGroup.class" /> <zipfileset dir="${tolvenEJB.location}/conf" prefix="META-INF"/> <zipfileset dir="${tolvenEJB.location}/resources/"/> </jar> - <copy toDir="${tolvenEJB.location}/build" overwrite="true" preservelastmodified="true"> - <fileset dir="${jaxb.location}" > - <include name="lib/jaxb-impl.jar"/> - <include name="lib/jsr173_1.0_api.jar"/> - <include name="lib/jaxb-api.jar"/> - <include name="lib/jaxb1-impl.jar"/> - </fileset> - </copy> - <copy toDir="${tolvenEJB.location}/build/lib" overwrite="true" preservelastmodified="true"> - <fileset dir="${commons-math.location}" > - <include name="*.jar"/> - </fileset> - </copy> - <copy toDir="${tolvenEJB.location}/build/lib" overwrite="true" preservelastmodified="true"> - <fileset dir="${commons-lang.location}" > - <include name="*.jar"/> - </fileset> - </copy> - <copy toDir="${tolvenEJB.location}/build/lib" overwrite="true" preservelastmodified="true"> - <fileset dir="${jboss-rules.location}" > - <include name="*.jar"/> - </fileset> - </copy> - <copy toDir="${tolvenEJB.location}/build/lib" overwrite="true" preservelastmodified="true"> - <fileset dir="${jboss-rules.location}/lib" > - <include name="*.jar"/> - </fileset> - </copy> </target> --- 75,86 ---- <target name="packaging" depends="compile" description="tolvenEJB.jar"> <jar destfile="${tolvenEJB.location}/build/tolvenEJB.jar"> <zipfileset dir="${httpcore.location}/lib"> <include name="*.jar"/> </zipfileset > + <zipfileset dir="${tolvenSecurity.location}/build/bin" includes="**/*.class" /> <zipfileset dir="${tolvenEJB.location}/build/bin" includes="**/*.class" excludes="**/AccountUserIdCallback.class **/TolvenPrincipal.class **/TolvenGroup.class" /> <zipfileset dir="${tolvenEJB.location}/conf" prefix="META-INF"/> <zipfileset dir="${tolvenEJB.location}/resources/"/> </jar> </target> |
From: Joseph I. <jos...@us...> - 2007-04-06 23:50:56
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10901/src/org/tolven/security/bean Modified Files: Tag: E_JI_MDBKeys AccountProcessingProtectionBean.java Log Message: Move dependencies to SAR Index: AccountProcessingProtectionBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean/Attic/AccountProcessingProtectionBean.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** AccountProcessingProtectionBean.java 1 Apr 2007 08:20:51 -0000 1.1.2.4 --- AccountProcessingProtectionBean.java 6 Apr 2007 23:50:54 -0000 1.1.2.5 *************** *** 17,20 **** --- 17,21 ---- import java.io.IOException; import java.io.InputStream; + import java.io.Serializable; import java.security.GeneralSecurityException; import java.security.PrivateKey; *************** *** 25,28 **** --- 26,30 ---- import javax.crypto.SecretKey; import javax.ejb.Local; + import javax.ejb.Remote; import javax.ejb.Stateless; import javax.security.auth.Subject; *************** *** 34,37 **** --- 36,40 ---- import org.tolven.doc.bean.TolvenMessage; import org.tolven.security.AccountProcessingProtectionLocal; + import org.tolven.security.AccountProcessingProtectionRemote; import org.tolven.security.key.AccountProcessingPrivateKey; import org.tolven.security.key.AccountProcessingPublicKey; *************** *** 47,50 **** --- 50,54 ---- @Stateless() @Local(AccountProcessingProtectionLocal.class) + @Remote(AccountProcessingProtectionRemote.class) public class AccountProcessingProtectionBean implements AccountProcessingProtectionLocal { *************** *** 68,71 **** --- 72,92 ---- } + public TolvenMessage getAsEncryptedTolvenMessage(byte[] unencryptedContent, TolvenMessage tm) throws LoginException, GeneralSecurityException, IOException { + Account account = accountDAOLocal.findAccount(tm.getAccountId()); + if (account == null) + throw new RuntimeException("Cannot find account Id=" + tm.getAccountId() + " for TolvenMessage"); + AccountProcessingPublicKey accountProcessingPublicKey = account.getAccountProcessingPublicKey(); + if (accountProcessingPublicKey == null) + throw new RuntimeException("No AccountProcessingKey for account Id=" + account.getId()); + DocumentSecretKey documentSecretKey = DocumentSecretKey.getInstance(); + SecretKey docSecretKey = documentSecretKey.init(accountProcessingPublicKey.getPublicKey()); + Cipher cipher = Cipher.getInstance(docSecretKey.getAlgorithm()); + cipher.init(Cipher.ENCRYPT_MODE, docSecretKey); + tm.setPayload(cipher.doFinal(unencryptedContent)); + tm.setEncryptedKeyAlgorithm(docSecretKey.getAlgorithm()); + tm.setEncryptedKey(documentSecretKey.getEncryptedKey()); + return tm; + } + public byte[] getDecryptedContent(TolvenMessage tm) throws LoginException, GeneralSecurityException, IOException { Account account = accountDAOLocal.findAccount(tm.getAccountId()); |
From: Joseph I. <jos...@us...> - 2007-04-06 23:50:56
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/security In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10901/src/org/tolven/security Added Files: Tag: E_JI_MDBKeys AccountProcessingProtectionRemote.java Log Message: Move dependencies to SAR --- NEW FILE: AccountProcessingProtectionRemote.java --- /* * Copyright (C) 2006 Tolven Inc * * 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. * * Contact: in...@to... */ package org.tolven.security; import java.io.IOException; import java.io.Serializable; import java.security.GeneralSecurityException; import javax.security.auth.login.LoginException; import org.tolven.doc.bean.TolvenMessage; /** * This interface protects the DocBase by handling its encryption and decryption. * * @author Joseph Isaac * */ public interface AccountProcessingProtectionRemote { public void setAsEncryptedContent(byte[] unencryptedContent, TolvenMessage tm) throws LoginException, GeneralSecurityException, IOException; public TolvenMessage getAsEncryptedTolvenMessage(byte[] unencryptedContent, TolvenMessage tm) throws LoginException, GeneralSecurityException, IOException; } |
From: Joseph I. <jos...@us...> - 2007-04-06 23:50:52
|
Update of /cvsroot/tolven/tolven/jboss-config/tolven-dependencies/META-INF In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10884/jboss-config/tolven-dependencies/META-INF Added Files: Tag: E_JI_MDBKeys jboss-service.xml Log Message: Move dependencies to SAR --- NEW FILE: jboss-service.xml --- <?xml version="1.0" encoding="UTF-8"?> <!-- Scoped Tolven Server SAR deployment descriptor. --> <server> <loader-repository>tolven.com:loader=tolven.ear <loader-repository-config>java2ParentDelegaton=false</loader-repository-config> </loader-repository> </server> |
From: Joseph I. <jos...@us...> - 2007-04-06 23:50:52
|
Update of /cvsroot/tolven/tolven In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10884 Modified Files: Tag: E_JI_MDBKeys build.xml Log Message: Move dependencies to SAR Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/build.xml,v retrieving revision 1.77.2.3 retrieving revision 1.77.2.4 diff -C2 -d -r1.77.2.3 -r1.77.2.4 *** build.xml 31 Mar 2007 22:53:16 -0000 1.77.2.3 --- build.xml 6 Apr 2007 23:50:48 -0000 1.77.2.4 *************** *** 235,238 **** --- 235,268 ---- </target> + <target name="tolven-dependencies-sar"> + <delete file="build/tolven-dependencies.sar" /> + <jar destfile="build/tolven-dependencies.sar"> + <fileset dir="jboss-config/tolven-dependencies"> + <include name="META-INF/jboss-service.xml" /> + </fileset> + <fileset dir="${jaxb.location}" > + <include name="lib/jaxb-impl.jar"/> + <include name="lib/jsr173_1.0_api.jar"/> + <include name="lib/jaxb-api.jar"/> + <include name="lib/jaxb1-impl.jar"/> + </fileset> + <fileset dir="${commons-math.location}" > + <include name="*.jar"/> + </fileset> + <fileset dir="${commons-lang.location}" > + <include name="*.jar"/> + </fileset> + <fileset dir="${jboss-rules.location}" > + <include name="*.jar"/> + </fileset> + <fileset dir="${jboss-rules.location}/lib" > + <include name="*.jar"/> + </fileset> + </jar> + <copy toDir="C:/tolvenB20061001-local/tolven-jboss-4.0.4.GA/server/tolven/deploy" overwrite="true" preservelastmodified="true"> + <fileset file="build/tolven-dependencies.sar"/> + </copy> + </target> + <target name="undeploy"> <delete> |
From: Joseph I. <jos...@us...> - 2007-04-06 23:50:47
|
Update of /cvsroot/tolven/tolvenSecurity/src/org/tolven/security/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10871/src/org/tolven/security/bean Modified Files: Tag: E_JI_MDBKeys KeyLoginBean.java Log Message: Move dependencies to SAR Index: KeyLoginBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenSecurity/src/org/tolven/security/bean/Attic/KeyLoginBean.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** KeyLoginBean.java 31 Mar 2007 22:53:23 -0000 1.1.2.1 --- KeyLoginBean.java 6 Apr 2007 23:50:42 -0000 1.1.2.2 *************** *** 14,20 **** --- 14,24 ---- package org.tolven.security.bean; + import java.security.GeneralSecurityException; + import java.security.PublicKey; + import javax.annotation.Resource; import javax.ejb.EJBContext; import javax.ejb.Local; + import javax.ejb.Remote; import javax.ejb.Stateless; import javax.persistence.EntityManager; *************** *** 23,27 **** --- 27,33 ---- import org.tolven.security.KeyLoginLocal; + import org.tolven.security.KeyLoginRemote; import org.tolven.security.key.AccountPrivateKey; + import org.tolven.security.key.AccountProcessingPublicKey; import org.tolven.security.key.AccountPublicKey; import org.tolven.security.key.UserPrivateKey; *************** *** 36,40 **** @Stateless @Local(KeyLoginLocal.class) ! public class KeyLoginBean implements KeyLoginLocal { @PersistenceContext --- 42,47 ---- @Stateless @Local(KeyLoginLocal.class) ! @Remote(KeyLoginRemote.class) ! public class KeyLoginBean implements KeyLoginLocal, KeyLoginRemote { @PersistenceContext *************** *** 74,78 **** */ public AccountPrivateKey findAccountPrivateKey(long accountUserId) { ! Query query = em.createQuery("SELECT accountPrivateKey FROM AccountUser au WHERE au.id = :accountUserId " + "AND u.status = :activeStatus"); query.setParameter("accountUserId", accountUserId); query.setParameter("aciveStatus", "active"); --- 81,85 ---- */ public AccountPrivateKey findAccountPrivateKey(long accountUserId) { ! Query query = em.createQuery("SELECT accountPrivateKey FROM AccountUser au WHERE au.id = :accountUserId " + "AND au.status = :activeStatus"); query.setParameter("accountUserId", accountUserId); query.setParameter("aciveStatus", "active"); *************** *** 86,90 **** */ public AccountPublicKey findAccountPublicKey(long accountUserId) { ! Query query = em.createQuery("SELECT accountPublicKey FROM AccountUser au WHERE au.id = :accountUserId " + "AND u.status = :activeStatus"); query.setParameter("accountUserId", accountUserId); query.setParameter("aciveStatus", "active"); --- 93,97 ---- */ public AccountPublicKey findAccountPublicKey(long accountUserId) { ! Query query = em.createQuery("SELECT accountPublicKey FROM AccountUser au WHERE au.id = :accountUserId " + "AND au.status = :activeStatus"); query.setParameter("accountUserId", accountUserId); query.setParameter("aciveStatus", "active"); *************** *** 92,94 **** --- 99,113 ---- } + /** + * Return an AccountPublicKey + * @param accountUserId + * @return + */ + public PublicKey findAccountProcessingPublicKey(long accountId) throws GeneralSecurityException { + Query query = em.createQuery("SELECT accountProcessingPublicKey FROM Account a WHERE a.id = :accountId"); + query.setParameter("accountId", accountId); + AccountProcessingPublicKey accountProcessingPublicKey = (AccountProcessingPublicKey)query.getSingleResult(); + return accountProcessingPublicKey.getPublicKey(); + } + } |
From: Joseph I. <jos...@us...> - 2007-04-06 23:50:47
|
Update of /cvsroot/tolven/tolvenSecurity/src/org/tolven/security In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10871/src/org/tolven/security Added Files: Tag: E_JI_MDBKeys KeyLoginRemote.java Log Message: Move dependencies to SAR --- NEW FILE: KeyLoginRemote.java --- /* * Copyright (C) 2006 Tolven Inc * * 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. * * Contact: in...@to... */ package org.tolven.security; import java.security.GeneralSecurityException; import java.security.PublicKey; /** * This class provides functionality to the KeyLoginModule and should only reference application security related classes * * @author Joseph Isaac * */ public interface KeyLoginRemote { /** * Return an AccountPublicKey * @param accountUserId * @return */ public PublicKey findAccountProcessingPublicKey(long accountId) throws GeneralSecurityException; } |
From: Joseph I. <jos...@us...> - 2007-04-06 23:50:39
|
Update of /cvsroot/tolven/tolven/jboss-config/tolven-dependencies/META-INF In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10852/jboss-config/tolven-dependencies/META-INF Log Message: Directory /cvsroot/tolven/tolven/jboss-config/tolven-dependencies/META-INF added to the repository |
From: Joseph I. <jos...@us...> - 2007-04-06 23:50:39
|
Update of /cvsroot/tolven/tolven/jboss-config/tolven-dependencies In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10852/jboss-config/tolven-dependencies Log Message: Directory /cvsroot/tolven/tolven/jboss-config/tolven-dependencies added to the repository --> Using per-directory sticky tag `E_JI_MDBKeys' |
From: John C. <jc...@us...> - 2007-04-05 00:15:31
|
Update of /cvsroot/tolven/tolvenWEB/web/five In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29007/web/five Modified Files: patients.xhtml dmpats.xhtml Log Message: Fix diabetes filter - the variable name of the datagrid was duplicating the id of the table which in IE is a no-no. FF was OK. Index: patients.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/patients.xhtml,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** patients.xhtml 27 Mar 2007 23:21:40 -0000 1.18 --- patients.xhtml 5 Apr 2007 00:15:30 -0000 1.19 *************** *** 14,26 **** <script language="JavaScript" type="text/javascript"> // <![CDATA[ ! prevPatFilterValue = ''; function patientFilterChange(element, vax) { if (prevPatFilterValue==vax) return; ! prevPatFilterValue = vax; if (vax==null || vax.length==0) { patientGridz.setRequestParams( {name: 'element', value: visiblePage} ); } else { ! patientGridz.setRequestParams( {name: 'element', value: visiblePage}, {name: 'NameFilter', value: prevPatFilterValue} ); } // patientGridz.setTotalRows(10); --- 14,27 ---- <script language="JavaScript" type="text/javascript"> // <![CDATA[ ! // patientListOffset = 0; function patientFilterChange(element, vax) { + var prevPatFilterValue = $('#{menu.element}').getAttribute( 'filterValue' ); if (prevPatFilterValue==vax) return; ! $('#{menu.element}').setAttribute( 'filterValue', vax); if (vax==null || vax.length==0) { patientGridz.setRequestParams( {name: 'element', value: visiblePage} ); } else { ! patientGridz.setRequestParams( {name: 'element', value: visiblePage}, {name: 'NameFilter', value: vax} ); } // patientGridz.setTotalRows(10); *************** *** 29,43 **** } patientGridEventFilter = new Form.Element.Observer( $("patientFilter"), 1, patientFilterChange ); $("patientFilter").focus(); patientGridz = new Rico.LiveGrid( '#{menu.element}-LG', 15, #{menu.menuDataCount}, 'menuData.ajax', {prefetchBuffer: true, tableClass: 'dataGrid', largeBufferSize: 5.0, nearLimitFactor: 0.4, ! requestParameters: [{name: 'element', value: visiblePage}], ! loadingClass: 'dataGridLoading', sortAscendImg: '../images/sort_asc.gif', ! sortDescendImg:'../images/sort_desc.gif'}); // ]]> </script> --- 30,83 ---- } patientGridEventFilter = new Form.Element.Observer( $("patientFilter"), 1, patientFilterChange ); + + function updateOffset( liveGrid, offset ) { + $('#{menu.element}').setAttribute( 'gridOffset', offset ); + } + + function updateSortInfo( liveGrid ) { + var sortCol = liveGrid.sort.getSortedColumnIndex(); + // alert( sortCol ); + if (sortCol >= 0) { + var sortColName = liveGrid.sort.options.columns[sortCol].name; + var sortDir = liveGrid.sort.options.columns[sortCol].getSortDirection(); + $('#{menu.element}').setAttribute( 'gridSortCol', sortColName ); + $('#{menu.element}').setAttribute( 'gridSortDir', sortDir ); + } + } + $('#{menu.element}').setAttribute( 'refreshablex', true ); + var requestParams; + var filterValue = $('#{menu.element}').getAttribute( 'filterValue' ); + if (filterValue) { + $("patientFilter").value = filterValue; + requestParams = [{name: 'element', value: visiblePage}, {name: 'NameFilter', value: filterValue} ]; + } else { + requestParams = [{name: 'element', value: visiblePage}]; + } $("patientFilter").focus(); + var gridOffset = $('#{menu.element}').getAttribute( 'gridOffset' ); + if (!gridOffset) gridOffset = 0; + var gridSortCol = $('#{menu.element}').getAttribute( 'gridSortCol' ); + if (!gridSortCol) { + gridSortCol='name'; + gridSortDir='ASC'; + $('#{menu.element}').setAttribute( 'gridSortCol', gridSortCol ); + $('#{menu.element}').setAttribute( 'gridSortDir', gridSortDir ); + } + var gridSortDir = $('#{menu.element}').getAttribute( 'gridSortDir' ); patientGridz = new Rico.LiveGrid( '#{menu.element}-LG', 15, #{menu.menuDataCount}, 'menuData.ajax', {prefetchBuffer: true, tableClass: 'dataGrid', + offset: gridOffset, + sortCol: gridSortCol, + sortDir: gridSortDir, largeBufferSize: 5.0, nearLimitFactor: 0.4, ! onscroll : updateOffset, ! onRefreshComplete: updateSortInfo, ! requestParameters: requestParams, ! // loadingClass: 'dataGridLoading', sortAscendImg: '../images/sort_asc.gif', ! sortDescendImg:'../images/sort_desc.gif'}); // ]]> </script> Index: dmpats.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/dmpats.xhtml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dmpats.xhtml 12 Feb 2007 07:11:02 -0000 1.3 --- dmpats.xhtml 5 Apr 2007 00:15:30 -0000 1.4 *************** *** 10,16 **** <body> <ui:composition> <script language="JavaScript" type="text/javascript"> // <![CDATA[ ! dmpatsGrid = new Rico.LiveGrid( 'dmpatsGrid', 15, #{menu.menuDataCount}, 'menuData.ajax', {prefetchBuffer: true, --- 10,32 ---- <body> <ui:composition> + <div id="#{menu.element}-pane"> + <script language="JavaScript" type="text/javascript"> // <![CDATA[ ! function dmpatFilterChange(element, vax) { ! var prevFilterValue = $('#{menu.element}').getAttribute( 'filterValue' ); ! if (prevFilterValue==vax) return; ! $('#{menu.element}').setAttribute( 'filterValue', vax); ! if (vax==null || vax.length==0) { ! dmpatsGridz.setRequestParams( {name: 'element', value: visiblePage} ); ! } else { ! dmpatsGridz.setRequestParams( {name: 'element', value: visiblePage}, {name: 'NameFilter', value: vax} ); ! } ! dmpatsGridz.resetContents(); ! dmpatsGridz.requestContentRefresh(0); ! } ! new Form.Element.Observer( $("dmpatsFilter"), 1, dmpatFilterChange ); ! ! dmpatsGridz = new Rico.LiveGrid( 'dmpatsGrid', 15, #{menu.menuDataCount}, 'menuData.ajax', {prefetchBuffer: true, *************** *** 22,44 **** sortAscendImg: '../images/sort_asc.gif', sortDescendImg:'../images/sort_desc.gif'}); - - prevDMPatFilterValue = ''; - function dmpatFilterChange(element, vax) { - if (prevDMPatFilterValue==vax) return; - prevDMPatFilterValue = vax; - if (vax==null || vax.length==0) { - dmpatsGrid.setRequestParams( {name: 'element', value: visiblePage} ); - } else { - dmpatsGrid.setRequestParams( {name: 'element', value: visiblePage}, {name: 'NameFilter', value: prevDMPatFilterValue} ); - } - dmpatsGrid.resetContents(); - dmpatsGrid.requestContentRefresh(0); - } - new Form.Element.Observer( $("dmpatsFilter"), 1, dmpatFilterChange ); $("dmpatsFilter").focus(); // ]]> </script> <form action="#"> ! Filter (last,first): <input name="dmpatsFilter" type="text" id="dmpatsFilter" /> </form> <div id="dmpatsDG" style="width:590px"> --- 38,46 ---- sortAscendImg: '../images/sort_asc.gif', sortDescendImg:'../images/sort_desc.gif'}); $("dmpatsFilter").focus(); // ]]> </script> <form action="#"> ! Filter (last name): <input name="dmpatsFilter" type="text" id="dmpatsFilter" /> </form> <div id="dmpatsDG" style="width:590px"> *************** *** 74,77 **** --- 76,80 ---- </table> </div> + </div> </ui:composition> |
From: John C. <jc...@us...> - 2007-04-02 19:36:26
|
Update of /cvsroot/tolven/tolvenWEB/web/five In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29417/web/five Modified Files: summary.xhtml Log Message: Use full body width for nine-panel summary. Let columns seek best width based on content. Index: summary.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/summary.xhtml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** summary.xhtml 16 Feb 2007 04:04:12 -0000 1.5 --- summary.xhtml 2 Apr 2007 19:36:25 -0000 1.6 *************** *** 19,27 **** <div class="summary" style="padding:5px;"> ! <h:panelGrid columns="3" width="900px" cellspacing="2px" > <c:forEach items="#{menu.childPaths}" var="child"> ! <h:panelGroup> ! <div id="#{child}" style="width:290px;"/> ! </h:panelGroup> </c:forEach> </h:panelGrid> --- 19,25 ---- <div class="summary" style="padding:5px;"> ! <h:panelGrid columns="3" width="100%" cellspacing="2px" > <c:forEach items="#{menu.childPaths}" var="child"> ! <div id="#{child}" style="width:100%;"/> </c:forEach> </h:panelGrid> |
From: John C. <jc...@us...> - 2007-04-02 18:28:19
|
Update of /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31228/src/org/tolven/mobile/client/view/form Modified Files: TemperatureForm.java Log Message: Fix typo in text - thremal > thermal Index: TemperatureForm.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form/TemperatureForm.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TemperatureForm.java 28 Feb 2007 07:12:16 -0000 1.2 --- TemperatureForm.java 2 Apr 2007 18:28:17 -0000 1.3 *************** *** 53,57 **** form.append(methodField); stateField = new ChoiceGroup(" ", ChoiceGroup.POPUP, new String[] ! {"Thremal State", "Indoor - Normal Clothing or Bedding", "Indoor - Reduced Clothing Bedding", --- 53,57 ---- form.append(methodField); stateField = new ChoiceGroup(" ", ChoiceGroup.POPUP, new String[] ! {"Thermal State", "Indoor - Normal Clothing or Bedding", "Indoor - Reduced Clothing Bedding", |
From: Joseph I. <jos...@us...> - 2007-04-01 08:34:55
|
Update of /cvsroot/tolven/tolvenClient In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv5677 Added Files: .cvsignore Log Message: Added the usual cvsignore file to tolvenClient --- NEW FILE: .cvsignore --- .externalToolBuilders .settings bin .classpath .packaging .project build |
From: Joseph I. <jos...@us...> - 2007-04-01 08:33:26
|
Update of /cvsroot/tolven/tolvenClient In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv5225 Removed Files: .classpath .project Log Message: Removed .classpath and .project, which are local files --- .project DELETED --- --- .classpath DELETED --- |
From: Joseph I. <jos...@us...> - 2007-04-01 08:20:55
|
Update of /cvsroot/tolven/tolvenSecurity/src/org/tolven/security/auth In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv32160/src/org/tolven/security/auth Modified Files: Tag: E_JI_MDBKeys MDBLoginModule.java Log Message: mdbuser password is now read from a hashed password file. The mdbuser and its password are incorporated into IzPack installer. Index: MDBLoginModule.java =================================================================== RCS file: /cvsroot/tolven/tolvenSecurity/src/org/tolven/security/auth/Attic/MDBLoginModule.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** MDBLoginModule.java 31 Mar 2007 22:53:23 -0000 1.1.2.1 --- MDBLoginModule.java 1 Apr 2007 08:20:54 -0000 1.1.2.2 *************** *** 14,76 **** package org.tolven.security.auth; ! import java.io.IOException; import java.util.Arrays; import java.util.Map; import javax.security.auth.Subject; - import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; - import javax.security.auth.callback.NameCallback; - import javax.security.auth.callback.UnsupportedCallbackException; import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; /** ! * This LoginModule does not verify username/password directly and MUST be proceeded by a LoginModule which does. ! * However, it is responsible for adding credentials to a Subject, and while adding a UserPrivateKey, it will attempt ! * unlock the UserPrivateKey with the provided password. If the password is not correct, then the login will fail. * * @author Joseph Isaac * */ public class MDBLoginModule implements LoginModule { - private CallbackHandler callbackHandler; private String principalName; private char[] password; private Map sharedState; public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) { ! System.out.println(getClass() + " initialize()"); ! this.callbackHandler = callbackHandler; this.sharedState = sharedState; } public boolean login() throws LoginException { ! System.out.println(getClass() + " begin login"); ! if (callbackHandler == null) ! throw new LoginException("No CallbackHandler"); ! NameCallback nc = new NameCallback("User name: "); ! Callback[] callbacks = { nc }; try { ! callbackHandler.handle(callbacks); ! principalName = nc.getName(); if (principalName == null) ! throw new LoginException("null principalName not permitted"); ! char[] tmpPassword = "accountprocessingQ".toCharArray(); ! if (tmpPassword == null) ! throw new LoginException("null password not permitted"); ! password = new char[tmpPassword.length]; ! if (tmpPassword != null) { ! System.arraycopy(tmpPassword, 0, password, 0, tmpPassword.length); ! } ! sharedState.put("javax.security.auth.login.name", password); sharedState.put("javax.security.auth.login.password", password); ! } catch (IOException e) { ! LoginException le = new LoginException("Failed to get principalName/password"); le.initCause(e); throw le; ! } catch (UnsupportedCallbackException e) { ! LoginException le = new LoginException("CallbackHandler does not support: " + e.getCallback()); le.initCause(e); throw le; --- 14,79 ---- package org.tolven.security.auth; ! import java.io.UnsupportedEncodingException; import java.util.Arrays; import java.util.Map; + import javax.management.JMException; + import javax.management.MBeanServer; + import javax.management.MBeanServerFactory; + import javax.management.ObjectName; import javax.security.auth.Subject; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; /** ! * This LoginModule protects an application password using the hashing mechanism in a JAAS SecurityDomain. * * @author Joseph Isaac * + * \@hashed-mdb-password@ is replaced by deployment substitution to be the hashed password + * + <login-module code="org.tolven.security.auth.MDBLoginModule" + flag="required"> + <module-option name = "username">accountprocessingQ</module-option> + <module-option name = "password">@hashed-mdb-password@</module-option> + <module-option name = "jaasSecurityDomain">jboss.security:service=TolvenSecurityDomain,domain=tolvenMDB</module-option> + </login-module> + * */ public class MDBLoginModule implements LoginModule { private String principalName; private char[] password; private Map sharedState; + private Map options; public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) { ! //System.out.println(getClass() + " initialize()"); this.sharedState = sharedState; + this.options = options; } public boolean login() throws LoginException { ! //System.out.println(getClass() + " begin login"); try { ! principalName = (String) options.get("username"); if (principalName == null) ! throw new LoginException("module option username cannot be null"); ! String hashPassword = (String) options.get("password"); ! if (hashPassword == null) ! throw new LoginException("module option password cannot be null"); ! String securityDomainObjectName = (String) options.get("jaasSecurityDomain"); ! if (securityDomainObjectName == null) ! throw new LoginException("module option jaasSecurityDomain cannot be null"); ! password = getDecryptedPassword(hashPassword, securityDomainObjectName); ! sharedState.put("javax.security.auth.login.name", principalName); sharedState.put("javax.security.auth.login.password", password); ! } catch (UnsupportedEncodingException e) { ! LoginException le = new LoginException("Failed to decrypt password"); le.initCause(e); throw le; ! } catch (JMException e) { ! LoginException le = new LoginException("Failed to decrypt password"); le.initCause(e); throw le; *************** *** 79,82 **** --- 82,96 ---- } + private char[] getDecryptedPassword(String hashPassword, String securityDomainObjectName) throws JMException, UnsupportedEncodingException { + MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0); + ObjectName jaasMgr = new ObjectName(securityDomainObjectName); + if (jaasMgr == null) + throw new RuntimeException("Could not locate SecurityDomain=" + securityDomainObjectName); + String[] signature = { String.class.getName() }; + Object[] tolvenDB = { hashPassword }; + byte[] serverPassword = (byte[]) server.invoke(jaasMgr, "decode64", tolvenDB, signature); + return new String(serverPassword, "UTF-8").toCharArray(); + } + public boolean commit() throws LoginException { return true; *************** *** 94,98 **** private void removeAllCredentials() throws LoginException { - callbackHandler = null; principalName = null; if (password != null) --- 108,111 ---- *************** *** 100,103 **** --- 113,117 ---- password = null; sharedState = null; + options = null; } |
From: Joseph I. <jos...@us...> - 2007-04-01 08:20:52
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/security/auth In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv32106/src/org/tolven/security/auth Modified Files: Tag: E_JI_MDBKeys KeyLoginModule.java Log Message: mdbuser password is now read from a hashed password file. The mdbuser and its password are incorporated into IzPack installer. Index: KeyLoginModule.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/security/auth/KeyLoginModule.java,v retrieving revision 1.9.2.4 retrieving revision 1.9.2.5 diff -C2 -d -r1.9.2.4 -r1.9.2.5 *** KeyLoginModule.java 31 Mar 2007 22:53:20 -0000 1.9.2.4 --- KeyLoginModule.java 1 Apr 2007 08:20:51 -0000 1.9.2.5 *************** *** 19,22 **** --- 19,23 ---- import java.security.PublicKey; import java.security.acl.Group; + import java.security.spec.InvalidKeySpecException; import java.util.Arrays; import java.util.Enumeration; *************** *** 38,42 **** import org.tolven.core.entity.Account; import org.tolven.core.entity.AccountUser; - import org.tolven.security.AccountProcessingProtectionLocal; import org.tolven.security.LoginLocal; import org.tolven.security.TolvenPrincipal; --- 39,42 ---- *************** *** 66,69 **** --- 66,70 ---- private long accountUserId; private Map sharedState; + private Map options; public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) { *************** *** 72,116 **** this.callbackHandler = callbackHandler; this.sharedState = sharedState; } public boolean login() throws LoginException { //System.out.println(getClass() + " begin login"); - if (callbackHandler == null) - throw new LoginException("No CallbackHandler"); - NameCallback nc = new NameCallback("User name: "); - PasswordCallback pc = new PasswordCallback("Password: ", false); - AccountUserIdCallback auc = new AccountUserIdCallback("AccountUserId: "); - Callback[] callbacks = { nc, pc, auc }; - Callback[] stdCallbacks = { nc, pc }; try { ! //TODO: We currently use a custom callback handler, but have not changed the default callback handler ! // So both can come through here and being interfaces, there is no way to distinguish between them ! // Here we try the default first, and recognize it because if it does not support the AccountUseridCallback ! try { ! callbackHandler.handle(callbacks); ! } catch (UnsupportedCallbackException ex) { ! callbackHandler.handle(stdCallbacks); ! } ! principalName = nc.getName(); ! if (principalName == null) { principalName = (String) sharedState.get("javax.security.auth.login.name"); ! if (principalName == null) ! throw new LoginException("null principalName not permitted"); ! } ! char[] tmpPassword = pc.getPassword(); ! if (tmpPassword == null) { ! tmpPassword = (char[]) sharedState.get("javax.security.auth.login.password"); ! if (tmpPassword == null) ! throw new LoginException("null password not permitted"); } ! password = new char[tmpPassword.length]; ! System.arraycopy(tmpPassword, 0, password, 0, tmpPassword.length); ! pc.clearPassword(); ! accountUserId = auc.getAccountUserId(); ! if (accountUserId == 0) { ! //System.out.println(getClass() + " Login not linked to an account"); ! } else { ! System.out.println(getClass() + " Login linking to account id=" + accountUserId); } } catch (IOException e) { LoginException le = new LoginException("Failed to get principalName/password"); --- 73,132 ---- this.callbackHandler = callbackHandler; this.sharedState = sharedState; + this.options = options; } public boolean login() throws LoginException { //System.out.println(getClass() + " begin login"); try { ! String passwordStackingOption = (String) options.get("password-stacking"); ! if ("useFirstPass".equals(passwordStackingOption)) { principalName = (String) sharedState.get("javax.security.auth.login.name"); ! Object obj = sharedState.get("javax.security.auth.login.password"); ! if (obj instanceof char[]) { ! password = (char[]) obj; ! } else { ! password = ((String) obj).toCharArray(); ! } } ! if (principalName == null || password == null) { ! if (callbackHandler == null) ! throw new LoginException("No CallbackHandler"); ! NameCallback nc = new NameCallback("User name: "); ! PasswordCallback pc = new PasswordCallback("Password: ", false); ! AccountUserIdCallback auc = new AccountUserIdCallback("AccountUserId: "); ! Callback[] callbacks = { nc, pc, auc }; ! Callback[] stdCallbacks = { nc, pc }; ! //TODO: We currently use a custom callback handler, but have not changed the default callback handler ! // So both can come through here and being interfaces, there is no way to distinguish between them ! // Here we try the default first, and recognize it because if it does not support the AccountUseridCallback ! try { ! callbackHandler.handle(callbacks); ! } catch (UnsupportedCallbackException ex) { ! callbackHandler.handle(stdCallbacks); ! } ! if (principalName == null) { ! principalName = nc.getName(); ! if (principalName == null) ! throw new LoginException("null principalName not permitted"); ! } ! if (password == null) { ! char[] tmpPassword = pc.getPassword(); ! if (tmpPassword == null) ! throw new LoginException("null password not permitted"); ! password = new char[tmpPassword.length]; ! System.arraycopy(tmpPassword, 0, password, 0, tmpPassword.length); ! pc.clearPassword(); ! } ! accountUserId = auc.getAccountUserId(); ! if (accountUserId == 0) { ! //System.out.println(getClass() + " Login not linked to an account"); ! } else { ! System.out.println(getClass() + " Login linking to account id=" + accountUserId); ! } } + if (principalName == null) + throw new LoginException("null principalName not permitted"); + if (password == null) + throw new LoginException("null password not permitted"); } catch (IOException e) { LoginException le = new LoginException("Failed to get principalName/password"); *************** *** 171,175 **** --- 187,195 ---- userPublicKey = userKeyRing.getUserPublicKey(); } + try { userPrivateKey.unlockPrivateKey(password); + } catch (InvalidKeySpecException ex) { + throw new LoginException(getClass() + ": Could not unlock UserPrivateKey"); + } // Populate the Subject //System.out.println(getClass() + ": Adding UserPrivateKey to Subject " + principalName); *************** *** 231,239 **** AccountProcessingPublicKey accountProcessingPublicKey = account.getAccountProcessingPublicKey(); try { - String processingId = AccountProcessingProtectionLocal.ACCOUNT_PROCESSING_Q_ID; if (accountProcessingPublicKey == null) { LoginContext lc = null; try { ! lc = new LoginContext("tolvenMDB", new KeyLdapCallbackHandler(processingId, null)); lc.login(); Subject subject = lc.getSubject(); --- 251,258 ---- AccountProcessingPublicKey accountProcessingPublicKey = account.getAccountProcessingPublicKey(); try { if (accountProcessingPublicKey == null) { LoginContext lc = null; try { ! lc = new LoginContext("tolvenMDB"); lc.login(); Subject subject = lc.getSubject(); *************** *** 241,245 **** UserPublicKey userPublicKey = publicCredentials.iterator().next(); if (userPublicKey == null) ! throw new RuntimeException(getClass() + " :No UserPublicKey found for " + processingId); AccountProcessingPrivateKey accountProcessingPrivateKey = AccountProcessingPrivateKey.getInstance(); account.setAccountProcessingPrivateKey(accountProcessingPrivateKey); --- 260,264 ---- UserPublicKey userPublicKey = publicCredentials.iterator().next(); if (userPublicKey == null) ! throw new RuntimeException(getClass() + " :No UserPublicKey found for tolvenMDB"); AccountProcessingPrivateKey accountProcessingPrivateKey = AccountProcessingPrivateKey.getInstance(); account.setAccountProcessingPrivateKey(accountProcessingPrivateKey); *************** *** 248,254 **** account.setAccountProcessingPublicKey(publicKey); } catch (GeneralSecurityException ex) { ! throw new RuntimeException(getClass() + " :Could not create AccountProcessingKey " + processingId); } catch (IOException ex) { ! throw new RuntimeException(getClass() + " :Could not create AccountProcessingKey " + processingId); } } finally { --- 267,273 ---- account.setAccountProcessingPublicKey(publicKey); } catch (GeneralSecurityException ex) { ! throw new RuntimeException(getClass() + " :Could not create AccountProcessingKey for tolvenMDB"); } catch (IOException ex) { ! throw new RuntimeException(getClass() + " :Could not create AccountProcessingKey for tolvenMDB"); } } finally { *************** *** 258,262 **** } } catch (LoginException ex) { ! throw new RuntimeException(getClass() + " :Could not login " + AccountProcessingProtectionLocal.ACCOUNT_PROCESSING_Q_ID, ex); } } --- 277,281 ---- } } catch (LoginException ex) { ! throw new RuntimeException(getClass() + " :Could not login for tolvenMDB", ex); } } |
From: Joseph I. <jos...@us...> - 2007-04-01 08:20:52
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/core/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv32106/src/org/tolven/core/bean Modified Files: Tag: E_JI_MDBKeys AccountDAOBean.java Log Message: mdbuser password is now read from a hashed password file. The mdbuser and its password are incorporated into IzPack installer. Index: AccountDAOBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/core/bean/AccountDAOBean.java,v retrieving revision 1.29.6.2 retrieving revision 1.29.6.3 diff -C2 -d -r1.29.6.2 -r1.29.6.3 *** AccountDAOBean.java 31 Mar 2007 22:53:20 -0000 1.29.6.2 --- AccountDAOBean.java 1 Apr 2007 08:20:51 -0000 1.29.6.3 *************** *** 41,46 **** import org.tolven.core.entity.AccountUser; import org.tolven.doc.entity.Invitation; - import org.tolven.security.AccountProcessingProtectionLocal; - import org.tolven.security.auth.KeyLdapCallbackHandler; import org.tolven.security.key.AccountPrivateKey; import org.tolven.security.key.AccountProcessingPrivateKey; --- 41,44 ---- *************** *** 119,127 **** AccountProcessingPublicKey accountProcessingPublicKey = account.getAccountProcessingPublicKey(); try { - String processingId = AccountProcessingProtectionLocal.ACCOUNT_PROCESSING_Q_ID; if (accountProcessingPublicKey == null) { LoginContext lc = null; try { ! lc = new LoginContext("tolvenMDB", new KeyLdapCallbackHandler(processingId, null)); lc.login(); Subject subject = lc.getSubject(); --- 117,124 ---- AccountProcessingPublicKey accountProcessingPublicKey = account.getAccountProcessingPublicKey(); try { if (accountProcessingPublicKey == null) { LoginContext lc = null; try { ! lc = new LoginContext("tolvenMDB"); lc.login(); Subject subject = lc.getSubject(); *************** *** 129,133 **** UserPublicKey userPublicKey = publicCredentials.iterator().next(); if (userPublicKey == null) ! throw new RuntimeException(getClass() + " :No UserPublicKey found for " + processingId); AccountProcessingPrivateKey accountProcessingPrivateKey = AccountProcessingPrivateKey.getInstance(); account.setAccountProcessingPrivateKey(accountProcessingPrivateKey); --- 126,130 ---- UserPublicKey userPublicKey = publicCredentials.iterator().next(); if (userPublicKey == null) ! throw new RuntimeException(getClass() + " :No UserPublicKey found for tolvenMDB"); AccountProcessingPrivateKey accountProcessingPrivateKey = AccountProcessingPrivateKey.getInstance(); account.setAccountProcessingPrivateKey(accountProcessingPrivateKey); *************** *** 136,142 **** account.setAccountProcessingPublicKey(publicKey); } catch (GeneralSecurityException ex) { ! throw new RuntimeException(getClass() + " :Could not create AccountProcessingKey " + processingId); } catch (IOException ex) { ! throw new RuntimeException(getClass() + " :Could not create AccountProcessingKey " + processingId); } } finally { --- 133,139 ---- account.setAccountProcessingPublicKey(publicKey); } catch (GeneralSecurityException ex) { ! throw new RuntimeException(getClass() + " :Could not create AccountProcessingKey for tolvenMDB"); } catch (IOException ex) { ! throw new RuntimeException(getClass() + " :Could not create AccountProcessingKey for tolvenMDB"); } } finally { *************** *** 146,150 **** } } catch (LoginException ex) { ! throw new RuntimeException(getClass() + " :Could not login " + AccountProcessingProtectionLocal.ACCOUNT_PROCESSING_Q_ID, ex); } } --- 143,147 ---- } } catch (LoginException ex) { ! throw new RuntimeException(getClass() + " :Could not login to tolvenMDB", ex); } } |
From: Joseph I. <jos...@us...> - 2007-04-01 08:20:52
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv32106/src/org/tolven/app/bean Modified Files: Tag: E_JI_MDBKeys CreatorBean.java Log Message: mdbuser password is now read from a hashed password file. The mdbuser and its password are incorporated into IzPack installer. Index: CreatorBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean/CreatorBean.java,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -C2 -d -r1.7.2.1 -r1.7.2.2 *** CreatorBean.java 28 Mar 2007 05:13:23 -0000 1.7.2.1 --- CreatorBean.java 1 Apr 2007 08:20:51 -0000 1.7.2.2 *************** *** 325,329 **** // ByteArrayOutputStream output = new ByteArrayOutputStream( ); // xmlBean.marshalTRIM( trim, output ); ! accountProcessingProctectionLocal.setAsEncryptedContent(payload, tm, AccountProcessingProtectionLocal.ACCOUNT_PROCESSING_Q_ID); // tm.setPayload(docXML.getContent()); // System.out.println( "Payload: " + new String(tm.getPayload())); --- 325,329 ---- // ByteArrayOutputStream output = new ByteArrayOutputStream( ); // xmlBean.marshalTRIM( trim, output ); ! accountProcessingProctectionLocal.setAsEncryptedContent(payload, tm); // tm.setPayload(docXML.getContent()); // System.out.println( "Payload: " + new String(tm.getPayload())); *************** *** 343,347 **** ByteArrayOutputStream output = new ByteArrayOutputStream( ); xmlBean.marshalCCR( ccr, output ); ! accountProcessingProctectionLocal.setAsEncryptedContent(output.toByteArray(), tm, AccountProcessingProtectionLocal.ACCOUNT_PROCESSING_Q_ID); q.send( tm ); --- 343,347 ---- ByteArrayOutputStream output = new ByteArrayOutputStream( ); xmlBean.marshalCCR( ccr, output ); ! accountProcessingProctectionLocal.setAsEncryptedContent(output.toByteArray(), tm); q.send( tm ); |
From: Joseph I. <jos...@us...> - 2007-04-01 08:20:52
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv32106/src/org/tolven/security/bean Modified Files: Tag: E_JI_MDBKeys AccountProcessingProtectionBean.java Log Message: mdbuser password is now read from a hashed password file. The mdbuser and its password are incorporated into IzPack installer. Index: AccountProcessingProtectionBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/security/bean/Attic/AccountProcessingProtectionBean.java,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** AccountProcessingProtectionBean.java 31 Mar 2007 22:53:20 -0000 1.1.2.3 --- AccountProcessingProtectionBean.java 1 Apr 2007 08:20:51 -0000 1.1.2.4 *************** *** 34,38 **** import org.tolven.doc.bean.TolvenMessage; import org.tolven.security.AccountProcessingProtectionLocal; - import org.tolven.security.auth.KeyLdapCallbackHandler; import org.tolven.security.key.AccountProcessingPrivateKey; import org.tolven.security.key.AccountProcessingPublicKey; --- 34,37 ---- *************** *** 53,57 **** private AccountDAOLocal accountDAOLocal; ! public void setAsEncryptedContent(byte[] unencryptedContent, TolvenMessage tm, String processingId) throws LoginException, GeneralSecurityException, IOException { Account account = accountDAOLocal.findAccount(tm.getAccountId()); if (account == null) --- 52,56 ---- private AccountDAOLocal accountDAOLocal; ! public void setAsEncryptedContent(byte[] unencryptedContent, TolvenMessage tm) throws LoginException, GeneralSecurityException, IOException { Account account = accountDAOLocal.findAccount(tm.getAccountId()); if (account == null) *************** *** 69,73 **** } ! public byte[] getDecryptedContent(TolvenMessage tm, String processingId) throws LoginException, GeneralSecurityException, IOException { Account account = accountDAOLocal.findAccount(tm.getAccountId()); if (account == null) --- 68,72 ---- } ! public byte[] getDecryptedContent(TolvenMessage tm) throws LoginException, GeneralSecurityException, IOException { Account account = accountDAOLocal.findAccount(tm.getAccountId()); if (account == null) *************** *** 75,79 **** LoginContext lc = null; try { ! lc = new LoginContext("tolvenMDB", new KeyLdapCallbackHandler(processingId, null)); lc.login(); Subject subject = lc.getSubject(); --- 74,78 ---- LoginContext lc = null; try { ! lc = new LoginContext("tolvenMDB"); lc.login(); Subject subject = lc.getSubject(); *************** *** 81,89 **** UserPrivateKey userPrivateKey = privateCredentials.iterator().next(); if (userPrivateKey == null) ! throw new GeneralSecurityException(getClass() + " :No UserPrivateKey found for " + processingId); PrivateKey privateKey = userPrivateKey.getPrivateKey(); AccountProcessingPrivateKey accountProcessingPrivateKey = account.getAccountProcessingPrivateKey(); if (accountProcessingPrivateKey == null) ! throw new RuntimeException(": No AccountProcessingPrivateKey found for " + processingId); //TODO: Get the DocumentSecretKey from the TolvenMessage's encryptedKey DocumentSecretKey documentSecretKey = DocumentSecretKey.getInstance(); --- 80,88 ---- UserPrivateKey userPrivateKey = privateCredentials.iterator().next(); if (userPrivateKey == null) ! throw new GeneralSecurityException(getClass() + " :No UserPrivateKey found for tolvenMDB"); PrivateKey privateKey = userPrivateKey.getPrivateKey(); AccountProcessingPrivateKey accountProcessingPrivateKey = account.getAccountProcessingPrivateKey(); if (accountProcessingPrivateKey == null) ! throw new RuntimeException(": No AccountProcessingPrivateKey found for tolvenMDB"); //TODO: Get the DocumentSecretKey from the TolvenMessage's encryptedKey DocumentSecretKey documentSecretKey = DocumentSecretKey.getInstance(); *************** *** 99,104 **** } ! public InputStream getDecryptedContentAsInputStream(TolvenMessage tm, String processingId) throws LoginException, GeneralSecurityException, IOException { ! return new ByteArrayInputStream(getDecryptedContent(tm, processingId)); } } --- 98,103 ---- } ! public InputStream getDecryptedContentAsInputStream(TolvenMessage tm) throws LoginException, GeneralSecurityException, IOException { ! return new ByteArrayInputStream(getDecryptedContent(tm)); } } |