[MMBASE CVS] RE: Message
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] RE: MedHelp 55945
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] src/org/mmbase/bridge/util DataTypeField.java
Update of /var/cvs/src/org/mmbase/bridge/util In directory james.mmbase.org:/tmp/cvs-serv19163/util Modified Files: Tag: MMBase-1_8 DataTypeField.java Log Message: fixed @since tag See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/bridge/util Index: DataTypeField.java === RCS file: /var/cvs/src/org/mmbase/bridge/util/DataTypeField.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -b -r1.1.2.4 -r1.1.2.5 --- DataTypeField.java 20 Oct 2008 08:41:41 - 1.1.2.4 +++ DataTypeField.java 8 Dec 2008 09:14:02 - 1.1.2.5 @@ -22,7 +22,7 @@ * (itself). This also associates a Cloud object with the DataType. * * @author Michiel Meeuwissen - * @version $Id: DataTypeField.java,v 1.1.2.4 2008/10/20 08:41:41 michiel Exp $ + * @version $Id: DataTypeField.java,v 1.1.2.5 2008/12/08 09:14:02 michiel Exp $ * @since MMBase-1.8.7 */ @@ -45,7 +45,7 @@ } /** * This constructor only wraps the given field to have another datatype. - * @since MMBase-1.9 + * @since MMBase-1.8.7 */ public DataTypeField(final Field field, final DataType dataType) { super(field.getName(), dataType.getBaseType(), field.getType(), field.getState(), dataType); ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] Re: Order status
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] applications/richtext/src/org/mmbase/richtext/processors/xml Wiki.java
Update of /var/cvs/applications/richtext/src/org/mmbase/richtext/processors/xml In directory james.mmbase.org:/tmp/cvs-serv20817/processors/xml Modified Files: Wiki.java Log Message: added some code to autocorrect some inconsistencies which could have occured See also: http://cvs.mmbase.org/viewcvs/applications/richtext/src/org/mmbase/richtext/processors/xml Index: Wiki.java === RCS file: /var/cvs/applications/richtext/src/org/mmbase/richtext/processors/xml/Wiki.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -b -r1.15 -r1.16 --- Wiki.java 29 Sep 2008 08:55:17 - 1.15 +++ Wiki.java 8 Dec 2008 10:06:08 - 1.16 @@ -29,7 +29,7 @@ * id of the node). * * @author Michiel Meeuwissen - * @version $Id: Wiki.java,v 1.15 2008/09/29 08:55:17 michiel Exp $ + * @version $Id: Wiki.java,v 1.16 2008/12/08 10:06:08 michiel Exp $ * @todo something goes wrong if same node relation multiple times. */ @@ -174,7 +174,10 @@ NodeQuery q = Queries.createRelationNodesQuery(editedNode, objects, "idrel", "destination"); NodeList links = cloud.getNodeManager("idrel").getList(q); createdLinks.addAll(links); +cleanDuplicateIdRels(createdLinks); cloud.setProperty("createdlinks", createdLinks); +} else { +log.debug("Found create lnsk in cloud already"); } // search all anchors @@ -219,8 +222,37 @@ } + + return source; } +/** + * Duplicate idrels should not have been created, but perhaps in some old version of this code + * it could happen. Get it over with, and simply make sure there are none + */ +private void cleanDuplicateIdRels(NodeList list) { +Set ids = new HashSet (); +NodeIterator i = list.nodeIterator(); + +while (i.hasNext()) { +Node n = i.nextNode(); +String id = n.getStringValue("id"); +if (ids.contains(id)) { +try { +n.delete(true); +log.info("Removed duplicate id " + id); +i.remove(); +} catch (Exception e) { +log.warn(e); +} +} else { +ids.add(id); +} +} +log.debug("Found ids " + ids); +} + + } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer_Portlets/portlets-newsletter/config/applications/newsletter/builders newsletterpublication.xml
Update of /var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/config/applications/newsletter/builders In directory james.mmbase.org:/tmp/cvs-serv22273 Modified Files: newsletterpublication.xml Log Message: CMSC-1163, Newsletter: Add extra information on which person approved newsletter edition,change the field size See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-newsletter/config/applications/newsletter/builders See also: http://www.mmbase.org/jira/browse/CMSC-1163 Index: newsletterpublication.xml === RCS file: /var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/config/applications/newsletter/builders/newsletterpublication.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -b -r1.15 -r1.16 --- newsletterpublication.xml 4 Dec 2008 09:10:14 - 1.15 +++ newsletterpublication.xml 8 Dec 2008 10:44:54 - 1.16 @@ -188,7 +188,7 @@ http://www.mmbase.org/xmlns/datatypes"/> approved_by - STRING ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] RE: MedHelp 92405
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] applications/crontab/src/org/mmbase/applications/crontab CronEntry.java
Update of /var/cvs/applications/crontab/src/org/mmbase/applications/crontab In directory james.mmbase.org:/tmp/cvs-serv22666 Modified Files: CronEntry.java Log Message: made it possible to set type explicitely to default, leaving the confifgution token empty. See also: http://cvs.mmbase.org/viewcvs/applications/crontab/src/org/mmbase/applications/crontab Index: CronEntry.java === RCS file: /var/cvs/applications/crontab/src/org/mmbase/applications/crontab/CronEntry.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -b -r1.21 -r1.22 --- CronEntry.java 4 Dec 2008 14:12:04 - 1.21 +++ CronEntry.java 8 Dec 2008 10:55:10 - 1.22 @@ -20,7 +20,7 @@ * * @author Kees Jongenburger * @author Michiel Meeuwissen - * @version $Id: CronEntry.java,v 1.21 2008/12/04 14:12:04 michiel Exp $ + * @version $Id: CronEntry.java,v 1.22 2008/12/08 10:55:10 michiel Exp $ */ public class CronEntry implements java.io.Serializable { @@ -119,10 +119,10 @@ } public CronEntry(String id, String cronTime, String name, String className, String configuration, String typeString) throws Exception { -this(id, cronTime, name, className, configuration, typeString == null ? Type.DEFAULT : Type.valueOf(typeString.toUpperCase())); +this(id, cronTime, name, className, configuration, (typeString == null || "".equals(typeString)) ? Type.DEFAULT : Type.valueOf(typeString.toUpperCase())); } public CronEntry(String id, String cronTime, String name, String className, String configuration, String typeString, Pattern servers) throws Exception { -this(id, cronTime, name, className, configuration, typeString == null ? Type.DEFAULT : Type.valueOf(typeString.toUpperCase()), servers); +this(id, cronTime, name, className, configuration, (typeString == null || "".equals(typeString)) ? Type.DEFAULT : Type.valueOf(typeString.toUpperCase()), servers); } /** ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] src/org/mmbase/util ThreadPools.java
Update of /var/cvs/src/org/mmbase/util In directory james.mmbase.org:/tmp/cvs-serv22731 Modified Files: ThreadPools.java Log Message: javadoc See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util Index: ThreadPools.java === RCS file: /var/cvs/src/org/mmbase/util/ThreadPools.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -b -r1.24 -r1.25 --- ThreadPools.java2 Dec 2008 13:04:19 - 1.24 +++ ThreadPools.java8 Dec 2008 10:55:41 - 1.25 @@ -18,7 +18,7 @@ * * @since MMBase 1.8 * @author Michiel Meeuwissen - * @version $Id: ThreadPools.java,v 1.24 2008/12/02 13:04:19 michiel Exp $ + * @version $Id: ThreadPools.java,v 1.25 2008/12/08 10:55:41 michiel Exp $ */ public abstract class ThreadPools { private static final Logger log = Logging.getLoggerInstance(ThreadPools.class); @@ -38,7 +38,8 @@ /** * Wrapper around Thread.scheduler.scheduleAtFixedRate. - * @deprecated + * @deprecated Used ThreadPools.scheduler#scheduleAtFixedRate This method is only provided to + * use this in both 1.8 (concurrecy backport) and 1.9 (java 1.5). */ public static ScheduledFuture scheduleAtFixedRate(Runnable pub, int time1, int time2) { return scheduler.scheduleAtFixedRate(pub, ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] Delivery Status Notification (Failure)
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] Your order
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] src/org/mmbase/util ResourceLoader.java
Update of /var/cvs/src/org/mmbase/util In directory james.mmbase.org:/tmp/cvs-serv24760 Modified Files: Tag: MMBase-1_8 ResourceLoader.java Log Message: ported stuff with ! in resourceloader.xml to recognize the current jar from head See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util Index: ResourceLoader.java === RCS file: /var/cvs/src/org/mmbase/util/ResourceLoader.java,v retrieving revision 1.39.2.14 retrieving revision 1.39.2.15 diff -u -b -r1.39.2.14 -r1.39.2.15 --- ResourceLoader.java 14 Nov 2008 10:14:39 - 1.39.2.14 +++ ResourceLoader.java 8 Dec 2008 12:59:12 - 1.39.2.15 @@ -98,7 +98,7 @@ * For property-files, the java-unicode-escaping is undone on loading, and applied on saving, so there is no need to think of that. * @author Michiel Meeuwissen * @since MMBase-1.8 - * @version $Id: ResourceLoader.java,v 1.39.2.14 2008/11/14 10:14:39 michiel Exp $ + * @version $Id: ResourceLoader.java,v 1.39.2.15 2008/12/08 12:59:12 michiel Exp $ */ public class ResourceLoader extends ClassLoader { @@ -1681,7 +1681,19 @@ ResourceLoader.readClassWeights(); } } -).getMaps(); +) { +protected Map.Entry getEntry(org.mmbase.util.xml.DocumentReader reader, String key, String value) { +String u = reader.getDocument().getDocumentURI(); +String[] parts = u.split("!", 2); +log.info(u + "-> " + Arrays.asList(parts)); +if (parts.length == 2) { +if (key.startsWith("!")) { +key = "\\A" + ReplacingLocalizedString.makeLiteral(parts[0]) + key + "\\z"; // should escape '.' and so one. +} +} +return new Entry(key, value); +} +}.getMaps(); private static final Map classWeights = new ConcurrentHashMap(); ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] applications/email/config/utils crontab.xml
Update of /var/cvs/applications/email/config/utils In directory james.mmbase.org:/tmp/cvs-serv22577 Modified Files: crontab.xml Log Message: example was not quite correct and gave warning in the log because of that See also: http://cvs.mmbase.org/viewcvs/applications/email/config/utils Index: crontab.xml === RCS file: /var/cvs/applications/email/config/utils/crontab.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- crontab.xml 24 Oct 2007 13:40:23 - 1.1 +++ crontab.xml 8 Dec 2008 10:54:06 - 1.2 @@ -9,7 +9,7 @@ -*/5 * * * *|org.mmbase.modules.smtp.PopHandler||pop,pop.gmail.com,mihxiltest,mmbase +*/5 * * * *|org.mmbase.module.smtp.PopFetcher||pop3,pop.gmail.com,mihxiltest,mmbase||mitulo/ ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] Delivery Status Notification
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] src/org/mmbase/util/xml DocumentReader.java UtilReader.java
Update of /var/cvs/src/org/mmbase/util/xml In directory james.mmbase.org:/tmp/cvs-serv24760/xml Modified Files: Tag: MMBase-1_8 DocumentReader.java UtilReader.java Log Message: ported stuff with ! in resourceloader.xml to recognize the current jar from head See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util/xml Index: DocumentReader.java === RCS file: /var/cvs/src/org/mmbase/util/xml/DocumentReader.java,v retrieving revision 1.29.2.6 retrieving revision 1.29.2.7 diff -u -b -r1.29.2.6 -r1.29.2.7 --- DocumentReader.java 1 Oct 2008 09:22:00 - 1.29.2.6 +++ DocumentReader.java 8 Dec 2008 12:59:12 - 1.29.2.7 @@ -40,7 +40,7 @@ * @author Rico Jansen * @author Pierre van Rooden * @author Michiel Meeuwissen - * @version $Id: DocumentReader.java,v 1.29.2.6 2008/10/01 09:22:00 michiel Exp $ + * @version $Id: DocumentReader.java,v 1.29.2.7 2008/12/08 12:59:12 michiel Exp $ * @since MMBase-1.7 */ public class DocumentReader { @@ -605,6 +605,13 @@ return v.iterator(); } +/** + * @since MMBase-1.9 + */ +public Document getDocument() { +return document; +} + public static void main(String[] argv) throws Exception { if (argv.length == 0) { System.out.println("Usage: java -Dmmbase.config= org.mmbase.util.xml.DocumentReader "); Index: UtilReader.java === RCS file: /var/cvs/src/org/mmbase/util/xml/UtilReader.java,v retrieving revision 1.25.2.4 retrieving revision 1.25.2.5 diff -u -b -r1.25.2.4 -r1.25.2.5 --- UtilReader.java 24 Nov 2008 17:32:09 - 1.25.2.4 +++ UtilReader.java 8 Dec 2008 12:59:12 - 1.25.2.5 @@ -34,7 +34,7 @@ * @since MMBase-1.6.4 * @author Rob Vermeulen * @author Michiel Meeuwissen - * @version $Id: UtilReader.java,v 1.25.2.4 2008/11/24 17:32:09 michiel Exp $ + * @version $Id: UtilReader.java,v 1.25.2.5 2008/12/08 12:59:12 michiel Exp $ */ public class UtilReader { @@ -183,6 +183,13 @@ } } +/** + * @since MMBase-1.9.1 + */ +protected Map.Entry getEntry(DocumentReader reader, String k, String v) { +return new Entry(k, v); +} + protected void readProperties(String s) { properties.clear(); maps.clear(); @@ -234,7 +241,7 @@ } } if (key != null) { -entryList.add(new Entry(key, value)); +entryList.add(getEntry(reader, key, value)); } } if (maps.containsKey(name) && ! type.equals("mergingmap")) { @@ -244,10 +251,11 @@ } } else { String value = reader.getElementValue(p); -if (properties.containsKey(name)) { -log.service("Property '" + name + "'(" + value + "') of " + url + " is shadowed"); +Map.Entry entry = getEntry(reader, name, value); +if (properties.containsKey(entry.getKey())) { +log.service("Property '" + entry.getKey() + "'(" + entry.getValue()+ "') of " + url + " is shadowed"); } else { -properties.put(name, value); +properties.put(entry.getKey(), entry.getValue()); } } } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] src/org/mmbase/util Casting.java
Update of /var/cvs/src/org/mmbase/util In directory james.mmbase.org:/tmp/cvs-serv22793 Modified Files: Casting.java Log Message: strip some zeros See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util Index: Casting.java === RCS file: /var/cvs/src/org/mmbase/util/Casting.java,v retrieving revision 1.121 retrieving revision 1.122 diff -u -b -r1.121 -r1.122 --- Casting.java1 Dec 2008 22:52:13 - 1.121 +++ Casting.java8 Dec 2008 10:56:11 - 1.122 @@ -16,7 +16,7 @@ * * @author Michiel Meeuwissen * @since MMBase-1.6 - * @version $Id: Casting.java,v 1.121 2008/12/01 22:52:13 michiel Exp $ + * @version $Id: Casting.java,v 1.122 2008/12/08 10:56:11 michiel Exp $ */ import java.util.*; @@ -936,7 +936,7 @@ */ static public BigDecimal toDecimal(Object i) { if (i instanceof BigDecimal) { -return (BigDecimal) i; +return ((BigDecimal) i).plus().stripTrailingZeros(); } else if (i instanceof CharSequence) { try { return new BigDecimal("" + i).stripTrailingZeros(); @@ -960,7 +960,7 @@ } else if (i instanceof Float) { return new BigDecimal((Float) i); } else { -return new BigDecimal(toDouble(i)); +return new BigDecimal(toDouble(i)).stripTrailingZeros(); } } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] RE: Message
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer_Portlets/portlets-newsletter/config/applications/newsletter/builders newsletterpublication.xml
Update of /var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/config/applications/newsletter/builders In directory james.mmbase.org:/tmp/cvs-serv22408 Modified Files: Tag: b1_5 newsletterpublication.xml Log Message: CMSC-1163, Newsletter: Add extra information on which person approved newsletter edition,change the field size See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-newsletter/config/applications/newsletter/builders See also: http://www.mmbase.org/jira/browse/CMSC-1163 Index: newsletterpublication.xml === RCS file: /var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/config/applications/newsletter/builders/newsletterpublication.xml,v retrieving revision 1.11.2.4 retrieving revision 1.11.2.5 diff -u -b -r1.11.2.4 -r1.11.2.5 --- newsletterpublication.xml 4 Dec 2008 09:11:10 - 1.11.2.4 +++ newsletterpublication.xml 8 Dec 2008 10:49:12 - 1.11.2.5 @@ -188,7 +188,7 @@ http://www.mmbase.org/xmlns/datatypes"/> approved_by - STRING ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] Delivery Status Notification
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] src/org/mmbase/cache QueryResultCache.java
Update of /var/cvs/src/org/mmbase/cache In directory james.mmbase.org:/tmp/cvs-serv27662 Modified Files: Tag: MMBase-1_8 QueryResultCache.java Log Message: made the silly constructor public See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/cache Index: QueryResultCache.java === RCS file: /var/cvs/src/org/mmbase/cache/QueryResultCache.java,v retrieving revision 1.34.2.5 retrieving revision 1.34.2.6 diff -u -b -r1.34.2.5 -r1.34.2.6 --- QueryResultCache.java 24 Jun 2008 09:52:22 - 1.34.2.5 +++ QueryResultCache.java 8 Dec 2008 15:33:51 - 1.34.2.6 @@ -32,7 +32,7 @@ * @author Daniel Ockeloen * @author Michiel Meeuwissen * @author Bunst Eunders - * @version $Id: QueryResultCache.java,v 1.34.2.5 2008/06/24 09:52:22 michiel Exp $ + * @version $Id: QueryResultCache.java,v 1.34.2.6 2008/12/08 15:33:51 michiel Exp $ * @since MMBase-1.7 * @see org.mmbase.storage.search.SearchQuery */ @@ -59,7 +59,7 @@ */ private final ChainedReleaseStrategy releaseStrategy; -QueryResultCache(int size) { +public QueryResultCache(int size) { super(size); releaseStrategy = new ChainedReleaseStrategy(); log.debug("Instantiated a " + this.getClass().getName() + " (" + releaseStrategy + ")"); // should happen limited number of times ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] src/org/mmbase/cache QueryResultCache.java
Update of /var/cvs/src/org/mmbase/cache In directory james.mmbase.org:/tmp/cvs-serv27728 Modified Files: QueryResultCache.java Log Message: made the silly constructor public See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/cache Index: QueryResultCache.java === RCS file: /var/cvs/src/org/mmbase/cache/QueryResultCache.java,v retrieving revision 1.46 retrieving revision 1.47 diff -u -b -r1.46 -r1.47 --- QueryResultCache.java 24 Jun 2008 09:54:44 - 1.46 +++ QueryResultCache.java 8 Dec 2008 15:34:26 - 1.47 @@ -32,7 +32,7 @@ * @author Daniel Ockeloen * @author Michiel Meeuwissen * @author Bunst Eunders - * @version $Id: QueryResultCache.java,v 1.46 2008/06/24 09:54:44 michiel Exp $ + * @version $Id: QueryResultCache.java,v 1.47 2008/12/08 15:34:26 michiel Exp $ * @since MMBase-1.7 * @see org.mmbase.storage.search.SearchQuery * @todo Perhaps we could put the 'typeCounter' stuff in a sub-class. @@ -62,7 +62,7 @@ */ private final ChainedReleaseStrategy releaseStrategy; -QueryResultCache(int size) { +public QueryResultCache(int size) { super(size); releaseStrategy = new ChainedReleaseStrategy(); log.service("Instantiated a " + this.getClass().getName() + " (" + releaseStrategy + ")"); // should happen limited number of times ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers - New directory
Update of /var/cvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers In directory james.mmbase.org:/tmp/cvs-serv28263/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers Log Message: Directory /var/cvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers added to the repository See also: http://cvs.mmbase.org/viewcvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers PrefixSuffixModifierTest.java TemplateCleanerModifierTest.java
Update of /var/cvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers In directory james.mmbase.org:/tmp/cvs-serv28295/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers Added Files: PrefixSuffixModifierTest.java TemplateCleanerModifierTest.java Log Message: See also: http://cvs.mmbase.org/viewcvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers PrefixSuffixModifierTest.java is new TemplateCleanerModifierTest.java is new ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] Delivery Status Notification (Failure)
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders Users.java
Update of /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders In directory james.mmbase.org:/tmp/cvs-serv29119/implementation/cloudcontext/builders Modified Files: Tag: MMBase-1_8 Users.java Log Message: MMB-1749 See also: http://cvs.mmbase.org/viewcvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders See also: http://www.mmbase.org/jira/browse/MMB-1749 Index: Users.java === RCS file: /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders/Users.java,v retrieving revision 1.48.2.4 retrieving revision 1.48.2.5 diff -u -b -r1.48.2.4 -r1.48.2.5 --- Users.java 24 Sep 2008 09:55:59 - 1.48.2.4 +++ Users.java 8 Dec 2008 16:30:55 - 1.48.2.5 @@ -17,6 +17,7 @@ import org.mmbase.storage.search.*; import org.mmbase.storage.search.implementation.*; import org.mmbase.cache.Cache; +import org.mmbase.cache.QueryResultCache; import org.mmbase.util.Encode; import org.mmbase.util.logging.Logger; import org.mmbase.util.logging.Logging; @@ -31,10 +32,10 @@ * @author Eduard Witteveen * @author Pierre van Rooden * @author Michiel Meeuwissen - * @version $Id: Users.java,v 1.48.2.4 2008/09/24 09:55:59 rico Exp $ + * @version $Id: Users.java,v 1.48.2.5 2008/12/08 16:30:55 michiel Exp $ * @since MMBase-1.7 */ -public class Users extends MMObjectBuilder { +public class Users extends MMObjectBuilder implements Provider { private static final Logger log = Logging.getLoggerInstance(Users.class); @@ -63,6 +64,12 @@ public String getDescription() { return "Caches the users. UserName --> User Node"; } }; +protected static QueryResultCache userRankCache = new QueryResultCache(100) { +public String getName(){ return "CCS:UserRankCache"; } +public String getDescription() { return "Caches the rank objects related to queries"; } + +}; + protected Function encodeFunction = new AbstractFunction("encode", new Parameter[] {new Parameter("password", String.class, true) }, ReturnType.STRING) { { @@ -92,6 +99,7 @@ public boolean init() { rankCache.putCache(); userCache.putCache(); +userRankCache.putCache(); String s = (String)getInitParameters().get("encoding"); if (s == null) { @@ -336,11 +344,21 @@ query.setConstraint(cons); // sometimes, I quite hate the 'core version' query-framework. + + try { -List result = mmb.getClusterBuilder().getClusterNodesFromQueryHandler(query); +boolean useCache = query.getCachePolicy().checkPolicy(query); +List result = useCache ? (List) userRankCache.get(query) : null; +if (result == null) { +result = mmb.getClusterBuilder().getClusterNodesFromQueryHandler(query); if (log.isDebugEnabled()) { log.debug("Executing " + query + " --> " + result); } +} +if (useCache) { +userRankCache.put(query, result); +} + if (result.size() > 0) { return ((MMObjectNode) result.get(0)).getNodeValue("mmbaseusers"); } else { @@ -588,5 +606,15 @@ } +public boolean allowEncodedPassword() { +return org.mmbase.util.Casting.toBoolean(getInitParameter("allowencodedpassword")); +} + +public MMObjectBuilder getUserBuilder() { +return this; +} + + + } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext Provider.java
Update of /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext In directory james.mmbase.org:/tmp/cvs-serv29119/implementation/cloudcontext Added Files: Tag: MMBase-1_8 Provider.java Log Message: MMB-1749 See also: http://cvs.mmbase.org/viewcvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext See also: http://www.mmbase.org/jira/browse/MMB-1749 Provider.java is new ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders Contexts.java
Update of /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders In directory james.mmbase.org:/tmp/cvs-serv29267/builders Modified Files: Tag: MMBase-1_8 Contexts.java Log Message: MMB-1749 See also: http://cvs.mmbase.org/viewcvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders See also: http://www.mmbase.org/jira/browse/MMB-1749 Index: Contexts.java === RCS file: /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders/Contexts.java,v retrieving revision 1.48.2.1 retrieving revision 1.48.2.2 diff -u -b -r1.48.2.1 -r1.48.2.2 --- Contexts.java 7 Sep 2006 12:46:49 - 1.48.2.1 +++ Contexts.java 8 Dec 2008 16:31:47 - 1.48.2.2 @@ -35,7 +35,7 @@ * @author Eduard Witteveen * @author Pierre van Rooden * @author Michiel Meeuwissen - * @version $Id: Contexts.java,v 1.48.2.1 2006/09/07 12:46:49 pierre Exp $ + * @version $Id: Contexts.java,v 1.48.2.2 2008/12/08 16:31:47 michiel Exp $ * @seeorg.mmbase.security.implementation.cloudcontext.Verify * @seeorg.mmbase.security.Authorization */ @@ -194,7 +194,7 @@ if (user.getNode() != null && user.getNode().getNumber() == nodeId && operation == Operation.DELETE) return false; // nobody may delete own node if (builder instanceof Contexts) { try { -Users users = Users.getBuilder(); +MMObjectBuilder users = Authenticate.getInstance().getUserProvider().getUserBuilder(); BasicSearchQuery query = new BasicSearchQuery(true); Step step = query.addStep(users); BasicFieldValueConstraint constraint = new BasicFieldValueConstraint(new BasicStepField(step, users.getField("defaultcontext")), new Integer(nodeId)); @@ -522,8 +522,9 @@ Constraint newConstraint = query.createConstraint(field, ac.contexts); if (ac.inverse) query.setInverse(newConstraint, true); -if (step.getTableName().equals("mmbaseusers")) { // anybody may see own node -Users users = Users.getBuilder(); +Provider users = Authenticate.getInstance().getUserProvider(); + +if (step.getTableName().equals(users.getUserBuilder().getTableName())) { // anybody may see own node Constraint own = query.createConstraint(query.createStepField(step, "number"), new Integer(users.getUser(userContext.getIdentifier()).getNumber())); newConstraint = query.createConstraint(newConstraint, CompositeConstraint.LOGICAL_OR, own); @@ -605,7 +606,8 @@ if (found == null) { found = new HashSet(); -found.addAll(getGroupsOrUsers(contextNode, operation, Users.getBuilder())); +MMObjectBuilder users = Authenticate.getInstance().getUserProvider().getUserBuilder(); +found.addAll(getGroupsOrUsers(contextNode, operation, users)); found.addAll(getGroupsOrUsers(contextNode, operation, Groups.getBuilder())); operationsCache.put(contextNode, operation, found); } @@ -790,7 +792,7 @@ /** */ protected boolean mayGrant(MMObjectNode contextNode, MMObjectNode groupOrUserNode, Operation operation, MMObjectNode user) { -Users users = Users.getBuilder(); +Provider users = Authenticate.getInstance().getUserProvider(); if (users.getRank(user).getInt() >= Rank.ADMIN.getInt()) return true; // admin may do everything Groups groups = Groups.getBuilder(); @@ -854,7 +856,7 @@ */ protected boolean mayRevoke(MMObjectNode contextNode, MMObjectNode groupOrUserNode, Operation operation, MMObjectNode user) { -Users users = Users.getBuilder(); +Provider users = Authenticate.getInstance().getUserProvider(); if (users.getRank(user).getInt() >= Rank.ADMIN.getInt()) return true; // admin may do everything if (groupOrUserNode.getBuilder() instanceof Groups) { if (! Groups.getBuilder().contains(groupOrUserNode, user.getNumber()) || users.getRank(user).getInt() <= Rank.BASICUSER.getInt()) return false; // must be 'high rank' member of group @@ -913,7 +915,7 @@ * util */ protected MMObjectNode getUserNode(UserContext user) { -Users users = Users.getBuilder(); +Provider users = Authenticate.getInstance().getUserProvider(); return users.getUser(user.getIdentifier()); } @@ -996,7 +998,8 @@ throw new SecurityException("Self was not supplied"); } // find the user first, the check if the current user actually has rights
[MMBASE CVS] applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext Authenticate.java User.java
Update of /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext In directory james.mmbase.org:/tmp/cvs-serv29267 Modified Files: Tag: MMBase-1_8 Authenticate.java User.java Log Message: MMB-1749 See also: http://cvs.mmbase.org/viewcvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext See also: http://www.mmbase.org/jira/browse/MMB-1749 Index: Authenticate.java === RCS file: /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/Authenticate.java,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -u -b -r1.17 -r1.17.2.1 --- Authenticate.java 20 Feb 2006 18:34:16 - 1.17 +++ Authenticate.java 8 Dec 2008 16:31:46 - 1.17.2.1 @@ -31,7 +31,7 @@ * @author Eduard Witteveen * @author Pierre van Rooden * @author Michiel Meeuwissen - * @version $Id: Authenticate.java,v 1.17 2006/02/20 18:34:16 michiel Exp $ + * @version $Id: Authenticate.java,v 1.17.2.1 2008/12/08 16:31:46 michiel Exp $ */ public class Authenticate extends Authentication { private static final Logger log = Logging.getLoggerInstance(Authenticate.class); @@ -60,10 +60,18 @@ } } +public final static Authenticate getInstance() { +return (Authenticate) MMBase.getMMBase().getMMBaseCop().getAuthentication(); +} + +public Provider getUserProvider() { +return Users.getBuilder(); +} + // javadoc inherited protected void load() throws SecurityException { -Users users = Users.getBuilder(); +Provider users = getUserProvider(); if (users == null) { String msg = "builders for security not installed, if you are trying to install the application belonging to this security, please restart the application after all data has been imported)"; log.fatal(msg); @@ -88,21 +96,30 @@ } +private boolean warnedNoAnonymousUser = false; + // javadoc inherited public UserContext login(String s, Map map, Object aobj[]) throws SecurityException { if (log.isDebugEnabled()) { log.trace("login-module: '" + s + "'"); } MMObjectNode node = null; -Users users = Users.getBuilder(); +Provider users = getUserProvider(); if (users == null) { String msg = "builders for security not installed, if you are trying to install the application belonging to this security, please restart the application after all data has been imported)"; log.fatal(msg); throw new SecurityException(msg); } -allowEncodedPassword = org.mmbase.util.Casting.toBoolean(users.getInitParameter("allowencodedpassword")); +allowEncodedPassword = users.allowEncodedPassword(); if ("anonymous".equals(s)) { node = users.getAnonymousUser(); +if (node == null) { +if (! warnedNoAnonymousUser) { +log.warn("No user node for anonymous found"); +warnedNoAnonymousUser = true; +} +return new LocalAdmin("anonymous", s, Rank.getRank("anonymous")); +} } else if ("name/password".equals(s)) { String userName = (String)map.get("username"); String password = (String)map.get("password"); @@ -117,7 +134,7 @@ return user; } } -node = users.getUser(userName, password); +node = users.getUser(userName, password, true); if (node != null && ! users.isValid(node)) { throw new SecurityException("Logged in an invalid user"); } @@ -153,12 +170,18 @@ return user; } else { if (userName != null) { +try { node = users.getUser(userName); -if (rank != null) { +} catch (SecurityException se) { +log.service(se); +return new LocalAdmin(userName, s, rank == null ? Rank.ADMIN : Rank.getRank(rank)); } } else if (rank != null) { node = users.getUserByRank(rank, userName); log.debug("Class authentication to rank " + rank + " found node " + node); +if (node == null) { +return new LocalAdmin(rank, s, Rank.getRank(rank)); +} } } } else { @@ -240,14 +263,19 @@ private String userName; private long l; +private Rank r = Rank.ADMIN; LocalAdmin(String user, String app) { super(new AdminVirtualNode(), Authenticate.this.getKey(), app); l = extraAdminsUniqueNumber; userName = user
[MMBASE CVS] applications/cloudcontext/config/builders/cloudcontext mmbaseusers.xml
Update of /var/cvs/applications/cloudcontext/config/builders/cloudcontext In directory james.mmbase.org:/tmp/cvs-serv30106/config/builders/cloudcontext Modified Files: mmbaseusers.xml Log Message: MMB-1749 See also: http://cvs.mmbase.org/viewcvs/applications/cloudcontext/config/builders/cloudcontext See also: http://www.mmbase.org/jira/browse/MMB-1749 Index: mmbaseusers.xml === RCS file: /var/cvs/applications/cloudcontext/config/builders/cloudcontext/mmbaseusers.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -u -b -r1.23 -r1.24 --- mmbaseusers.xml 13 Jun 2008 14:09:39 - 1.23 +++ mmbaseusers.xml 8 Dec 2008 17:02:46 - 1.24 @@ -187,6 +187,32 @@ + + +Rank +Rank + + http://www.mmbase.org/xmlns/datatypes";> + + http://www.mmbase.org/xmlns/searchquery";> + + + + + +rank +mmbaseranks + + + + +rank +mmbaseranks + + + + + ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext Provider.java Authenticate.java User.java
Update of /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext In directory james.mmbase.org:/tmp/cvs-serv30106/src/org/mmbase/security/implementation/cloudcontext Modified Files: Authenticate.java User.java Added Files: Provider.java Log Message: MMB-1749 See also: http://cvs.mmbase.org/viewcvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext See also: http://www.mmbase.org/jira/browse/MMB-1749 Index: Authenticate.java === RCS file: /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/Authenticate.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -b -r1.26 -r1.27 --- Authenticate.java 13 Nov 2008 15:18:36 - 1.26 +++ Authenticate.java 8 Dec 2008 17:02:46 - 1.27 @@ -31,7 +31,7 @@ * @author Eduard Witteveen * @author Pierre van Rooden * @author Michiel Meeuwissen - * @version $Id: Authenticate.java,v 1.26 2008/11/13 15:18:36 michiel Exp $ + * @version $Id: Authenticate.java,v 1.27 2008/12/08 17:02:46 michiel Exp $ */ public class Authenticate extends Authentication { private static final Logger log = Logging.getLoggerInstance(Authenticate.class); @@ -59,6 +59,19 @@ log.error(ioe); } } +/** + * @since MMBase-1.8.7 + */ +public final static Authenticate getInstance() { +return (Authenticate) MMBase.getMMBase().getMMBaseCop().getAuthentication(); +} + +/** + * @since MMBase-1.8.7 + */ +public Provider getUserProvider() { +return Users.getBuilder(); +} /** @@ -66,7 +79,7 @@ */ @Override protected void load() throws SecurityException { attributes.put(STORES_CONTEXT_IN_OWNER, Boolean.TRUE); -Users users = Users.getBuilder(); +Provider users = getUserProvider(); if (users == null) { String msg = "builders for security not installed, if you are trying to install the application belonging to this security, please restart the application after all data has been imported)"; log.fatal(msg); @@ -102,6 +115,7 @@ return "mmbaseusers"; } +private boolean warnedNoAnonymousUser = false; /** * [EMAIL PROTECTED] @@ -111,15 +125,22 @@ log.trace("login-module: '" + s + "'"); } MMObjectNode node = null; -Users users = Users.getBuilder(); +Provider users = getUserProvider(); if (users == null) { String msg = "builders for security not installed, if you are trying to install the application belonging to this security, please restart the application after all data has been imported)"; log.fatal(msg); throw new SecurityException(msg); } -allowEncodedPassword = org.mmbase.util.Casting.toBoolean(users.getInitParameter("allowencodedpassword")); +allowEncodedPassword = users.allowEncodedPassword(); if ("anonymous".equals(s)) { node = users.getAnonymousUser(); +if (node == null) { +if (! warnedNoAnonymousUser) { +log.warn("No user node for anonymous found"); +warnedNoAnonymousUser = true; +} +return new LocalAdmin("anonymous", s, Rank.getRank("anonymous")); +} } else if ("name/password".equals(s)) { String userName = (String)map.get("username"); String password = (String)map.get("password"); @@ -134,7 +155,7 @@ return user; } } -node = users.getUser(userName, password); +node = users.getUser(userName, password, false); if (node != null && ! users.isValid(node)) { throw new SecurityException("Logged in an invalid user"); } @@ -306,7 +327,7 @@ } public class AdminVirtualNode extends VirtualNode { AdminVirtualNode() { -super(Users.getBuilder()); +super(Authenticate.this.getUserProvider().getUserBuilder()); } } Index: User.java === RCS file: /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/User.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -b -r1.25 -r1.26 --- User.java 26 Jul 2007 12:45:57 - 1.25 +++ User.java 8 Dec 2008 17:02:46 - 1.26 @@ -28,7 +28,7 @@ * @author Eduard Witteveen * @author Pierre van Rooden * @author Michiel Meeuwissen - * @version $Id: User.java,v 1.25 2007/07/26 12:45:57 michiel Exp $ + * @version $Id: User.java,v 1.26 2008/12/08 17:02:46 michiel Exp $ * @seeorg.mmbase.security.implementation.cloudcontext.builders.Users */ public class User extends BasicUser impleme
[MMBASE CVS] applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders Contexts.java Users.java
Update of /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders In directory james.mmbase.org:/tmp/cvs-serv30106/src/org/mmbase/security/implementation/cloudcontext/builders Modified Files: Contexts.java Users.java Log Message: MMB-1749 See also: http://cvs.mmbase.org/viewcvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders See also: http://www.mmbase.org/jira/browse/MMB-1749 Index: Contexts.java === RCS file: /var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders/Contexts.java,v retrieving revision 1.56 retrieving revision 1.57 diff -u -b -r1.56 -r1.57 --- Contexts.java 7 Aug 2008 20:01:51 - 1.56 +++ Contexts.java 8 Dec 2008 17:02:46 - 1.57 @@ -35,7 +35,7 @@ * @author Eduard Witteveen * @author Pierre van Rooden * @author Michiel Meeuwissen - * @version $Id: Contexts.java,v 1.56 2008/08/07 20:01:51 michiel Exp $ + * @version $Id: Contexts.java,v 1.57 2008/12/08 17:02:46 michiel Exp $ * @seeorg.mmbase.security.implementation.cloudcontext.Verify * @seeorg.mmbase.security.Authorization */ @@ -193,7 +193,7 @@ if (user.getNode() != null && user.getNode().getNumber() == nodeId && operation == Operation.DELETE) return false; // nobody may delete own node if (builder instanceof Contexts) { try { -Users users = Users.getBuilder(); +MMObjectBuilder users = Authenticate.getInstance().getUserProvider().getUserBuilder(); BasicSearchQuery query = new BasicSearchQuery(true); Step step = query.addStep(users); BasicFieldValueConstraint constraint = new BasicFieldValueConstraint(new BasicStepField(step, users.getField("defaultcontext")), new Integer(nodeId)); @@ -521,8 +521,9 @@ Constraint newConstraint = query.createConstraint(field, ac.contexts); if (ac.inverse) query.setInverse(newConstraint, true); -if (step.getTableName().equals("mmbaseusers")) { // anybody may see own node -Users users = Users.getBuilder(); +Provider users = Authenticate.getInstance().getUserProvider(); + +if (step.getTableName().equals(users.getUserBuilder().getTableName())) { // anybody may see own node Constraint own = query.createConstraint(query.createStepField(step, "number"), new Integer(users.getUser(userContext.getIdentifier()).getNumber())); newConstraint = query.createConstraint(newConstraint, CompositeConstraint.LOGICAL_OR, own); @@ -604,7 +605,8 @@ if (found == null) { found = new HashSet(); -found.addAll(getGroupsOrUsers(contextNode, operation, Users.getBuilder())); +MMObjectBuilder users = Authenticate.getInstance().getUserProvider().getUserBuilder(); +found.addAll(getGroupsOrUsers(contextNode, operation, users)); found.addAll(getGroupsOrUsers(contextNode, operation, Groups.getBuilder())); operationsCache.put(contextNode, operation, found); } @@ -790,7 +792,7 @@ * @javadoc */ protected boolean mayGrant(MMObjectNode contextNode, MMObjectNode groupOrUserNode, Operation operation, MMObjectNode user) { -Users users = Users.getBuilder(); +Provider users = Authenticate.getInstance().getUserProvider(); if (users.getRank(user).getInt() >= Rank.ADMIN.getInt()) return true; // admin may do everything Groups groups = Groups.getBuilder(); @@ -855,7 +857,7 @@ * @todo untested */ protected boolean mayRevoke(MMObjectNode contextNode, MMObjectNode groupOrUserNode, Operation operation, MMObjectNode user) { -Users users = Users.getBuilder(); +Provider users = Authenticate.getInstance().getUserProvider(); if (users.getRank(user).getInt() >= Rank.ADMIN.getInt()) return true; // admin may do everything if (groupOrUserNode.getBuilder() instanceof Groups) { if (! Groups.getBuilder().contains(groupOrUserNode, user.getNumber()) || users.getRank(user).getInt() <= Rank.BASICUSER.getInt()) return false; // must be 'high rank' member of group @@ -914,7 +916,7 @@ * @javadoc */ protected MMObjectNode getUserNode(UserContext user) { -Users users = Users.getBuilder(); +Provider users = Authenticate.getInstance().getUserProvider(); return users.getUser(user.getIdentifier()); } @@ -985,7 +987,8 @@ throw new SecurityException("Self was not supplied"); } // find the user first, the ch
[MMBASE CVS] applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/template SimpleTemplateParser.java QueryTemplateParser.java Template.java MultiTemplateParser.java Abstract
Update of /var/cvs/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/template In directory james.mmbase.org:/tmp/cvs-serv32624/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/template Modified Files: SimpleTemplateParser.java QueryTemplateParser.java Template.java MultiTemplateParser.java AbstractTemplateParser.java TemplateParser.java Log Message: more tests See also: http://cvs.mmbase.org/viewcvs/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/template Index: SimpleTemplateParser.java === RCS file: /var/cvs/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/template/SimpleTemplateParser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- SimpleTemplateParser.java 6 Dec 2008 17:58:51 - 1.1 +++ SimpleTemplateParser.java 8 Dec 2008 19:37:08 - 1.2 @@ -3,20 +3,19 @@ public class SimpleTemplateParser extends AbstractTemplateParser implements TemplateParser { public static final String SIMPLE_TEMPLATE_REGEXP = "\\w+(:[0-9]+)?"; - public SimpleTemplateParser(String nodeType, String nodeNumber, String template) { super(nodeType, nodeNumber, template); } -public void insertNumber() { -removeNumber(); +public void insertNodeNumber() { +removeNodeNumber(); if (nodeType.equals(template.getTemplate())) { -template.setNodenr(nodeNumber); +template.setNodeNumber(nodeNumber); } } -public static boolean isTemplate(String template){ -return template.matches("^"+SIMPLE_TEMPLATE_REGEXP+"$"); +public static boolean isTemplate(String template) { +return template.matches("^" + SIMPLE_TEMPLATE_REGEXP + "$"); } @Override @@ -29,5 +28,4 @@ return new Template(templateStr); } - } Index: QueryTemplateParser.java === RCS file: /var/cvs/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/template/QueryTemplateParser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- QueryTemplateParser.java6 Dec 2008 17:58:51 - 1.1 +++ QueryTemplateParser.java8 Dec 2008 19:37:08 - 1.2 @@ -13,10 +13,10 @@ this.templateQueryRunner = templateQueryRunner; } -public void insertNumber() { -removeNumber(); +public void insertNodeNumber() { +removeNodeNumber(); if(nodeType.equals(((QueryTemplate)template).getSourceType())){ -template.setNodenr(templateQueryRunner.runQuery(nodeNumber, queryTemplate)); +template.setNodeNumber(templateQueryRunner.runQuery(nodeNumber, queryTemplate)); } } Index: Template.java === RCS file: /var/cvs/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/template/Template.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- Template.java 6 Dec 2008 17:58:51 - 1.1 +++ Template.java 8 Dec 2008 19:37:08 - 1.2 @@ -7,7 +7,7 @@ public class Template { protected String template; -protected String nodenr = ""; +protected String nodeNumber = ""; static final String TEMPLATE_NODENR_SEPARATOR=":"; @@ -18,23 +18,27 @@ } public void removeNodenr(){ -nodenr = ""; +nodeNumber = ""; } String getNodeNumber(){ -return nodenr; +return nodeNumber; } -public boolean hasNodenr(){ -return !"".equals(nodenr); +public boolean hasNodeNumber(){ +return !"".equals(nodeNumber); } -public void setNodenr(String nodenr){ -this.nodenr = (StringUtils.isBlank(nodenr) ? "" : nodenr); +public void setNodeNumber(String nodeNumber){ +this.nodeNumber = (StringUtils.isBlank(nodeNumber) ? "" : nodeNumber); } public String getTemplate(){ -return template + (hasNodenr() ? TEMPLATE_NODENR_SEPARATOR + nodenr : ""); +return template + (hasTemplate() && hasNodeNumber() ? TEMPLATE_NODENR_SEPARATOR : "") + nodeNumber; +} + +public boolean hasTemplate() { +return ! StringUtils.isBlank(template); } private void splitNodenrFromTemplate() { @@ -43,7 +47,11 @@ Matcher m = p.matcher(_template); if (m.find()) { template = _template.substring(0, m.start()); -nodenr = _template.substring(m.start() + 1); +nodeNumber = _template.substring(m.start() + 1); } } + +public void removeTemplate() { +template = ""; +} } Index: MultiTemplateParser.java
[MMBASE CVS] applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/template AbstractTemplateParserTest.java QueryTemplateParserTest.java SimpleTemplateParserTest.java Templ
Update of /var/cvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/template In directory james.mmbase.org:/tmp/cvs-serv32624/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/template Modified Files: AbstractTemplateParserTest.java QueryTemplateParserTest.java SimpleTemplateParserTest.java TemplateTest.java MultiTemplateParserTest.java Log Message: more tests See also: http://cvs.mmbase.org/viewcvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/template Index: AbstractTemplateParserTest.java === RCS file: /var/cvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/template/AbstractTemplateParserTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- AbstractTemplateParserTest.java 6 Dec 2008 17:58:50 - 1.1 +++ AbstractTemplateParserTest.java 8 Dec 2008 19:37:08 - 1.2 @@ -4,6 +4,8 @@ import java.lang.reflect.Method; import java.util.List; +import org.mmbase.datatypes.processors.CreationTimeGuesser; + import junit.framework.TestCase; @@ -13,6 +15,7 @@ protected String nonMatchingTemplate = getNonMatchingTemplate(); protected String nonMatchingTemplateWithNodenr = getNonMatchingTemplateWithNodenr(); protected String matchingTemplateResult = getMatchingTemplateResult(); +protected String matchingTemplateWithTemplateRemoved = getMatchingTemplateWithTemplateRemoved(); protected String nodeType = getNodeType(); protected String nodeNumber= getNodeNumber(); protected List legalPatterns = getLegalPatterns(); @@ -69,15 +72,23 @@ assertEquals(nonMatchingTemplate, templateParser.getTemplate()); } +public void test_strip_template_leave_nodenr_withNodenr(){ +createInstanceAndInsertNodenr(nodeType, nodeNumber, matchingTemplate); +templateParser.stripTemplateLeaveNodenr(); +assertEquals(matchingTemplateWithTemplateRemoved, templateParser.getTemplate()); +} + protected abstract String getMatchingTemplate(); protected abstract String getMatchingTemplateWithNodenr(); protected abstract String getNonMatchingTemplate(); protected abstract String getNonMatchingTemplateWithNodenr(); protected abstract String getMatchingTemplateResult(); +protected abstract String getMatchingTemplateWithTemplateRemoved(); protected abstract String getNodeType(); protected abstract String getNodeNumber(); protected abstract void createInstanceAndInsertNodenr(String nodeType, String nodeNumber, String template); protected abstract List getLegalPatterns(); protected abstract List getIllegalPatterns(); protected abstract Class getTemplateParserClass(); + } Index: QueryTemplateParserTest.java === RCS file: /var/cvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/template/QueryTemplateParserTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- QueryTemplateParserTest.java6 Dec 2008 17:58:50 - 1.1 +++ QueryTemplateParserTest.java8 Dec 2008 19:37:08 - 1.2 @@ -10,7 +10,7 @@ QueryTemplate qt = new QueryTemplate(template); QueryTemplateParser queryTemplateParser = new QueryTemplateParser(nodeType, nodeNumber, template, qt, new MockTemplateQueryRunner(nodeNumber)); templateParser = queryTemplateParser; -templateParser.insertNumber(); +templateParser.insertNodeNumber(); } @Override @@ -76,4 +76,9 @@ protected Class getTemplateParserClass() { return QueryTemplateParser.class; } + +@Override +protected String getMatchingTemplateWithTemplateRemoved() { +return getNodeNumber(); +} } Index: SimpleTemplateParserTest.java === RCS file: /var/cvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/template/SimpleTemplateParserTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- SimpleTemplateParserTest.java 6 Dec 2008 17:58:50 - 1.1 +++ SimpleTemplateParserTest.java 8 Dec 2008 19:37:08 - 1.2 @@ -9,7 +9,7 @@ @Override protected final void createInstanceAndInsertNodenr(String nodeType, String nodeNumber, String template) { templateParser = new SimpleTemplateParser (nodeType, nodeNumber, template); -templateParser.insertNumber(); +templateParser.insertNodeNumber(); } @Override @@ -72,5 +72,10 @@ return SimpleTemplateParser.class; } +@Override +protected String getMatchingTemplateWithTemplateRemoved() { +return getNodeNumber(
[MMBASE CVS] applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache TokenizerCacheNameResolver.java FlushNameTemplateBean.java
Update of /var/cvs/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache In directory james.mmbase.org:/tmp/cvs-serv32624/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache Modified Files: TokenizerCacheNameResolver.java FlushNameTemplateBean.java Log Message: more tests See also: http://cvs.mmbase.org/viewcvs/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache Index: TokenizerCacheNameResolver.java === RCS file: /var/cvs/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/TokenizerCacheNameResolver.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- TokenizerCacheNameResolver.java 28 Nov 2008 20:20:48 - 1.2 +++ TokenizerCacheNameResolver.java 8 Dec 2008 19:37:08 - 1.3 @@ -6,7 +6,7 @@ The license (Mozilla version 1.0) can be read at the MMBase site. See http://www.MMBase.org/license -*/ + */ package org.mmbase.applications.vprowizards.spring.cache; import java.util.ArrayList; @@ -30,31 +30,29 @@ * in names paces. Each name space could relate to a kind of cache flush hint [EMAIL PROTECTED] CacheFlushHint}. * There is also support for templates. See: [EMAIL PROTECTED] FlushNameTemplateBean} * + * * @author ebunders */ public class TokenizerCacheNameResolver implements CacheNameResolver { - - private Map> namesForNamespace = null; private List globalValues; private String input = null; -private final String reNamespace = "^[\\w_]+:"; -private final String reValue = "[\\w_]+"; -private final String reTemplate = "(" + reValue + "(\\[[\\w_]+(:[0-9])?\\])?)?"; -private final String reComposite = reNamespace + reTemplate + "(," + reTemplate + ")*"; +private static final String REGEX_NAMESPACE = "^[\\w_]+:"; +private static final String REGEX_VALUE = "[\\w_]+"; +private static final String REGEX_TEMPLATE = "(" + REGEX_VALUE + "(\\[[\\w_]+(:[0-9])?\\])?)?"; +private static final String REGEX_COMPOSITE = REGEX_NAMESPACE + REGEX_TEMPLATE + "(," + REGEX_TEMPLATE + ")*"; private static Logger log = Logging.getLoggerInstance(TokenizerCacheNameResolver.class); - public List getNames(String nameSpace) { -if(StringUtils.isEmpty(nameSpace)) { +if (StringUtils.isEmpty(nameSpace)) { throw new IllegalStateException("attribute namespace is empty"); } tokenizeIfNecessary(); List result = new ArrayList(); -if(namesForNamespace.get(nameSpace) != null){ +if (namesForNamespace.get(nameSpace) != null) { result.addAll(namesForNamespace.get(nameSpace)); } result.addAll(globalValues); @@ -77,17 +75,15 @@ } /** - * Tokenize the input string with all the configured tokens. All values for each token are then put thrugh all the - * modifiers - *TODO: what if the string starts with a namespace that has not been registered. - [EMAIL PROTECTED] IllegalStateException when input is not set yet. + [EMAIL PROTECTED] IllegalStateException + * when input is not set yet. */ private void tokenize() { -if(StringUtils.isEmpty(input)) { +if (StringUtils.isEmpty(input)) { throw new IllegalStateException("set input first"); } -//init +// init namesForNamespace = new HashMap>(); globalValues = new ArrayList(); @@ -96,26 +92,23 @@ part = part.trim(); boolean partHasNamespace = false; //boolean matches = part.matches("^[\\w_]+:[\\w,]+"); -boolean matches = part.matches(reComposite); +boolean matches = part.matches(REGEX_COMPOSITE); if (matches) { partHasNamespace = true; String nameSpace = part.substring(0, part.indexOf(":")); -part = part.substring(part.indexOf(":")+1); -if(namesForNamespace.get(nameSpace) == null){ +part = part.substring(part.indexOf(":") + 1); +if (namesForNamespace.get(nameSpace) == null) { namesForNamespace.put(nameSpace, new ArrayList()); } namesForNamespace.get(nameSpace).addAll(Arrays.asList(part.split(","))); } - if (!partHasNamespace) { globalValues.addAll(Arrays.asList(part.split(","))); } } } - - private void reset() { namesForNamespace = null; } @@ -124,6 +117,4 @@ throw new UnsupportedOperationException("this method is not supported for this cach
[MMBASE CVS] applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache OSCacheHandlerInterceptorIntegrationTest.java FlushNameTemplateBeanIntegrationTest.java TokenizerCacheNam
Update of /var/cvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache In directory james.mmbase.org:/tmp/cvs-serv32624/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache Modified Files: TokenizerCacheNameResolverTest.java Added Files: OSCacheHandlerInterceptorIntegrationTest.java FlushNameTemplateBeanIntegrationTest.java Removed Files: PrefixSuffixModifierTest.java FlushNameTemplateBeanTest.java BasicCacheHandlerInterceptorTest.java Log Message: more tests See also: http://cvs.mmbase.org/viewcvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache OSCacheHandlerInterceptorIntegrationTest.java is new FlushNameTemplateBeanIntegrationTest.java is new Index: TokenizerCacheNameResolverTest.java === RCS file: /var/cvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/TokenizerCacheNameResolverTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- TokenizerCacheNameResolverTest.java 28 Nov 2008 20:20:48 - 1.2 +++ TokenizerCacheNameResolverTest.java 8 Dec 2008 19:37:08 - 1.3 @@ -92,12 +92,12 @@ assertNotNull(l.contains("noppes[jaja]")); } -//public void test_templates_with_paht(){ -//tcnr.setInput("een:"); -//List l = tcnr.getNames("vier"); -//assertEquals(2, l.size()); -//assertNotNull(l.contains("noop[test:4576]")); -//} +public void test_templates_with_paht(){ +tcnr.setInput("vier:noop[test.disco.nogwat:4576]"); +List l = tcnr.getNames("vier"); +assertEquals(1, l.size()); +assertNotNull(l.contains("noop[test.disco.nogwat:4576]")); +} public void test_tokenizer_resets_with_new_input(){ tcnr.setInput("een:a,b twee:c"); ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/modifiers TemplateCleanerModifier.java
Update of /var/cvs/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/modifiers In directory james.mmbase.org:/tmp/cvs-serv32624/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/modifiers Modified Files: TemplateCleanerModifier.java Log Message: more tests See also: http://cvs.mmbase.org/viewcvs/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/modifiers Index: TemplateCleanerModifier.java === RCS file: /var/cvs/applications/vpro-wizards/src/org/mmbase/applications/vprowizards/spring/cache/modifiers/TemplateCleanerModifier.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- TemplateCleanerModifier.java6 Dec 2008 17:58:51 - 1.1 +++ TemplateCleanerModifier.java8 Dec 2008 19:37:08 - 1.2 @@ -10,7 +10,7 @@ } public String modify(String input) { -return MultiTemplateParser.cleanTemplate(input); +return MultiTemplateParser.stripTemplatesLeaveNodeNr(input); } } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers TemplateCleanerModifierTest.java
Update of /var/cvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers In directory james.mmbase.org:/tmp/cvs-serv32624/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers Modified Files: TemplateCleanerModifierTest.java Log Message: more tests See also: http://cvs.mmbase.org/viewcvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers Index: TemplateCleanerModifierTest.java === RCS file: /var/cvs/applications/vpro-wizards/tests/org/mmbase/applications/vprowizards/spring/cache/modifiers/TemplateCleanerModifierTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- TemplateCleanerModifierTest.java8 Dec 2008 15:59:26 - 1.1 +++ TemplateCleanerModifierTest.java8 Dec 2008 19:37:08 - 1.2 @@ -4,7 +4,28 @@ public class TemplateCleanerModifierTest extends TestCase { -public void test(){ -//fail("implement"); +public void test_simple_template_with_nodenr_is_removed(){ +cleanAndCheck("users_[name:898]", "users_898"); +} + +public void test_simle_template_without_nodenr_is_removed(){ +cleanAndCheck("users_[name]", "users_"); +} + +public void test_query_template_with_nodenr_is_removed(){ +cleanAndCheck("users_[name.nogwat.disco:898]", "users_898"); +} + +public void test_query_template_without_nodenr_is_removed(){ +cleanAndCheck("users_[name.nogwat.disco]", "users_"); +} + +public void test_multi_template_with_nodenr_is_removed(){ +cleanAndCheck("users_[name.nogwat.disco:898]_nogwat_[user:10]", "users_898_nogwat_10"); +} + +private void cleanAndCheck(String template, String expected){ +TemplateCleanerModifier modifier = new TemplateCleanerModifier(); +assertEquals(expected, modifier.modify(template)); } } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] RE: Message
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] Re: Order status
Don't hurry to leave, you'll find a lot of useful things here! one immediately notices the lack of a sign indicating that the Sorosthat time the governments anti-Semitic sentiments had became visible, The jet landed in Prague and Soros deplaned. A Czech televisionmilk. The stores offered few of the products available in the West. ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources imagesearch.jsp
Update of /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources In directory james.mmbase.org:/tmp/cvs-serv6817/cmsc/contentrepository/src/webapp/editors/resources Modified Files: imagesearch.jsp Log Message: CMSC-1126 using Assets in content See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources See also: http://www.mmbase.org/jira/browse/CMSC-1126 Index: imagesearch.jsp === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/imagesearch.jsp,v retrieving revision 1.38 retrieving revision 1.39 diff -u -b -r1.38 -r1.39 --- imagesearch.jsp 5 Dec 2008 03:47:21 - 1.38 +++ imagesearch.jsp 9 Dec 2008 01:49:55 - 1.39 @@ -69,10 +69,10 @@ - + - + ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/migration migration_1.4_to_1.5.txt
Update of /var/cvs/contributions/CMSContainer/migration In directory james.mmbase.org:/tmp/cvs-serv7048 Modified Files: migration_1.4_to_1.5.txt Log Message: CMSC-1163, Newsletter: Add extra information on which person approved newsletter edition,change the field size in migration See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/migration See also: http://www.mmbase.org/jira/browse/CMSC-1163 Index: migration_1.4_to_1.5.txt === RCS file: /var/cvs/contributions/CMSContainer/migration/migration_1.4_to_1.5.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -u -b -r1.14 -r1.15 --- migration_1.4_to_1.5.txt5 Dec 2008 09:33:58 - 1.14 +++ migration_1.4_to_1.5.txt9 Dec 2008 02:00:25 - 1.15 @@ -135,7 +135,7 @@ Goal: . Type: sql-script --- Start script --- -ALTER TABLE mm_newsletterpublication ADD COLUMN approved_by text; +ALTER TABLE mm_newsletterpublication ADD COLUMN approved_by varchar(255); --- End script --- Exceptions/errors/other problems and what to do: * ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/migration migration_1.4_to_1.5.txt
Update of /var/cvs/contributions/CMSContainer/migration In directory james.mmbase.org:/tmp/cvs-serv8011 Modified Files: Tag: b1_5 migration_1.4_to_1.5.txt Log Message: CMSC-1163, Newsletter: Add extra information on which person approved newsletter edition,change the field size in migration See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/migration See also: http://www.mmbase.org/jira/browse/CMSC-1163 Index: migration_1.4_to_1.5.txt === RCS file: /var/cvs/contributions/CMSContainer/migration/migration_1.4_to_1.5.txt,v retrieving revision 1.9.2.5 retrieving revision 1.9.2.6 diff -u -b -r1.9.2.5 -r1.9.2.6 --- migration_1.4_to_1.5.txt5 Dec 2008 09:34:03 - 1.9.2.5 +++ migration_1.4_to_1.5.txt9 Dec 2008 02:16:19 - 1.9.2.6 @@ -135,7 +135,7 @@ Goal: . Type: sql-script --- Start script --- -ALTER TABLE mm_newsletterpublication ADD COLUMN approved_by text; +ALTER TABLE mm_newsletterpublication ADD COLUMN approved_by varchar(255); --- End script --- Exceptions/errors/other problems and what to do: * ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] Re: Order status
You won't find such classy things in any other place! be in the game. He wanted a surrogate. So I guess I was the first surrogate,He remembered with great fondness the time that Soros asked him out scenarios of what might happen that day in the financial markets.What was more, Rogers was getting on his nerves. They had always ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit ui-table.tag ui-tcolumn.tag
Update of /var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit In directory james.mmbase.org:/tmp/cvs-serv23425/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit Modified Files: ui-table.tag ui-tcolumn.tag Log Message: CMSC-1177 Community: add select all checkbox to community user listing See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit See also: http://www.mmbase.org/jira/browse/CMSC-1177 Index: ui-table.tag === RCS file: /var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit/ui-table.tag,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- ui-table.tag28 Jul 2008 14:51:42 - 1.4 +++ ui-table.tag9 Dec 2008 05:27:58 - 1.5 @@ -4,7 +4,7 @@ <%@ attribute name="var" rtexprvalue="false" required="true" type="java.lang.String" %> <%@ attribute name="size" rtexprvalue="true" required="true" type="java.lang.Integer" %> <%@ attribute name="requestURI" rtexprvalue="true" required="false" type="java.lang.String" %> - +<%@ attribute name="bulkbox" rtexprvalue="true" required="false" type="java.lang.Boolean" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"; %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"; %> @@ -28,16 +28,15 @@ - - - <%@ include file="ui-table-paging.tagf" %> + + Index: ui-tcolumn.tag === RCS file: /var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit/ui-tcolumn.tag,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- ui-tcolumn.tag 25 Jul 2008 08:42:58 - 1.4 +++ ui-tcolumn.tag 9 Dec 2008 05:27:58 - 1.5 @@ -20,7 +20,12 @@ + + + + + @@ -35,7 +40,6 @@ ${content} - ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer_Modules/community/src/webapp/editors/community userlist_table.jspf
Update of /var/cvs/contributions/CMSContainer_Modules/community/src/webapp/editors/community In directory james.mmbase.org:/tmp/cvs-serv23425/CMSContainer_Modules/community/src/webapp/editors/community Modified Files: userlist_table.jspf Log Message: CMSC-1177 Community: add select all checkbox to community user listing See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Modules/community/src/webapp/editors/community See also: http://www.mmbase.org/jira/browse/CMSC-1177 Index: userlist_table.jspf === RCS file: /var/cvs/contributions/CMSContainer_Modules/community/src/webapp/editors/community/userlist_table.jspf,v retrieving revision 1.11 retrieving revision 1.12 diff -u -b -r1.11 -r1.12 --- userlist_table.jspf 8 Dec 2008 02:58:24 - 1.11 +++ userlist_table.jspf 9 Dec 2008 05:27:58 - 1.12 @@ -1,5 +1,5 @@ + requestURI="/editors/community/SearchConditionalUser.do" bulkbox="true"> @@ -43,4 +43,12 @@ onState(); + function selectAll(value, formName, elementPrefix) { + var elements = document.forms[formName].elements; + for (var i = 0; i < elements.length; i++) { + if (elements[i].name.indexOf(elementPrefix) == 0) { + elements[i].checked = value; + } + } +} ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit ui-table.tag ui-tcolumn.tag
Update of /var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit In directory james.mmbase.org:/tmp/cvs-serv23676/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit Modified Files: Tag: b1_5 ui-table.tag ui-tcolumn.tag Log Message: CMSC-1177 Community: add select all checkbox to community user listing See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit See also: http://www.mmbase.org/jira/browse/CMSC-1177 Index: ui-table.tag === RCS file: /var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit/ui-table.tag,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -b -r1.4 -r1.4.2.1 --- ui-table.tag28 Jul 2008 14:51:42 - 1.4 +++ ui-table.tag9 Dec 2008 05:36:38 - 1.4.2.1 @@ -4,7 +4,7 @@ <%@ attribute name="var" rtexprvalue="false" required="true" type="java.lang.String" %> <%@ attribute name="size" rtexprvalue="true" required="true" type="java.lang.Integer" %> <%@ attribute name="requestURI" rtexprvalue="true" required="false" type="java.lang.String" %> - +<%@ attribute name="bulkbox" rtexprvalue="true" required="false" type="java.lang.Boolean" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"; %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"; %> @@ -28,16 +28,15 @@ - - - <%@ include file="ui-table-paging.tagf" %> + + Index: ui-tcolumn.tag === RCS file: /var/cvs/contributions/CMSContainer/cmsc/edit-webapp/src/webapp/WEB-INF/tags/edit/ui-tcolumn.tag,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -b -r1.4 -r1.4.2.1 --- ui-tcolumn.tag 25 Jul 2008 08:42:58 - 1.4 +++ ui-tcolumn.tag 9 Dec 2008 05:36:38 - 1.4.2.1 @@ -20,7 +20,12 @@ + + + + + @@ -35,7 +40,6 @@ ${content} - ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer_Modules/community/src/webapp/editors/community userlist_table.jspf
Update of /var/cvs/contributions/CMSContainer_Modules/community/src/webapp/editors/community In directory james.mmbase.org:/tmp/cvs-serv23676/CMSContainer_Modules/community/src/webapp/editors/community Modified Files: Tag: b1_5 userlist_table.jspf Log Message: CMSC-1177 Community: add select all checkbox to community user listing See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Modules/community/src/webapp/editors/community See also: http://www.mmbase.org/jira/browse/CMSC-1177 Index: userlist_table.jspf === RCS file: /var/cvs/contributions/CMSContainer_Modules/community/src/webapp/editors/community/userlist_table.jspf,v retrieving revision 1.6.2.5 retrieving revision 1.6.2.6 diff -u -b -r1.6.2.5 -r1.6.2.6 --- userlist_table.jspf 8 Dec 2008 02:51:25 - 1.6.2.5 +++ userlist_table.jspf 9 Dec 2008 05:36:38 - 1.6.2.6 @@ -1,5 +1,5 @@ + requestURI="/editors/community/SearchConditionalUser.do" bulkbox="true"> @@ -43,5 +43,12 @@ onState(); + function selectAll(value, formName, elementPrefix) { + var elements = document.forms[formName].elements; + for (var i = 0; i < elements.length; i++) { + if (elements[i].name.indexOf(elementPrefix) == 0) { + elements[i].checked = value; + } + } +} - ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms AssetAction.java AssetSearchAction.java AssetUploadAction.java AssetUploadForm.java ImageUpl
Update of /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms In directory james.mmbase.org:/tmp/cvs-serv24082/src/java/com/finalist/cmsc/repository/forms Modified Files: AssetAction.java AssetSearchAction.java AssetUploadAction.java AssetUploadForm.java ImageUploadAction.java ImageUploadForm.java Log Message: CMSC-681 Asset Maintenance See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms See also: http://www.mmbase.org/jira/browse/CMSC-681 Index: AssetAction.java === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/AssetAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- AssetAction.java11 Nov 2008 05:56:54 - 1.4 +++ AssetAction.java9 Dec 2008 06:04:04 - 1.5 @@ -34,12 +34,13 @@ public class AssetAction extends MMBaseAction { private final static String MOVEASSETTOCHANNEL = "moveAssetToChannel"; + @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, Cloud cloud) throws Exception { String action = request.getParameter("action"); - if(StringUtils.isNotEmpty(action) && action.equals(MOVEASSETTOCHANNEL)) { + if (StringUtils.isNotEmpty(action) && action.equals(MOVEASSETTOCHANNEL)) { return mapping.findForward(MOVEASSETTOCHANNEL); } List typesList = new ArrayList(); @@ -59,9 +60,11 @@ String orderby = request.getParameter("orderby"); String direction = request.getParameter("direction"); String show = request.getParameter("show"); - if(StringUtils.isNotEmpty(show)){ + String exist = request.getParameter("exist"); + + if (StringUtils.isNotEmpty(show)) { show = "thumbnail"; - }else{ + } else { show = null; } if (StringUtils.isEmpty(orderby)) { @@ -101,6 +104,7 @@ addToRequest(request, "elements", assets); addToRequest(request, "elementCount", Integer.toString(assetCount)); addToRequest(request, "show", show); + addToRequest(request, "exist", exist); Map createdNumbers = new HashMap(); for (Iterator iter = created.iterator(); iter.hasNext();) { Index: AssetSearchAction.java === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/AssetSearchAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- AssetSearchAction.java 2 Dec 2008 02:40:20 - 1.4 +++ AssetSearchAction.java 9 Dec 2008 06:04:04 - 1.5 @@ -1,6 +1,8 @@ package com.finalist.cmsc.repository.forms; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.StringTokenizer; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -9,9 +11,18 @@ import net.sf.mmapps.modules.cloudprovider.CloudProviderFactory; import org.apache.commons.lang.StringUtils; -import org.apache.struts.action.*; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; import org.apache.struts.util.LabelValueBean; -import org.mmbase.bridge.*; +import org.mmbase.bridge.Cloud; +import org.mmbase.bridge.Field; +import org.mmbase.bridge.FieldIterator; +import org.mmbase.bridge.FieldList; +import org.mmbase.bridge.Node; +import org.mmbase.bridge.NodeList; +import org.mmbase.bridge.NodeManager; +import org.mmbase.bridge.NodeQuery; import org.mmbase.bridge.util.Queries; import org.mmbase.bridge.util.SearchUtil; import org.mmbase.storage.search.Constraint; @@ -26,7 +37,6 @@ import com.finalist.cmsc.services.publish.Publish; import com.finalist.cmsc.services.workflow.Workflow; import com.finalist.cmsc.struts.PagerAction; -import com.finalist.cmsc.util.KeywordUtil; public class AssetSearchAction extends PagerAction { Index: AssetUploadAction.java === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/AssetUploadAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- AssetUploadAction.java 2 Dec 2008 02:40:20 - 1.4 +++ AssetUploadAction.java 9 Dec 2008 06:04:04 - 1.5 @@ -1,25 +1,31 @@ -/* - * - * This software is OSI Certified Open Source Software. OSI Certified is a certification mark of the Open Source - * Initiative. - * - * The license (Mozilla version 1.0) can be read at the MMBase site. See http:/
[MMBASE CVS] contributions/CMSContainer/cmsc/contentrepository/resources cmsc-repository.properties cmsc-repository_nl.properties cmsc-repository_zh.properties
Update of /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources In directory james.mmbase.org:/tmp/cvs-serv24082/resources Modified Files: cmsc-repository.properties cmsc-repository_nl.properties cmsc-repository_zh.properties Log Message: CMSC-681 Asset Maintenance See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/resources See also: http://www.mmbase.org/jira/browse/CMSC-681 Index: cmsc-repository.properties === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources/cmsc-repository.properties,v retrieving revision 1.42 retrieving revision 1.43 diff -u -b -r1.42 -r1.43 --- cmsc-repository.properties 4 Dec 2008 08:32:55 - 1.42 +++ cmsc-repository.properties 9 Dec 2008 06:04:04 - 1.43 @@ -395,12 +395,12 @@ assets.upload.submit=Upload assets.upload.results=Uploaded assets assets.upload.error=No assets uploaded. The asset(s) might be to large. Check ZIP file, it might be corrupt or password protected or it might not contain any supported assets. -asset.upload.explanation=Select a local asset file or a ZIP file containing multiple assets +asset.upload.explanation=Upload local files to this channel. Also ZIP files are supported to upload more than one. asset.title=Asset asset.channel=Channel {0} . asset.new=New -asset.create=create +asset.create=Create new URL asset.asset=asset in this channel asset.type=Of type {0} : asset.preview.title=Open a browser with a preview of this element. @@ -436,3 +436,4 @@ asset.search.title = Asset search searchform.assettype=Asset type: searchform.assettypes.all=all types \ No newline at end of file +asset.upload.existed = This file is already in the repository! \ No newline at end of file Index: cmsc-repository_nl.properties === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources/cmsc-repository_nl.properties,v retrieving revision 1.41 retrieving revision 1.42 diff -u -b -r1.41 -r1.42 --- cmsc-repository_nl.properties 4 Dec 2008 08:32:55 - 1.41 +++ cmsc-repository_nl.properties 9 Dec 2008 06:04:04 - 1.42 @@ -396,7 +396,7 @@ asset.title=Asset asset.channel=Channel {0} . asset.new=New -asset.create=create +asset.create=Create new URL asset.asset=asset in this channel asset.type=Of type {0} : asset.preview.title=Open a browser with a preview of this element. @@ -431,3 +431,4 @@ asset.search.title = Asset search searchform.assettype=Asset type: searchform.assettypes.all=all types \ No newline at end of file +asset.upload.existed = This file is already in the repository! \ No newline at end of file Index: cmsc-repository_zh.properties === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources/cmsc-repository_zh.properties,v retrieving revision 1.21 retrieving revision 1.22 diff -u -b -r1.21 -r1.22 --- cmsc-repository_zh.properties 2 Dec 2008 03:46:28 - 1.21 +++ cmsc-repository_zh.properties 9 Dec 2008 06:04:04 - 1.22 @@ -434,3 +434,4 @@ asset.search.title = Asset search searchform.assettype=Asset type: searchform.assettypes.all=all types \ No newline at end of file +asset.upload.existed = This file is already in the repository! \ No newline at end of file ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository asset.jsp assetupload.jsp imageupload.jsp
Update of /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository In directory james.mmbase.org:/tmp/cvs-serv24082/src/webapp/editors/repository Modified Files: asset.jsp assetupload.jsp imageupload.jsp Log Message: CMSC-681 Asset Maintenance See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository See also: http://www.mmbase.org/jira/browse/CMSC-681 Index: asset.jsp === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository/asset.jsp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- asset.jsp 8 Dec 2008 03:56:08 - 1.13 +++ asset.jsp 9 Dec 2008 06:04:04 - 1.14 @@ -36,9 +36,6 @@ - - - @@ -47,7 +44,6 @@ - <% UserRole role = RepositoryUtil.getRole(cloud, parentchannelnode, false); %> @@ -58,7 +54,7 @@ <%@ include file="assetupload.jsp" %> <% if (role != null && SecurityUtil.isWriter(role)) { %> - + "/> @@ -66,11 +62,6 @@ - - - ${type.label} - - " class="button"/> @@ -207,8 +198,6 @@ - - @@ -271,8 +260,6 @@ - - \ No newline at end of file Index: assetupload.jsp === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository/assetupload.jsp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- assetupload.jsp 11 Nov 2008 05:56:54 - 1.4 +++ assetupload.jsp 9 Dec 2008 06:04:04 - 1.5 @@ -1,16 +1,11 @@ <%@ page import="com.finalist.util.http.BulkUploadUtil"%> function upload() { - if(document.getElementById("atype").options[document.getElementById("atype").options.selectedIndex].value=="urls"){ - document.getElementByName("uploadButton").disable=true; - alert("Only attachments and images can be uploaded!"); - } setTimeout('sayWait();',0); } function sayWait() { document.getElementById("busy").style.visibility="visible"; - //document.getElementById("notbusy").style.visibility="hidden"; } @@ -19,8 +14,13 @@ - + + + + + + @@ -32,29 +32,3 @@ -<% - // retrieve list op node id's from either the recent upload - // or from the request url to enable a return url - // in combination with struts which have to be investigated first - String uploadedNodes = ""; - int numberOfUploadedNodes = -1; - if ("post".equalsIgnoreCase(request.getMethod())) { - List nodes = (ArrayList)(request.getAttribute("uploadedAssets")); - uploadedNodes = BulkUploadUtil.convertToCommaSeparated(nodes); - numberOfUploadedNodes = nodes.size(); - } else { - if (request.getParameter("uploadedNodes") != null) { - uploadedNodes = request.getParameter("uploadedNodes"); - } - if (request.getParameter("numberOfUploadedNodes") != null) { - numberOfUploadedNodes = Integer.parseInt(request.getParameter("numberOfUploadedNodes")); - } - } -%> -<% - if (numberOfUploadedNodes == 0) { -%> - -<% - } -%> \ No newline at end of file Index: imageupload.jsp === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository/imageupload.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- imageupload.jsp 2 Dec 2008 02:40:21 - 1.1 +++ imageupload.jsp 9 Dec 2008 06:04:04 - 1.2 @@ -8,10 +8,7 @@ function upload() { -var f=document.forms[0]; -f.submit(); setTimeout('sayWait();',0); - } function sayWait() { @@ -24,6 +21,16 @@ openPopupWindow('imageinfo', '900', '500', 'imageinfo.jsp?objectnumber='+objectnumber); } + function unpublish(parentchannel, objectnumber) { + var url = "AssetDeleteAction.do"; + url += "?channelnumber=" + parentchannel; + url += "&action
[MMBASE CVS] contributions/CMSContainer/cmsc/contentrepository/src/webapp/WEB-INF struts-repository.xml
Update of /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/WEB-INF In directory james.mmbase.org:/tmp/cvs-serv24082/src/webapp/WEB-INF Modified Files: struts-repository.xml Log Message: CMSC-681 Asset Maintenance See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/WEB-INF See also: http://www.mmbase.org/jira/browse/CMSC-681 Index: struts-repository.xml === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/WEB-INF/struts-repository.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -u -b -r1.26 -r1.27 --- struts-repository.xml 4 Dec 2008 08:41:17 - 1.26 +++ struts-repository.xml 9 Dec 2008 06:04:04 - 1.27 @@ -244,7 +244,7 @@ - + ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/utilities/src/java/com/finalist/cmsc/util ComparisonUtil.java
Update of /var/cvs/contributions/CMSContainer/cmsc/utilities/src/java/com/finalist/cmsc/util In directory james.mmbase.org:/tmp/cvs-serv24208/cmsc/utilities/src/java/com/finalist/cmsc/util Modified Files: ComparisonUtil.java Log Message: CMSC-1126 using Assets in content See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/utilities/src/java/com/finalist/cmsc/util See also: http://www.mmbase.org/jira/browse/CMSC-1126 Index: ComparisonUtil.java === RCS file: /var/cvs/contributions/CMSContainer/cmsc/utilities/src/java/com/finalist/cmsc/util/ComparisonUtil.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- ComparisonUtil.java 3 Dec 2008 10:28:52 - 1.2 +++ ComparisonUtil.java 9 Dec 2008 06:06:32 - 1.3 @@ -2,17 +2,21 @@ import java.lang.reflect.Method; import java.util.Comparator; -import java.util.HashMap; +import java.util.Map; + +import net.sf.mmapps.commons.util.StringUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class ComparisonUtil implements Comparator { private static Log log = LogFactory.getLog(DateUtil.class); + + private static final String GET = "get"; /* * @param the Comparator ,a javaBean or a map that get itself. */ - String[] fields_user = null; + private String[] fields_user = null; public String[] getFields_user() { return fields_user; @@ -48,9 +52,12 @@ */ private static boolean compareField(Object o1, Object o2, String fieldName) { try { - if (Integer.class != getFieldValueByName(fieldName, o1).getClass()) { -String value1 = getFieldValueByName(fieldName, o1).toString(); -String value2 = getFieldValueByName(fieldName, o2).toString(); + Object fieldObj1 = getFieldValueByName(fieldName, o1); + Object fieldObj2 = getFieldValueByName(fieldName, o2); + if (fieldObj1 == null || fieldObj2 == null) return false; + if (!(fieldObj1 instanceof Integer)) { +String value1 = fieldObj1.toString(); +String value2 = fieldObj2.toString(); /* * Collator myCollator = Collator.getInstance(java.util.Locale.ENGLISH); will make sort by Chinese? */ @@ -58,8 +65,8 @@ return true; } } else { -Integer value1 = (Integer) getFieldValueByName(fieldName, o1); -Integer value2 = (Integer) getFieldValueByName(fieldName, o2); +Integer value1 = (Integer) fieldObj1; +Integer value2 = (Integer) fieldObj2; if (value1.intValue() - value2.intValue() > 0) { return true; } @@ -77,17 +84,19 @@ * object attribute there are could get two type (HashMap,javaBean) */ private static Object getFieldValueByName(String fieldName, Object obj) { - String methodStr = "get"; + if (obj == null || StringUtil.isEmptyOrWhitespace(fieldName)) return null; + int length = fieldName.length(); + String methodStr = GET; Object value = null; try { - if (HashMap.class != obj.getClass()) { -String Letter = fieldName.substring(0, 1).toUpperCase(); -methodStr = "get" + Letter + fieldName.substring(1); -Method method = obj.getClass().getMethod(methodStr, new Class[] {}); -value = method.invoke(obj, new Object[] {}); + if (!(obj instanceof Map)) { +String headLetter = fieldName.substring(0, 1).toUpperCase(); +methodStr = GET + headLetter + (length > 1 ? fieldName.substring(1) : ""); +Method method = obj.getClass().getMethod(methodStr); +value = method.invoke(obj); } else { -Method method = obj.getClass().getMethod(methodStr, new Class[] { Object.class }); -value = method.invoke(obj, new Object[] { fieldName }); +Method method = obj.getClass().getMethod(methodStr, String.class); +value = method.invoke(obj, fieldName); } return value; } catch (Exception e) { ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository selector.jsp
Update of /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository In directory james.mmbase.org:/tmp/cvs-serv24311 Modified Files: selector.jsp Log Message: CMSC-681 Asset Maintenance See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository See also: http://www.mmbase.org/jira/browse/CMSC-681 Index: selector.jsp === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository/selector.jsp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -b -r1.20 -r1.21 --- selector.jsp13 Nov 2008 04:24:08 - 1.20 +++ selector.jsp9 Dec 2008 06:11:58 - 1.21 @@ -103,10 +103,6 @@ - " target="content"> -" target="content"> -" target="content"> - http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository imageupload.jsp
Update of /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository In directory james.mmbase.org:/tmp/cvs-serv24401/repository Modified Files: imageupload.jsp Log Message: CMSC-681 Asset Maintenance See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository See also: http://www.mmbase.org/jira/browse/CMSC-681 Index: imageupload.jsp === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository/imageupload.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- imageupload.jsp 9 Dec 2008 06:04:04 - 1.2 +++ imageupload.jsp 9 Dec 2008 06:15:27 - 1.3 @@ -8,7 +8,10 @@ function upload() { +var f=document.forms[0]; +f.submit(); setTimeout('sayWait();',0); + } function sayWait() { @@ -21,16 +24,6 @@ openPopupWindow('imageinfo', '900', '500', 'imageinfo.jsp?objectnumber='+objectnumber); } - function unpublish(parentchannel, objectnumber) { - var url = "AssetDeleteAction.do"; - url += "?channelnumber=" + parentchannel; - url += "&action=unlink"; - url += "&returnurl=" + escape(document.location + "&refreshchannel=true"); - url += "&objectnumber=" + objectnumber; - - document.location.href = url; - } - var blockSelect = false; @@ -39,16 +32,11 @@ - + - - - - - @@ -65,7 +53,32 @@ - +<% + // retrieve list op node id's from either the recent upload + // or from the request url to enable a return url + // in combination with struts which have to be investigated first + String uploadedNodes = ""; + int numberOfUploadedNodes = -1; + if ("post".equalsIgnoreCase(request.getMethod())) { + List nodes = (ArrayList)(request.getAttribute("uploadedImages")); + uploadedNodes = BulkUploadUtil.convertToCommaSeparated(nodes); + numberOfUploadedNodes = nodes.size(); + } else { + if (request.getParameter("uploadedNodes") != null) { + uploadedNodes = request.getParameter("uploadedNodes"); + } + if (request.getParameter("numberOfUploadedNodes") != null) { + numberOfUploadedNodes = Integer.parseInt(request.getParameter("numberOfUploadedNodes")); + } + } +%> +<% if (numberOfUploadedNodes == 0) { %> + +<% } else if (numberOfUploadedNodes > 0) { %> + + + + @@ -76,7 +89,8 @@ true - + + @@ -92,7 +106,7 @@ class="swap" href=""> <%-- use uploadedNodes and numberOfUploadedNodes in return url --%> -/editors/resources/imageupload.jsp?uploadedNodes=${param.uploadedNodes}&uploadAction=${param.uploadAction} +/editors/resources/imageupload.jsp?uploadedNodes=<%=uploadedNodes%>&numberOfUploadedNodes=<%=numberOfUploadedNodes%>&uploadAction=${param.uploadAction} @@ -110,10 +124,11 @@ " alt=""/> -">" - alt=""/> + + + + "> + " title=""/> );" onclick="blockSelect = true;"> " alt=""/> @@ -126,9 +141,11 @@ ${!useSwapStyle} + - +<% } %> + ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources imageupload.jsp
Update of /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources In directory james.mmbase.org:/tmp/cvs-serv24401/resources Modified Files: imageupload.jsp Log Message: CMSC-681 Asset Maintenance See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources See also: http://www.mmbase.org/jira/browse/CMSC-681 Index: imageupload.jsp === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/resources/imageupload.jsp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -b -r1.11 -r1.12 --- imageupload.jsp 28 Nov 2008 09:30:26 - 1.11 +++ imageupload.jsp 9 Dec 2008 06:15:27 - 1.12 @@ -8,10 +8,7 @@ function upload() { -var f=document.forms[0]; -f.submit(); setTimeout('sayWait();',0); - } function sayWait() { @@ -24,6 +21,16 @@ openPopupWindow('imageinfo', '900', '500', 'imageinfo.jsp?objectnumber='+objectnumber); } + function unpublish(parentchannel, objectnumber) { + var url = "AssetDeleteAction.do"; + url += "?channelnumber=" + parentchannel; + url += "&action=unlink"; + url += "&returnurl=" + escape(document.location + "&refreshchannel=true"); + url += "&objectnumber=" + objectnumber; + + document.location.href = url; + } + var blockSelect = false; @@ -31,55 +38,34 @@ - - + + - + + - + + - "/> + + + + + - + + -<% -// retrieve list op node id's from either the recent upload -// or from the request url to enable a return url -// TODO move this to a struts action there are some issue with HttpUpload -// in combination with struts which have to be investigated first -String uploadedNodes = ""; -int numberOfUploadedNodes = -1; -if ("post".equalsIgnoreCase(request.getMethod())) { -NodeManager manager = cloud.getNodeManager("images"); -List nodes = BulkUploadUtil.uploadAndStore(manager, request); -uploadedNodes = BulkUploadUtil.convertToCommaSeparated(nodes); -numberOfUploadedNodes = nodes.size(); -} else { -if (request.getParameter("uploadedNodes") != null) { -uploadedNodes = request.getParameter("uploadedNodes"); -} -if (request.getParameter("numberOfUploadedNodes") != null) { -numberOfUploadedNodes = Integer.parseInt(request.getParameter("numberOfUploadedNodes")); -} -} -%> -<% if (numberOfUploadedNodes == 0) { %> - -<% } else if (numberOfUploadedNodes > 0) { %> - - - - + @@ -90,8 +76,7 @@ true - - + @@ -107,7 +92,7 @@ class="swap" href=""> <%-- use uploadedNodes and numberOfUploadedNodes in return url --%> -/editors/resources/imageupload.jsp?uploadedNodes=<%=uploadedNodes%>&numberOfUploadedNodes=<%=numberOfUploadedNodes%>&uploadAction=${param.uploadAction} +/editors/resources/imageupload.jsp?uploadedNodes=${param.uploadedNodes}&uploadAction=${param.uploadAction} @@ -125,11 +110,10 @@ " alt=""/> - - - - "> - " title=""/> +">" + alt=""/> );" onclick="blockSelect = true;"> " alt=""/> @@ -142,11 +126,9 @@ ${!useSwapStyle} - -<% } %> - + ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] Your order
___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] Your order
Don't hurry to leave, you'll find a lot of useful things here! The St. Valentines Day Massacreyen to the dollar, a change of nearly 5 percent from its close the previous that he and his colleagues should have reassessed their yenThe encounter with Benny Landa was symptomatic of a deeper change ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/contentrepository/resources cmsc-repository.properties cmsc-repository_nl.properties cmsc-repository_zh.properties
Update of /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources In directory james.mmbase.org:/tmp/cvs-serv25915/resources Modified Files: cmsc-repository.properties cmsc-repository_nl.properties cmsc-repository_zh.properties Log Message: CMSC-681 Asset Maintenance change creating url See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/resources See also: http://www.mmbase.org/jira/browse/CMSC-681 Index: cmsc-repository.properties === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources/cmsc-repository.properties,v retrieving revision 1.43 retrieving revision 1.44 diff -u -b -r1.43 -r1.44 --- cmsc-repository.properties 9 Dec 2008 06:04:04 - 1.43 +++ cmsc-repository.properties 9 Dec 2008 07:52:24 - 1.44 @@ -400,7 +400,7 @@ asset.title=Asset asset.channel=Channel {0} . asset.new=New -asset.create=Create new URL +asset.create=Url Create asset.asset=asset in this channel asset.type=Of type {0} : asset.preview.title=Open a browser with a preview of this element. Index: cmsc-repository_nl.properties === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources/cmsc-repository_nl.properties,v retrieving revision 1.42 retrieving revision 1.43 diff -u -b -r1.42 -r1.43 --- cmsc-repository_nl.properties 9 Dec 2008 06:04:04 - 1.42 +++ cmsc-repository_nl.properties 9 Dec 2008 07:52:24 - 1.43 @@ -396,7 +396,7 @@ asset.title=Asset asset.channel=Channel {0} . asset.new=New -asset.create=Create new URL +asset.create=Url Create asset.asset=asset in this channel asset.type=Of type {0} : asset.preview.title=Open a browser with a preview of this element. Index: cmsc-repository_zh.properties === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources/cmsc-repository_zh.properties,v retrieving revision 1.22 retrieving revision 1.23 diff -u -b -r1.22 -r1.23 --- cmsc-repository_zh.properties 9 Dec 2008 06:04:04 - 1.22 +++ cmsc-repository_zh.properties 9 Dec 2008 07:52:24 - 1.23 @@ -399,7 +399,7 @@ asset.title=èµæº asset.channel=é¢é {0} . asset.new=æ°å»º -asset.create=å»ºç« +asset.create= é¾æ¥ asset.asset=é¢éå çèµæº asset.type=ç±»å {0} : asset.preview.title=æå¼æµè§è¿äºelementçé¢è§. ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository asset.jsp
Update of /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository In directory james.mmbase.org:/tmp/cvs-serv25915/src/webapp/editors/repository Modified Files: asset.jsp Log Message: CMSC-681 Asset Maintenance change creating url See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository See also: http://www.mmbase.org/jira/browse/CMSC-681 Index: asset.jsp === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/webapp/editors/repository/asset.jsp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -b -r1.14 -r1.15 --- asset.jsp 9 Dec 2008 06:04:04 - 1.14 +++ asset.jsp 9 Dec 2008 07:52:24 - 1.15 @@ -54,7 +54,7 @@ <%@ include file="assetupload.jsp" %> <% if (role != null && SecurityUtil.isWriter(role)) { %> - + "/> @@ -62,6 +62,7 @@ + " class="button"/> ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE CVS] contributions/CMSContainer/cmsc/contentrepository/resources cmsc-repository.properties cmsc-repository_nl.properties cmsc-repository_zh.properties
Update of /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources In directory james.mmbase.org:/tmp/cvs-serv26022 Modified Files: cmsc-repository.properties cmsc-repository_nl.properties cmsc-repository_zh.properties Log Message: CMSC-681 Asset Maintenance change creating url See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/resources See also: http://www.mmbase.org/jira/browse/CMSC-681 Index: cmsc-repository.properties === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources/cmsc-repository.properties,v retrieving revision 1.44 retrieving revision 1.45 diff -u -b -r1.44 -r1.45 --- cmsc-repository.properties 9 Dec 2008 07:52:24 - 1.44 +++ cmsc-repository.properties 9 Dec 2008 07:57:19 - 1.45 @@ -399,8 +399,8 @@ asset.title=Asset asset.channel=Channel {0} . -asset.new=New -asset.create=Url Create +asset.new=New Url +asset.create= Create asset.asset=asset in this channel asset.type=Of type {0} : asset.preview.title=Open a browser with a preview of this element. Index: cmsc-repository_nl.properties === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources/cmsc-repository_nl.properties,v retrieving revision 1.43 retrieving revision 1.44 diff -u -b -r1.43 -r1.44 --- cmsc-repository_nl.properties 9 Dec 2008 07:52:24 - 1.43 +++ cmsc-repository_nl.properties 9 Dec 2008 07:57:19 - 1.44 @@ -395,8 +395,8 @@ asset.title=Asset asset.channel=Channel {0} . -asset.new=New -asset.create=Url Create +asset.new=New Url +asset.create=Create asset.asset=asset in this channel asset.type=Of type {0} : asset.preview.title=Open a browser with a preview of this element. Index: cmsc-repository_zh.properties === RCS file: /var/cvs/contributions/CMSContainer/cmsc/contentrepository/resources/cmsc-repository_zh.properties,v retrieving revision 1.23 retrieving revision 1.24 diff -u -b -r1.23 -r1.24 --- cmsc-repository_zh.properties 9 Dec 2008 07:52:24 - 1.23 +++ cmsc-repository_zh.properties 9 Dec 2008 07:57:19 - 1.24 @@ -398,8 +398,8 @@ asset.title=èµæº asset.channel=é¢é {0} . -asset.new=æ°å»º -asset.create= é¾æ¥ +asset.new=æ°å»º é¾æ¥ +asset.create= å建 asset.asset=é¢éå çèµæº asset.type=ç±»å {0} : asset.preview.title=æå¼æµè§è¿äºelementçé¢è§. ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs