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...> - 2006-09-18 15:43:20
|
Update of /cvsroot/tolven/tolvenWEB/web/five/test In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19305/web/five/test Added Files: docList.xhtml docDetail.xhtml Log Message: Add debug menu to demo tab that displays contents of documents --- NEW FILE: docDetail.xhtml --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> <head> <title>Document Details</title> </head> <body> <ui:composition> <div id="docDetailPane" > <h:form id="docDetail" onsubmit="return ajaxSubmit2(this);"> <h:panelGrid columns="2"> <h:outputText value="document Id"/> <h:outputText id="id" value="#{doc.docXML.id}"/> </h:panelGrid> <h:outputText value="Path"/> <h:inputText value="#{doc.path}" size="80" /> <h:outputText value="Value"/> <h:inputText value="#{doc.pathValue}" size="40"/> <h:commandButton id="docDetailSubmit" action="#{doc.evaluatePath}" value="Evaluate"/> </h:form> <pre> #{doc.docXML.contentString} </pre> </div> </ui:composition> </body> </html> --- NEW FILE: docList.xhtml --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> <head> <title>document list</title> </head> <body> <ui:composition> <script language="JavaScript" type="text/javascript"> // <![CDATA[ #{menu.elementLabel}DG = new Rico.LiveGrid( '#{menu.element}LG', 10, 100, 'xmlDocList.ajax', {prefetchBuffer: true, requestParameters: [{name: 'element', value: visiblePage}], sortAscendImg: '../images/sort_asc.gif', sortDescendImg:'../images/sort_desc.gif'}); // ]]> </script> <p> Doucments owned by this account</p> <div style="border: 1px solid #E1E1E1;width:590px"> <table id="#{menu.element}LG_header"> <thead> <tr> <th align="right" width="60px">ID</th> <th align="left" width="200px">Binding Context</th> <th align="left" width="200px">Author</th> <th align="left" width="100px">Status</th> </tr> </thead> </table> <table id="#{menu.element}LG" > <tbody> <tr><td align="right" width="60px">-</td><td align="left" width="200px">-</td><td align="left" width="100px">-</td><td align="left" width="200px">-</td></tr> <tr><td align="right" width="60px">-</td><td align="left" width="200px">-</td><td align="left" width="100px">-</td><td align="left" width="200px">-</td></tr> <tr><td align="right" width="60px">-</td><td align="left" width="200px">-</td><td align="left" width="100px">-</td><td align="left" width="200px">-</td></tr> <tr><td align="right" width="60px">-</td><td align="left" width="200px">-</td><td align="left" width="100px">-</td><td align="left" width="200px">-</td></tr> <tr><td align="right" width="60px">-</td><td align="left" width="200px">-</td><td align="left" width="100px">-</td><td align="left" width="200px">-</td></tr> <tr><td align="right" width="60px">-</td><td align="left" width="200px">-</td><td align="left" width="100px">-</td><td align="left" width="200px">-</td></tr> <tr><td align="right" width="60px">-</td><td align="left" width="200px">-</td><td align="left" width="100px">-</td><td align="left" width="200px">-</td></tr> <tr><td align="right" width="60px">-</td><td align="left" width="200px">-</td><td align="left" width="100px">-</td><td align="left" width="200px">-</td></tr> <tr><td align="right" width="60px">-</td><td align="left" width="200px">-</td><td align="left" width="100px">-</td><td align="left" width="200px">-</td></tr> <tr><td align="right" width="60px">-</td><td align="left" width="200px">-</td><td align="left" width="100px">-</td><td align="left" width="200px">-</td></tr> <tr><td align="right" width="60px">-</td><td align="left" width="200px">-</td><td align="left" width="100px">-</td><td align="left" width="200px">-</td></tr> </tbody> </table> </div> </ui:composition> </body> </html> |
From: John C. <jc...@us...> - 2006-09-18 15:41:46
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18502/src/org/tolven/app/bean Modified Files: MenuBean.java Log Message: Add ability to query XML documents and view in menu structure Index: MenuBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean/MenuBean.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** MenuBean.java 31 Aug 2006 06:48:24 -0000 1.29 --- MenuBean.java 18 Sep 2006 15:41:41 -0000 1.30 *************** *** 253,256 **** --- 253,257 ---- account, null, "tabs.xhtml", null, 1, "echr", null, "true", null, "tab" ); em.persist( root ); + // New Activity Tab MenuStructure activity = new MenuStructure( account, root, "activity.xhtml", null, 1, "activity", "New Activity", "true", null, "tab" ); *************** *** 263,266 **** --- 264,268 ---- em.persist( new MSColumn( activity, 6, "Due", "date02", "d MMM yyyy") ); + // Patients Tab MenuStructure patients = new MenuStructure( account, root, "bar1.xhtml", null, 2, "patients", "Patients", "true", null, "tab" ); *************** *** 294,334 **** em.persist( new MSColumn( dmpats, 6, "Sex", "string04", null) ); ! ! MenuStructure demo = new MenuStructure( ! account, root, "bar1.xhtml", null, 4, "demo", "Demo", "true", null, "tab" ); ! em.persist( demo ); ! ! MenuStructure gen = new MenuStructure( ! account, demo, "bar2.xhtml", null, 1, "gen", "Generate Data", "true", null, "tab" ); ! em.persist( gen ); ! ! MenuStructure perf = new MenuStructure( ! account, demo, "bar2.xhtml", null, 1, "perf", "Performance", "true", null, "tab" ); ! em.persist(perf); ! ! MenuStructure busy = new MenuStructure( ! account, perf, "test.xhtml", null, 1, "busy", "Busy", "true", null, "tab" ); ! em.persist( busy ); ! ! MenuStructure elapsed = new MenuStructure( ! account, perf, "test/perfLog.xhtml", null, 2, "elapsed", "Elapsed Times", "true", null, "tab" ); ! em.persist( elapsed ); ! ! MenuStructure familyHx = new MenuStructure( ! account, gen, "test/testFamily.xhtml", null, 1, "fam", "Families", "true", null, "tab" ); ! em.persist( familyHx ); ! ! MenuStructure familyDetail = new MenuStructure( ! account, familyHx, "test/familyDetail.xhtml", null, 3, "detail", "Family detail", "true", null, "detail" ); ! em.persist( familyDetail ); ! ! MenuStructure people = new MenuStructure( ! account, gen, "test/genPerson.xhtml", null, 2, "people", "People", "true", null, "tab" ); ! em.persist( people ); ! ! MenuStructure patgen = new MenuStructure( ! account, gen, "test/patientGen.xhtml", null, 1, "patgen", "Patients", "true", null, "tab" ); ! em.persist( patgen ); ! MenuStructure patient = new MenuStructure( account, root, "patient.xhtml", "chartLink.xhtml", 3, "patient", "Patient", "false", "patient", "placeholder" ); --- 296,300 ---- em.persist( new MSColumn( dmpats, 6, "Sex", "string04", null) ); ! // Individual patient tab(s) MenuStructure patient = new MenuStructure( account, root, "patient.xhtml", "chartLink.xhtml", 3, "patient", "Patient", "false", "patient", "placeholder" ); *************** *** 339,362 **** em.persist( overview ); ! MenuStructure patActivity = new MenuStructure( ! account, overview, "patActivity.xhtml", null, 1, "patact", "New Activity", "true", null, "tab" ); ! em.persist( patActivity ); ! ! MenuStructure summary = new MenuStructure( ! account, overview, "summary.xhtml", null, 2, "summary", "Summary", "true", null, "tab" ); ! em.persist( summary ); ! ! MenuStructure todo = new MenuStructure( ! account, overview, "todo.xhtml", null, 3, "todo", "Things To Do", "true", null, "tab" ); ! em.persist( todo ); ! ! MenuStructure appointments = new MenuStructure( ! account, overview, "appointments.xhtml", null, 4, "appts", "Appointments", "true", null, "tab" ); ! em.persist( appointments ); ! ! MenuStructure pastappts = new MenuStructure( ! account, overview, "pastAppointments.xhtml", null, 5, "pastappts", "Past Appointments", "true", null, "tab" ); ! em.persist( pastappts ); ! MenuStructure problems = new MenuStructure( account, patient, "problems.xhtml", null, 2, "problems", "Problems", "true", null, "tab" ); --- 305,370 ---- em.persist( overview ); ! MenuStructure patActivity = new MenuStructure( ! account, overview, "patActivity.xhtml", null, 1, "patact", "New Activity", "true", null, "tab" ); ! em.persist( patActivity ); ! ! MenuStructure summary = new MenuStructure( ! account, overview, "summary.xhtml", null, 2, "summary", "Summary", "true", null, "tab" ); ! em.persist( summary ); ! ! // PORTLETS ! MenuStructure probSummary = new MenuStructure( ! account, summary, "problemSummary.xhtml", null, 1, "probsum", "Problems", "true", null, "portlet" ); ! em.persist( probSummary ); ! ! MenuStructure medSummary = new MenuStructure( ! account, summary, "medsummary.xhtml", null, 2, "medsum", "Active Medications", "true", null, "portlet" ); ! em.persist( medSummary ); ! ! MenuStructure funStatSummary = new MenuStructure( ! account, summary, "funStatSummary.xhtml", null, 3, "funStatsum", "Functional Status", "true", null, "portlet" ); ! em.persist( funStatSummary ); ! ! MenuStructure labSummary = new MenuStructure( ! account, summary, "labSummary.xhtml", null, 4, "labsum", "Lab Results", "true", null, "portlet" ); ! em.persist( labSummary ); ! em.persist( new MSColumn( labSummary, 1, "Date", "date01", "yyyy") ); ! em.persist( new MSColumn( labSummary, 2, "Test", "string01", null) ); ! em.persist( new MSColumn( labSummary, 3, "Result", "string02", null) ); ! ! MenuStructure radSummary = new MenuStructure( ! account, summary, "radSummary.xhtml", null, 5, "radsum", "Radiology Results", "true", null, "portlet" ); ! em.persist( radSummary ); ! em.persist( new MSColumn( radSummary, 1, "Date", "date01", "yyyy") ); ! em.persist( new MSColumn( radSummary, 2, "Test", "string01", null) ); ! ! MenuStructure selfSummary = new MenuStructure( ! account, summary, "selfSummary.xhtml", null, 6, "selfsum", "Self-Monitoring", "true", null, "portlet" ); ! em.persist( selfSummary ); ! ! MenuStructure medhxfSummary = new MenuStructure( ! account, summary, "medhxfSummary.xhtml", null, 7, "mhxsum", "Medical History", "true", null, "portlet" ); ! em.persist( medhxfSummary ); ! ! MenuStructure famhxSummary = new MenuStructure( ! account, summary, "famhxSummary.xhtml", null, 8, "fhxsum", "Family History", "true", null, "portlet" ); ! em.persist( famhxSummary ); ! ! MenuStructure immSummary = new MenuStructure( ! account, summary, "immSummary.xhtml", null, 9, "immsum", "Immunizations", "true", null, "portlet" ); ! em.persist( immSummary ); ! ! MenuStructure todo = new MenuStructure( ! account, overview, "todo.xhtml", null, 3, "todo", "Things To Do", "true", null, "tab" ); ! em.persist( todo ); ! ! MenuStructure appointments = new MenuStructure( ! account, overview, "appointments.xhtml", null, 4, "appts", "Appointments", "true", null, "tab" ); ! em.persist( appointments ); ! ! MenuStructure pastappts = new MenuStructure( ! account, overview, "pastAppointments.xhtml", null, 5, "pastappts", "Past Appointments", "true", null, "tab" ); ! em.persist( pastappts ); ! MenuStructure problems = new MenuStructure( account, patient, "problems.xhtml", null, 2, "problems", "Problems", "true", null, "tab" ); *************** *** 370,405 **** em.persist( patResults ); ! MenuStructure labAll = new MenuStructure( ! account, patResults, "lab.xhtml", null, 10, "lab", "Lab", "true", null, "tab" ); ! em.persist( labAll ); ! em.persist( new MSColumn( labAll, 1, "Date", "date01", "MMM-dd-yyyy hh:mm") ); ! em.persist( new MSColumn( labAll, 2, "Test", "string01", null) ); ! em.persist( new MSColumn( labAll, 3, "Result", "string02", null) ); ! em.persist( new MSColumn( labAll, 4, "Value", "pqValue01", null) ); ! em.persist( new MSColumn( labAll, 5, "Units", "pqUnits01", null) ); ! em.persist( new MSColumn( labAll, 6, "Interpretation", "string04", null) ); ! em.persist( new MSColumn( labAll, 7, "Source", "parent02", null) ); ! ! MenuStructure lipids = new MenuStructure( ! account, patResults, "graphLipids.xhtml", null, 15, "lipids", "Lipids", "true", null, "tab" ); ! em.persist( lipids ); ! ! MenuStructure rad = new MenuStructure( ! account, patResults, "rad.xhtml", null, 20, "rad", "Radiology", "true", null, "tab" ); ! em.persist( rad ); ! em.persist( new MSColumn( rad, 1, "Date", "date01", "MMM-dd-yyyy hh:mm") ); ! em.persist( new MSColumn( rad, 2, "Test", "string01", null) ); ! em.persist( new MSColumn( rad, 3, "Report", "string02", null) ); ! em.persist( new MSColumn( rad, 4, "Interpretation", "string03", null) ); ! em.persist( new MSColumn( rad, 5, "Source", "parent02", null) ); ! ! MenuStructure other = new MenuStructure( ! account, patResults, "other.xhtml", null, 30, "other", "Other", "true", null, "tab" ); ! em.persist( other ); ! ! MenuStructure selfMed = new MenuStructure( ! account, patResults, "selfMed.xhtml", null, 40, "selfMed", "Self Medicating", "true", null, "tab" ); ! em.persist( selfMed ); ! MenuStructure medications = new MenuStructure( account, patient, "medications.xhtml", null, 4, "meds", "Medications", "true", null, "tab" ); --- 378,413 ---- em.persist( patResults ); ! MenuStructure labAll = new MenuStructure( ! account, patResults, "lab.xhtml", null, 10, "lab", "Lab", "true", null, "tab" ); ! em.persist( labAll ); ! em.persist( new MSColumn( labAll, 1, "Date", "date01", "MMM-dd-yyyy hh:mm") ); ! em.persist( new MSColumn( labAll, 2, "Test", "string01", null) ); ! em.persist( new MSColumn( labAll, 3, "Result", "string02", null) ); ! em.persist( new MSColumn( labAll, 4, "Value", "pqValue01", null) ); ! em.persist( new MSColumn( labAll, 5, "Units", "pqUnits01", null) ); ! em.persist( new MSColumn( labAll, 6, "Interpretation", "string04", null) ); ! em.persist( new MSColumn( labAll, 7, "Source", "parent02", null) ); ! ! MenuStructure lipids = new MenuStructure( ! account, patResults, "graphLipids.xhtml", null, 15, "lipids", "Lipids", "true", null, "tab" ); ! em.persist( lipids ); ! ! MenuStructure rad = new MenuStructure( ! account, patResults, "rad.xhtml", null, 20, "rad", "Radiology", "true", null, "tab" ); ! em.persist( rad ); ! em.persist( new MSColumn( rad, 1, "Date", "date01", "MMM-dd-yyyy hh:mm") ); ! em.persist( new MSColumn( rad, 2, "Test", "string01", null) ); ! em.persist( new MSColumn( rad, 3, "Report", "string02", null) ); ! em.persist( new MSColumn( rad, 4, "Interpretation", "string03", null) ); ! em.persist( new MSColumn( rad, 5, "Source", "parent02", null) ); ! ! MenuStructure other = new MenuStructure( ! account, patResults, "other.xhtml", null, 30, "other", "Other", "true", null, "tab" ); ! em.persist( other ); ! ! MenuStructure selfMed = new MenuStructure( ! account, patResults, "selfMed.xhtml", null, 40, "selfMed", "Self Medicating", "true", null, "tab" ); ! em.persist( selfMed ); ! MenuStructure medications = new MenuStructure( account, patient, "medications.xhtml", null, 4, "meds", "Medications", "true", null, "tab" ); *************** *** 431,475 **** ! // PORTLETS ! MenuStructure probSummary = new MenuStructure( ! account, summary, "problemSummary.xhtml", null, 1, "probsum", "Problems", "true", null, "portlet" ); ! em.persist( probSummary ); ! ! MenuStructure medSummary = new MenuStructure( ! account, summary, "medsummary.xhtml", null, 2, "medsum", "Active Medications", "true", null, "portlet" ); ! em.persist( medSummary ); ! ! MenuStructure funStatSummary = new MenuStructure( ! account, summary, "funStatSummary.xhtml", null, 3, "funStatsum", "Functional Status", "true", null, "portlet" ); ! em.persist( funStatSummary ); ! ! MenuStructure labSummary = new MenuStructure( ! account, summary, "labSummary.xhtml", null, 4, "labsum", "Lab Results", "true", null, "portlet" ); ! em.persist( labSummary ); ! em.persist( new MSColumn( labSummary, 1, "Date", "date01", "yyyy") ); ! em.persist( new MSColumn( labSummary, 2, "Test", "string01", null) ); ! em.persist( new MSColumn( labSummary, 3, "Result", "string02", null) ); ! MenuStructure radSummary = new MenuStructure( ! account, summary, "radSummary.xhtml", null, 5, "radsum", "Radiology Results", "true", null, "portlet" ); ! em.persist( radSummary ); ! em.persist( new MSColumn( radSummary, 1, "Date", "date01", "yyyy") ); ! em.persist( new MSColumn( radSummary, 2, "Test", "string01", null) ); ! MenuStructure selfSummary = new MenuStructure( ! account, summary, "selfSummary.xhtml", null, 6, "selfsum", "Self-Monitoring", "true", null, "portlet" ); ! em.persist( selfSummary ); ! MenuStructure medhxfSummary = new MenuStructure( ! account, summary, "medhxfSummary.xhtml", null, 7, "mhxsum", "Medical History", "true", null, "portlet" ); ! em.persist( medhxfSummary ); ! MenuStructure famhxSummary = new MenuStructure( ! account, summary, "famhxSummary.xhtml", null, 8, "fhxsum", "Family History", "true", null, "portlet" ); ! em.persist( famhxSummary ); ! MenuStructure immSummary = new MenuStructure( ! account, summary, "immSummary.xhtml", null, 9, "immsum", "Immunizations", "true", null, "portlet" ); ! em.persist( immSummary ); --- 439,489 ---- ! // Demo Tab ! MenuStructure demo = new MenuStructure( ! account, root, "bar1.xhtml", null, 4, "demo", "Demo", "true", null, "tab" ); ! em.persist( demo ); ! MenuStructure gen = new MenuStructure( ! account, demo, "bar2.xhtml", null, 1, "gen", "Generate Data", "true", null, "tab" ); ! em.persist( gen ); ! MenuStructure familyHx = new MenuStructure( ! account, gen, "test/testFamily.xhtml", null, 1, "fam", "Families", "true", null, "tab" ); ! em.persist( familyHx ); ! ! MenuStructure familyDetail = new MenuStructure( ! account, familyHx, "test/familyDetail.xhtml", null, 3, "detail", "Family detail", "true", null, "detail" ); ! em.persist( familyDetail ); ! ! MenuStructure people = new MenuStructure( ! account, gen, "test/genPerson.xhtml", null, 2, "people", "People", "true", null, "tab" ); ! em.persist( people ); ! ! MenuStructure patgen = new MenuStructure( ! account, gen, "test/patientGen.xhtml", null, 1, "patgen", "Patients", "true", null, "tab" ); ! em.persist( patgen ); ! MenuStructure perf = new MenuStructure( ! account, demo, "bar2.xhtml", null, 2, "perf", "Performance", "true", null, "tab" ); ! em.persist(perf); ! MenuStructure busy = new MenuStructure( ! account, perf, "test.xhtml", null, 1, "busy", "Busy", "true", null, "tab" ); ! em.persist( busy ); ! ! MenuStructure elapsed = new MenuStructure( ! account, perf, "test/perfLog.xhtml", null, 2, "elapsed", "Elapsed Times", "true", null, "tab" ); ! em.persist( elapsed ); ! ! MenuStructure debug = new MenuStructure( ! account, demo, "bar2.xhtml", null, 3, "debug", "Debug", "true", null, "tab" ); ! em.persist(debug); ! MenuStructure docs = new MenuStructure( ! account, debug, "test/docList.xhtml", null, 1, "docs", "Documents", "true", null, "tab" ); ! em.persist( docs ); ! MenuStructure docDetail = new MenuStructure( ! account, docs, "test/docDetail.xhtml", null, 3, "detail", "document Detail", "true", null, "detail" ); ! em.persist( docDetail ); |
From: John C. <jc...@us...> - 2006-09-18 15:41:46
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/doc/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18502/src/org/tolven/doc/bean Modified Files: DocumentBean.java Log Message: Add ability to query XML documents and view in menu structure Index: DocumentBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/doc/bean/DocumentBean.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DocumentBean.java 31 Aug 2006 05:18:28 -0000 1.6 --- DocumentBean.java 18 Sep 2006 15:41:42 -0000 1.7 *************** *** 43,46 **** --- 43,47 ---- import org.tolven.doc.entity.DocCCR; import org.tolven.doc.entity.DocImage; + import org.tolven.doc.entity.DocXML; /** *************** *** 88,98 **** * to create actual CCR object graph. * @param userId * @return * @throws IOException * @throws CCRException */ ! public DocCCR createCCRDocument( long userId ) throws IOException, CCRException { DocCCR doc = new DocCCR(); doc.setAuthor(em.getReference( TolvenUser.class, userId )); em.persist( doc ); String oid = propertyBean.getProperties().getProperty("tolven.repository.oid"); --- 89,101 ---- * to create actual CCR object graph. * @param userId + * @param accountId * @return * @throws IOException * @throws CCRException */ ! public DocCCR createCCRDocument( long userId, long accountId ) throws IOException, CCRException { DocCCR doc = new DocCCR(); doc.setAuthor(em.getReference( TolvenUser.class, userId )); + doc.setAccount(em.getReference( Account.class, accountId )); em.persist( doc ); String oid = propertyBean.getProperties().getProperty("tolven.repository.oid"); *************** *** 174,178 **** public List<DocImage> findImages(long accountId, int pageSize, int offset, String sortAttribute, String sortDir ) { Query query = em.createQuery( "SELECT d FROM DocImage d where account.id = :account ORDER BY d." + sortAttribute + " " + sortDir ); ! query.setMaxResults(pageSize); query.setFirstResult(offset); query.setParameter( "account", accountId); --- 177,181 ---- public List<DocImage> findImages(long accountId, int pageSize, int offset, String sortAttribute, String sortDir ) { Query query = em.createQuery( "SELECT d FROM DocImage d where account.id = :account ORDER BY d." + sortAttribute + " " + sortDir ); ! query.setMaxResults(pageSize); query.setFirstResult(offset); query.setParameter( "account", accountId); *************** *** 182,185 **** --- 185,201 ---- /** + * Return XML documents for the specified account + */ + public List<DocXML> findXMLDocuments(long accountId, int pageSize, int offset, String sortAttribute, String sortDir ) { + Query query = em.createQuery( "SELECT d FROM DocCCR d where account.id = :account ORDER BY d." + sortAttribute + " " + sortDir ); + query.setMaxResults(pageSize); + query.setFirstResult(offset); + query.setParameter( "account", accountId); + List<DocXML> items = query.getResultList(); + // System.out.println( "Query XML Docs for account " + accountId + " count is " + items.size()); + return items; + } + + /** * Persist a new image and return it's ID * @param doc |
From: John C. <jc...@us...> - 2006-09-18 15:40:06
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/ccr In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv17697/src/org/tolven/ccr Modified Files: PersonNameType.java Log Message: Change nickname from Object to String, add set methods for each property Index: PersonNameType.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/ccr/PersonNameType.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PersonNameType.java 20 Jun 2006 16:40:16 -0000 1.1 --- PersonNameType.java 18 Sep 2006 15:40:02 -0000 1.2 *************** *** 43,47 **** protected List<String> title; @XmlElement(name = "NickName", namespace = "urn:astm-org:CCR", required = true) ! protected List<Object> nickName; /** --- 43,47 ---- protected List<String> title; @XmlElement(name = "NickName", namespace = "urn:astm-org:CCR", required = true) ! protected List<String> nickName; /** *************** *** 212,221 **** * */ ! public List<Object> getNickName() { if (nickName == null) { ! nickName = new ArrayList<Object>(); } return this.nickName; } } --- 212,245 ---- * */ ! public List<String> getNickName() { if (nickName == null) { ! nickName = new ArrayList<String>(); } return this.nickName; } + public void setFamily(List<String> family) { + this.family = family; + } + + public void setGiven(List<String> given) { + this.given = given; + } + + public void setMiddle(List<String> middle) { + this.middle = middle; + } + + public void setNickName(List<String> nickName) { + this.nickName = nickName; + } + + public void setSuffix(List<String> suffix) { + this.suffix = suffix; + } + + public void setTitle(List<String> title) { + this.title = title; + } + } |
From: John C. <jc...@us...> - 2006-09-18 15:18:14
|
Update of /cvsroot/tolven/tolven In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv8561 Modified Files: readme.txt Log Message: Clarify language in readme Index: readme.txt =================================================================== RCS file: /cvsroot/tolven/tolven/readme.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** readme.txt 4 Sep 2006 00:16:53 -0000 1.7 --- readme.txt 18 Sep 2006 15:17:23 -0000 1.8 *************** *** 1,9 **** Tolven Inc readme.txt ! This is build tag B20060903-1705 (entered by hand) Licensing: Notices: ! $Name$ --- 1,13 ---- Tolven Inc readme.txt ! See http://www.tolven.org/setup/releaseNotes.html ! Licensing: + See tolven/lgpl.txt and tolven/lib/* for other licenses + Notices: ! See tolven/notice.txt ! $Name$ |
From: Joseph I. <jos...@us...> - 2006-09-18 07:38:39
|
Update of /cvsroot/tolven/tolven/security-config In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13059/security-config Modified Files: build.xml Log Message: *.pem files were being read from the wrong place due to a cut & paste error Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/security-config/build.xml,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** build.xml 18 Sep 2006 06:50:06 -0000 1.40 --- build.xml 18 Sep 2006 07:38:34 -0000 1.41 *************** *** 526,530 **** <target name="deploy-certs-to-localhost-ldap" description="Copy certificates to localhost LDAP for Tolven"> <copy toDir="${ldap.location}" overwrite="true" preservelastmodified="true" verbose="${message.show.copy}"> ! <fileset dir="${tolven.stage}/postgres-deploy-location/data"> <include name="tolvendev-ldap-cert.pem"/> <include name="tolvendev-ldap-key.pem"/> --- 526,530 ---- <target name="deploy-certs-to-localhost-ldap" description="Copy certificates to localhost LDAP for Tolven"> <copy toDir="${ldap.location}" overwrite="true" preservelastmodified="true" verbose="${message.show.copy}"> ! <fileset dir="${tolven.stage}/ldap-deploy-location"> <include name="tolvendev-ldap-cert.pem"/> <include name="tolvendev-ldap-key.pem"/> *************** *** 540,544 **** <input message="To copy certificates, please enter user password for remote LDAP host: ${ldap.host}" addproperty="tolven.ldap.host.password" /> <scp todir="${ldap.host.user}@${ldap.host}:${ldap.location}" password="${tolven.ldap.host.password}" trust="true" failonerror="true"> ! <fileset dir="${tolven.stage}/postgres-deploy-location/data"> <include name="tolvendev-ldap-cert.pem"/> <include name="tolvendev-ldap-key.pem"/> --- 540,544 ---- <input message="To copy certificates, please enter user password for remote LDAP host: ${ldap.host}" addproperty="tolven.ldap.host.password" /> <scp todir="${ldap.host.user}@${ldap.host}:${ldap.location}" password="${tolven.ldap.host.password}" trust="true" failonerror="true"> ! <fileset dir="${tolven.stage}/ldap-deploy-location"> <include name="tolvendev-ldap-cert.pem"/> <include name="tolvendev-ldap-key.pem"/> |
From: Joseph I. <jos...@us...> - 2006-09-18 06:50:10
|
Update of /cvsroot/tolven/tolven/security-config In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25703/security-config Modified Files: build.xml Log Message: Minor echo change for better debugging Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/security-config/build.xml,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** build.xml 17 Sep 2006 23:26:48 -0000 1.39 --- build.xml 18 Sep 2006 06:50:06 -0000 1.40 *************** *** 546,550 **** </fileset> </scp> ! <echo level="info" message="tolvendev-ldap-cert.pem, tolvendev-ldap-key.pem and tolvendev-ldap-cacerts.pem have been copied to ${ldap.host}:${ldap.location}" /> </target> --- 546,550 ---- </fileset> </scp> ! <echo level="info" message="tolvendev-ldap-cert.pem, tolvendev-ldap-key.pem and tolvendev-ldap-cacerts.pem have been copied to ${ldap.host.user}@${ldap.host}:${ldap.location}" /> </target> *************** *** 571,575 **** </fileset> </scp> ! <echo level="info" message="server.crt, server.key and root.crt have been copied to ${jdbc.host}:${postgres.location}/data" /> </target> --- 571,575 ---- </fileset> </scp> ! <echo level="info" message="server.crt, server.key and root.crt have been copied to ${postgres.host.user}@${jdbc.host}:${postgres.location}/data" /> </target> |
From: Joseph I. <jos...@us...> - 2006-09-17 23:26:51
|
Update of /cvsroot/tolven/tolven/security-config In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9125/security-config Modified Files: build.xml Log Message: Currently if the user has not yet set up a PG client but wants to install tolven first, then there is no ${user.home}/postgresql directory and the install fails. So, mkdir is added here, just in case. Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/security-config/build.xml,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** build.xml 15 Sep 2006 02:02:58 -0000 1.38 --- build.xml 17 Sep 2006 23:26:48 -0000 1.39 *************** *** 503,506 **** --- 503,507 ---- <os family="windows"/> </condition> + <mkdir dir="${postgres-client-cert-dir}" /> <copy toDir="${postgres-client-cert-dir}" overwrite="true" preservelastmodified="true" verbose="${message.show.copy}"> <fileset dir="${tolven.stage}/pg-client"> |
From: Joseph I. <jos...@us...> - 2006-09-15 02:03:04
|
Update of /cvsroot/tolven/tolven/security-config In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13172/security-config Modified Files: build.xml Log Message: Separate the creation of the stage from requiring the whole JBossServer Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/security-config/build.xml,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** build.xml 5 Sep 2006 04:06:40 -0000 1.37 --- build.xml 15 Sep 2006 02:02:58 -0000 1.38 *************** *** 253,257 **** <input message="LDAP: Please enter the LDAP password to be hashed" addproperty="tolven.ldap.password" /> <input message="LDAP: Please enter a keystore password to protect the LDAP password" addproperty="tolven.ldap.keystore.password" /> ! <java classname="org.jboss.security.plugins.FilePassword" classpath="${deploy.location}/lib/jbosssx.jar" failonerror="true"> <arg value="${tolven.security.ldap.salt}" /> <arg value="${tolven.security.ldap.iterations}" /> --- 253,257 ---- <input message="LDAP: Please enter the LDAP password to be hashed" addproperty="tolven.ldap.password" /> <input message="LDAP: Please enter a keystore password to protect the LDAP password" addproperty="tolven.ldap.keystore.password" /> ! <java classname="org.jboss.security.plugins.FilePassword" classpath="${tolven.location}/lib/jboss/jbosssx.jar" failonerror="true"> <arg value="${tolven.security.ldap.salt}" /> <arg value="${tolven.security.ldap.iterations}" /> *************** *** 263,267 **** <input message="Please enter the ldap password to be hashed" addproperty="tolven.ldap.password" /> <input message="Please enter a keystore password to protect the ldap password" addproperty="tolven.ldap.keystore.password" /> ! <java classname="org.jboss.security.plugins.PBEUtils" classpath="${deploy.location}/lib/jbosssx.jar" output="${tolven.security.openssl.ldap.dir}/hashed-ldapserver.password" failonerror="true"> <arg value="${tolven.security.ldap.salt}" /> <arg value="${tolven.security.ldap.iterations}" /> --- 263,267 ---- <input message="Please enter the ldap password to be hashed" addproperty="tolven.ldap.password" /> <input message="Please enter a keystore password to protect the ldap password" addproperty="tolven.ldap.keystore.password" /> ! <java classname="org.jboss.security.plugins.PBEUtils" classpath="${tolven.location}/lib/jboss/jbosssx.jar" output="${tolven.security.openssl.ldap.dir}/hashed-ldapserver.password" failonerror="true"> <arg value="${tolven.security.ldap.salt}" /> <arg value="${tolven.security.ldap.iterations}" /> *************** *** 281,285 **** <input message="Postgres: Please enter the postgres password to be hashed" addproperty="tolven.database.password" /> <input message="Postgres: Please enter a keystore password to protect the postgres password" addproperty="tolven.database.keystore.password" /> ! <java classname="org.jboss.security.plugins.FilePassword" classpath="${deploy.location}/lib/jbosssx.jar" failonerror="true"> <arg value="${tolven.security.db.salt}" /> <arg value="${tolven.security.db.iterations}" /> --- 281,285 ---- <input message="Postgres: Please enter the postgres password to be hashed" addproperty="tolven.database.password" /> <input message="Postgres: Please enter a keystore password to protect the postgres password" addproperty="tolven.database.keystore.password" /> ! <java classname="org.jboss.security.plugins.FilePassword" classpath="${tolven.location}/lib/jboss/jbosssx.jar" failonerror="true"> <arg value="${tolven.security.db.salt}" /> <arg value="${tolven.security.db.iterations}" /> *************** *** 291,295 **** <input message="Please enter the database password to be hashed" addproperty="tolven.database.password" /> <input message="Please enter a keystore password to protect the database password" addproperty="tolven.database.keystore.password" /> ! <java classname="org.jboss.security.plugins.PBEUtils" classpath="${deploy.location}/lib/jbosssx.jar" output="${tolven.security.openssl.db.dir}/hashed-pgserver.password" failonerror="true"> <arg value="${tolven.security.db.salt}" /> <arg value="${tolven.security.db.iterations}" /> --- 291,295 ---- <input message="Please enter the database password to be hashed" addproperty="tolven.database.password" /> <input message="Please enter a keystore password to protect the database password" addproperty="tolven.database.keystore.password" /> ! <java classname="org.jboss.security.plugins.PBEUtils" classpath="${tolven.location}/lib/jboss/jbosssx.jar" output="${tolven.security.openssl.db.dir}/hashed-pgserver.password" failonerror="true"> <arg value="${tolven.security.db.salt}" /> <arg value="${tolven.security.db.iterations}" /> |
From: Joseph I. <jos...@us...> - 2006-09-15 02:03:04
|
Update of /cvsroot/tolven/tolven/lib/jboss In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13172/lib/jboss Added Files: jbosssx.jar Log Message: Separate the creation of the stage from requiring the whole JBossServer --- NEW FILE: jbosssx.jar --- (This appears to be a binary file; contents omitted.) |
From: John C. <jc...@us...> - 2006-09-09 21:56:00
|
Update of /cvsroot/tolven/simpleEJB In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7131 Added Files: .classpath build.xml .project .cvsignore People.wsdl simple-ds.xml Log Message: Tutorial of EJB3 server --- NEW FILE: People.wsdl --- <?xml version="1.0" encoding="UTF-8"?> <definitions name="PeopleBeanService" targetNamespace="http://bean.simple.tolven.org/jaws" xmlns:tns="http://bean.simple.tolven.org/jaws" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <schema elementFormDefault="qualified" targetNamespace="http://bean.simple.tolven.org/jaws" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://bean.simple.tolven.org/jaws" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <complexType name="countPeople"> <sequence/> </complexType> <complexType name="countPeopleResponse"> <sequence> <element name="result" type="long"/> </sequence> </complexType> <element name="countPeople" type="tns:countPeople"/> <element name="countPeopleResponse" type="tns:countPeopleResponse"/> </schema> </types> <message name="PeopleBean_countPeopleResponse"> <part name="result" element="tns:countPeopleResponse"/> </message> <message name="PeopleBean_countPeople"> <part name="parameters" element="tns:countPeople"/> </message> <portType name="PeopleBean"> <operation name="countPeople"> <input message="tns:PeopleBean_countPeople"/> <output message="tns:PeopleBean_countPeopleResponse"/> </operation> </portType> <binding name="PeopleBeanBinding" type="tns:PeopleBean"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="countPeople"> <soap:operation soapAction=""/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <service name="PeopleBeanService"> <port name="PeopleBeanPort" binding="tns:PeopleBeanBinding"> <soap:address location="http://Upstairs:8080/simpleEJB/PeopleBean"/> </port> </service> </definitions> --- NEW FILE: .cvsignore --- build --- NEW FILE: build.xml --- <?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="packaging" name="simple"> <property name="deploy.location" value="C:/jboss-4.0.4.GA/server/default"/> <path id="project.classpath"> <fileset dir="e:/jboss-4.0.4.GA"> <include name="client/*.jar"/> </fileset> <pathelement location="${junit.location}/junit.jar"/> </path> <target name="compile" depends="init" description="Compile source modules"> <javac destdir="build/bin" listfiles="yes" debug="true" > <src path="src"/> <classpath refid="project.classpath"/> </javac> </target> <target name="deploy" depends="packaging"> <copy toDir="${deploy.location}/deploy" verbose="${message.show.copy}"> <fileset file="SimpleDS.xml"/> <fileset file="build/simple.ear"/> </copy> </target> <target name="init"> <mkdir dir="build/bin"/> </target> <target name="clean"> <delete dir="build"/> </target> <target name="packaging" depends="compile" description="simpleEJB.jar"> <jar destfile="build/simpleEJB.jar"> <zipfileset dir="build/bin" includes="**/*.class"/> <zipfileset dir="conf" prefix="META-INF"/> </jar> <jar destfile="build/simple.ear"> <zipfileset dir="build"> <include name="*.jar"/> </zipfileset> <zipfileset dir="conf" prefix="META-INF"/> </jar> </target> </project> --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>simpleEJB</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> --- NEW FILE: .classpath --- <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-client"/> <classpathentry kind="output" path="bin"/> </classpath> --- NEW FILE: simple-ds.xml --- <?xml version="1.0" encoding="UTF-8"?> <!-- ==================================================================== --> <!-- Datasource config for Postgres --> <!-- ==================================================================== --> <datasources> <local-tx-datasource> <jndi-name>SimpleDS</jndi-name> <connection-url>jdbc:postgresql://localhost/postgres</connection-url> <driver-class>org.postgresql.Driver</driver-class> <user-name>postgres</user-name> <password>postgres</password> </local-tx-datasource> </datasources> |
From: John C. <jc...@us...> - 2006-09-09 21:55:58
|
Update of /cvsroot/tolven/simpleEJB/conf In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7131/conf Added Files: application.xml persistence.xml Log Message: Tutorial of EJB3 server --- NEW FILE: application.xml --- <?xml version="1.0" encoding="UTF-8"?> <application version="5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"> <display-name>Simple Application</display-name> <module> <ejb>simpleEJB.jar</ejb> </module> </application> --- NEW FILE: persistence.xml --- <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"> <persistence-unit name="em" transaction-type="JTA"> <jta-data-source>java:/SimpleDS</jta-data-source> <properties> <property name="toplink.ddl-generation" value="create-tables"/> <property name="toplink.logging.levelxxxx" value="FINEST"/> <property name="toplink.create-ddl-jdbc-file-name" value="tolven-create-ddl.sql"/> <property name="toplink.drop-ddl-jdbc-file-name" value="tolven-drop-ddl.sql"/> <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.hbm2ddl.auto" value="update"/> </properties> </persistence-unit> </persistence> |
From: John C. <jc...@us...> - 2006-09-09 21:55:57
|
Update of /cvsroot/tolven/simpleEJB/src/org/tolven/simple/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7131/src/org/tolven/simple/bean Added Files: PeopleBean.java Log Message: Tutorial of EJB3 server --- NEW FILE: PeopleBean.java --- package org.tolven.simple.bean; import java.util.List; import javax.ejb.Local; import javax.ejb.Remote; import javax.ejb.Stateless; import javax.jws.WebMethod; import javax.jws.WebService; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import org.tolven.simple.PeopleLocal; import org.tolven.simple.PeopleRemote; import org.tolven.simple.entity.Household; import org.tolven.simple.entity.Person; /** * A stateless session bean that provides persistence services related to people. * Notice that this is a POJO, no special base class. Easy to unit test. * There should be no mention of transactions here: * Either the container creates a transaction or the client can create a * UserTransaction to encapsulate multiple calls. * @author John Churin */ @Local(PeopleLocal.class) @Remote(PeopleRemote.class) @WebService public @Stateless class PeopleBean implements PeopleLocal, PeopleRemote { /** * Wiring is automatic in EJB3: The container sets this value for us. */ @PersistenceContext private EntityManager em; /** * Persist the supplied Person object for the first time */ public void addPerson(Person person) { em.persist(person); } /** * Ensure that the supplied Person object that came * from persistence is updated if needed. */ public void updatePerson(Person person) { em.merge(person); } /** * Create the household. As a side effect, this will also * update persons which now have a reference to this household. * Notice that Merge us used for this purpose. */ public void addHousehold(Household household) { em.merge(household); } /** * Query the database for all people and return them in a list. */ public List<Person> findPeople() { Query query = em.createQuery( "SELECT p FROM Person p"); return query.getResultList(); } /** * Query the database for people not associated with a household * and return them in a list. */ public List<Person> findHomelessPeople() { Query query = em.createQuery( "SELECT p FROM Person p WHERE p.household IS NULL"); return query.getResultList(); } /** * Return a count of all people. This method is annotated so that it * will be published in the WSDL for this service. */ @WebMethod public long countPeople() { Query query = em.createQuery( "select count(p) from Person p"); return (Long) query.getSingleResult(); } } |
From: John C. <jc...@us...> - 2006-09-09 21:55:57
|
Update of /cvsroot/tolven/simpleEJB/src/org/tolven/simple/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7131/src/org/tolven/simple/entity Added Files: Person.java Address.java Household.java Log Message: Tutorial of EJB3 server --- NEW FILE: Person.java --- package org.tolven.simple.entity; import java.io.Serializable; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Lob; import javax.persistence.ManyToOne; import javax.persistence.PrePersist; import javax.persistence.Table; /** * A simple Person entity. * Notice that this is a POJO, no special base class. * The persistence specification is in annotations. * Although allowed, there is no XML required. * @author John Churin */ @Entity @Table(name = "PERSON", schema="simple") public class Person implements Serializable { // Version number for Person private static final long serialVersionUID = 1L; @Id @GeneratedValue private long id; @Column( name="PERSON_NAME") private String name; @Column( name="SORT_NAME") private String sortName; /** * A Person can be part of a Household. */ @ManyToOne private Household household; @Lob @Basic(fetch=FetchType.LAZY) @Column(name="photo") private byte[] photo; /** * Called automatically to populate a copy of name in upper case. */ @PrePersist public void populateSortName() { if (getName()!=null) { sortName = getName().toUpperCase(); } else { sortName = null; } } public String getSortName() { return sortName; } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Household getHousehold() { return household; } public void setHousehold(Household household) { this.household = household; } public byte[] getPhoto() { return photo; } public void setPhoto(byte[] photo) { this.photo = photo; } } --- NEW FILE: Household.java --- package org.tolven.simple.entity; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; /** * A Household is a "parent" object containing an optional collection * of people. * @author John Churin */ @Entity @Table(name = "HOUSEHOLD", schema="simple") public class Household implements Serializable { // Version number for Household private static final long serialVersionUID = 1L; @Id @GeneratedValue private long id; @OneToMany(mappedBy = "household", cascade=CascadeType.ALL) private Set<Person> people = null; @Embedded private Address address; public long getId() { return id; } public void setId(long id) { this.id = id; } public Address getAddress() { return address; } public void setAddress(Address address) { this.address = address; } public Set<Person> getPeople() { if (people==null) { people = new HashSet<Person>(10); } return people; } public void addPerson(Person person) { getPeople().add(person); person.setHousehold(this); } public void setPeople(Set<Person> people) { this.people = people; } } --- NEW FILE: Address.java --- package org.tolven.simple.entity; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Embeddable; @Embeddable public class Address implements Serializable { // Version number for Address private static final long serialVersionUID = 1L; @Column( name="LINE1") private String line1; @Column( name="LINE2") private String line2; @Column( name="CITY") private String city; @Column( name="STATE") private String state; @Column( name="POSTAL_CODE") private String postalCode; @Column( name="COUNTRY") private String country; public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getLine1() { return line1; } public void setLine1(String line1) { this.line1 = line1; } public String getLine2() { return line2; } public void setLine2(String line2) { this.line2 = line2; } public String getPostalCode() { return postalCode; } public void setPostalCode(String postalCode) { this.postalCode = postalCode; } public String getState() { return state; } public void setState(String state) { this.state = state; } } |
From: John C. <jc...@us...> - 2006-09-09 21:55:57
|
Update of /cvsroot/tolven/simpleEJB/src/org/tolven/simple In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7131/src/org/tolven/simple Added Files: PeopleLocal.java PeopleRemote.java Log Message: Tutorial of EJB3 server --- NEW FILE: PeopleLocal.java --- package org.tolven.simple; import java.util.List; import org.tolven.simple.entity.Household; import org.tolven.simple.entity.Person; public interface PeopleLocal { public void addPerson(Person person); public List<Person>findPeople(); public List<Person> findHomelessPeople(); public void addHousehold(Household household); public long countPeople(); } --- NEW FILE: PeopleRemote.java --- package org.tolven.simple; import java.util.List; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import org.tolven.simple.entity.Household; import org.tolven.simple.entity.Person; @WebService @SOAPBinding(style=SOAPBinding.Style.RPC) public interface PeopleRemote { public void addPerson(Person person); public void addHousehold(Household household); public List<Person>findPeople(); public List<Person> findHomelessPeople(); public void updatePerson(Person person); public long countPeople(); } |
From: John C. <jc...@us...> - 2006-09-09 21:55:56
|
Update of /cvsroot/tolven/simpleEJB/src/org/tolven/simple/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7077/src/org/tolven/simple/bean Log Message: Directory /cvsroot/tolven/simpleEJB/src/org/tolven/simple/bean added to the repository |
From: John C. <jc...@us...> - 2006-09-09 21:55:55
|
Update of /cvsroot/tolven/simpleEJB/src In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7077/src Log Message: Directory /cvsroot/tolven/simpleEJB/src added to the repository |
From: John C. <jc...@us...> - 2006-09-09 21:55:55
|
Update of /cvsroot/tolven/simpleEJB/src/org/tolven In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7077/src/org/tolven Log Message: Directory /cvsroot/tolven/simpleEJB/src/org/tolven added to the repository |
From: John C. <jc...@us...> - 2006-09-09 21:55:55
|
Update of /cvsroot/tolven/simpleEJB/src/org In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7077/src/org Log Message: Directory /cvsroot/tolven/simpleEJB/src/org added to the repository |
From: John C. <jc...@us...> - 2006-09-09 21:55:53
|
Update of /cvsroot/tolven/simpleEJB/bin In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7077/bin Log Message: Directory /cvsroot/tolven/simpleEJB/bin added to the repository |
From: John C. <jc...@us...> - 2006-09-09 21:55:53
|
Update of /cvsroot/tolven/simpleEJB/conf In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7077/conf Log Message: Directory /cvsroot/tolven/simpleEJB/conf added to the repository |
From: John C. <jc...@us...> - 2006-09-09 21:55:52
|
Update of /cvsroot/tolven/simpleEJB/src/org/tolven/simple In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7077/src/org/tolven/simple Log Message: Directory /cvsroot/tolven/simpleEJB/src/org/tolven/simple added to the repository |
From: John C. <jc...@us...> - 2006-09-09 21:55:52
|
Update of /cvsroot/tolven/simpleEJB/src/org/tolven/simple/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7077/src/org/tolven/simple/entity Log Message: Directory /cvsroot/tolven/simpleEJB/src/org/tolven/simple/entity added to the repository |
From: John C. <jc...@us...> - 2006-09-09 21:51:28
|
Update of /cvsroot/tolven/simpleEJB In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv5424/simpleEJB Log Message: Directory /cvsroot/tolven/simpleEJB added to the repository |
From: John C. <jc...@us...> - 2006-09-09 21:50:56
|
Update of /cvsroot/tolven/simpleEJBClient/org/tolven/simple/client In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv4988/org/tolven/simple/client Added Files: Client1.java Client4.java Client3.java Client2.java Log Message: Sample project, accesses simpleEJB (server) --- NEW FILE: Client1.java --- package org.tolven.simple.client; import javax.naming.InitialContext; import javax.naming.NamingException; import org.tolven.simple.PeopleRemote; import org.tolven.simple.entity.Person; public class Client1 { public static void main(String[] args) throws NamingException { InitialContext ctx = new InitialContext(); // Bind to the remote session bean interface in the running server via JNDI/RMI PeopleRemote people = (PeopleRemote) ctx.lookup("simple/PeopleBean/remote"); // Create some POJO entity beans and persist them (one at a time) for (int x = 0; x < 50; x++) { Person person = new Person(); person.setName( "Bill " + x ); people.addPerson(person); } } } --- NEW FILE: Client4.java --- package org.tolven.simple.client; import java.util.List; import javax.naming.InitialContext; import javax.naming.NamingException; import org.tolven.simple.PeopleRemote; import org.tolven.simple.entity.Person; /** * Get a list of people and display their name and address (from household) * @author John Churin * */ public class Client4 { public static void main(String[] args) throws NamingException { InitialContext ctx = new InitialContext(); // Bind to the remote session bean interface in the running server via JNDI/RMI PeopleRemote people = (PeopleRemote) ctx.lookup("simple/PeopleBean/remote"); // Ask the server to do the query and return results List<Person> list = people.findPeople(); for (Person p : list ) { if (p.getHousehold()==null || p.getHousehold().getAddress()==null) { System.out.format("Homeless Person %d=%s\n", p.getId(), p.getName()); } else { System.out.format("Person %d=%s @ %s, %s\n", p.getId(), p.getName(), p.getHousehold().getAddress().getCity(), p.getHousehold().getAddress().getState()); } } } } --- NEW FILE: Client2.java --- package org.tolven.simple.client; import java.util.List; import javax.naming.InitialContext; import javax.naming.NamingException; import org.tolven.simple.PeopleRemote; import org.tolven.simple.entity.Address; import org.tolven.simple.entity.Household; import org.tolven.simple.entity.Person; /** * Find persons not belonging to a household and associate them to a new houshold. * Don't let households get larger than three people. * @author John Churin */ public class Client2 { public static void main(String[] args) throws NamingException { InitialContext ctx = new InitialContext(); // Bind to the remote session bean interface in the running server via JNDI/RMI PeopleRemote people = (PeopleRemote) ctx.lookup("simple/PeopleBean/remote"); List<Person> list = people.findHomelessPeople(); Household household = null; for (Person p : list ) { if (household==null) { household = new Household(); Address address = new Address(); address.setCity("Boca Raton"); address.setState("FL"); address.setCountry("USA"); household.setAddress(address); } household.addPerson(p); if (household.getPeople().size() > 2 ) { people.addHousehold(household); household = null; } } if (household!=null) people.addHousehold(household); } } --- NEW FILE: Client3.java --- package org.tolven.simple.client; import java.util.List; import javax.naming.InitialContext; import javax.naming.NamingException; import org.tolven.simple.PeopleRemote; import org.tolven.simple.entity.Person; /** * Query server for the list of people, returning POJOs and update every third name. * @author John Churin */ public class Client3 { public static void main(String[] args) throws NamingException { InitialContext ctx = new InitialContext(); // Bind to the remote session bean interface in the running server via JNDI/RMI PeopleRemote people = (PeopleRemote) ctx.lookup("simple/PeopleBean/remote"); List<Person> list = people.findPeople(); for (Person p : list ) { System.out.format("Person %d=%s\n", p.getId(), p.getName()); // While we at it, update every third person if (p.getId()%3==0) { p.setName( "Sam"); people.updatePerson(p); } } } } |