Commit graph

  • ab378b0806 * Consider superclasses and interfaces when resolving class to prototype mapping. hns 2005-09-15 22:40:03 +00:00
  • cf1d403ab3 * Implement unsetCookie(name) that causes a prevously set cookie to be discarded * Add Javadoc comments to all methods hns 2005-09-13 20:51:45 +00:00
  • 435d2a5ee8 * Set cookie version to 1 and allow days value of zero in order for cookies to be deleted. hns 2005-09-13 20:16:27 +00:00
  • f9a327a9e8 * Made most fields in RequestEvaluator private and use a synchronized getter to access them * Minor change in ScriptingEngine interface hns 2005-09-13 13:40:31 +00:00
  • e05d4eabc8 * Be more precise when throwing exception in popStringBuffer(). hns 2005-09-13 10:22:53 +00:00
  • c57877dfb8 * Add dontEnum() function to JavaScript Object prototype. Takes a variable list of String arguments of propertiy names to set to DONTENUM. * Add some missing Javadocs. hns 2005-09-08 19:39:33 +00:00
  • 58a109b727 * Do not log concurrency conflicts. This is often misinterpreted as error which it is not. hns 2005-09-07 08:42:20 +00:00
  • 84751f86a6 * Move sql logging to finally clause so statements are logged even if an exception is thrown * Unified String/StringBuffer variable naming a bit hns 2005-09-07 08:41:16 +00:00
  • 58b09f4436 * Pass prefix, suffix, default parameters to macro functions and allow them to change them. Implemented by putting these values into a helper class RenderParameters which can easily overridden. hns 2005-09-01 22:01:17 +00:00
  • 1a3434837d * Put copy-on-write WrappedMap into separate class in order to be able to synchronize all of its methods, which is necessary to catch the switch between original and copied map, and which isn't necessary for ordinary and read-only WrappedMaps. hns 2005-09-01 21:57:56 +00:00
  • d728d7fe21 compiler warned about 'unmappable' character in juerg lehnis name; changed umlauts to ascii michi 2005-09-01 19:38:58 +00:00
  • 88b3579908 Updated old 2002 license version that was still used by the build script with the current license and changed the year to 2005 zumbrunn 2005-09-01 13:01:29 +00:00
  • a156431e69 Removed old static files of himp demo app zumbrunn 2005-09-01 12:56:16 +00:00
  • 8783b0e01c Removed gong, bloggerapi and lillebror from list of default apps and updated version number in build script from the bogus 1.4.2 to 1.5.0 zumbrunn 2005-09-01 12:41:18 +00:00
  • 3aa000e95b * Only show last two elements of script path in debugger. (Assume common case it is the prototype and the script.) hns 2005-08-31 20:35:06 +00:00
  • 437dfb94d3 * Bring manage app up to date with current Helma. hns 2005-08-31 13:16:21 +00:00
  • 24e878c176 * Refactored helma.doc package to make it work with repositories. hns 2005-08-31 12:20:42 +00:00
  • b5b60e3d92 * add getResources(). hns 2005-08-31 12:18:13 +00:00
  • 02ce5cc92e * Add getTypeProperties() and getSkinResources(), removed unused isJavaPrototype field. hns 2005-08-31 12:17:54 +00:00
  • 5c804670cb * Add new global function defineLibraryScope(string, boolean). This creates a new global property object with the name in argument 1 only if it doesn't exist yet, and optionally populates it with the standard JavaScript object (String, Date, isNaN, ...) hns 2005-08-30 16:52:30 +00:00
  • c632c8f8bd * Always render full file path because sources may be scattered in different repositories. hns 2005-08-30 11:06:07 +00:00
  • 05bce5953e * Make helmadoc work with multiple application repositories. hns 2005-08-30 11:01:27 +00:00
  • 3a55bd1b5e * Simplify some boolean statements. hns 2005-08-30 11:00:50 +00:00
  • 9f8774adc7 * Simplify checks for ignoreCase. hns 2005-08-29 16:13:13 +00:00
  • d76533a0c9 * Make main db.properties case sensitive. hns 2005-08-29 16:12:30 +00:00
  • 1a62a3db34 * Fix Bug 439: req.action returns wrong result on GET/POST/... hns 2005-08-29 15:56:20 +00:00
  • 8044f33450 * Only prepend table name to query if access name doesn't contain "(" or "." This makes it possible to use an SQL function as group criterium hns 2005-08-29 15:25:30 +00:00
  • 5efab894ef * Only prepend table name to query if access name doesn't contain "(" or "." hns 2005-08-29 14:11:38 +00:00
  • 8b446fea01 * Minor changes: remove unused code, switch error message to lower/mixed case. hns 2005-08-29 14:10:24 +00:00
  • 0f3d15cee5 * Patch from Juerg Lehni: try to autodetect Joins in additionalTables option. * Some code cleanup: - Don't do string concatenation in arguments to StringBuffer.append() - Remove redundant if clause - Remove throws statement for unthrown exceptions - Remove unneeded variable initialzation hns 2005-08-29 13:49:31 +00:00
  • 961f755c4f * Only interpret last path element as action if it is not terminated by a "/". This helps us to disambiguify URLs: /foo/ will never be interpreted as action, while /foo will be. hns 2005-08-29 12:06:24 +00:00
  • 37574fbdfd * Provide a getter for the repository's directory. hns 2005-08-25 10:13:22 +00:00
  • af84ec19c9 * Remaining public fields in RequestTrans converted to private, final where possible * Added setters/getters * Improved hashCode() implementation for RequestTrans hns 2005-08-18 22:55:30 +00:00
  • 3d6da7803d * Synchronize get() and set() to hopefully get rid of weird property read errors. * Do not access static fields through instance variable hns 2005-08-18 22:41:00 +00:00
  • 04d8589d29 Make public fields in RequestTrans private, remove transient modifier, add getters and setters as needed, synchronize getter and setter for action to fix inconsistent behaviour. hns 2005-08-18 21:46:52 +00:00
  • 97c5399c9b Implement getPrototypeProperties(String) to get a SystemMap containing the scripted properties of a prototype. hns 2005-08-12 13:27:26 +00:00
  • 3b2a106503 Handle case where global variable is null. hns 2005-08-12 13:18:38 +00:00
  • ac0fc677a5 * Set connection readonly flag to true in executeRetrieval() and false in executeUpdate(). * Remove a few unneeded local variables. hns 2005-08-12 13:18:11 +00:00
  • a878d5919a Added more possible parameters for the Image() constructor: BufferedImage, Image lehni 2005-08-12 11:32:03 +00:00
  • 5050abc53d Various changes to the imaging code: - added Image.trim(), that trims an image based on a specified pixel, just like in Photoshop. - saveAs exists in two versions now, one that takes a filename, the other an OutputStream + Mime type (first step toward an Java activation framework based approach) lehni 2005-08-12 11:30:04 +00:00
  • 29f4faa3a1 Various changes to the imaging code: - added Image.trim(), that trims an image based on a specified pixel, just like in Photoshop. - saveAs exists in two versions now, one that takes a filename, the other an OutputStream + Mime type (first step toward an Java activation framework based approach) lehni 2005-08-12 11:28:55 +00:00
  • e78b126148 Convert rootPrototype and userPrototype fields to local variables. hns 2005-08-09 23:50:21 +00:00
  • b316462c69 * Extract session cleanup and cron job invoker code from run() into separate cleanupSessions() and executeCronJobs() methods * Add some missing JavaDoc tags hns 2005-08-09 17:44:55 +00:00
  • 42a088ef58 Do not insist on helma.jar to be in classpath. This is useful for running Helma in alternative environments such as GCJ. hns 2005-08-09 17:32:39 +00:00
  • 7e44b71d6d Normalize upload file names by cutting off any path info before the actual file name. hns 2005-08-09 13:37:19 +00:00
  • 9b97203b3a added try-catch-blocks around CronJob parsing and CronJob handling kmfdm 2005-08-09 12:55:23 +00:00
  • 5982de3b48 Add uploadSoftfail servlet init parameter hns 2005-08-01 10:03:16 +00:00
  • 24fb08d1fc Improve cron thread log output hns 2005-08-01 10:02:44 +00:00
  • 7218ddd4da Simplify getCronJobs() implementation hns 2005-08-01 10:01:58 +00:00
  • f369c4ca1b Minor plastic surgery: move item.delete() up a few lines. hns 2005-07-29 13:41:15 +00:00
  • 1682808eca Delete upload file item after usage. hns 2005-07-29 13:37:24 +00:00
  • 3c29cd2e32 * Use Hashtable instead of WeakHashMap for activeCronJobs - we're using function names as keys, so it's actually bogus to use WeakHashMap, plus WeakHashMap is not synchronized. * Add event log statements each time cron jobs are executed: List of cron jobs we're going to execute, and the map of cron jobs still active from last time. * Add log statement if CronRunner catches an exception, just so it behaves like the same-thread cron execution code. hns 2005-07-29 13:30:45 +00:00
  • 42989de65e Add app.getCronJobs() function that allows to retrieve the currently registered custom cron jobs. This returns a JavaScript object with the function name as property names and the helma.util.CronJob instance as property values. hns 2005-07-29 13:24:31 +00:00
  • 878b7ee06d * Switch to Jakarta Commons FileUpload for handling file uploads. * Introduce uploadSoftfail setting in apps.properties that allows file upload errors to be cought by checking req.data.helma_upload_error hns 2005-07-29 11:45:42 +00:00
  • 56c1973ca5 Adding commons-fileupload.jar to classpath hns 2005-07-29 11:31:55 +00:00
  • 904acb7b17 Adding Jakarta Commons FileUpload 1.0 hns 2005-07-29 11:31:03 +00:00
  • 4539f0f74a Renamed some variables in the cron job section of the run() method. Rewrote cron job cleanup code at the end of run(). hns 2005-07-20 13:55:40 +00:00
  • 06fa3713a7 Remove debugging output. hns 2005-07-20 13:50:36 +00:00
  • 6d4978f652 * Fix bug 435, cron jobs are run even if the function name is not defined * Fix a bug that caused the scheduler thread to awaken twice in immedate succession because of imprecise timing in Thread.sleep() hns 2005-07-20 13:49:37 +00:00
  • 37e51812d6 Should fix bug 434 <http://helma.org/bugs/show_bug.cgi?id=434> * Synchronize all methods that call/rely on update(). * Make sure repositories and resources are not null after update() has been called. hns 2005-07-20 11:42:16 +00:00
  • bea4c3a5b7 Invoke setReadonly(boolean) on the db connection depending on the type of statement we're about to send. hns 2005-07-12 09:42:00 +00:00
  • eafca524bc Do not ignore case (i.e. switch property names to lower case) for db properties. hns 2005-07-12 09:40:26 +00:00
  • 3b539848c0 Add new constructor that takes ignoreCase flag, because it can't be set later for app/resource name properties. hns 2005-07-12 09:39:54 +00:00
  • ab5694092e Use Context.get/putThreadLocal() to register per-thread scopes for DynamicGlobalObject. This is to fix some very obscure behaviour that was likely caused by the WeakHashMap code. hns 2005-07-07 15:28:09 +00:00
  • 38b4f265ce Look up variables in per-thread scope first, then in shared global scope. grob 2005-07-06 14:10:02 +00:00
  • 5ebbfe70a3 Synchronize set/getSubnodeRelation() to prevent problems on multiprocessor machines grob 2005-07-06 11:42:36 +00:00
  • d8feb2620b Set req and res fields to volatile to prevent invalid reads on multiprocessor machines grob 2005-07-06 11:41:20 +00:00
  • fa38fbc172 Synchronize thread -> scope map grob 2005-07-06 11:40:16 +00:00
  • 6bdb02ec6a Fix registerUser(): user addNode() instead of setNode() so user nodes are stored as child nodes, not properties. hns 2005-06-28 10:27:05 +00:00
  • 9e43503ced Remove setDbMapping() which is never used and might be hazardous if it was. hns 2005-06-28 10:08:18 +00:00
  • 7209fd9709 make class not final hns 2005-06-28 10:03:55 +00:00
  • 5e2494462a sznchronizing all methods that manipulate/access the buffer field to avoid bogus rendering on multiprocessor machines. hns 2005-06-24 13:37:54 +00:00
  • 7991eb888f Add proxy method for Application.getSkin(String protoname, String skinname, Object[] skinpath) hns 2005-06-22 09:40:45 +00:00
  • d743c82c89 Go back to old log file rotation code layout a bit, but still only use one thread to gzip all rotated files: - GZipper class is with FileLogger again and takes either a list of files or a single file - Log file rotation is done synchronously in the Logging.Runner thread, only gzipping is done in a separate thread hns 2005-06-22 08:37:25 +00:00
  • 365fab6a63 Rewrote log file rotation to use just one thread for zipping all log files. hns 2005-06-16 19:57:15 +00:00
  • 0c8b653c1e Cleaned up constructor a bit, use direct assignment instead of setter for prototype. hns 2005-06-16 17:51:04 +00:00
  • 27a31bd736 Do not try to set DbMapping in Node.setPrototype() - it has disastrous effects for prototyped groupby nodes. hns 2005-06-16 17:45:56 +00:00
  • 8f4bfdd54b Set parent in MultiFileRepository child repositories, otherwise order is lost in Application.addRepository() hns 2005-06-16 12:12:43 +00:00
  • 0ecfcd0fba - Make sure collections on transient nodes are set to transient when making persitable to avoid collection objects being loaded from database. - Allow getKey() to be called on transient nodes iff primary key is set - Do set DbMapping in setPrototype() method - Unified Node constructors and initializers a bit hns 2005-06-15 14:40:57 +00:00
  • 879015efd5 Fix bug 431 http://www.helma.org/bugs/show_bug.cgi?id=431 hns 2005-06-14 10:34:34 +00:00
  • df88235e04 MultiFileRepository contributed by Barbara Ondrisek: A subclass of FileRepository that treats all subdirectories as top-level file repositories (instead of than treating them as prototype directories) hns 2005-06-10 12:35:10 +00:00
  • 96a8d6f95e ignore-dirs patch contributed by Barbara Ondrisek: appname.ignore = dir1,dir2 prevents Prototypes to be created for the given directories. hns 2005-06-10 12:28:27 +00:00
  • f9ce4c8c07 ResourceComparator is never used with ResourceTrackers hns 2005-06-10 12:02:16 +00:00
  • 2b2fdf59c1 Simplified getInstance(String) a little bit. hns 2005-06-09 16:34:00 +00:00
  • 04a1b2cb80 Set thread priority for GZipper threads to MIN_PRIORITY. hns 2005-06-09 16:32:32 +00:00
  • 0e2aca1c07 - Remove old debug thread dump in getInstance(String) - Remove double checking to avoid entering synchronized code in getInstance(String) - Rename newLog(String) to getFileLogger(String) and clean it up a little bit hns 2005-06-09 11:46:12 +00:00
  • 23efbd457d Make Runner.run() synchronized again, needed by wait() hns 2005-06-09 11:23:49 +00:00
  • e95169cfe6 Remove comment about bogus thread safety, not true anymore after last commit. hns 2005-06-09 11:15:01 +00:00
  • 70edf7bedf - No need to make runner volatile since it is only access in synchronized code - Do not null out Logging.runner at the end of Runner.run() - Remove unused Runner.wakeup() method and make runner.run() not synchronized hns 2005-06-09 11:02:55 +00:00
  • 3a55c1b270 - Make sure we use an absolute path for logdir - Make all methods that work on the logfile/writer synchronized - Increase Buffer size in GZipper thread to 8192 bytes hns 2005-06-09 10:42:51 +00:00
  • 5bc692e923 Make runner variable volatile. hns 2005-06-06 19:28:14 +00:00
  • 107aaa6a59 - Encapsulate access to static runner into synchronized methods to prevent spawning of multiple threads. - Make static runner field non-public. hns 2005-06-06 15:55:16 +00:00
  • 1a7a054894 Minor patch: get dateLastRendered and dateCache from the same java.util.Date instance. hns 2005-06-06 15:52:45 +00:00
  • 18dbec3dd8 Fix two minor bugs that keep everything from working. hns 2005-06-02 20:27:40 +00:00
  • a8b9ffd154 Make FileRepository(File) constructor public again, it is used from the helma.main and helma.servlet packages. hns 2005-06-02 19:04:13 +00:00
  • 43b1b5edd8 Many changes and fixes in Prototype skin management: - Use an ordered TreeSet for prototype's repositories so we know the resources we get are already in the right order. - Use SkinMap again for intetracking mapping the prototype's skins internally after cleaning the code up a bit. - Add new ScriptableSkinMap object that wraps a skinmap, exposes it as native JavaScript object by extending WrappedMap, and does the Resource to String conversion in get(). - Move code that loads additional skins from skinpath from SkinManager.getSkinFiles() to SkinMap.loadSkinFiles() - Inline addSkinResource() and addCodeResource() methods into checkForUpdates(). - Make lastUpdate kind of fields volatile. hns 2005-06-02 12:06:57 +00:00
  • 1c9bdff6af Rename getSkinInternal() to getSkinInPath() hns 2005-06-02 08:18:44 +00:00
  • a9aadfe00c - Make sure our file has an absolute path, otherwise we run into inconsistent behaviour of File.exists() hns 2005-06-01 15:09:52 +00:00
  • ceebcdb96e - Make sure our directory has an absolute path, otherwise we run into inconsistent behaviour of File.exists() - Throw exception if directory exists and is not a directory - Rename dir instance variable to directory hns 2005-06-01 15:09:35 +00:00
  • 828ba529dd Make constructor public. hns 2005-06-01 14:54:50 +00:00