From 1a45d7e04960f7f84f3d1d21de751f8d194d290b Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 18 Aug 2003 11:53:01 +0000 Subject: [PATCH] Changed getxxx() to getXxx() in bean getters and setters as rhino is able to deal with this and create obj.xxx properties. --- src/helma/framework/RequestBean.java | 23 ++++-------- src/helma/framework/ResponseBean.java | 36 +++++++++---------- src/helma/framework/core/ApplicationBean.java | 28 +++++++-------- 3 files changed, 38 insertions(+), 49 deletions(-) diff --git a/src/helma/framework/RequestBean.java b/src/helma/framework/RequestBean.java index d49e69eb..1b6da6b7 100644 --- a/src/helma/framework/RequestBean.java +++ b/src/helma/framework/RequestBean.java @@ -75,7 +75,7 @@ public class RequestBean implements Serializable { } // property related methods: - public String getaction() { + public String getAction() { return req.action; } @@ -84,7 +84,7 @@ public class RequestBean implements Serializable { * * @return ... */ - public Map getdata() { + public Map getData() { return req.getRequestData(); } @@ -93,7 +93,7 @@ public class RequestBean implements Serializable { * * @return ... */ - public long getruntime() { + public long getRuntime() { return (System.currentTimeMillis() - req.startTime); } @@ -102,7 +102,7 @@ public class RequestBean implements Serializable { * * @return ... */ - public String getpassword() { + public String getPassword() { return req.getPassword(); } @@ -111,7 +111,7 @@ public class RequestBean implements Serializable { * * @return ... */ - public String getpath() { + public String getPath() { return req.path; } @@ -120,19 +120,8 @@ public class RequestBean implements Serializable { * * @return ... */ - public String getusername() { + public String getUsername() { return req.getUsername(); } - /* public Date getLastModified () { - long since = req.getIfModifiedSince (); - if (since < 0) - return null; - else - return new Date (since); - } - public void setLastModified () { - throw new RuntimeException ("The lastModified property of the Request object is read-only. "+ - "Set lastModified on the Response object if you want to mark the last modification date of a resource."); - } */ } diff --git a/src/helma/framework/ResponseBean.java b/src/helma/framework/ResponseBean.java index 6df9d5f6..7966a49c 100644 --- a/src/helma/framework/ResponseBean.java +++ b/src/helma/framework/ResponseBean.java @@ -173,7 +173,7 @@ public class ResponseBean implements Serializable { } // property-related methods: - public boolean getcache() { + public boolean getCache() { return res.cache; } @@ -191,7 +191,7 @@ public class ResponseBean implements Serializable { * * @return ... */ - public String getcharset() { + public String getCharset() { return res.charset; } @@ -200,7 +200,7 @@ public class ResponseBean implements Serializable { * * @param charset ... */ - public void setcharset(String charset) { + public void setCharset(String charset) { res.charset = charset; } @@ -209,7 +209,7 @@ public class ResponseBean implements Serializable { * * @return ... */ - public String getcontentType() { + public String getContentType() { return res.contentType; } @@ -218,7 +218,7 @@ public class ResponseBean implements Serializable { * * @param contentType ... */ - public void setcontentType(String contentType) { + public void setContentType(String contentType) { res.contentType = contentType; } @@ -227,7 +227,7 @@ public class ResponseBean implements Serializable { * * @return ... */ - public Map getdata() { + public Map getData() { return res.getResponseData(); } @@ -236,7 +236,7 @@ public class ResponseBean implements Serializable { * * @return ... */ - public Map gethandlers() { + public Map getHandlers() { return res.getMacroHandlers(); } @@ -245,7 +245,7 @@ public class ResponseBean implements Serializable { * * @return ... */ - public String geterror() { + public String getError() { return res.error; } @@ -254,7 +254,7 @@ public class ResponseBean implements Serializable { * * @return ... */ - public String getmessage() { + public String getMessage() { return res.message; } @@ -263,7 +263,7 @@ public class ResponseBean implements Serializable { * * @param message ... */ - public void setmessage(String message) { + public void setMessage(String message) { res.message = message; } @@ -272,7 +272,7 @@ public class ResponseBean implements Serializable { * * @return ... */ - public String getrealm() { + public String getRealm() { return res.realm; } @@ -281,7 +281,7 @@ public class ResponseBean implements Serializable { * * @param realm ... */ - public void setrealm(String realm) { + public void setRealm(String realm) { res.realm = realm; } @@ -290,7 +290,7 @@ public class ResponseBean implements Serializable { * * @param arr ... */ - public void setskinpath(Object[] arr) { + public void setSkinpath(Object[] arr) { res.setSkinpath(arr); } @@ -299,7 +299,7 @@ public class ResponseBean implements Serializable { * * @return ... */ - public Object[] getskinpath() { + public Object[] getSkinpath() { return res.getSkinpath(); } @@ -308,7 +308,7 @@ public class ResponseBean implements Serializable { * * @return ... */ - public int getstatus() { + public int getStatus() { return res.status; } @@ -317,7 +317,7 @@ public class ResponseBean implements Serializable { * * @param status ... */ - public void setstatus(int status) { + public void setStatus(int status) { res.status = status; } @@ -384,8 +384,8 @@ public class ResponseBean implements Serializable { } ///////////////////////////////////// - // The following are legacy methods used by - // Helma templates (*.hsp files) and shouldn't + // The following are legacy methods used by + // Helma templates (*.hsp files) and shouldn't // be used otherwise. //////////////////////////////////// public void pushStringBuffer() { diff --git a/src/helma/framework/core/ApplicationBean.java b/src/helma/framework/core/ApplicationBean.java index 298bfe41..2055efdb 100644 --- a/src/helma/framework/core/ApplicationBean.java +++ b/src/helma/framework/core/ApplicationBean.java @@ -299,7 +299,7 @@ public class ApplicationBean implements Serializable { } // getter methods for readonly properties of this application - public int getcacheusage() { + public int getCacheusage() { return app.getCacheUsage(); } @@ -308,7 +308,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public INode getdata() { + public INode getData() { return app.getCacheNode(); } @@ -317,7 +317,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public Map getmodules() { + public Map getModules() { return app.modules; } @@ -326,7 +326,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public String getdir() { + public String getDir() { return app.getAppDir().getAbsolutePath(); } @@ -335,7 +335,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public String getname() { + public String getName() { return app.getName(); } @@ -344,7 +344,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public Date getupSince() { + public Date getUpSince() { return new Date(app.starttime); } @@ -353,7 +353,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public long getrequestCount() { + public long getRequestCount() { return app.getRequestCount(); } @@ -362,7 +362,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public long getxmlrpcCount() { + public long getXmlrpcCount() { return app.getXmlrpcCount(); } @@ -371,7 +371,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public long geterrorCount() { + public long getErrorCount() { return app.getErrorCount(); } @@ -389,7 +389,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public Map getproperties() { + public Map getProperties() { if (properties == null) { properties = new WrappedMap(app.getProperties()); properties.setReadonly(true); @@ -402,7 +402,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public int getfreeThreads() { + public int getFreeThreads() { return app.countFreeEvaluators(); } @@ -411,7 +411,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public int getactiveThreads() { + public int getActiveThreads() { return app.countActiveEvaluators(); } @@ -420,7 +420,7 @@ public class ApplicationBean implements Serializable { * * @return ... */ - public int getmaxThreads() { + public int getMaxThreads() { return app.countEvaluators(); } @@ -429,7 +429,7 @@ public class ApplicationBean implements Serializable { * * @param n ... */ - public void setmaxThreads(int n) { + public void setMaxThreads(int n) { // add one to the number to compensate for the internal scheduler. app.setNumberOfEvaluators(n + 1); }