Commit graph

613 commits

Author SHA1 Message Date
stefanp
4a373e8a09 added default values to fields 2002-03-07 13:58:07 +00:00
stefanp
d165ce1c28 no message 2002-03-07 13:54:06 +00:00
hns
c9b927af09 Work on type.properties v. 1.2 support. 2002-03-06 15:01:15 +00:00
hns
5cf87fab38 Added code to check whether a value is a string type and should be put in
quotes when building a query. Previously, also
number values were quoted in SQL queries since neither Oracle nor
MySQL seemed to care, but Sybase doesn't like quoted number vaules.

Also, some bits and pieces for version 1.2 type.properties reading.
(see http://helma.org/rfc/mapping12new/ )
2002-03-06 13:07:50 +00:00
hns
802d66ee80 Added isStringColumn method that lets us check whether a column is
a string type and values therefore need to be quoted. Previously, also
number values were quoted in SQL queries since neither Oracle nor
MySQL seemed to care, but Sybase doesn't like quoted number vaules.
2002-03-06 13:05:40 +00:00
hns
00a396c2f5 Omit quotes from where-clause of getNodeByKey, since the
id value is always an integer. Using quotes used to work fine for
Oracle and MySQL, but it seems to cause problems on Sybase.
2002-03-01 17:57:38 +00:00
hns
fed45aa542 Added try/catch statements to all calls of close() methods in
statement and tableset classes. This seems to be necessary when
using Sybase, as reported by Georg Backer <gbacker@lionhead.com>
on the list.
2002-03-01 16:05:00 +00:00
hns
1ef841f9c0 Foundation for new type mapping support in DbMapping class. 2002-02-26 16:56:13 +00:00
hns
48205c183e Backpedal on previous change to include Servername ("Helma")
again instead of printing only the version number.
2002-02-25 16:13:37 +00:00
hns
1db50720f7 Use Server name and version directly from helma.main.Server.version
instead of having a separate server anme and version fields.
2002-02-25 16:02:10 +00:00
hns
41abbaa3ad updated version info 2002-02-25 16:00:53 +00:00
hns
4a3879b0ee Check for readonly flag in putProperty method so that write protected
properties can't be modified from script code.

Deleted stuff that was permanently commented out:
  * setNode() method
  * readonly check for created and lastmodified props
2002-02-25 14:48:11 +00:00
hns
4e192c39c0 added public isReadonly() method to check the readonly flag from
other packages.
2002-02-25 14:45:54 +00:00
hns
3fee354352 ° Cut off _action suffix when setting the action property the reqest object
° Unset done flag when processing an error to make sure it is actually processed
2002-02-22 16:26:04 +00:00
hns
8bab32a94c suppress log message if onRequest() function is not defined. 2002-02-20 16:57:26 +00:00
hns
e966459776 commented out mildly annoying log message for static file requests 2002-02-20 16:15:26 +00:00
hns
69cb0cb711 just testing the setup 2002-02-20 16:02:15 +00:00
hns
ced9315833 Generate multiple valid IDs in generateMaxID() when the
prototype's table is empty. Previously, new IDs for empty
tables always returned 0.

This fixes bug 59.

http://helma.org/bugs/show_bug.cgi?id=59
2002-02-01 15:20:22 +00:00
hns
896e5e1854 New code to find out which action to call. From now on, every
function ending with "_action" may be invoked via HTTP. It
isn't necessary anymore to define the action in a .hac file.

As a consequence, it's not possible anymore to invoke
templates (.hsp files) via HTTP. Thus, the exposeTemplates
option has become obsolete.

Implemented onRequest() function which is called on the
object handling the HTTP request before the actual action
is invoked.
2002-01-30 15:37:35 +00:00
hns
a132619c8d updated version string 2001-12-13 11:56:21 +00:00
hns
14fe874b38 Adapted to change from Hashtable to HashMap in DbMapping. Basically,
an Iterator is used instead of an Enumeration for looping through the
mapping tables.
2001-12-13 11:54:48 +00:00
hns
15941ce4f4 Big cleanups and fixes:
- Groupby-Nodes with prototype now use an internal DbMapping object
with the specified prototype's DbMapping as parent mapping. This is
necessary because the groupby prototype may be used in different places
and with different relational constraints.
- Cleaned up and reduced duplcate code in Getters for Property Relations
and DbMappings. Now everything is based on getExactPropertyRelation(str)
and getPropertyRelation() methods.
- Replaced Hashtables with HashMaps for performance reasons after
noticing that they are accessed quite often within a single request.
2001-12-13 11:51:20 +00:00
hns
cda86002f3 Pass through RedirectExceptions from renderSkin function. 2001-12-13 11:46:42 +00:00
hns
ad1c5fbb60 Return instances of ESValue without conversion to ESValue,
i.e. without calling ESLoader.normalizeObject().
2001-12-13 11:45:46 +00:00
hns
d306e6fa18 Don't do deep serialization of HopObjects. Instead, for
HopObject properties a proxy object is created for
serialization. It is a Hashtable with two entries: id and prototype,
containing the the id and prototype name of the referenced
HopObject as string values.
2001-12-07 16:18:38 +00:00
hns
7ee29bfdc3 Fixed bug in asynchronous client, although this is untested and
unused code. Eventually we'll have to switch to Apache
XML-RPC since this is where bugs will get fixed from now on.
2001-12-07 16:16:11 +00:00
hns
d141d65585 updated version info 2001-12-07 12:38:51 +00:00
hns
93eb5c9750 set the name of the action in the request object
when executing an action.
2001-12-07 12:38:31 +00:00
hns
2574442456 added action field to let application code know the name of
the action being executed.
2001-12-07 12:37:34 +00:00
hns
24b8f34382 Pass application object in constructor for internal DbMapping
object.

In checkConstraints(), if a filter property is set, never return
true if the object has been modified since it was fetched from
the database. This is the only way we can be sure that the
constraints are fulfilled without evaluating the filter expression.
2001-12-06 22:40:30 +00:00
hns
9da4b1dec9 Reset created and lastModified at the end of the constructor
for relational nodes to show that the object hasn't been
modified since it was fetched from db.
2001-12-06 22:38:14 +00:00
hns
a8fd428530 Every DbMapping object must now have a reference to the
application it belongs to.
2001-12-06 22:35:24 +00:00
hns
ef5b901c1e updated version info 2001-12-04 12:46:21 +00:00
hns
f13c73a5d1 if a prototype if specified for groupby nodes, use the DbMapping
parsed by the application instead of creating a vanilla DbMapping.
This makes it possible to actually define additional properties and
collections on groupby nodes.
2001-12-04 12:45:29 +00:00
hns
deca565254 Not needed anymore. 2001-12-02 22:53:22 +00:00
hns
9622366678 Switched back from custum UrlEncoder to standard
java.net.URLEncoder class.
2001-12-02 22:52:20 +00:00
hns
246e79fa14 minimal formatting change 2001-12-02 22:50:56 +00:00
hns
c85b7e106a fixed bug: embedded webserver always sent no-cache header. 2001-12-02 22:50:25 +00:00
hns
4476523c67 increased version info 2001-11-28 13:39:12 +00:00
hns
e9aa7b7edd Let user cache have the user prototype and dbmapping so
collections/virtual subnodes work for anonymous users.
2001-11-27 16:50:00 +00:00
hns
dee820e805 Prevent type.properties check when accessing properties
of Java objects as skin macros.
2001-11-27 16:08:15 +00:00
hns
e42ce0ae46 Allow access to static fields from javascript. 2001-11-27 15:49:33 +00:00
hns
accd2f15e9 increased version info. 2001-11-27 14:16:13 +00:00
hns
5da1156043 Do not encode prefix and suffix attributes of macros. 2001-11-27 14:15:41 +00:00
hns
aec53f4425 Added code to find out if a property is defined in the
type.properties file before returning its value as a macro.

Return an error message if the property is not defined, or if
the macro tried to access a private property (which currently
applies only to user passwords).
2001-11-27 14:15:18 +00:00
hns
0dd58e56b0 added isPrimitive() utility method to find out if this property
can possibly be used as skin macro.
2001-11-27 14:12:00 +00:00
hns
f017f35e78 Increased version number.
Version info is now written to the logger instead of stdout.
2001-11-26 18:02:39 +00:00
hns
e32c31e1b1 Cache nodes are checked each time they are retrieved
because the clearCache() function may have been called on
the object since last accessing the cache node.

implemented clearCache() method to reset the cache in the
wrapped object.
2001-11-26 17:58:00 +00:00
hns
c4fb354f92 Implemented clearCacheNode() method to recreate/reset
a node's cache node.
2001-11-26 17:55:57 +00:00
hns
35c78734e8 added a clearCache() function to the HopObject prototype that
lets one clear (recreate) the HopObject's cache node.

createSkin now uses the application's skin cache. This is not
really much faster because caching and skin creation are
very similar in speed, but it should help reduce garbage collection.
2001-11-26 17:33:02 +00:00