[Idrs-commit] CVS: Idrs/dev/src/net/sourceforge/idrs/core/report GenTag.java,1.1,1.2 IDRSHead.java,1
Brought to you by:
bigman921
|
From: Marc B. <big...@us...> - 2002-08-22 20:07:06
|
Update of /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/core/report
In directory usw-pr-cvs1:/tmp/cvs-serv21727/dev/src/net/sourceforge/idrs/core/report
Modified Files:
GenTag.java IDRSHead.java
Log Message:
Synced development
Index: GenTag.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/core/report/GenTag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GenTag.java 13 Apr 2002 16:06:35 -0000 1.1
--- GenTag.java 22 Aug 2002 20:06:33 -0000 1.2
***************
*** 180,183 ****
--- 180,184 ----
sval = head.getRequest().getParameter(name);
if (sval == null) {
+ System.out.println("Getting db value " + owner + "." + src + " : " + head.getFieldData(owner,src));
return (sval = head.getFieldData(owner,src)) != null ? sval : "";
}
***************
*** 187,190 ****
--- 188,192 ----
}
else {
+ System.out.println("Getting db value " + owner + "." + src + " : " + head.getFieldData(owner,src));
return (sval = head.getFieldData(owner,src)) != null ? sval : "";
}
Index: IDRSHead.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/core/report/IDRSHead.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** IDRSHead.java 14 Apr 2002 12:37:53 -0000 1.9
--- IDRSHead.java 22 Aug 2002 20:06:33 -0000 1.10
***************
*** 10,13 ****
--- 10,14 ----
import javax.servlet.http.*;
import java.sql.*;
+ import java.security.*;
public final class IDRSHead implements Serializable, IDRSScript {
***************
*** 24,27 ****
--- 25,29 ----
protected transient boolean send = true;
static final long serialVersionUID = -4520281654183459125L;
+ transient static final String ERR_NAME = "doc_ERROR";
protected transient HttpSession session;
protected transient HttpServletRequest request;
***************
*** 43,46 ****
--- 45,49 ----
protected transient HashMap connsInfo;
+ protected transient String digest;
/*
public void preBuild(HashMap connsInfo) throws Exception {
***************
*** 74,81 ****
if (body.isHTML()) {
! output = header + "\n" + "</HEAD>\n";
}
! return output;
}
--- 77,88 ----
if (body.isHTML()) {
! output = header + "</HEAD>\n";
! return output;
! }
! else {
! return "";
}
!
}
***************
*** 95,100 ****
}
}
! else if (txt != null) {
! header += txt + "\n";
}
--- 102,107 ----
}
}
! else if (txt != null && txt.length() != 0) {
! header += txt;
}
***************
*** 136,141 ****
*/
public void init(HashMap conns, int userNum, int docID, String url, HttpSession session,
! HttpServletRequest request,HttpServletResponse response, Application app, IDRSScriptLanguage context,UserInfo userInfo) throws Exception {
this.userInfo=userInfo;
--- 143,149 ----
*/
public void init(HashMap conns, int userNum, int docID, String url, HttpSession session,
! HttpServletRequest request,HttpServletResponse response, Application app, IDRSScriptLanguage context,UserInfo userInfo,String digest) throws Exception {
+ this.digest = digest;
this.userInfo=userInfo;
***************
*** 334,338 ****
if (Db == null)
throw new Exception("DB " + db + " not found");
! return Db.getFieldData(field,format);
}
catch (Exception e) {
--- 342,346 ----
if (Db == null)
throw new Exception("DB " + db + " not found");
! return Db.getFieldData(field.toLowerCase(),format);
}
catch (Exception e) {
***************
*** 613,616 ****
--- 621,667 ----
}
}
+
+ /**
+ *Tells the type of digest
+ *@param plain Plain Text String
+ */
+ public String getDigest(String plain) throws Exception {
+ if (! this.digest.equalsIgnoreCase("none")) {
+ MessageDigest md = MessageDigest.getInstance(this.digest);
+ md.update(plain.getBytes());
+ byte[] digest = md.digest();
+ return new String(digest);
+ }
+ else {
+ return plain;
+ }
+ }
+
+ /*
+ /**
+ *Creates an error in the request
+ *@param err as string
+ /
+
+ public void createError(String err) {
+ request.setAttribute(ERR_NAME,err);
+ }
+
+ /**
+ *Determines if there is an error
+ *@return true if there is an error
+ /
+ public boolean isError() {
+ return request.getAttribute(ERR_NAME) != null;
+ }
+
+ /**
+ *Retrieves the error
+ /
+ public String getError() {
+ return (String) request.getAttribute(ERR_NAME);
+ }
+
+ */
}
|