You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(89) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(9) |
Feb
(6) |
Mar
(22) |
Apr
(34) |
May
(43) |
Jun
(48) |
Jul
(96) |
Aug
(64) |
Sep
(30) |
Oct
(12) |
Nov
(17) |
Dec
(21) |
2007 |
Jan
(61) |
Feb
(24) |
Mar
(51) |
Apr
(54) |
May
(41) |
Jun
(57) |
Jul
(16) |
Aug
(12) |
Sep
(29) |
Oct
(143) |
Nov
(57) |
Dec
(193) |
2008 |
Jan
(92) |
Feb
(54) |
Mar
(34) |
Apr
(50) |
May
(71) |
Jun
(3) |
Jul
(16) |
Aug
(16) |
Sep
(11) |
Oct
(13) |
Nov
(8) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
(9) |
Apr
(36) |
May
(10) |
Jun
(2) |
Jul
(13) |
Aug
(15) |
Sep
(5) |
Oct
(2) |
Nov
(13) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(2) |
Mar
(6) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(24) |
Sep
(14) |
Oct
(8) |
Nov
(4) |
Dec
(9) |
2011 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(1) |
From: Eric P. <th...@us...> - 2009-11-19 01:55:44
|
Update of /cvsroot/sandev/sand/platform/tools/build/generate/org/sandev/generator In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7189 Modified Files: SQLQueryProcessorGenerator.java Log Message: Support for custom value functions. Index: SQLQueryProcessorGenerator.java =================================================================== RCS file: /cvsroot/sandev/sand/platform/tools/build/generate/org/sandev/generator/SQLQueryProcessorGenerator.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** SQLQueryProcessorGenerator.java 7 Aug 2009 22:29:16 -0000 1.17 --- SQLQueryProcessorGenerator.java 19 Nov 2009 01:55:31 -0000 1.18 *************** *** 208,211 **** --- 208,213 ---- out.println(" if(query==null) {"); out.println(" return null; }"); + out.println(" else if(query.getFunction()==query.FUNCTION_CUSTOMVALUE) {"); + out.println(" return doCustomValueQuery(dm,conn,query); }"); for(int i=0;i<classes.length;i++) { String msgname=getShortInstanceName(classes[i].qualifiedName()); *************** *** 216,219 **** --- 218,256 ---- out.println(""); out.println(""); + out.println(" /**"); + out.println(" * Process the custom value call. The call has already been "); + out.println(" * screened for injection attacks by the authorizer."); + out.println(" */"); + out.println(" public static SandCollectionMessage doCustomValueQuery("); + out.println(" DataManagerNode dm,Connection conn,SandQueryMessage query)"); + out.println(" throws SQLException"); + out.println(" {"); + out.println(" SandAttrVal sav=query.getMatchInfo()[0];"); + out.println(" String func=sav.getAttr();"); + out.println(" func=func.substring(query.PERSISTFUNCTION.length());"); + out.println(" String sql=\"SELECT \" + func + \"(\" + sav.getVal() + \")\";"); + out.println(" Statement stmt=conn.createStatement();"); + out.println(" try {"); + out.println(" dm.getLogger().log(Logger.LOGLEVEL_INFO,sql);"); + out.println(" } catch(LoggerException e) {"); + out.println(" throw new SandSQLException(\"Error logging: \" + e,e);"); + out.println(" }"); + out.println(" SandCollectionMessage retval=query.getCollectionMessage();"); + out.println(" StringBuffer sbuf=new StringBuffer();"); + out.println(" try {"); + out.println(" stmt.executeQuery(sql);"); + out.println(" ResultSet rs=stmt.getResultSet();"); + out.println(" if(!rs.next()) {"); + out.println(" throw new SQLException(\"No custom value result data.\"); }"); + out.println(" sbuf.append(rs.getObject(1));"); + out.println(" } finally {"); + out.println(" stmt.close();"); + out.println(" }"); + out.println(" retval.setQueryResult(sbuf.toString());"); + out.println(" retval.setComplete(true);"); + out.println(" return retval;"); + out.println(" }"); + out.println(""); + out.println(""); for(int i=0;i<classes.length;i++) { String msgname=getShortInstanceName(classes[i].qualifiedName()); |
From: Eric P. <th...@us...> - 2009-11-18 19:36:34
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22142 Added Files: ProcessingStatusListener.java Log Message: Should have been checked in many months ago. Just found it. Interface used for progress update notifications. --- NEW FILE: ProcessingStatusListener.java --- /* * SAND development/deployment environment * Copyright (C) 2008 SAND Services 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. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.sandev.basics.util; import org.sandev.basics.sandmessages.ProcessingStatus; /** * An interface used by application components to listen for * ProcessingStatus messages. For example a node might have an * interface component like a progress bar that uses incoming messages * to update a display. */ public interface ProcessingStatusListener { /** * The ProcessingStatus notification method. It is up to the * listener to check whether the given message is relevant or not. * This method does not throw as there is no general upstream * catch mechanism, and the message source may also need to notify * other listeners. */ public void onDelivery(ProcessingStatus ps); } |
From: Eric P. <th...@us...> - 2009-11-12 21:53:13
|
Update of /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/HTTP In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27157 Modified Files: AbstractXHTMLFormAdaptor.java Log Message: Don't escape summary values that are already in XHTML. This is allows us to get pretty close to arbitrarily advanced summary displays when needed. Index: AbstractXHTMLFormAdaptor.java =================================================================== RCS file: /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/HTTP/AbstractXHTMLFormAdaptor.java,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** AbstractXHTMLFormAdaptor.java 2 Nov 2009 19:33:00 -0000 1.78 --- AbstractXHTMLFormAdaptor.java 12 Nov 2009 21:53:02 -0000 1.79 *************** *** 2506,2510 **** if(valueAccess(user,filter,sim,flds[i])==AuthFilter.AUTH_NOACCESS) { vals[i]=getHiddenFieldValue(); } ! vals[i]=trapLinksFormat(vals[i]); vals[i]=callback.filterDisplayText(vals[i]); if((vals[i]==null)||(vals[i].equals(""))) { --- 2506,2511 ---- if(valueAccess(user,filter,sim,flds[i])==AuthFilter.AUTH_NOACCESS) { vals[i]=getHiddenFieldValue(); } ! if(!isXHTML(vals[i])) { ! vals[i]=trapLinksFormat(vals[i]); } vals[i]=callback.filterDisplayText(vals[i]); if((vals[i]==null)||(vals[i].equals(""))) { *************** *** 2522,2525 **** --- 2523,2539 ---- /** + * Return true if the given text is already XHTML and therefore should + * not be escaped. This is NOT a full validity check, just a guess as + * to whether the text should be XML escaped before rendering. + */ + protected boolean isXHTML(String text) + { + if((text.startsWith("<img "))||(text.indexOf("</ul>")>=0)) { + return true; } + return false; + } + + + /** * Creates a read only representation of an enumerated type value. * The value can be retrieved on load. Since the same load code |
From: Eric P. <th...@us...> - 2009-11-05 16:18:17
|
Update of /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/HTTP In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29964 Modified Files: XHTMLScreenAdaptor.java Log Message: After verifying the default screen, set the parameter so we remember where we are for subsequent operations. Index: XHTMLScreenAdaptor.java =================================================================== RCS file: /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/HTTP/XHTMLScreenAdaptor.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** XHTMLScreenAdaptor.java 6 Aug 2009 20:53:24 -0000 1.32 --- XHTMLScreenAdaptor.java 5 Nov 2009 16:18:06 -0000 1.33 *************** *** 296,300 **** } catch(Exception e) { urlscr=ui.getEntryPoints(0); //go with the first defined ! } } try { verifyScreenAccess(owner.getAuthFilter(),user,ui,urlscr,owner); --- 296,301 ---- } catch(Exception e) { urlscr=ui.getEntryPoints(0); //go with the first defined ! } ! params.put(SCREENPARAM,new String[] { urlscr }); } try { verifyScreenAccess(owner.getAuthFilter(),user,ui,urlscr,owner); |
From: Eric P. <th...@us...> - 2009-11-03 20:57:12
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16919 Modified Files: StringUtil.java Log Message: Added stringLiteralize and escapeEmbeddedNewlines utility methods. Index: StringUtil.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util/StringUtil.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** StringUtil.java 2 Nov 2009 19:30:19 -0000 1.34 --- StringUtil.java 3 Nov 2009 20:56:53 -0000 1.35 *************** *** 1144,1147 **** --- 1144,1178 ---- /** + * Convert the given string so it can be printed out as a string + * literal. + */ + public static String stringLiteralize(String source) + { + String retval=source; + retval=escapeEmbeddedNewlines(retval); + retval=escapeEmbeddedSingleQuotes(retval); + retval=escapeEmbeddedQuotes(retval); + return retval; + } + + + /** + * Convert any embedded newline characters into a newline + * escape sequence. In other words replace "\n" with "\\n". + */ + public static String escapeEmbeddedNewlines(String source) + { + StringBuffer sbuf=new StringBuffer(); + char[] chars=source.toCharArray(); + for(int i=0;i<chars.length;i++) { + if(chars[i]=='\n') { + sbuf.append("\\n"); } + else { + sbuf.append(chars[i]); } } + return sbuf.toString(); + } + + + /** * Escape any embedded single quote characters found within the * string by adding a backslash before them. |
From: Eric P. <th...@us...> - 2009-11-02 19:33:09
|
Update of /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/HTTP In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16871 Modified Files: AbstractXHTMLFormAdaptor.java Log Message: The span for a collection element now has the title set to the uniqueID if it is a persistent message. Useful in transformation for creating actions on that particular instance. Index: AbstractXHTMLFormAdaptor.java =================================================================== RCS file: /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/HTTP/AbstractXHTMLFormAdaptor.java,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** AbstractXHTMLFormAdaptor.java 10 Sep 2009 18:36:21 -0000 1.77 --- AbstractXHTMLFormAdaptor.java 2 Nov 2009 19:33:00 -0000 1.78 *************** *** 2428,2432 **** actionToText(UIFormContext.ACTION_SELECT,callback,null) + DELIMITER + msg.getShortName() + DELIMITER + index; ! out.println("<span class=\"selectionItem\" id=\"" + inputName + "\">"); out.println("<input type=\"image\" src=\"images/selectptr.gif\" " + "name=\"" + inputName + "\" id=\"" + msg.getShortName() + --- 2428,2436 ---- actionToText(UIFormContext.ACTION_SELECT,callback,null) + DELIMITER + msg.getShortName() + DELIMITER + index; ! out.print("<span class=\"selectionItem\" id=\"" + inputName + "\""); ! if(msg instanceof SandPersistMessage) { ! SandPersistMessage spm=(SandPersistMessage)msg; ! out.print(" title=\"" + spm.getUniqueID() + "\""); } ! out.println(">"); out.println("<input type=\"image\" src=\"images/selectptr.gif\" " + "name=\"" + inputName + "\" id=\"" + msg.getShortName() + |
From: Eric P. <th...@us...> - 2009-11-02 19:30:31
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16654 Modified Files: StringUtil.java Log Message: added escapeEmbeddedSingleQuotes utility. Index: StringUtil.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util/StringUtil.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** StringUtil.java 2 Oct 2009 14:37:04 -0000 1.33 --- StringUtil.java 2 Nov 2009 19:30:19 -0000 1.34 *************** *** 1144,1147 **** --- 1144,1163 ---- /** + * Escape any embedded single quote characters found within the + * string by adding a backslash before them. + */ + public static String escapeEmbeddedSingleQuotes(String source) + { + StringBuffer sbuf=new StringBuffer(); + char[] chars=source.toCharArray(); + for(int i=0;i<chars.length;i++) { + if(chars[i]=='\'') { + sbuf.append("\\"); } + sbuf.append(chars[i]); } + return sbuf.toString(); + } + + + /** * Escape any embedded quotes found within the string by adding * a backslash before them. |
From: Eric P. <th...@us...> - 2009-10-05 01:42:33
|
Update of /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/UIProcessor In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18282 Modified Files: XHTMLSandUIServlet.java Log Message: support for encrypted login credentials passed with the URL. Index: XHTMLSandUIServlet.java =================================================================== RCS file: /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/UIProcessor/XHTMLSandUIServlet.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** XHTMLSandUIServlet.java 24 Sep 2009 21:44:03 -0000 1.36 --- XHTMLSandUIServlet.java 5 Oct 2009 01:42:19 -0000 1.37 *************** *** 57,60 **** --- 57,61 ---- import org.sandev.basics.sandmessages.TestRunStatus; import org.sandev.basics.util.UIFormOwner; + import org.sandev.basics.util.CommBridge; import org.sandev.basics.util.UIRenderInput; import org.sandev.basics.util.UIRenderOutputStream; *************** *** 71,77 **** --- 72,80 ---- import org.sandev.basics.util.SandEncryptor; import org.sandev.basics.util.SandEncryptorException; + import org.sandev.basics.util.SampleEncryptor; import org.sandev.basics.util.UserWorkLog; import org.sandev.basics.util.ArrayUtils; import org.sandev.basics.util.XMLTextProcessing; + import org.sandev.basics.util.StringUtil; import org.sandev.basics.MessageDriver.MessageDriverNodeInstance; import org.sandev.basics.MessageDriver.MessageDriverNode; *************** *** 956,967 **** String username=req.getParameter("username"); String password=req.getParameter("password"); ! if((username!=null)&&(!username.equals(""))) { AuthUser user=null; ! try { ! user=getFormOwner().getUserFromLogin(username,password); ! } catch(SandException e) { ! //if anything goes wrong, then login fails. ! debugout("XHTMLSandUIServlet.authLogin caught " + e); ! } if(user!=null) { debugout(username + " has logged in"); --- 959,965 ---- String username=req.getParameter("username"); String password=req.getParameter("password"); ! if(StringUtil.haveValue(username)) { AuthUser user=null; ! user=getFormOwner().getUserFromLogin(username,password); if(user!=null) { debugout(username + " has logged in"); *************** *** 1396,1427 **** /** ! * Read the URL parameters for username password information and return ! * the associated AuthUser uniqueID if found. Return the defaultAuthID ! * if not found. Specifying the username and password as URL parameters ! * is generally bad practice since this can be observed in transit and ! * gets recorded in firewall logs and everywhere. However there are ! * times when this can be a useful mechanism. * ! * <p>One example is access to our demo heap. The demo heap provides ! * access as requested, and all passwords are "demo" so it doesn't ! * matter if we send that info as a URL parameter. By specifying the ! * username/password info, we can automatically set up a user account ! * if the requestor doesn't already have one. </p> */ public long readAuthParameters(long defaultAuthID,HttpServletRequest req) throws SandException { String username=req.getParameter("user"); String password=req.getParameter("pass"); ! if((username==null)||(username.trim().equals(""))) { ! return defaultAuthID; } ! debugout("readAuthParameters finding user " + username); ! AuthUser user=getFormOwner().getUserFromLogin(username,password); ! if(user!=null) { ! debugout("readAuthParameters: user " + username + ! " (id " + user.getUniqueID() + ") found"); ! return user.getUniqueID(); } ! debugout("readAuthParameters: user " + username + " not found"); ! return defaultAuthID; } --- 1394,1456 ---- /** ! * Read the URL parameters for username password information and ! * return the associated AuthUser uniqueID if found. Return the ! * defaultAuthID if not found. Specifying the username and ! * password as URL parameters is a REALLY BAD IDEA since this can ! * be observed in transit, gets recorded in firewall logs etc. ! * However there are times when this can be a useful mechanism, ! * such as providing access to a demo account that is not the ! * default guest account. It's not secured, but still requires a ! * login. This is one way to handle those situations. * ! * <p>The enclogin param is only slightly more reasonable to use, ! * since anyone seeing it can just be pass this string along ! * themselves to impersonate the user. Cosmetically they don't ! * see a plaintext "password" field in the URL, but it's ! * completely useless in terms of actual security. The only real ! * way to do a login is to actually go through the login process, ! * typically involving POSTing parameters over https. </p> */ public long readAuthParameters(long defaultAuthID,HttpServletRequest req) throws SandException { + long retval=defaultAuthID; String username=req.getParameter("user"); String password=req.getParameter("pass"); ! String enclogin=req.getParameter("enclogin"); ! if(StringUtil.haveValue(enclogin)) { ! try { ! debugout("XHTMLSandUIServlet.readAuthParameters enclogin"); ! SandEncryptor sec=null; ! if(getFormOwner() instanceof CommBridge) { ! sec=((CommBridge)getFormOwner()).getEncryptor(); } ! else { ! sec=new SampleEncryptor(); } ! long userID=sec.getCypherUserID(enclogin); ! AuthUser cand=getFormOwner().getUserForID(userID); ! //if(cand!=null) { ! // debugout("cand " + userID); } ! String userpass=sec.decrypt(cand,enclogin); ! username=userpass.substring(0,userpass.indexOf(":")); ! password=userpass.substring(userpass.indexOf(":")+1); ! //debugout(" cand.username: " + cand.getUsername()); ! //debugout(" user.username: " + username); ! //debugout(" cand.password: " + cand.getPassword()); ! //debugout(" user.password: " + password); ! if((cand.getUsername().equals(username))&& ! (cand.getPassword().equals(password))) { ! retval=cand.getUniqueID(); ! debugout("enclogin found user " + retval + ! " (" + username + ")"); } ! } catch(Exception e) { ! debugout("XHTMLSandUIServlet enclogin caught " + e); ! } } ! else if(StringUtil.haveValue(username)) { ! AuthUser user=getFormOwner().getUserFromLogin(username,password); ! if(user!=null) { ! retval=user.getUniqueID(); ! debugout("readAuthParameters found user " + retval + ! " (" + username + ")"); } } ! return retval; } |
From: Eric P. <th...@us...> - 2009-10-02 14:37:17
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29358 Modified Files: StringUtil.java Log Message: Added wordWrap formatting utilityy Index: StringUtil.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util/StringUtil.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** StringUtil.java 26 Jul 2009 14:40:59 -0000 1.32 --- StringUtil.java 2 Oct 2009 14:37:04 -0000 1.33 *************** *** 1348,1351 **** --- 1348,1374 ---- } + + /** + * Wrap the given string so there are no more than maxCharsPerLine + * without a terminating newline string. + */ + public static String wordWrap(String str,String newline,int maxCharsPerLine) + { + if(str==null) { + return ""; } + StringBuffer sbuf=new StringBuffer(); + String[] words=str.split("\\s"); + int echocount=0; + for(int i=0;i<words.length;i++) { + if((echocount>0)&&((echocount+words[i].length())>maxCharsPerLine)) { + sbuf.append(newline); //prev line termination + echocount=0; } + if(echocount>0) { //separator from previous word + sbuf.append(" "); } + sbuf.append(words[i]); //the word + echocount+=words[i].length(); } + return sbuf.toString(); + } + } |
From: Eric P. <th...@us...> - 2009-09-24 21:44:16
|
Update of /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/UIProcessor In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15403 Modified Files: XHTMLSandUIServlet.java Log Message: Added ids to the fieldnames in the login form so they can more easily be transformed as needed. Index: XHTMLSandUIServlet.java =================================================================== RCS file: /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/UIProcessor/XHTMLSandUIServlet.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** XHTMLSandUIServlet.java 9 Jul 2009 01:35:08 -0000 1.35 --- XHTMLSandUIServlet.java 24 Sep 2009 21:44:03 -0000 1.36 *************** *** 1,5 **** /* * SAND development/deployment environment ! * Copyright (C) 2003-2008 SAND Services Inc. * * This library is free software; you can redistribute it and/or --- 1,5 ---- /* * SAND development/deployment environment ! * Copyright (C) 2003-2009 SAND Services Inc. * * This library is free software; you can redistribute it and/or *************** *** 1022,1026 **** out.println("<form id=\"login\" action=\"" + url + "\" method=\"post\">"); out.println("<span class=\"field\" title=\"username\" id=\"usernameField\">"); ! out.println("<b class=\"fieldname\">username</b>"); out.println("<code class=\"fieldvalue\">"); out.println("<input id=\"username\" type=\"text\" name=\"username\" value=\"\" size=\"30\"/>"); --- 1022,1026 ---- out.println("<form id=\"login\" action=\"" + url + "\" method=\"post\">"); out.println("<span class=\"field\" title=\"username\" id=\"usernameField\">"); ! out.println("<b class=\"fieldname\" id=\"SANDLoginUser\">username</b>"); out.println("<code class=\"fieldvalue\">"); out.println("<input id=\"username\" type=\"text\" name=\"username\" value=\"\" size=\"30\"/>"); *************** *** 1028,1032 **** out.println("<br class=\"fieldLineBreak\"/></span>"); out.println("<span class=\"field\" title=\"password\" id=\"passwordField\">"); ! out.println("<b class=\"fieldname\">password</b>"); out.println("<code class=\"fieldvalue\">"); out.println("<input id=\"password\" type=\"password\" name=\"password\" value=\"\" size=\"30\"/>"); --- 1028,1032 ---- out.println("<br class=\"fieldLineBreak\"/></span>"); out.println("<span class=\"field\" title=\"password\" id=\"passwordField\">"); ! out.println("<b class=\"fieldname\" id=\"SANDLoginPass\">password</b>"); out.println("<code class=\"fieldvalue\">"); out.println("<input id=\"password\" type=\"password\" name=\"password\" value=\"\" size=\"30\"/>"); *************** *** 1035,1039 **** if(rememberMeSupported()) { out.println("<span class=\"field\" title=\"rememberme\" id=\"remembermeField\">"); ! out.println("<b class=\"fieldname\">remember me</b>"); out.println("<code class=\"fieldvalue\">"); out.println("<input id=\"rememberme\" type=\"checkbox\" name=\"rememberme\"/>"); --- 1035,1039 ---- if(rememberMeSupported()) { out.println("<span class=\"field\" title=\"rememberme\" id=\"remembermeField\">"); ! out.println("<b class=\"fieldname\" id=\"SANDLoginRM\">remember me</b>"); out.println("<code class=\"fieldvalue\">"); out.println("<input id=\"rememberme\" type=\"checkbox\" name=\"rememberme\"/>"); |
From: Eric P. <th...@us...> - 2009-09-19 03:49:39
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16383 Modified Files: DateUtil.java Log Message: Added elapstr debug utility. Occasionally useful for light timing debug. Index: DateUtil.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util/DateUtil.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** DateUtil.java 15 Sep 2009 22:54:09 -0000 1.18 --- DateUtil.java 19 Sep 2009 03:49:23 -0000 1.19 *************** *** 416,419 **** --- 416,438 ---- /** + * Return elapsed time since the given date as a debug value. Useful + * for quick and dirty rough timing feedback. + */ + public static String elapstr(String prefix,Date date) + { + if(prefix==null) { + prefix=""; } + long total=System.currentTimeMillis() - date.getTime(); + long millis=total%1000; + total=total/1000; + long seconds=total%60; + total=total/60; + long minutes=total%60; + total=total/60; + return prefix + total + ":" + minutes + ":" + seconds + "." + millis; + } + + + /** * Return true if the two dates represent the same instant in time * as calculated to the nearest millisecond, false otherwise. If |
From: Eric P. <th...@us...> - 2009-09-15 22:54:21
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20208 Modified Files: DateUtil.java Log Message: Added initCalendar and add utility methods. Changed rounding methods to return a Date value since that is more useful than void. Index: DateUtil.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util/DateUtil.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** DateUtil.java 23 Aug 2009 19:01:03 -0000 1.17 --- DateUtil.java 15 Sep 2009 22:54:09 -0000 1.18 *************** *** 538,541 **** --- 538,564 ---- + /** + * Returns a regular Calendar instance set to the given date. + */ + public static Calendar initCalendar(Date date) + { + Calendar cal=Calendar.getInstance(); + cal.setTime(date); + return cal; + } + + + /** + * Convenience shorthand method. + */ + public static Date add(Date date,int calendarField,int amount) + { + Calendar cal=Calendar.getInstance(); + cal.setTime(date); + cal.add(calendarField,amount); + return cal.getTime(); + } + + //////////////////////////////////////// // UTC utilities *************** *** 676,680 **** * becomes 03:00:01.000. */ ! public static void roundUpMillis(Calendar cal) { int millis=cal.get(Calendar.MILLISECOND); --- 699,703 ---- * becomes 03:00:01.000. */ ! public static Date roundUpMillis(Calendar cal) { int millis=cal.get(Calendar.MILLISECOND); *************** *** 682,685 **** --- 705,709 ---- int diff=1000-millis; cal.add(Calendar.MILLISECOND,diff); } + return cal.getTime(); } *************** *** 689,693 **** * becomes 03:01:00. */ ! public static void roundUpSeconds(Calendar cal) { int seconds=cal.get(Calendar.SECOND); --- 713,717 ---- * becomes 03:01:00. */ ! public static Date roundUpSeconds(Calendar cal) { int seconds=cal.get(Calendar.SECOND); *************** *** 695,698 **** --- 719,723 ---- int diff=60-seconds; cal.add(Calendar.SECOND,diff); } + return cal.getTime(); } *************** *** 702,706 **** * becomes 04:00. */ ! public static void roundUpMinutes(Calendar cal) { int minutes=cal.get(Calendar.MINUTE); --- 727,731 ---- * becomes 04:00. */ ! public static Date roundUpMinutes(Calendar cal) { int minutes=cal.get(Calendar.MINUTE); *************** *** 708,711 **** --- 733,737 ---- int diff=60-minutes; cal.add(Calendar.MINUTE,diff); } + return cal.getTime(); } *************** *** 717,721 **** * be rounded up to the nearest minute first. */ ! public static void roundUpMinutePeriod(Calendar cal,int minutePeriod) { roundUpMillis(cal); --- 743,747 ---- * be rounded up to the nearest minute first. */ ! public static Date roundUpMinutePeriod(Calendar cal,int minutePeriod) { roundUpMillis(cal); *************** *** 728,731 **** --- 754,758 ---- int diff=end-minute; //e.g. 45-39=6 cal.add(Calendar.MINUTE,diff); //e.g. 6 minutes added + return cal.getTime(); } *************** *** 737,741 **** * 12. The calendar will be rounded to the nearest hour first. */ ! public static void roundUpHourPeriod(Calendar cal,int hourPeriod) { roundUpMillis(cal); --- 764,768 ---- * 12. The calendar will be rounded to the nearest hour first. */ ! public static Date roundUpHourPeriod(Calendar cal,int hourPeriod) { roundUpMillis(cal); *************** *** 749,752 **** --- 776,780 ---- int diff=end-hour; //e.g. 24-14=10; cal.add(Calendar.HOUR,diff); //e.g. 10 hours added + return cal.getTime(); } *************** *** 759,763 **** * calendar to wrap it around to the threshold on the following day. */ ! public static void roundToThresholdHour(Calendar cal,int hour) { roundUpMillis(cal); --- 787,791 ---- * calendar to wrap it around to the threshold on the following day. */ ! public static Date roundToThresholdHour(Calendar cal,int hour) { roundUpMillis(cal); *************** *** 770,773 **** --- 798,802 ---- else { //after threshold hour cal.add(Calendar.HOUR_OF_DAY,((24-calHour)+hour)); } } + return cal.getTime(); } |
From: Eric P. <th...@us...> - 2009-09-14 00:01:05
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14010 Modified Files: MatchUtil.java Log Message: Made the String eval equality expression handle wildcard matches. Index: MatchUtil.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util/MatchUtil.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MatchUtil.java 9 Jul 2009 01:40:40 -0000 1.8 --- MatchUtil.java 14 Sep 2009 00:00:54 -0000 1.9 *************** *** 175,180 **** String compval=expr[index+1]; boolean retval=false; ! if((oper.equals("="))&&(val.equalsIgnoreCase(compval))) { ! retval=true; } else if((oper.equals("!="))&&(!val.equalsIgnoreCase(compval))) { retval=true; } --- 175,185 ---- String compval=expr[index+1]; boolean retval=false; ! if(oper.equals("=")) { ! if(compval.indexOf("*")>=0) { //wildcard match ! compval=compval.replaceAll("\\*",".*"); ! if(val.toLowerCase().matches(compval.toLowerCase())) { ! return true; } } ! else if(val.equalsIgnoreCase(compval)) { //regular match ! return true; } } else if((oper.equals("!="))&&(!val.equalsIgnoreCase(compval))) { retval=true; } |
From: Eric P. <th...@us...> - 2009-09-10 18:36:35
|
Update of /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/HTTP In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9668 Modified Files: AbstractXHTMLFormAdaptor.java Log Message: It's not enough to ignore the enter key press, we have to return the original action value rather than "true" or else we will try to process "true" as a custom action. Index: AbstractXHTMLFormAdaptor.java =================================================================== RCS file: /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/HTTP/AbstractXHTMLFormAdaptor.java,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** AbstractXHTMLFormAdaptor.java 23 Aug 2009 19:05:27 -0000 1.76 --- AbstractXHTMLFormAdaptor.java 10 Sep 2009 18:36:21 -0000 1.77 *************** *** 818,822 **** if(value!=null) { debug(callback,"readEnterKeyAction " + key + ": " + value); } ! ////user pressed the enter key. Figure out what to do. //if((value!=null)&&(value.equalsIgnoreCase("true"))) { // debug(callback," original default action: " + retval); --- 818,822 ---- if(value!=null) { debug(callback,"readEnterKeyAction " + key + ": " + value); } ! ////user pressed the enter key. Figure out what to do. See comment //if((value!=null)&&(value.equalsIgnoreCase("true"))) { // debug(callback," original default action: " + retval); *************** *** 827,831 **** // debug(callback,"app defined default action: " + retval); } //user clicked a paging link, do PAGETO action ! if((value!=null)&&(value.startsWith("page to"))) { SandQueryMessage sqm=uifc.getFindQuery(); if(value.indexOf(":")<=0) { --- 827,833 ---- // debug(callback,"app defined default action: " + retval); } //user clicked a paging link, do PAGETO action ! if((value!=null)&&(value.equalsIgnoreCase("true"))) { ! return currAction; } //don't interfere ! else if((value!=null)&&(value.startsWith("page to"))) { SandQueryMessage sqm=uifc.getFindQuery(); if(value.indexOf(":")<=0) { |
From: Eric P. <th...@us...> - 2009-08-23 19:05:46
|
Update of /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/HTTP In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26924 Modified Files: AbstractXHTMLFormAdaptor.java Log Message: disableUnauthorizedActions now checks the synthesized message class name against the authorizor, even if the currInst is null. If currInst is available then we still use that, but this prevents the find button from showing up when it shouldn't be. Index: AbstractXHTMLFormAdaptor.java =================================================================== RCS file: /cvsroot/sandev/sand/platform/tools/src/org/sandev/tools/HTTP/AbstractXHTMLFormAdaptor.java,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** AbstractXHTMLFormAdaptor.java 6 Aug 2009 20:54:37 -0000 1.75 --- AbstractXHTMLFormAdaptor.java 23 Aug 2009 19:05:27 -0000 1.76 *************** *** 1696,1716 **** (modePath.endsWith("FINDING"))) { return; } //let it go, this is a reference find. SandInstanceMessage sim=uifc.getCurrInst(); ! if(sim==null) { ! return; } //nothing to do. ! SandQueryMessage sqm=(SandQueryMessage)sim.getQueryMessage(); ! if(sqm==null) { ! uifc.disableAction(UIFormContext.ACTION_FIND); } ! else { //query is possible ! int auth=AuthFilter.AUTH_NOACCESS; ! try { ! auth=filter.messageClassAccess(user,sqm.getShortName()); ! } catch(SandException e) { ! //nothing to do here. treat it as unauthorized. ! } ! if(auth==AuthFilter.AUTH_NOACCESS) { ! debug(UIFormContext.actionValueToLabelStatic( ! UIFormContext.ACTION_FIND) + " not authorized"); ! uifc.disableAction(UIFormContext.ACTION_FIND); } } } } --- 1696,1718 ---- (modePath.endsWith("FINDING"))) { return; } //let it go, this is a reference find. + String classname=uifc.getCurrClass() + "Query"; SandInstanceMessage sim=uifc.getCurrInst(); ! if(sim!=null) { ! SandQueryMessage sqm=(SandQueryMessage)sim.getQueryMessage(); ! if(sqm==null) { ! uifc.disableAction(UIFormContext.ACTION_FIND); ! return; } //no query supported at all, done. ! else { ! classname=sqm.getShortName(); } } ! int auth=AuthFilter.AUTH_NOACCESS; ! try { ! auth=filter.messageClassAccess(user,classname); ! } catch(SandException e) { ! //nothing to do here. treat it as unauthorized. ! } ! if(auth==AuthFilter.AUTH_NOACCESS) { ! debug(UIFormContext.actionValueToLabelStatic( ! UIFormContext.ACTION_FIND) + " not authorized"); ! uifc.disableAction(UIFormContext.ACTION_FIND); } } } |
From: Eric P. <th...@us...> - 2009-08-23 19:03:14
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26631 Modified Files: AuthFilterBase.java Log Message: Added an overload for the addMatch utility method for ease of typing. Index: AuthFilterBase.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util/AuthFilterBase.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AuthFilterBase.java 22 May 2009 21:12:12 -0000 1.7 --- AuthFilterBase.java 23 Aug 2009 19:03:00 -0000 1.8 *************** *** 586,589 **** --- 586,600 ---- /** + * Make a new SandAttrVal out of the attr and val then call the + * main addMatch method. + */ + protected SandAttrVal[] addMatch(SandAttrVal[] matches, + String attr,String val) + { + return addMatch(matches,new SandAttrVal(attr,val)); + } + + + /** * Add this SandAttrVal to the existing array and return the new array. */ |
From: Eric P. <th...@us...> - 2009-08-23 19:01:13
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26351 Modified Files: DateUtil.java Log Message: Added today and tomorrow utility methods. Index: DateUtil.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util/DateUtil.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** DateUtil.java 14 Aug 2009 21:45:37 -0000 1.16 --- DateUtil.java 23 Aug 2009 19:01:03 -0000 1.17 *************** *** 495,498 **** --- 495,527 ---- /** + * Returns the date for today 00:00. + */ + public static Date today() + { + Calendar cal=Calendar.getInstance(); + cal.set(Calendar.MILLISECOND,0); + cal.set(Calendar.SECOND,0); + cal.set(Calendar.MINUTE,0); + cal.set(Calendar.HOUR_OF_DAY,0); + return cal.getTime(); + } + + + /** + * Returns the date for tomorrow 00:00. + */ + public static Date tomorrow() + { + Calendar cal=Calendar.getInstance(); + cal.set(Calendar.MILLISECOND,0); + cal.set(Calendar.SECOND,0); + cal.set(Calendar.MINUTE,0); + cal.set(Calendar.HOUR_OF_DAY,0); + cal.add(Calendar.DAY_OF_MONTH,1); + return cal.getTime(); + } + + + /** * Figure out common shorthand values to return a full year value. * What this method does may change over time. |
From: Eric P. <th...@us...> - 2009-08-18 18:56:32
|
Update of /cvsroot/sandev/sand/apps/basics/build/generate/org/sandev/generator In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12908 Modified Files: HelpFileGenerator.java Log Message: Added some debugging lines, commented out, for tracking down dangling help warnings in the build. Index: HelpFileGenerator.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/build/generate/org/sandev/generator/HelpFileGenerator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** HelpFileGenerator.java 28 May 2008 02:35:54 -0000 1.5 --- HelpFileGenerator.java 18 Aug 2009 18:56:14 -0000 1.6 *************** *** 211,214 **** --- 211,218 ---- GeneralTagPrintname gtp=GeneralTagPrintname.getGeneralTagPrintname(cd); GeneralTagHelp gth=GeneralTagHelp.getGeneralTagHelp(cd); + //@sand.help first argument - help text - not found" details: + //String tipText=gth.getTipText(); + //if(tipText.equals("")) { + // System.out.println("No help found for " + cd); } if(gth.getDescription().startsWith("NOHELPDISPLAY")) { return; } //don't want help for this *************** *** 234,237 **** --- 238,245 ---- GeneralTagPrintname gtp=GeneralTagPrintname.getGeneralTagPrintname(fd); GeneralTagHelp gth=GeneralTagHelp.getGeneralTagHelp(fd); + //"@sand.help first argument - help text - not found" details: + //String tipText=gth.getTipText(); + //if(tipText.equals("")) { + // System.out.println("No help found for " + fd); } String fieldname=gtp.getPrintnameStr(); if(fd.type().typeName().endsWith("Struct")) { |
From: Eric P. <th...@us...> - 2009-08-18 18:55:11
|
Update of /cvsroot/sandev/sand/platform/tools/build/generate/org/sandev/generator In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12749 Modified Files: XHTMLFormGenerator.java Log Message: Added some debugging lines, commented out, for tracking down dangling help warnings in the build. Index: XHTMLFormGenerator.java =================================================================== RCS file: /cvsroot/sandev/sand/platform/tools/build/generate/org/sandev/generator/XHTMLFormGenerator.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** XHTMLFormGenerator.java 24 Jul 2009 17:58:04 -0000 1.48 --- XHTMLFormGenerator.java 18 Aug 2009 18:55:02 -0000 1.49 *************** *** 883,886 **** --- 883,889 ---- GeneralTagHelp gth=GeneralTagHelp.getGeneralTagHelp(fd); String tipText=gth.getTipText(); + //"@sand.help first argument - help text - not found" details: + //if(tipText.equals("")) { + // System.out.println("No help found for " + fd); } FieldTagMetatype ftm=FieldTagMetatype.getFieldTagMetatype(fd); FieldTagFlags ftf=FieldTagFlags.getFieldTagFlags(fd); |
From: Eric P. <th...@us...> - 2009-08-18 18:54:00
|
Update of /cvsroot/sandev/sand/apps/basics/build/generate/org/sandev/generator/tags In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12539 Modified Files: GeneralTagHelp.java Log Message: Some debugging trace lines commented out, useful for tracking down dangling help text warnings. Index: GeneralTagHelp.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/build/generate/org/sandev/generator/tags/GeneralTagHelp.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GeneralTagHelp.java 28 May 2007 17:43:20 -0000 1.3 --- GeneralTagHelp.java 18 Aug 2009 18:53:44 -0000 1.4 *************** *** 78,81 **** --- 78,84 ---- String expr=tag.text().trim(); if(expr.equals("")) { + //Uncomment to figure out where the build complaint is coming from + //Exception e=new Exception(); + //e.printStackTrace(); System.out.println("@" + TAGNAME + " first argument - help text - not found"); } |
From: Eric P. <th...@us...> - 2009-08-14 21:45:50
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13951 Modified Files: DateUtil.java Log Message: Added getCurrentYear utility method, and grokYear utility method. Seems worth having something that will try figure out the year from a small integer value. Not perfect, but better than nothing. Index: DateUtil.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util/DateUtil.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** DateUtil.java 7 Aug 2009 22:28:20 -0000 1.15 --- DateUtil.java 14 Aug 2009 21:45:37 -0000 1.16 *************** *** 484,487 **** --- 484,512 ---- + /** + * Shorthand method to retrieve the current year. + */ + public static int getCurrentYear() + { + Calendar cal=Calendar.getInstance(); + return cal.get(Calendar.YEAR); + } + + + /** + * Figure out common shorthand values to return a full year value. + * What this method does may change over time. + */ + public static int grokYear(int year) + { + if(year<100) { + if((2000+year)>getCurrentYear()) { + year=1900+year; } + else { + year=2000+year; } } + return year; + } + + //////////////////////////////////////// // UTC utilities |
From: Eric P. <th...@us...> - 2009-08-14 21:43:15
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13693 Modified Files: MessageUtil.java Log Message: added setAppFormError utility method. Sometimes you just want to complain about a general error. Index: MessageUtil.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util/MessageUtil.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** MessageUtil.java 21 May 2009 17:06:49 -0000 1.13 --- MessageUtil.java 14 Aug 2009 21:43:02 -0000 1.14 *************** *** 259,262 **** --- 259,276 ---- /** + * Set an app error with the given text. + */ + public static void setAppFormError(AggregateUpdate au,String errtext) + { + ErrorInfo ei=new ErrorInfo(); + ei.setSeverity(ErrorInfo.SEVERITY_ERROR); + ei.setCode(INVALIDFORM); + ei.setText(errtext); + au.addNotices(ei); + au.setSandTransmitStatus(AggregateUpdate.STATUS_APPERROR); + } + + + /** * Return true if the given collection message contains an instance * with the given id, false otherwise. |
From: Eric P. <th...@us...> - 2009-08-14 21:41:41
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/structs In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13499 Modified Files: SandQueryMessage.java Log Message: Added the addMatchInfo shorthand method since it's available for all generated update messages and saves typing when working at the level of a generic update. Index: SandQueryMessage.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/structs/SandQueryMessage.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SandQueryMessage.java 22 May 2009 21:18:16 -0000 1.7 --- SandQueryMessage.java 14 Aug 2009 21:41:22 -0000 1.8 *************** *** 290,293 **** --- 290,294 ---- */ public void addMatchInfo(SandAttrVal av); + public void addMatchInfo(String attr,String val); |
From: Eric P. <th...@us...> - 2009-08-07 22:29:25
|
Update of /cvsroot/sandev/sand/platform/tools/build/generate/org/sandev/generator In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22234 Modified Files: SQLQueryProcessorGenerator.java Log Message: Don't assume what we are doing a max of is an integer field. Could be a date or even a string. Index: SQLQueryProcessorGenerator.java =================================================================== RCS file: /cvsroot/sandev/sand/platform/tools/build/generate/org/sandev/generator/SQLQueryProcessorGenerator.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** SQLQueryProcessorGenerator.java 9 Jul 2009 01:36:52 -0000 1.16 --- SQLQueryProcessorGenerator.java 7 Aug 2009 22:29:16 -0000 1.17 *************** *** 1222,1226 **** out.println(" if(i>0) {"); out.println(" sb.append(\",\"); }"); ! out.println(" sb.append(rs.getInt(i+1)); } }"); out.println(" coll.setQueryResult(sb.toString());"); out.println(" }"); --- 1222,1226 ---- out.println(" if(i>0) {"); out.println(" sb.append(\",\"); }"); ! out.println(" sb.append(rs.getObject(i+1)); } }"); out.println(" coll.setQueryResult(sb.toString());"); out.println(" }"); |
From: Eric P. <th...@us...> - 2009-08-07 22:28:33
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22119 Modified Files: DateUtil.java Log Message: Added a max utility and some bulletproofing for readQueryValue Index: DateUtil.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/util/DateUtil.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** DateUtil.java 29 Apr 2009 13:19:11 -0000 1.14 --- DateUtil.java 7 Aug 2009 22:28:20 -0000 1.15 *************** *** 363,370 **** /** ! * Inverse operation for getQueryValue. */ public static Date readQueryValue(String val) { Calendar cal=Calendar.getInstance(); String token=val.substring(0,4); --- 363,373 ---- /** ! * Inverse operation for getQueryValue. Returns new Date(0) if ! * the given value could not be read. */ public static Date readQueryValue(String val) { + if((val==null)||(val.indexOf("-")<0)) { + return new Date(0); } Calendar cal=Calendar.getInstance(); String token=val.substring(0,4); *************** *** 470,473 **** --- 473,487 ---- + /** + * Shorthand comparison and selection. + */ + public static Date max(Date d1,Date d2) + { + if(d2.compareTo(d1)>0) { + return d2; } + return d1; + } + + //////////////////////////////////////// // UTC utilities |