You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(48) |
Dec
(31) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(22) |
Feb
(68) |
Mar
(185) |
Apr
(11) |
May
(21) |
Jun
(23) |
Jul
(46) |
Aug
(69) |
Sep
(211) |
Oct
(26) |
Nov
(51) |
Dec
(52) |
2006 |
Jan
(13) |
Feb
(13) |
Mar
(8) |
Apr
(21) |
May
(17) |
Jun
(100) |
Jul
(34) |
Aug
(23) |
Sep
(26) |
Oct
(16) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(66) |
Oct
(10) |
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(3) |
May
(8) |
Jun
(5) |
Jul
(31) |
Aug
(8) |
Sep
(11) |
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
(13) |
Feb
(2) |
Mar
(9) |
Apr
(6) |
May
(24) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(120) |
2013 |
Jan
(6) |
Feb
(35) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ap...@re...> - 2005-02-03 22:51:57
|
Author: apevec Date: 2005-02-03 23:51:30 +0100 (Thu, 03 Feb 2005) New Revision: 196 Added: tools/trunk/tools/commands/mkservice tools/trunk/tools/commands/mkservice.help tools/trunk/tools/commands/mkservice.usage Modified: tools/trunk/tools/ChangeLog tools/trunk/tools/bin/ccm tools/trunk/tools/commands/Makefile.am tools/trunk/tools/configure.in Log: added ccm mkservice for running multiple CCM instance out of CCM RPMs It creates new CCM_HOME hierarchy and initscript i.e. service. Modified: tools/trunk/tools/ChangeLog =================================================================== --- tools/trunk/tools/ChangeLog 2005-02-03 19:52:55 UTC (rev 195) +++ tools/trunk/tools/ChangeLog 2005-02-03 22:51:30 UTC (rev 196) @@ -1,10 +1,16 @@ - CCM Devel Change Log + CCM Tools Change Log ===================== +2.1.2 +----- + + * added ccm mkservice [apevec] + + Genesis ------- - * CCM Devel package created + * CCM Tools package created -- End of file Modified: tools/trunk/tools/bin/ccm =================================================================== --- tools/trunk/tools/bin/ccm 2005-02-03 19:52:55 UTC (rev 195) +++ tools/trunk/tools/bin/ccm 2005-02-03 22:51:30 UTC (rev 196) @@ -84,13 +84,14 @@ if ($command) { unless ($ARGV[0] eq "hostinit" || $ARGV[0] eq "hostinit-bundle" || + $ARGV[0] eq "mkservice" || $ARGV[0] eq "load-bundle") { CCM::Util::setuser('servlet'); } shift @ARGV; &run("$command", @other_args, @ARGV); } else { - if ($ARGV[0] eq 'load' && $^O ne 'MSWin32' && $< == 0) { + if ($ARGV[0] eq 'load' && $OS ne 'MSWin32' && $< == 0) { my $config = grep { $_ eq '--config' } @ARGV; my $data = grep { $_ eq '--data' } @ARGV; my $schema = grep { $_ eq '--schema' } @ARGV; @@ -126,7 +127,7 @@ &run('ccm-run', @other_args, "com.arsdigita.packaging.MasterTool", @ARGV); } } - } elsif ($ARGV[0] eq 'upgrade' && $^O ne 'MSWin32' && $< == 0) { + } elsif ($ARGV[0] eq 'upgrade' && $OS ne 'MSWin32' && $< == 0) { my $ccm_user_id = getpwnam('servlet'); my $runtime = new CCM::Runtime; find( sub { chown ($ccm_user_id, -1, $File::Find::name); }, Modified: tools/trunk/tools/commands/Makefile.am =================================================================== --- tools/trunk/tools/commands/Makefile.am 2005-02-03 19:52:55 UTC (rev 195) +++ tools/trunk/tools/commands/Makefile.am 2005-02-03 22:51:30 UTC (rev 196) @@ -3,13 +3,14 @@ AUTOMAKE_OPTIONS = foreign no-dependencies 1.4 commandsdir = $(pkgdatadir)/commands -commands_SCRIPTS = start stop hostinit +commands_SCRIPTS = start stop hostinit mkservice commands_DATA = *.help *.usage EXTRA_DIST = $(commands_SCRIPTS) $(commands_DATA) check-local: perl -I ../lib -c hostinit + perl -I ../lib -c mkservice perl -I ../lib -c start perl -I ../lib -c stop # End of files Added: tools/trunk/tools/commands/mkservice =================================================================== --- tools/trunk/tools/commands/mkservice 2005-02-03 19:52:55 UTC (rev 195) +++ tools/trunk/tools/commands/mkservice 2005-02-03 22:51:30 UTC (rev 196) @@ -0,0 +1,187 @@ +#!/usr/bin/perl -w + +BEGIN { + if ( exists $ENV{'CCM_TOOLS_HOME'} && defined $ENV{'CCM_TOOLS_HOME'} ) { + if ( -d "$ENV{'CCM_TOOLS_HOME'}/lib" ) { + push @INC, "$ENV{'CCM_TOOLS_HOME'}/lib"; + } else { + print "$ENV{'CCM_TOOLS_HOME'}/lib was not found\n"; + exit 1; + } + } else { + print "The CCM_TOOLS_HOME environment variable must be set first.\n"; + exit 1; + } +} + +use strict; +use CCM::CommandsUtil; +use CCM::Util; +use File::Copy; +use File::Path; +use File::Spec; +use File::stat; +use Getopt::Long; + +my $OS = $^O; +my $ROOT =File::Spec->rootdir(); +my $help = 0; +my $usage = 0; +my $verbose = 0; +my $CCM_HOME = $ARGV[0]; +my $service_name = $ARGV[1]; +my @apps; +for (my $i=2; $i <= $#ARGV; $i++) { + push @apps, $ARGV[$i]; +} + +Getopt::Long::Configure("pass_through"); +if ( ! GetOptions( + 'help' => \$help, + 'usage' => \$usage, + 'verbose+' => \$verbose + ) + ) { + CCM::CommandsUtil::printUsageAndExit(); +} + +CCM::CommandsUtil::printHelpAndExit() if $help; +CCM::CommandsUtil::printUsageAndExit() if $usage; + +if ( ! defined($CCM_HOME) + || ! defined($service_name) + || ! @apps + ) { + CCM::CommandsUtil::printUsageAndExit(); +} + +if ($OS eq 'MSWin32') { + CCM::Util::error("$OS not supported"); +} +$CCM_HOME = File::Spec->rel2abs($CCM_HOME); + +# global list of classpaths maintained by %post in ccm RPMs +my $classpath = File::Spec->catfile("$ROOT", "etc", "ccm", "ccm.classpath"); +stat($classpath) or CCM::Util::error("could not find global ccm.classpath"); + +# global list of webapps maintained by %post in ccm RPMs +my $webapps = File::Spec->catfile("$ROOT", "etc", "ccm", "ccm.webapps"); +stat($webapps) or CCM::Util::error("could not find ccm.webapps"); + +# envvars provided by ccm-tools +my $envvars = File::Spec->catfile("$ROOT", "etc", "ccm", "conf", "envvars"); +stat($envvars) or CCM::Util::error("could not find envvars"); + +# log4j.properties provided by ccm-core +my $log4j = File::Spec->catfile("$ROOT", "etc", "ccm", "conf", "log4j.properties"); +stat($log4j) or CCM::Util::error("could not find log4j.properties"); + +# ccm initscript provided by ccm-tools +my $ccminit = File::Spec->catfile("$ROOT", "etc", "rc.d", "init.d", "ccm"); +stat($ccminit) or CCM::Util::error("could not find ccm initscript"); + +# don't overwrite existing $CCM_HOME and /etc/rc.d/init.d/$service_name +my $service = File::Spec->catfile("$ROOT", "etc", "rc.d", "init.d", $service_name); +!stat($service) or CCM::Util::error("service $service already present"); +!stat($CCM_HOME) or CCM::Util::error("$CCM_HOME already present"); + +my $verbose_args = ""; +for (1..$verbose) { + $verbose_args .= " --verbose"; +} + +# create new CCM_HOME with appropriate folder structure +mkpath($CCM_HOME); +chdir $CCM_HOME; +mkdir 'conf'; +mkdir 'webapps'; +mkdir 'data'; +mkdir 'logs'; +mkdir 'tmp'; +my ($ignore, $uid, $gid); +# owner: ccmadmin +($ignore,$ignore,$uid,$gid) = getpwnam('ccmadmin') + or CCM::Util::error("ccmadmin account missing"); +chown $uid, $gid, 'conf', 'webapps'; +# copy envvars log4j.properties from /etc/ccm/conf/ to conf/ +chdir 'conf'; +copy($envvars, File::Spec->curdir()) + or CCM::Util::error("envvars copy failed"); +copy($log4j, File::Spec->curdir()) + or CCM::Util::error("log4j copy failed"); +chown $uid, $gid, 'log4j.properties'; +chdir File::Spec->updir(); + +#owner: servlet +($ignore,$ignore,$uid,$gid) = getpwnam('servlet') + or CCM::Util::error("servlet account missing"); +chown $uid, $gid, 'data', 'logs', 'tmp'; +my $templates = File::Spec->catdir('webapps','ROOT','packages','content-section','templates'); +mkpath($templates); +chown $uid, $gid, $templates; + +# copy $webapps $classpath to new CCM_HOME, filtering thru @apps +&filter($webapps, 'ccm.webapps', \@apps); +&filter($classpath, 'ccm.classpath', \@apps); + +# copy $ccminit to $service, with modifications +open DST,">$service" + or CCM::Util::error("$service create failed"); +open SRC,"<$ccminit"; +while(<SRC>) { + if (/prog=ccm/) { + print DST <<"EOF"; +prog=$service_name +CCM_HOME=$CCM_HOME +export CCM_HOME +EOF + } else { + print DST $_; + } +} +close SRC; +close DST; +chmod 0755, $service; + +print <<"EOF"; +You can now load your CCM instance "$service_name" using: +# CCM_HOME=$CCM_HOME ccm load ... +# CCM_HOME=$CCM_HOME ccm hostinit ... +Start using: +# service $service_name start +EOF + +# copy from src to dst only those lines matching one of patterns in @apps +sub filter { + my $src = shift; + my $dst = shift; + my $apps = shift; + + open DST,">$dst" + or CCM::Util::error("$dst filter copy failed"); + open SRC,"<$src"; + my %app_seen; + while(<SRC>) { + my $line = $_; + my @matches = grep($line =~ $_, @{$apps}); + my $times = scalar @matches; + if ($times > 0) { + $app_seen{$matches[0]} = 1; + print DST $line; + } + if ($times > 1) { + CCM::Util::warn("duplicate package: $matches[0]"); + } + } + close SRC; + close DST; + # check that all wanted apps are actually installed + my @apps_not_seen; + foreach (@{$apps}) { + push(@apps_not_seen, $_) unless exists $app_seen{$_}; + } + if (scalar @apps_not_seen > 0) { + CCM::Util::error("unable to locate package: $apps_not_seen[0]"); + } +} + Property changes on: tools/trunk/tools/commands/mkservice ___________________________________________________________________ Name: svn:executable + * Added: tools/trunk/tools/commands/mkservice.help =================================================================== --- tools/trunk/tools/commands/mkservice.help 2005-02-03 19:52:55 UTC (rev 195) +++ tools/trunk/tools/commands/mkservice.help 2005-02-03 22:51:30 UTC (rev 196) @@ -0,0 +1 @@ +Prepare a new CCM instance (CCM_HOME tree and initscript). Added: tools/trunk/tools/commands/mkservice.usage =================================================================== --- tools/trunk/tools/commands/mkservice.usage 2005-02-03 19:52:55 UTC (rev 195) +++ tools/trunk/tools/commands/mkservice.usage 2005-02-03 22:51:30 UTC (rev 196) @@ -0,0 +1,5 @@ +usage: mkservice [OPTIONS] instance_root_directory service_name PACKAGE-KEYS + +Options: + --help Display help + --usage Print this message Modified: tools/trunk/tools/configure.in =================================================================== --- tools/trunk/tools/configure.in 2005-02-03 19:52:55 UTC (rev 195) +++ tools/trunk/tools/configure.in 2005-02-03 22:51:30 UTC (rev 196) @@ -3,8 +3,8 @@ AC_INIT(ccm-tools.spec.in) -VERSION=2.1.1 -RELEASE=2 +VERSION=2.1.2 +RELEASE=1 AM_INIT_AUTOMAKE(ccm-tools, $VERSION) AC_SUBST(RELEASE) |
From: <ssk...@re...> - 2005-02-03 19:53:26
|
Author: sskracic Date: 2005-02-03 20:52:55 +0100 (Thu, 03 Feb 2005) New Revision: 195 Modified: ccm-core/trunk/src/com/arsdigita/ui/UserBanner.java Log: Small addition to userBanner UI component: login URL containing return_url to the currently viewed page (loginExcursionURL). This is purposedly done in Java to avoid XSL gimmicks. Modified: ccm-core/trunk/src/com/arsdigita/ui/UserBanner.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/ui/UserBanner.java 2005-02-03 18:37:09 UTC (rev 194) +++ ccm-core/trunk/src/com/arsdigita/ui/UserBanner.java 2005-02-03 19:52:55 UTC (rev 195) @@ -92,6 +92,12 @@ state.getRequest())).toString()); content.addAttribute( + "loginExcursionURL", + URL.excursion(state.getRequest(), + Initializer.getFullURL(Initializer.LOGIN_PAGE_KEY, + state.getRequest())).toString()); + + content.addAttribute( "logoutURL", URL.there(state.getRequest(), Initializer.getFullURL(Initializer.LOGOUT_PAGE_KEY, |
From: <ssk...@re...> - 2005-02-03 18:37:43
|
Author: sskracic Date: 2005-02-03 19:37:09 +0100 (Thu, 03 Feb 2005) New Revision: 194 Modified: ccm-forum/trunk/test/src/com/arsdigita/forum/PostTest.java Log: Post API has been changed, test updated to reflect this. Modified: ccm-forum/trunk/test/src/com/arsdigita/forum/PostTest.java =================================================================== --- ccm-forum/trunk/test/src/com/arsdigita/forum/PostTest.java 2005-02-03 18:30:56 UTC (rev 193) +++ ccm-forum/trunk/test/src/com/arsdigita/forum/PostTest.java 2005-02-03 18:37:09 UTC (rev 194) @@ -150,6 +150,7 @@ CategoryCollection categories = root.getChildren(); assertTrue("has at least one category", categories.next()); Category postCategory = categories.getCategory(); + categories.close(); // Create a new post and categorize it @@ -173,7 +174,10 @@ // Verify that the category now contains one child object. assertEquals(1, postCategory.getNumberOfChildObjects()); - assertEquals(postCategory, post.getCategory()); + CategoryCollection result = post.getCategories(); + assertTrue("has at least one category", result.next()); + assertEquals(postCategory, result.getCategory()); + result.close(); } |
From: <ssk...@re...> - 2005-02-03 18:31:28
|
Author: sskracic Date: 2005-02-03 19:30:56 +0100 (Thu, 03 Feb 2005) New Revision: 193 Modified: ccm-core/trunk/etc/java-libs.txt ccm-core/trunk/lib/mail.jar Log: Upgrading javamail to newer version. All junit tests in MailSuite pass. Modified: ccm-core/trunk/etc/java-libs.txt =================================================================== --- ccm-core/trunk/etc/java-libs.txt 2005-02-02 16:51:23 UTC (rev 192) +++ ccm-core/trunk/etc/java-libs.txt 2005-02-03 18:30:56 UTC (rev 193) @@ -27,7 +27,7 @@ log4j.jar 1.2 APACHE http://www.apache.org/LICENSE.txt lucene-1.2.jar 1.2 APACHE http://www.apache.org/LICENSE.txt postgresql.jar 7.2 BSD http://www.postgresql.org/licence.html -mail.jar 1.2 SUN http://java.sun.com/products/javamail/ +mail.jar 1.3.1 SUN http://java.sun.com/products/javamail/ saxon.jar 6.5.2 MPL 1.0 http://www.mozilla.org/MPL/ servlet.jar 2.2 APACHE http://www.apache.org/LICENSE.txt Tidy.jar 04aug2000r7-dev Modified: ccm-core/trunk/lib/mail.jar =================================================================== (Binary files differ) |
Author: mbooth Date: 2005-02-02 17:51:23 +0100 (Wed, 02 Feb 2005) New Revision: 192 Added: ccm-cms-assets-fileattachment/trunk/src/com/arsdigita/cms/contentassets/FileAttachmentURLFinder.java ccm-cms/trunk/src/com/arsdigita/cms/dispatcher/AssetURLFinder.java Modified: ccm-cms-assets-fileattachment/trunk/src/com/arsdigita/cms/contentassets/FileAttachmentInitializer.java ccm-cms/trunk/src/com/arsdigita/cms/Initializer.java Log: Generic URLFinder for Assets and one for FileAttachments which will link to the containing item in the draft context. Modified: ccm-cms/trunk/src/com/arsdigita/cms/Initializer.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/Initializer.java 2005-02-02 14:23:39 UTC (rev 191) +++ ccm-cms/trunk/src/com/arsdigita/cms/Initializer.java 2005-02-02 16:51:23 UTC (rev 192) @@ -19,6 +19,7 @@ package com.arsdigita.cms; import com.arsdigita.cms.contenttypes.Link; +import com.arsdigita.cms.dispatcher.AssetURLFinder; import com.arsdigita.cms.dispatcher.ItemURLFinder; import com.arsdigita.cms.dispatcher.ItemTemplatePatternGenerator; import com.arsdigita.cms.dispatcher.ItemDelegatedURLPatternGenerator; @@ -112,6 +113,8 @@ new ItemURLFinder()); URLService.registerFinder(Template.BASE_DATA_OBJECT_TYPE, new ItemURLFinder()); + URLService.registerFinder(Asset.BASE_DATA_OBJECT_TYPE, + new AssetURLFinder()); URLService.registerFinder( Link.BASE_DATA_OBJECT_TYPE, Added: ccm-cms/trunk/src/com/arsdigita/cms/dispatcher/AssetURLFinder.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/dispatcher/AssetURLFinder.java 2005-02-02 14:23:39 UTC (rev 191) +++ ccm-cms/trunk/src/com/arsdigita/cms/dispatcher/AssetURLFinder.java 2005-02-02 16:51:23 UTC (rev 192) @@ -0,0 +1,66 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package com.arsdigita.cms.dispatcher; + +import com.arsdigita.cms.Asset; +import com.arsdigita.cms.ContentItem; + +import com.arsdigita.kernel.NoValidURLException; +import com.arsdigita.kernel.URLFinder; +import com.arsdigita.persistence.OID; +import com.arsdigita.web.Web; +import com.arsdigita.web.WebConfig; + +/** + * @author mb...@re... + * + * Implementation of URLFinder for Assets + */ +public class AssetURLFinder implements URLFinder { + /** + * + * find URL for an asset + * + * @param oid the OID of the asset + * @param context the context of the lookup (live/draft) + * + */ + public String find(OID oid, String context) throws NoValidURLException { + if( !"live".equals( context ) ) + throw new NoValidURLException("No draft URL for assets"); + + WebConfig config = Web.getConfig(); + + StringBuffer url = new StringBuffer(); + url.append( config.getDispatcherServletPath() ); + url.append( config.getDispatcherContextPath() ); + url.append( "/cms-service/stream/asset/?asset_id=" ); + url.append( oid.get( Asset.ID ).toString() ); + + return url.toString(); + } + + /** + * + * find URL for an asset in the live context + * + * @param oid the OID of the asset + */ + public String find(OID oid) throws NoValidURLException { + return find(oid, "live"); + } +} Modified: ccm-cms-assets-fileattachment/trunk/src/com/arsdigita/cms/contentassets/FileAttachmentInitializer.java =================================================================== --- ccm-cms-assets-fileattachment/trunk/src/com/arsdigita/cms/contentassets/FileAttachmentInitializer.java 2005-02-02 14:23:39 UTC (rev 191) +++ ccm-cms-assets-fileattachment/trunk/src/com/arsdigita/cms/contentassets/FileAttachmentInitializer.java 2005-02-02 16:51:23 UTC (rev 192) @@ -16,8 +16,11 @@ import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.contenttypes.ContentAssetInitializer; +import com.arsdigita.cms.contentassets.FileAttachment; import com.arsdigita.cms.contentassets.ui.FileAttachmentsStep; + import com.arsdigita.globalization.GlobalizedMessage; +import com.arsdigita.kernel.URLService; import com.arsdigita.runtime.LegacyInitEvent; import com.arsdigita.search.MetadataProviderRegistry; @@ -69,17 +72,11 @@ return 2; // XXX config param please } -/* public void init(LegacyInitEvent evt) { super.init(evt); - MetadataProviderRegistry.registerAdapter( - FileAttachment.BASE_DATA_OBJECT_TYPE, - new ContentPageMetadataProvider()); - URLService.registerFinder( - ArticleSection.BASE_DATA_OBJECT_TYPE, - new MultiPartArticleSectionURLFinder()); + FileAttachment.BASE_DATA_OBJECT_TYPE, + new FileAttachmentURLFinder()); } -*/ } Added: ccm-cms-assets-fileattachment/trunk/src/com/arsdigita/cms/contentassets/FileAttachmentURLFinder.java =================================================================== --- ccm-cms-assets-fileattachment/trunk/src/com/arsdigita/cms/contentassets/FileAttachmentURLFinder.java 2005-02-02 14:23:39 UTC (rev 191) +++ ccm-cms-assets-fileattachment/trunk/src/com/arsdigita/cms/contentassets/FileAttachmentURLFinder.java 2005-02-02 16:51:23 UTC (rev 192) @@ -0,0 +1,88 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Created on 11-May-04 + */ + +package com.arsdigita.cms.contentassets; + +import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.contentassets.FileAttachment; +import com.arsdigita.cms.dispatcher.AssetURLFinder; + +import com.arsdigita.kernel.NoValidURLException; +import com.arsdigita.kernel.URLFinder; +import com.arsdigita.kernel.URLService; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.DataQuery; +import com.arsdigita.persistence.OID; +import com.arsdigita.persistence.SessionManager; + +/** + * @author cgyg9330 + * @author mb...@re... + * + * A URLFinder for FileAttachments. In the draft context (ie, in CMS + * backend search) it will return the draft url for the containing item. + * Otherwise it will delegate to an AssetURLFinder. + */ +public class FileAttachmentURLFinder implements URLFinder { + + private static final AssetURLFinder s_assetFinder = new AssetURLFinder(); + + /** + * + * find URL for a file attachment by finding its article + * + * @param oid the OID of the file attachment + * @param content the context of the search (ie draft/live) + */ + public String find(OID oid, String context) throws NoValidURLException { + if (!"draft".equals(context)) + return s_assetFinder.find(oid, context); + + DataObject dobj = SessionManager.getSession().retrieve(oid); + if (dobj == null) { + throw new NoValidURLException("No such data object " + oid); + } + + if (!dobj + .getObjectType() + .getQualifiedName() + .equals(FileAttachment.BASE_DATA_OBJECT_TYPE)) { + throw new NoValidURLException( + "Data Object is not a file attachment " + + dobj.getObjectType().getQualifiedName() + + " " + + oid); + } + + FileAttachment file = new FileAttachment(dobj); + ContentItem owner = file.getFileOwner(); + return URLService.locate(owner.getOID(), context); + } + + /** + * + * find URL for the live context of a file attachment. Delegates to + * AssetURLFinder. + * + * @param oid the OID of the file attachment + * + */ + public String find(OID oid) throws NoValidURLException { + return s_assetFinder.find(oid); + } +} |
From: <mb...@re...> - 2005-02-02 14:24:08
|
Author: mbooth Date: 2005-02-02 15:23:39 +0100 (Wed, 02 Feb 2005) New Revision: 191 Modified: ccm-cms/trunk/src/com/arsdigita/cms/search/IntermediaQueryEngine.java Log: Fix launch_date related bug introduced when I changed from using cms_pages to using cms_items. Now outer join against cms_pages. Modified: ccm-cms/trunk/src/com/arsdigita/cms/search/IntermediaQueryEngine.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/IntermediaQueryEngine.java 2005-01-28 22:01:59 UTC (rev 190) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/IntermediaQueryEngine.java 2005-02-02 14:23:39 UTC (rev 191) @@ -47,13 +47,20 @@ public IntermediaQueryEngine() { addColumn("i.version", "version"); - //addColumn("p.launch_date", "launch_date"); + addColumn("p.launch_date", "launch_date"); addColumn("audited.last_modified", "last_modified"); addColumn("audited.modifying_user", "modifying_user"); addColumn("audited.creation_date", "creation_date"); addColumn("audited.creation_user", "creation_user"); addTable("cms_items", "i"); - //addTable("cms_pages", "p"); + + // XXX: I am going to hell for the line below. I console myself only + // because this is a hack to work around a terrible interface. + // This line replaces the existing hash entry for 'search_content' and + // abuses the alias to add a left outer join. + // mb...@re... 02/02/2005 + addTable( "search_content", "c left outer join cms_pages p on ( p.item_id = c.object_id )" ); + addTable("acs_auditing", "audited"); addCondition("c.object_id = i.item_id"); //addCondition("c.object_id = p.item_id"); @@ -71,9 +78,9 @@ } else if (VersionFilterType.KEY.equals(type.getKey())) { addVersionFilter(query, (VersionFilterSpecification)filter); } else if (LaunchDateFilterType.KEY.equals(type.getKey())) { - addColumn("p.launch_date", "launch_date"); - addTable("cms_pages", "p"); - addCondition("c.object_id = p.item_id"); + //addColumn("p.launch_date", "launch_date"); + //addTable("cms_pages", "p"); + //addCondition("c.object_id = p.item_id"); addLaunchDateFilter(query, (DateRangeFilterSpecification)filter); } else if (LastModifiedDateFilterType.KEY.equals(type.getKey())) { addLastModifiedDateFilter(query, (DateRangeFilterSpecification)filter); |
From: <ap...@re...> - 2005-01-28 22:09:03
|
Author: apevec Date: 2005-01-28 23:01:59 +0100 (Fri, 28 Jan 2005) New Revision: 190 Removed: ccm-ldn-aplaws/trunk/bundles/complete/ccm-bundle-aplaws-complete.spec.in ccm-ldn-aplaws/trunk/bundles/complete/config.cache ccm-ldn-aplaws/trunk/bundles/standard/config.cache Log: cleanup generated files Deleted: ccm-ldn-aplaws/trunk/bundles/complete/ccm-bundle-aplaws-complete.spec.in =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/ccm-bundle-aplaws-complete.spec.in 2005-01-28 14:50:29 UTC (rev 189) +++ ccm-ldn-aplaws/trunk/bundles/complete/ccm-bundle-aplaws-complete.spec.in 2005-01-28 22:01:59 UTC (rev 190) @@ -1,43 +0,0 @@ -Summary: CCM Bundle APLAWS Complete -Name: @PACKAGE@ -Version: @VERSION@ -Release: @RELEASE@ -URL: http://www.aplaws.org.uk -Source0: %{name}-%{version}.tar.gz -License: GPL -Group: Applications/Internet/CCM -BuildRoot: %{_tmppath}/%{name}-root -Requires: ccm-tools-bundle -#Requires: ::requires:: -BuildArchitectures: noarch -Prefix: /usr - -%description -The APLAWS Complete Bundle provides a mechanism to install -the complete, pre-integrated set of APLAWS application. - -%prep -%setup -q - -%build -./configure --prefix=/usr -make - -%install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -/usr/share/ccm-tools/bundles/aplaws-complete/applications.cfg -/usr/share/ccm-tools/bundles/aplaws-complete/integration.properties -/usr/share/ccm-tools/bundles/aplaws-complete/web.xml - -%changelog -* Mon Jan 26 2004 Daniel Berrange <ber...@re...> -- Initial build. - - Deleted: ccm-ldn-aplaws/trunk/bundles/complete/config.cache =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/config.cache 2005-01-28 14:50:29 UTC (rev 189) +++ ccm-ldn-aplaws/trunk/bundles/complete/config.cache 2005-01-28 22:01:59 UTC (rev 190) @@ -1,16 +0,0 @@ -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -ac_cv_path_install=${ac_cv_path_install=$'/usr/bin/install -c'} -ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes} Deleted: ccm-ldn-aplaws/trunk/bundles/standard/config.cache =================================================================== --- ccm-ldn-aplaws/trunk/bundles/standard/config.cache 2005-01-28 14:50:29 UTC (rev 189) +++ ccm-ldn-aplaws/trunk/bundles/standard/config.cache 2005-01-28 22:01:59 UTC (rev 190) @@ -1,16 +0,0 @@ -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -ac_cv_path_install=${ac_cv_path_install=$'/usr/bin/install -c'} -ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes} |
From: <ap...@re...> - 2005-01-28 14:50:50
|
Author: apevec Date: 2005-01-28 15:50:29 +0100 (Fri, 28 Jan 2005) New Revision: 189 Removed: ccm-ldn-aplaws/trunk/bundles/complete/Makefile ccm-ldn-aplaws/trunk/bundles/complete/Makefile.in ccm-ldn-aplaws/trunk/bundles/complete/aclocal.m4 ccm-ldn-aplaws/trunk/bundles/complete/ccm-bundle-aplaws-complete-1.0.0.tar.gz ccm-ldn-aplaws/trunk/bundles/complete/ccm-bundle-aplaws-complete.spec ccm-ldn-aplaws/trunk/bundles/complete/cfg/Makefile ccm-ldn-aplaws/trunk/bundles/complete/cfg/Makefile.in ccm-ldn-aplaws/trunk/bundles/complete/config.log ccm-ldn-aplaws/trunk/bundles/complete/config.status ccm-ldn-aplaws/trunk/bundles/complete/configure ccm-ldn-aplaws/trunk/bundles/minimal/ ccm-ldn-aplaws/trunk/bundles/standard/Makefile ccm-ldn-aplaws/trunk/bundles/standard/Makefile.in ccm-ldn-aplaws/trunk/bundles/standard/aclocal.m4 ccm-ldn-aplaws/trunk/bundles/standard/ccm-bundle-aplaws-standard-1.0.0.tar.gz ccm-ldn-aplaws/trunk/bundles/standard/ccm-bundle-aplaws-standard.spec ccm-ldn-aplaws/trunk/bundles/standard/cfg/Makefile ccm-ldn-aplaws/trunk/bundles/standard/cfg/Makefile.in ccm-ldn-aplaws/trunk/bundles/standard/config.log ccm-ldn-aplaws/trunk/bundles/standard/config.status ccm-ldn-aplaws/trunk/bundles/standard/configure tools/trunk/misc/build-partial.sh Modified: ccm-ldn-aplaws/trunk/bundles/camden/rollingbuild.sh ccm-ldn-aplaws/trunk/bundles/complete/rollingbuild.sh ccm-ldn-aplaws/trunk/bundles/demo/rollingbuild.sh ccm-ldn-aplaws/trunk/bundles/devel/rollingbuild.sh ccm-ldn-aplaws/trunk/bundles/standard/rollingbuild.sh tools/trunk/misc/build-all.sh Log: fix bundle RPM building cleanup generated files under ccm-ldn-aplaws/bundles/ Modified: ccm-ldn-aplaws/trunk/bundles/camden/rollingbuild.sh =================================================================== --- ccm-ldn-aplaws/trunk/bundles/camden/rollingbuild.sh 2005-01-27 16:47:56 UTC (rev 188) +++ ccm-ldn-aplaws/trunk/bundles/camden/rollingbuild.sh 2005-01-28 14:50:29 UTC (rev 189) @@ -31,7 +31,7 @@ make dist # Build the rpms -rpm -ta --clean ccm-bundle-aplaws-plus-camden-*.tar.gz +rpmbuild -ta --clean ccm-bundle-aplaws-plus-camden-*.tar.gz ./make-zip.sh Deleted: ccm-ldn-aplaws/trunk/bundles/complete/Makefile =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/Makefile 2005-01-27 16:47:56 UTC (rev 188) +++ ccm-ldn-aplaws/trunk/bundles/complete/Makefile 2005-01-28 14:50:29 UTC (rev 189) @@ -1,330 +0,0 @@ -# Generated automatically from Makefile.in by configure. -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# Process with automake - - -SHELL = /bin/sh - -srcdir = . -top_srcdir = . -prefix = /var/ccm-devel/dev/mbooth/aplaws-rickshaw/packagebuild/working/autobuild -exec_prefix = ${prefix} - -bindir = ${exec_prefix}/bin -sbindir = ${exec_prefix}/sbin -libexecdir = ${exec_prefix}/libexec -datadir = ${prefix}/share -sysconfdir = ${prefix}/etc -sharedstatedir = ${prefix}/com -localstatedir = ${prefix}/var -libdir = ${exec_prefix}/lib -infodir = ${prefix}/info -mandir = ${prefix}/man -includedir = ${prefix}/include -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/ccm-bundle-aplaws-complete -pkglibdir = $(libdir)/ccm-bundle-aplaws-complete -pkgincludedir = $(includedir)/ccm-bundle-aplaws-complete - -top_builddir = . - -ACLOCAL = aclocal -AUTOCONF = autoconf -AUTOMAKE = automake -AUTOHEADER = autoheader - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_SCRIPT = ${INSTALL_PROGRAM} -transform = s,x,x, - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -MAKEINFO = makeinfo -PACKAGE = ccm-bundle-aplaws-complete -RELEASE = 2 -VERSION = 1.0.0 - -SUBDIRS = cfg -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = ccm-bundle-aplaws-complete.spec -DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ -Makefile.in NEWS aclocal.m4 ccm-bundle-aplaws-complete.spec.in \ -configure configure.in install-sh missing mkinstalldirs - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -$(ACLOCAL_M4): configure.in - cd $(srcdir) && $(ACLOCAL) - -config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck -$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) -ccm-bundle-aplaws-complete.spec: $(top_builddir)/config.status ccm-bundle-aplaws-complete.spec.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. - - - -all-recursive install-data-recursive install-exec-recursive \ -installdirs-recursive install-recursive uninstall-recursive \ -check-recursive installcheck-recursive info-recursive dvi-recursive: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ - rev="$$subdir $$rev"; \ - test "$$subdir" != "." || dot_seen=yes; \ - done; \ - test "$$dot_seen" = "no" && rev=". $$rev"; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $$unique $(LISP) - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) - -mostlyclean-tags: - -clean-tags: - -distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - -rm -rf $(distdir) - GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz - mkdir $(distdir)/=build - mkdir $(distdir)/=inst - dc_install_base=`cd $(distdir)/=inst && pwd`; \ - cd $(distdir)/=build \ - && ../configure --srcdir=.. --prefix=$$dc_install_base \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) dist - -rm -rf $(distdir) - @banner="$(distdir).tar.gz is ready for distribution"; \ - dashes=`echo "$$banner" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - echo "$$dashes" -dist: distdir - -chmod -R a+r $(distdir) - GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) - -rm -rf $(distdir) -dist-all: distdir - -chmod -R a+r $(distdir) - GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) - -rm -rf $(distdir) -distdir: $(DISTFILES) - -rm -rf $(distdir) - mkdir $(distdir) - -chmod 777 $(distdir) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done - for subdir in $(SUBDIRS); do \ - if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ - || exit 1; \ - chmod 777 $(distdir)/$$subdir; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook -info-am: -info: info-recursive -dvi-am: -dvi: dvi-recursive -check-am: all-am -check: check-recursive -installcheck-am: -installcheck: installcheck-recursive -install-exec-am: -install-exec: install-exec-recursive - -install-data-am: -install-data: install-data-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-recursive -uninstall-am: -uninstall: uninstall-recursive -all-am: Makefile -all-redirect: all-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: installdirs-recursive -installdirs-am: - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-tags mostlyclean-generic - -mostlyclean: mostlyclean-recursive - -clean-am: clean-tags clean-generic mostlyclean-am - -clean: clean-recursive - -distclean-am: distclean-tags distclean-generic clean-am - -distclean: distclean-recursive - -rm -f config.status - -maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ - distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-recursive - -rm -f config.status - -.PHONY: install-data-recursive uninstall-data-recursive \ -install-exec-recursive uninstall-exec-recursive installdirs-recursive \ -uninstalldirs-recursive all-recursive check-recursive \ -installcheck-recursive info-recursive dvi-recursive \ -mostlyclean-recursive distclean-recursive clean-recursive \ -maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ -distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs-am \ -installdirs mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - -dist-hook: - cp $(top_builddir)/ccm-bundle-aplaws-complete.spec $(distdir)/ - -# End of file - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Deleted: ccm-ldn-aplaws/trunk/bundles/complete/Makefile.in =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/Makefile.in 2005-01-27 16:47:56 UTC (rev 188) +++ ccm-ldn-aplaws/trunk/bundles/complete/Makefile.in 2005-01-28 14:50:29 UTC (rev 189) @@ -1,330 +0,0 @@ -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# Process with automake - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = . - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -MAKEINFO = @MAKEINFO@ -PACKAGE = @PACKAGE@ -RELEASE = @RELEASE@ -VERSION = @VERSION@ - -SUBDIRS = cfg -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = ccm-bundle-aplaws-complete.spec -DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ -Makefile.in NEWS aclocal.m4 ccm-bundle-aplaws-complete.spec.in \ -configure configure.in install-sh missing mkinstalldirs - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -$(ACLOCAL_M4): configure.in - cd $(srcdir) && $(ACLOCAL) - -config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck -$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) -ccm-bundle-aplaws-complete.spec: $(top_builddir)/config.status ccm-bundle-aplaws-complete.spec.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. - -@SET_MAKE@ - -all-recursive install-data-recursive install-exec-recursive \ -installdirs-recursive install-recursive uninstall-recursive \ -check-recursive installcheck-recursive info-recursive dvi-recursive: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $(MAKEFLAGS); amf=$$2; \ - dot_seen=no; \ - rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ - rev="$$subdir $$rev"; \ - test "$$subdir" != "." || dot_seen=yes; \ - done; \ - test "$$dot_seen" = "no" && rev=". $$rev"; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $$unique $(LISP) - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) - -mostlyclean-tags: - -clean-tags: - -distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - -rm -rf $(distdir) - GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz - mkdir $(distdir)/=build - mkdir $(distdir)/=inst - dc_install_base=`cd $(distdir)/=inst && pwd`; \ - cd $(distdir)/=build \ - && ../configure --srcdir=.. --prefix=$$dc_install_base \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) dist - -rm -rf $(distdir) - @banner="$(distdir).tar.gz is ready for distribution"; \ - dashes=`echo "$$banner" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - echo "$$dashes" -dist: distdir - -chmod -R a+r $(distdir) - GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) - -rm -rf $(distdir) -dist-all: distdir - -chmod -R a+r $(distdir) - GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) - -rm -rf $(distdir) -distdir: $(DISTFILES) - -rm -rf $(distdir) - mkdir $(distdir) - -chmod 777 $(distdir) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done - for subdir in $(SUBDIRS); do \ - if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ - || exit 1; \ - chmod 777 $(distdir)/$$subdir; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook -info-am: -info: info-recursive -dvi-am: -dvi: dvi-recursive -check-am: all-am -check: check-recursive -installcheck-am: -installcheck: installcheck-recursive -install-exec-am: -install-exec: install-exec-recursive - -install-data-am: -install-data: install-data-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-recursive -uninstall-am: -uninstall: uninstall-recursive -all-am: Makefile -all-redirect: all-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: installdirs-recursive -installdirs-am: - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-tags mostlyclean-generic - -mostlyclean: mostlyclean-recursive - -clean-am: clean-tags clean-generic mostlyclean-am - -clean: clean-recursive - -distclean-am: distclean-tags distclean-generic clean-am - -distclean: distclean-recursive - -rm -f config.status - -maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ - distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-recursive - -rm -f config.status - -.PHONY: install-data-recursive uninstall-data-recursive \ -install-exec-recursive uninstall-exec-recursive installdirs-recursive \ -uninstalldirs-recursive all-recursive check-recursive \ -installcheck-recursive info-recursive dvi-recursive \ -mostlyclean-recursive distclean-recursive clean-recursive \ -maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ -distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs-am \ -installdirs mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - -dist-hook: - cp $(top_builddir)/@PACKAGE@.spec $(distdir)/ - -# End of file - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Deleted: ccm-ldn-aplaws/trunk/bundles/complete/aclocal.m4 =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/aclocal.m4 2005-01-27 16:47:56 UTC (rev 188) +++ ccm-ldn-aplaws/trunk/bundles/complete/aclocal.m4 2005-01-28 14:50:29 UTC (rev 189) @@ -1,104 +0,0 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4-p5 - -dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without -dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A -dnl PARTICULAR PURPOSE. - -# Do all the work for Automake. This macro actually does too much -- -# some checks are only needed if your package does certain things. -# But this isn't really a big deal. - -# serial 1 - -dnl Usage: -dnl AM_INIT_AUTOMAKE(package,version, [no-define]) - -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_REQUIRE([AC_PROG_INSTALL]) -PACKAGE=[$1] -AC_SUBST(PACKAGE) -VERSION=[$2] -AC_SUBST(VERSION) -dnl test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -fi -ifelse([$3],, -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) -AC_REQUIRE([AM_SANITY_CHECK]) -AC_REQUIRE([AC_ARG_PROGRAM]) -dnl FIXME This is truly gross. -missing_dir=`cd $ac_aux_dir && pwd` -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) -AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) -AC_REQUIRE([AC_PROG_MAKE_SET])]) - -# -# Check to make sure that the build environment is sane. -# - -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftestfile -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` - if test "[$]*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftestfile` - fi - if test "[$]*" != "X $srcdir/configure conftestfile" \ - && test "[$]*" != "X conftestfile $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "[$]2" = conftestfile - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -rm -f conftest* -AC_MSG_RESULT(yes)]) - -dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) -dnl The program must properly implement --version. -AC_DEFUN([AM_MISSING_PROG], -[AC_MSG_CHECKING(for working $2) -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if ($2 --version) < /dev/null > /dev/null 2>&1; then - $1=$2 - AC_MSG_RESULT(found) -else - $1="$3/missing $2" - AC_MSG_RESULT(missing) -fi -AC_SUBST($1)]) - Deleted: ccm-ldn-aplaws/trunk/bundles/complete/ccm-bundle-aplaws-complete-1.0.0.tar.gz =================================================================== (Binary files differ) Deleted: ccm-ldn-aplaws/trunk/bundles/complete/ccm-bundle-aplaws-complete.spec =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/ccm-bundle-aplaws-complete.spec 2005-01-27 16:47:56 UTC (rev 188) +++ ccm-ldn-aplaws/trunk/bundles/complete/ccm-bundle-aplaws-complete.spec 2005-01-28 14:50:29 UTC (rev 189) @@ -1,43 +0,0 @@ -Summary: CCM Bundle APLAWS Complete -Name: ccm-bundle-aplaws-complete -Version: 1.0.0 -Release: 2 -URL: http://www.aplaws.org.uk -Source0: %{name}-%{version}.tar.gz -License: GPL -Group: Applications/Internet/CCM -BuildRoot: %{_tmppath}/%{name}-root -Requires: ccm-tools-bundle -#Requires: ::requires:: -BuildArchitectures: noarch -Prefix: /usr - -%description -The APLAWS Complete Bundle provides a mechanism to install -the complete, pre-integrated set of APLAWS application. - -%prep -%setup -q - -%build -./configure --prefix=/usr -make - -%install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -/usr/share/ccm-tools/bundles/aplaws-complete/applications.cfg -/usr/share/ccm-tools/bundles/aplaws-complete/integration.properties -/usr/share/ccm-tools/bundles/aplaws-complete/web.xml - -%changelog -* Mon Jan 26 2004 Daniel Berrange <ber...@re...> -- Initial build. - - Deleted: ccm-ldn-aplaws/trunk/bundles/complete/cfg/Makefile =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/cfg/Makefile 2005-01-27 16:47:56 UTC (rev 188) +++ ccm-ldn-aplaws/trunk/bundles/complete/cfg/Makefile 2005-01-28 14:50:29 UTC (rev 189) @@ -1,197 +0,0 @@ -# Generated automatically from Makefile.in by configure. -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# Process with automake - - -SHELL = /bin/sh - -srcdir = . -top_srcdir = .. -prefix = /var/ccm-devel/dev/mbooth/aplaws-rickshaw/packagebuild/working/autobuild -exec_prefix = ${prefix} - -bindir = ${exec_prefix}/bin -sbindir = ${exec_prefix}/sbin -libexecdir = ${exec_prefix}/libexec -datadir = ${prefix}/share -sysconfdir = ${prefix}/etc -sharedstatedir = ${prefix}/com -localstatedir = ${prefix}/var -libdir = ${exec_prefix}/lib -infodir = ${prefix}/info -mandir = ${prefix}/man -includedir = ${prefix}/include -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/ccm-bundle-aplaws-complete -pkglibdir = $(libdir)/ccm-bundle-aplaws-complete -pkgincludedir = $(includedir)/ccm-bundle-aplaws-complete - -top_builddir = .. - -ACLOCAL = aclocal -AUTOCONF = autoconf -AUTOMAKE = automake -AUTOHEADER = autoheader - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_SCRIPT = ${INSTALL_PROGRAM} -transform = s,x,x, - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -MAKEINFO = makeinfo -PACKAGE = ccm-bundle-aplaws-complete -RELEASE = 2 -VERSION = 1.0.0 - -AUTOMAKE_OPTIONS = foreign no-dependencies 1.4 - -cfgdir = $(datadir)/ccm-tools/bundles/aplaws-complete -cfg_DATA = web.xml applications.cfg integration.properties - -EXTRA_DIST = $(cfg_DATA) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -DATA = $(cfg_DATA) - -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --foreign cfg/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -install-cfgDATA: $(cfg_DATA) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(cfgdir) - @list='$(cfg_DATA)'; for p in $$list; do \ - if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(cfgdir)/$$p"; \ - $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(cfgdir)/$$p; \ - else if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(DESTDIR)$(cfgdir)/$$p"; \ - $(INSTALL_DATA) $$p $(DESTDIR)$(cfgdir)/$$p; \ - fi; fi; \ - done - -uninstall-cfgDATA: - @$(NORMAL_UNINSTALL) - list='$(cfg_DATA)'; for p in $$list; do \ - rm -f $(DESTDIR)$(cfgdir)/$$p; \ - done -tags: TAGS -TAGS: - - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = cfg - -distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done -info-am: -info: info-am -dvi-am: -dvi: dvi-am -check-am: all-am -check: check-am -installcheck-am: -installcheck: installcheck-am -install-exec-am: -install-exec: install-exec-am - -install-data-am: install-cfgDATA -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: uninstall-cfgDATA -uninstall: uninstall-am -all-am: Makefile $(DATA) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - $(mkinstalldirs) $(DESTDIR)$(cfgdir) - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-generic mostlyclean-am - -clean: clean-am - -distclean-am: distclean-generic clean-am - -distclean: distclean-am - -maintainer-clean-am: maintainer-clean-generic distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-am - -.PHONY: uninstall-cfgDATA install-cfgDATA tags distdir info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs \ -mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - -# End of files - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Deleted: ccm-ldn-aplaws/trunk/bundles/complete/cfg/Makefile.in =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/cfg/Makefile.in 2005-01-27 16:47:56 UTC (rev 188) +++ ccm-ldn-aplaws/trunk/bundles/complete/cfg/Makefile.in 2005-01-28 14:50:29 UTC (rev 189) @@ -1,197 +0,0 @@ -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# Process with automake - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = .. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -MAKEINFO = @MAKEINFO@ -PACKAGE = @PACKAGE@ -RELEASE = @RELEASE@ -VERSION = @VERSION@ - -AUTOMAKE_OPTIONS = foreign no-dependencies 1.4 - -cfgdir = $(datadir)/ccm-tools/bundles/aplaws-complete -cfg_DATA = web.xml applications.cfg integration.properties - -EXTRA_DIST = $(cfg_DATA) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -DATA = $(cfg_DATA) - -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --foreign cfg/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -install-cfgDATA: $(cfg_DATA) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(cfgdir) - @list='$(cfg_DATA)'; for p in $$list; do \ - if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(cfgdir)/$$p"; \ - $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(cfgdir)/$$p; \ - else if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(DESTDIR)$(cfgdir)/$$p"; \ - $(INSTALL_DATA) $$p $(DESTDIR)$(cfgdir)/$$p; \ - fi; fi; \ - done - -uninstall-cfgDATA: - @$(NORMAL_UNINSTALL) - list='$(cfg_DATA)'; for p in $$list; do \ - rm -f $(DESTDIR)$(cfgdir)/$$p; \ - done -tags: TAGS -TAGS: - - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = cfg - -distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done -info-am: -info: info-am -dvi-am: -dvi: dvi-am -check-am: all-am -check: check-am -installcheck-am: -installcheck: installcheck-am -install-exec-am: -install-exec: install-exec-am - -install-data-am: install-cfgDATA -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: uninstall-cfgDATA -uninstall: uninstall-am -all-am: Makefile $(DATA) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - $(mkinstalldirs) $(DESTDIR)$(cfgdir) - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-generic mostlyclean-am - -clean: clean-am - -distclean-am: distclean-generic clean-am - -distclean: distclean-am - -maintainer-clean-am: maintainer-clean-generic distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-am - -.PHONY: uninstall-cfgDATA install-cfgDATA tags distdir info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs \ -mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - -# End of files - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Deleted: ccm-ldn-aplaws/trunk/bundles/complete/config.log =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/config.log 2005-01-27 16:47:56 UTC (rev 188) +++ ccm-ldn-aplaws/trunk/bundles/complete/config.log 2005-01-28 14:50:29 UTC (rev 189) @@ -1,11 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -configure:560: checking for a BSD compatible install -configure:613: checking whether build environment is sane -configure:670: checking whether make sets ${MAKE} -configure:716: checking for working aclocal -configure:729: checking for working autoconf -configure:742: checking for working automake -configure:755: checking for working autoheader -configure:768: checking for working makeinfo Deleted: ccm-ldn-aplaws/trunk/bundles/complete/config.status =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/config.status 2005-01-27 16:47:56 UTC (rev 188) +++ ccm-ldn-aplaws/trunk/bundles/complete/config.status 2005-01-28 14:50:29 UTC (rev 189) @@ -1,171 +0,0 @@ -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host camden.london.redhat.com: -# -# ./configure --prefix=/var/ccm-devel/dev/mbooth/aplaws-rickshaw/packagebuild/working/autobuild -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]" -for ac_option -do - case "$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running ${CONFIG_SHELL-/bin/sh} ./configure --prefix=/var/ccm-devel/dev/mbooth/aplaws-rickshaw/packagebuild/working/autobuild --no-create --no-recursion" - exec ${CONFIG_SHELL-/bin/sh} ./configure --prefix=/var/ccm-devel/dev/mbooth/aplaws-rickshaw/packagebuild/working/autobuild --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "./config.status generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "$ac_cs_usage"; exit 0 ;; - *) echo "$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=. -ac_given_INSTALL="/usr/bin/install -c" - -trap 'rm -fr Makefile - cfg/Makefile - ccm-bundle-aplaws-complete.spec conftest*; exit 1' 1 2 15 - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g; - s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF -/^[ ]*VPATH[ ]*=[^:]*$/d - -s%@SHELL@%/bin/sh%g -s%@CFLAGS@%%g -s%@CPPFLAGS@%%g -s%@CXXFLAGS@%%g -s%@FFLAGS@%%g -s%@DEFS@% -DPACKAGE=\"ccm-bundle-aplaws-complete\" -DVERSION=\"1.0.0\" %g -s%@LDFLAGS@%%g -s%@LIBS@%%g -s%@exec_prefix@%${prefix}%g -s%@prefix@%/var/ccm-devel/dev/mbooth/aplaws-rickshaw/packagebuild/working/autobuild%g -s%@program_transform_name@%s,x,x,%g -s%@bindir@%${exec_prefix}/bin%g -s%@sbindir@%${exec_prefix}/sbin%g -s%@libexecdir@%${exec_prefix}/libexec%g -s%@datadir@%${prefix}/share%g -s%@sysconfdir@%${prefix}/etc%g -s%@sharedstatedir@%${prefix}/com%g -s%@localstatedir@%${prefix}/var%g -s%@libdir@%${exec_prefix}/lib%g -s%@includedir@%${prefix}/include%g -s%@oldincludedir@%/usr/include%g -s%@infodir@%${prefix}/info%g -s%@mandir@%${prefix}/man%g -s%@INSTALL_PROGRAM@%${INSTALL}%g -s%@INSTALL_SCRIPT@%${INSTALL_PROGRAM}%g -s%@INSTALL_DATA@%${INSTALL} -m 644%g -s%@PACKAGE@%ccm-bundle-aplaws-complete%g -s%@VERSION@%1.0.0%g -s%@ACLOCAL@%aclocal%g -s%@AUTOCONF@%autoconf%g -s%@AUTOMAKE@%automake%g -s%@AUTOHEADER@%autoheader%g -s%@MAKEINFO@%makeinfo%g -s%@SET_MAKE@%%g -s%@RELEASE@%2%g - -CEOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi - -CONFIG_FILES=${CONFIG_FILES-"Makefile - cfg/Makefile - ccm-bundle-aplaws-complete.spec"} -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - - - -exit 0 Deleted: ccm-ldn-aplaws/trunk/bundles/complete/configure =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/configure 2005-01-27 16:47:56 UTC (rev 188) +++ ccm-ldn-aplaws/trunk/bundles/complete/configure 2005-01-28 14:50:29 UTC (rev 189) @@ -1,1055 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* ... [truncated message content] |
From: <ap...@re...> - 2005-01-27 16:48:07
|
Author: apevec Date: 2005-01-27 17:47:56 +0100 (Thu, 27 Jan 2005) New Revision: 188 Added: users/apevec/ users/apevec/todo.txt Log: test Added: users/apevec/todo.txt =================================================================== --- users/apevec/todo.txt 2005-01-27 15:16:27 UTC (rev 187) +++ users/apevec/todo.txt 2005-01-27 16:47:56 UTC (rev 188) @@ -0,0 +1,3 @@ +building bundle rpms +multiple ccm homes with runtime rpms +sox custom JSPs |
From: <mb...@re...> - 2005-01-27 15:16:43
|
Author: mbooth Date: 2005-01-27 16:16:27 +0100 (Thu, 27 Jan 2005) New Revision: 187 Modified: ccm-core/trunk/src/com/arsdigita/kernel/Party.java ccm-core/trunk/src/com/arsdigita/ui/admin/UserEditForm.java Log: Improved logging when deleting a user. Modified: ccm-core/trunk/src/com/arsdigita/kernel/Party.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/kernel/Party.java 2005-01-27 09:55:40 UTC (rev 186) +++ ccm-core/trunk/src/com/arsdigita/kernel/Party.java 2005-01-27 15:16:27 UTC (rev 187) @@ -32,6 +32,7 @@ import java.util.List; import java.util.Iterator; +import org.apache.log4j.Logger; /** * Represents a party, which can either be a group or a @@ -44,6 +45,8 @@ public static final String versionId = "$Id: //core-platform/dev/src/com/arsdigita/kernel/Party.java#14 $ by $Author: dennis $, $DateTime: 2004/08/16 18:10:38 $"; + private static final Logger s_log = Logger.getLogger( Party.class ); + /** * A list of EmailAddress objects associated with this party. **/ @@ -262,7 +265,7 @@ private DataAssociation getEmailAssociation() { // FIXME: is there a hidden meaning to retrieving the association twice? // -- 2002-11-26 - DataAssociation assoc = (DataAssociation) get("emailAddresses"); + //DataAssociation assoc = (DataAssociation) get("emailAddresses"); return (DataAssociation) get("emailAddresses"); } Modified: ccm-core/trunk/src/com/arsdigita/ui/admin/UserEditForm.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/ui/admin/UserEditForm.java 2005-01-27 09:55:40 UTC (rev 186) +++ ccm-core/trunk/src/com/arsdigita/ui/admin/UserEditForm.java 2005-01-27 15:16:27 UTC (rev 187) @@ -42,8 +42,7 @@ { // Logging - private static final Logger s_log = - Logger.getLogger(UserEditForm.class.getName()); + private static final Logger s_log = Logger.getLogger(UserEditForm.class); private UserBrowsePane m_browsePane; @@ -128,8 +127,13 @@ EmailAddress naddr = new EmailAddress(m_primaryEmail.getValue(state).toString()); if (!oaddr.equals(naddr)) { + if( s_log.isDebugEnabled() ) { + s_log.debug( "Changing primary email " + oaddr + " to " + + naddr ); + } + user.setPrimaryEmail(naddr); - user.save(); + //user.save(); user.removeEmailAddress(oaddr); } |
From: <cl...@re...> - 2005-01-27 09:56:09
|
Author: clasohm Date: 2005-01-27 10:55:40 +0100 (Thu, 27 Jan 2005) New Revision: 186 Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/CMSResources.properties Log: added cms.contentassets.ui.description, which is used by com.arsdigita.cms.contentassets.ui.FileAttachmentUpload Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/CMSResources.properties =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ui/CMSResources.properties 2005-01-24 09:04:52 UTC (rev 185) +++ ccm-cms/trunk/src/com/arsdigita/cms/ui/CMSResources.properties 2005-01-27 09:55:40 UTC (rev 186) @@ -806,3 +806,4 @@ \n\ If you have any questions, please contact the system adminstrator at {4}.\n\ Thank you for using {3}.\n +cms.contentassets.ui.description=Description: |
From: <ssk...@re...> - 2005-01-24 09:15:03
|
Author: sskracic Date: 2005-01-24 10:04:52 +0100 (Mon, 24 Jan 2005) New Revision: 185 Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/item/Summary.java Log: Fixing the NPE in the Summary pane. This cures the syndrome only, while the real cause must still be investigated. Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/item/Summary.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ui/item/Summary.java 2005-01-20 09:48:10 UTC (rev 184) +++ ccm-cms/trunk/src/com/arsdigita/cms/ui/item/Summary.java 2005-01-24 09:04:52 UTC (rev 185) @@ -118,7 +118,7 @@ // ITEM Element itemElement = new Element("cms:itemSummary",CMS.CMS_XML_NS); itemElement.addAttribute("name",item.getName()); - + String objectType = item.getObjectType().getName(); String descriptionAttribute = ""; if ( objectType.equals("NewsItem") || objectType.equals("Article") ) { @@ -130,7 +130,7 @@ } else if ( objectType.equals("MultiPartArticle") || objectType.equals("Agenda") || objectType.equals("PressRelease") || objectType.equals("Service") ) { descriptionAttribute = "summary"; } - + if ( !descriptionAttribute.equals("") ) { itemElement.addAttribute("description",(String)DomainServiceInterfaceExposer.get(item,descriptionAttribute)); } @@ -202,7 +202,7 @@ g.addEdge(t, dep, null); buffer.append(dep.getLabel() + ", "); } - + final int len = buffer.length(); if (len >= 2) { buffer.setLength(len - 2); @@ -211,7 +211,7 @@ } deps.close(); } - + List taskList = new ArrayList(); outer: while (g.nodeCount() > 0) { @@ -226,7 +226,7 @@ break; } Iterator tasks = taskList.iterator(); - + while (tasks.hasNext()) { Task task = (Task)tasks.next(); Element taskElement = new Element("cms:task",CMS.CMS_XML_NS); @@ -367,13 +367,13 @@ Iterator i = engine.getEnabledTasks(user, w.getID()).iterator(); if (i.hasNext()) { CMSTask task = (CMSTask) i.next(); - + if ( !task.isLocked() ) { task.lock(user); } } } - + String redirectURL = Web.getConfig().getDispatcherServletPath() + item.getContentSection().getPath() + "/admin/item.jsp?item_id=" + item.getID() + "&set_tab=1"; throw new RedirectSignal(redirectURL,true); } else { @@ -391,6 +391,8 @@ canBeExtended = false; } else if ( !workflow.isFinished() ) { canBeExtended = false; + } else if ( workflow.getWorkflowTemplate() == null ) { + canBeExtended = false; } else { TaskCollection templates = item.getContentSection().getWorkflowTemplates(); Filter f = templates.addInSubqueryFilter @@ -404,7 +406,7 @@ canBeExtended = false; } templates.close(); - + } return canBeExtended; |
Author: mbooth Date: 2005-01-20 10:48:10 +0100 (Thu, 20 Jan 2005) New Revision: 184 Added: ccm-cms/trunk/src/com/arsdigita/cms/search/AssetExtractor.java ccm-cms/trunk/src/com/arsdigita/cms/search/AssetMetadataProvider.java ccm-cms/trunk/src/com/arsdigita/cms/search/ContentItemMetadataProvider.java ccm-cms/trunk/src/com/arsdigita/cms/search/RawContentProvider.java ccm-cms/trunk/src/com/arsdigita/cms/search/TextContentProvider.java ccm-cms/trunk/src/com/arsdigita/cms/search/XMLContentProvider.java Removed: ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageAssetExtractor.java ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageRawContentProvider.java ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageTextContentProvider.java ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageXMLContentProvider.java Modified: ccm-cms-assets-fileattachment/trunk/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contentassets/FileAttachment.xml ccm-cms-assets-fileattachment/trunk/src/com/arsdigita/cms/contentassets/FileAttachment.java ccm-cms-assets-fileattachment/trunk/src/com/arsdigita/cms/contentassets/FileAttachmentInitializer.java ccm-cms-types-filestorageitem/trunk/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/FileStorageItem.xml ccm-cms-types-mparticle/trunk/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/MultiPartArticle.xml ccm-cms/trunk/src/WEB-INF/resources/cms-item-adapters.xml ccm-cms/trunk/src/com/arsdigita/cms/FileAsset.java ccm-cms/trunk/src/com/arsdigita/cms/Initializer.java ccm-cms/trunk/src/com/arsdigita/cms/contenttypes/ContentItemTraversalAdapter.java ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageMetadataProvider.java ccm-cms/trunk/src/com/arsdigita/cms/search/IntermediaQueryEngine.java ccm-ldn-search/trunk/doc/indexing-and-querying.html Log: Initial commit of file searching in both intermedia and lucene. This change indexes FileAttachments with their associated items, and also the files individually. There is an outstanding issue on Lucene where deleted FileAssets are not being removed from the search results. Also there is not yet a URLFinder registered for FileAssets. Applying this change involves reindexing search content. Modified: ccm-cms/trunk/src/WEB-INF/resources/cms-item-adapters.xml =================================================================== --- ccm-cms/trunk/src/WEB-INF/resources/cms-item-adapters.xml 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/WEB-INF/resources/cms-item-adapters.xml 2005-01-20 09:48:10 UTC (rev 184) @@ -112,7 +112,6 @@ <xrd:associations rule="include"> <xrd:property name="/object/locale"/> <xrd:property name="/object/type"/> - <xrd:property name="/object/fileAttachments"/> </xrd:associations> </xrd:adapter> @@ -172,13 +171,26 @@ <!-- Article in several sections --> </xrd:context> + <!-- Search metadata for file assets --> + <xrd:context name="com.arsdigita.cms.search.AssetMetadataProvider"> + <xrd:adapter objectType="com.arsdigita.cms.FileAsset" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> + <xrd:attributes rule="exclude"> + <xrd:property name="/object/id"/> + <xrd:property name="/object/content"/> + <xrd:property name="/object/defaultDomainClass"/> + <xrd:property name="/object/displayName"/> + <xrd:property name="/object/ancestors"/> + <xrd:property name="/object/version"/> + <xrd:property name="/object/isDeleted"/> + </xrd:attributes> + </xrd:adapter> + </xrd:context> <!-- For assets, we want to pull out all HTML, or binary files --> - <xrd:context name="com.arsdigita.cms.search.ContentPageAssetExtractor"> + <xrd:context name="com.arsdigita.cms.search.AssetExtractor"> <!-- Content item is the simplest type --> <xrd:adapter objectType="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> - <xrd:associations rule="include"> - </xrd:associations> + <xrd:associations rule="include"/> </xrd:adapter> <!-- Adds a text asset --> Modified: ccm-cms/trunk/src/com/arsdigita/cms/FileAsset.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/FileAsset.java 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/com/arsdigita/cms/FileAsset.java 2005-01-20 09:48:10 UTC (rev 184) @@ -25,14 +25,15 @@ import com.arsdigita.persistence.Filter; import com.arsdigita.persistence.OID; import com.arsdigita.persistence.SessionManager; + import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.math.BigDecimal; +import java.util.Locale; - /** * An {@link com.arsdigita.cms.Asset asset} describing a concrete * file, such as an image. @@ -233,4 +234,12 @@ return getFilesByKeyword(keyword, ContentItem.DRAFT); } + + protected void beforeSave() { + if( null == getLanguage() ) { + setLanguage( Locale.getDefault().getLanguage() ); + } + + super.beforeSave(); + } } Modified: ccm-cms/trunk/src/com/arsdigita/cms/Initializer.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/Initializer.java 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/com/arsdigita/cms/Initializer.java 2005-01-20 09:48:10 UTC (rev 184) @@ -24,15 +24,16 @@ import com.arsdigita.cms.dispatcher.ItemDelegatedURLPatternGenerator; import com.arsdigita.cms.publishToFile.PublishToFileListener; import com.arsdigita.cms.publishToFile.QueueManager; +import com.arsdigita.cms.search.AssetMetadataProvider; import com.arsdigita.cms.search.ContentTypeFilterType; -import com.arsdigita.cms.search.VersionFilterType; -import com.arsdigita.cms.search.LaunchDateFilterType; -import com.arsdigita.cms.search.LastModifiedUserFilterType; -import com.arsdigita.cms.search.LastModifiedDateFilterType; import com.arsdigita.cms.search.CreationDateFilterType; import com.arsdigita.cms.search.CreationUserFilterType; import com.arsdigita.cms.search.IntermediaQueryEngine; +import com.arsdigita.cms.search.LastModifiedDateFilterType; +import com.arsdigita.cms.search.LastModifiedUserFilterType; +import com.arsdigita.cms.search.LaunchDateFilterType; import com.arsdigita.cms.search.LuceneQueryEngine; +import com.arsdigita.cms.search.VersionFilterType; import com.arsdigita.cms.workflow.CMSTask; import com.arsdigita.domain.xml.TraversalHandler; import com.arsdigita.db.DbHelper; @@ -55,10 +56,11 @@ import com.arsdigita.runtime.LegacyInitializer; import com.arsdigita.runtime.PDLInitializer; import com.arsdigita.runtime.RuntimeConfig; -import com.arsdigita.search.Search; +import com.arsdigita.search.FilterType; import com.arsdigita.search.IndexerType; -import com.arsdigita.search.FilterType; +import com.arsdigita.search.MetadataProviderRegistry; import com.arsdigita.search.QueryEngineRegistry; +import com.arsdigita.search.Search; import com.arsdigita.search.filters.PermissionFilterType; import com.arsdigita.search.filters.CategoryFilterType; import com.arsdigita.util.UncheckedWrapperException; @@ -169,6 +171,9 @@ ("Couldn't access the listener class", ex); } + MetadataProviderRegistry.registerAdapter( + FileAsset.BASE_DATA_OBJECT_TYPE, + new AssetMetadataProvider()); } /** Modified: ccm-cms/trunk/src/com/arsdigita/cms/contenttypes/ContentItemTraversalAdapter.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/contenttypes/ContentItemTraversalAdapter.java 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/com/arsdigita/cms/contenttypes/ContentItemTraversalAdapter.java 2005-01-20 09:48:10 UTC (rev 184) @@ -74,7 +74,7 @@ Property prop, String context) { if (s_log.isDebugEnabled()) { - s_log.debug("Process property " + path); + s_log.debug("Process property " + path + " in context " + context ); } String prefix = "/object/"; int offset = path.indexOf("/", prefix.length()); Copied: ccm-cms/trunk/src/com/arsdigita/cms/search/AssetExtractor.java (from rev 170, ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageAssetExtractor.java) =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageAssetExtractor.java 2005-01-05 16:32:08 UTC (rev 170) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/AssetExtractor.java 2005-01-20 09:48:10 UTC (rev 184) @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.search; + +import com.arsdigita.persistence.metadata.Property; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.DataAssociation; +import com.arsdigita.persistence.metadata.ObjectType; + +import com.arsdigita.domain.DomainObject; +import com.arsdigita.domain.DomainObjectTraversal; +import com.arsdigita.domain.DomainServiceInterfaceExposer; + +import com.arsdigita.cms.TextAsset; +import com.arsdigita.cms.FileAsset; + +import java.util.List; +import java.util.ArrayList; + +import org.apache.log4j.Logger; + + +/** + * An implementation of DomainObjectTraversal that generates a + * finds all associated binary assets + * + * @version $Id: //cms/dev/src/com/arsdigita/cms/search/AssetExtractor.java#6 $ + */ +public class AssetExtractor extends DomainObjectTraversal { + private static final Logger s_log = + Logger.getLogger( AssetExtractor.class ); + + private List m_content; + + public static final String TEXT_ASSET_DATA_OBJ = + "com.arsdigita.cms.TextAsset"; + public static final String FILE_ASSET_DATA_OBJ = + "com.arsdigita.cms.FileAsset"; + + public AssetExtractor() { + m_content = new ArrayList(); + } + + public List getContent() { + return m_content; + } + + protected void beginObject(DomainObject obj, + String path) { + if( obj.getObjectType().isSubtypeOf + ( FileAsset.BASE_DATA_OBJECT_TYPE ) ) { + FileAsset fa = (FileAsset) obj; + m_content.add( new RawContentProvider( "file", fa.getContent() ) ); + + if( s_log.isDebugEnabled() ) { + s_log.debug( "Adding file provider for object " + fa.getOID() ); + } + } + } + + protected void endObject(DomainObject obj, + String path) { + } + + protected void revisitObject(DomainObject obj, + String path) { + } + + protected void handleAttribute(DomainObject obj, + String path, + Property property) { + Object value = DomainServiceInterfaceExposer.get(obj, property.getName()); + + if (value != null && + property.isRole() && + (value instanceof DataObject)) { + + ObjectType assetType = ((DataObject)value).getOID().getObjectType(); + String assetTypeName = assetType.getQualifiedName(); + if (assetTypeName.equals(TEXT_ASSET_DATA_OBJ)) { + // add the value of the text asset to search_content + TextAsset ta = new TextAsset((DataObject)value); + String text = ta.getText(); + if (text != null) { + text = com.arsdigita.util.StringUtils.htmlToText( text ); + m_content.add( + new RawContentProvider("text", text.getBytes())); + } + + if( s_log.isDebugEnabled() ) { + s_log.debug( "Adding text provider for attribute " + + ta.getOID() ); + } + } else if (assetTypeName.equals(FILE_ASSET_DATA_OBJ)) { + // add the value of the file asset to search_content + FileAsset fa = new FileAsset((DataObject)value); + m_content.add(new RawContentProvider("file", fa.getContent())); + + if( s_log.isDebugEnabled() ) { + s_log.debug( "Adding file provider for attribute " + + fa.getOID() ); + } + } else if( s_log.isDebugEnabled() ) { + s_log.debug( "Don't know what to do with property " + + property.getName() + " of type " + assetTypeName ); + } + } + + else if( s_log.isDebugEnabled() ) { + s_log.debug( "Ignoring property " + property.getName() + + " of type " + value.getClass().getName() ); + } + } + + protected void beginRole(DomainObject obj, + String path, + Property property) { + } + + protected void endRole(DomainObject obj, + String path, + Property property) { + } + + + protected void beginAssociation(DomainObject obj, + String path, + Property property) { + DataAssociation association = + (DataAssociation)DomainServiceInterfaceExposer.get + (obj, property.getName()); + + if (association != null && + association.getObjectType().isSubtypeOf + (FileAsset.BASE_DATA_OBJECT_TYPE)) { + while (association.next()) { + // add the value of the file asset to search_content + FileAsset fa = new FileAsset(association.getDataObject()); + m_content.add(new RawContentProvider("file", fa.getContent())); + + if( s_log.isDebugEnabled() ) { + s_log.debug( "Adding file provider for association " + + fa.getOID() ); + } + } + } + } + + protected void endAssociation(DomainObject obj, + String path, + Property property) { + } + +} Added: ccm-cms/trunk/src/com/arsdigita/cms/search/AssetMetadataProvider.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/AssetMetadataProvider.java 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/AssetMetadataProvider.java 2005-01-20 09:48:10 UTC (rev 184) @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.search; + +import com.arsdigita.cms.Asset; +import com.arsdigita.domain.DomainObject; +import com.arsdigita.util.StringUtils; + +import org.apache.log4j.Logger; + +/** + * This class is an implementation of the Search metadata provider for any + * subclass of {@link com.arsdigita.cms.Asset}. + * + * @author <a href="mailto:ber...@re...">Daniel Berrange</a> + * @version $Revision: #5 $ $Date: 2004/08/17 $ + */ +public class AssetMetadataProvider extends ContentItemMetadataProvider { + + public static final String ADAPTER_CONTEXT = + AssetMetadataProvider.class.getName(); + + private static final Logger s_log = + Logger.getLogger(AssetMetadataProvider.class); + + public final static String versionId = + "$Id: //cms/dev/src/com/arsdigita/cms/search/AssetMetadataProvider.java#5 $" + + " by $Author: dennis $, $DateTime: 2004/08/17 23:15:09 $"; + + public String getTitle(DomainObject dobj) { + Asset item = (Asset)dobj; + String title = item.getName(); + if (StringUtils.emptyString(title)) { + throw new IllegalArgumentException( + "Asset must have non-blank name!" + ); + } + return title; + } + + public String getSummary(DomainObject dobj) { + Asset item = (Asset)dobj; + return item.getDescription(); + } +} Added: ccm-cms/trunk/src/com/arsdigita/cms/search/ContentItemMetadataProvider.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/ContentItemMetadataProvider.java 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/ContentItemMetadataProvider.java 2005-01-20 09:48:10 UTC (rev 184) @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.search; + +import com.arsdigita.cms.ContentItem; +import com.arsdigita.domain.DomainObject; +import com.arsdigita.kernel.Party; +import com.arsdigita.search.ContentType; +import com.arsdigita.search.ContentProvider; +import com.arsdigita.search.MetadataProvider; + +import java.util.List; +import java.util.ArrayList; + +import java.util.Date; + +import org.apache.log4j.Logger; + +/** + * This class is an implementation of the Search metadata provider that uses the + * <code>DomainObjectTextRenderer</code> to extract search content for any + * subclass of {@link com.arsdigita.cms.ContentItem}. + * + * @author <a href="mailto:ber...@re...">Daniel Berrange</a> + * @version $Revision: #5 $ $Date: 2004/08/17 $ + */ +public abstract class ContentItemMetadataProvider implements MetadataProvider { + private static final Logger s_log = + Logger.getLogger(ContentItemMetadataProvider.class); + + public final static String versionId = + "$Id: //cms/dev/src/com/arsdigita/cms/search/ContentItemMetadataProvider.java#5 $" + + " by $Author: dennis $, $DateTime: 2004/08/17 23:15:09 $"; + + public String getTypeSpecificInfo(DomainObject dobj) { + ContentItem item = (ContentItem) dobj; + return ContentItem.LIVE.equals(item.getVersion()) ? + ContentItem.LIVE : ContentItem.DRAFT; + } + + public java.util.Locale getLocale(DomainObject dobj) { + ContentItem item = (ContentItem)dobj; + String lang = item.getLanguage(); + return lang == null ? null : new java.util.Locale(lang,""); + } + + public Date getCreationDate(DomainObject dobj) { + ContentItem item = (ContentItem)dobj; + return item.getCreationDate(); + } + + public Party getCreationParty(DomainObject dobj) { + ContentItem item = (ContentItem)dobj; + return item.getCreationUser(); + } + + public Date getLastModifiedDate(DomainObject dobj) { + ContentItem item = (ContentItem)dobj; + return item.getLastModifiedDate(); + } + + public Party getLastModifiedParty(DomainObject dobj) { + ContentItem item = (ContentItem)dobj; + return item.getLastModifiedUser(); + } + + public ContentProvider[] getContent(DomainObject dobj, + ContentType type) { + List content = new ArrayList(); + + if (type == ContentType.XML) { + if (s_log.isDebugEnabled()) { + s_log.debug("Adding XML Content for " + dobj.getOID()); + } + content.add(new XMLContentProvider("xml", dobj, + getClass().getName())); + } else if (type == ContentType.TEXT) { + if (s_log.isDebugEnabled()) { + s_log.debug("Adding Text Content for " + dobj.getOID()); + } + content.add(new TextContentProvider("text", dobj, + getClass().getName())); + content.add(new TextContentProvider("text", dobj, + AssetExtractor.class.getName())); + } else if (type == ContentType.RAW) { + if (s_log.isDebugEnabled()) { + s_log.debug("Adding Raw Content for " + dobj.getOID()); + } + AssetExtractor ex = new AssetExtractor(); + ex.walk(dobj, AssetExtractor.class.getName()); + content.addAll(ex.getContent()); + } + + return (ContentProvider[])content.toArray( + new ContentProvider[content.size()]); + } +} Deleted: ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageAssetExtractor.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageAssetExtractor.java 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageAssetExtractor.java 2005-01-20 09:48:10 UTC (rev 184) @@ -1,138 +0,0 @@ -/* - * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -package com.arsdigita.cms.search; - -import com.arsdigita.persistence.metadata.Property; -import com.arsdigita.persistence.DataObject; -import com.arsdigita.persistence.DataAssociation; -import com.arsdigita.persistence.metadata.ObjectType; - -import com.arsdigita.domain.DomainObject; -import com.arsdigita.domain.DomainObjectTraversal; -import com.arsdigita.domain.DomainServiceInterfaceExposer; - -import com.arsdigita.cms.TextAsset; -import com.arsdigita.cms.FileAsset; -import com.arsdigita.cms.ContentPage; - -import java.util.List; -import java.util.ArrayList; - - -/** - * An implementation of DomainObjectTraversal that generates a - * finds all associated binary assets - * - * @version $Id: //cms/dev/src/com/arsdigita/cms/search/ContentPageAssetExtractor.java#6 $ - */ -public class ContentPageAssetExtractor extends DomainObjectTraversal { - - private List m_content; - - public static final String TEXT_ASSET_DATA_OBJ = - "com.arsdigita.cms.TextAsset"; - public static final String FILE_ASSET_DATA_OBJ = - "com.arsdigita.cms.FileAsset"; - - public ContentPageAssetExtractor() { - m_content = new ArrayList(); - } - - public List getContent() { - return m_content; - } - - protected void beginObject(DomainObject obj, - String path) { - } - - protected void endObject(DomainObject obj, - String path) { - } - - protected void revisitObject(DomainObject obj, - String path) { - } - - protected void handleAttribute(DomainObject obj, - String path, - Property property) { - Object value = DomainServiceInterfaceExposer.get(obj, property.getName()); - - if (value != null && - property.isRole() && - (value instanceof DataObject)) { - - ObjectType assetType = ((DataObject)value).getOID().getObjectType(); - String assetTypeName = assetType.getQualifiedName(); - if (assetTypeName.equals(TEXT_ASSET_DATA_OBJ)) { - // add the value of the text asset to search_content - TextAsset ta = new TextAsset((DataObject)value); - String text = ta.getText(); - if (text != null) { - text = com.arsdigita.util.StringUtils.htmlToText( text ); - m_content.add( - new ContentPageRawContentProvider("text", - text.getBytes())); - } - } else if (assetTypeName.equals(FILE_ASSET_DATA_OBJ)) { - // add the value of the file asset to search_content - FileAsset fa = new FileAsset((DataObject)value); - m_content.add(new ContentPageRawContentProvider("file", - fa.getContent())); - } - } - } - - protected void beginRole(DomainObject obj, - String path, - Property property) { - } - - protected void endRole(DomainObject obj, - String path, - Property property) { - } - - - protected void beginAssociation(DomainObject obj, - String path, - Property property) { - DataAssociation association = - (DataAssociation)DomainServiceInterfaceExposer.get - (obj, property.getName()); - - if (association != null && - association.getObjectType().isSubtypeOf - (FileAsset.BASE_DATA_OBJECT_TYPE)) { - while (association.next()) { - // add the value of the file asset to search_content - FileAsset fa = new FileAsset(association.getDataObject()); - m_content.add(new ContentPageRawContentProvider("file", - fa.getContent())); - } - } - } - - protected void endAssociation(DomainObject obj, - String path, - Property property) { - } - -} Modified: ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageMetadataProvider.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageMetadataProvider.java 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageMetadataProvider.java 2005-01-20 09:48:10 UTC (rev 184) @@ -18,27 +18,12 @@ */ package com.arsdigita.cms.search; -import com.arsdigita.cms.ContentItem; import com.arsdigita.cms.ContentPage; - import com.arsdigita.domain.DomainObject; -import com.arsdigita.domain.DomainObjectTextRenderer; -import com.arsdigita.domain.DomainObjectXMLRenderer; - -import com.arsdigita.kernel.Party; - -import com.arsdigita.search.MetadataProvider; import com.arsdigita.search.ContentProvider; import com.arsdigita.search.ContentType; - -import com.arsdigita.persistence.metadata.ObjectType; import com.arsdigita.util.StringUtils; -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; -import java.util.ArrayList; - import org.apache.log4j.Logger; /** @@ -49,7 +34,7 @@ * @author <a href="mailto:ber...@re...">Daniel Berrange</a> * @version $Revision: #5 $ $Date: 2004/08/17 $ */ -public class ContentPageMetadataProvider implements MetadataProvider { +public class ContentPageMetadataProvider extends ContentItemMetadataProvider { public static final String ADAPTER_CONTEXT = ContentPageMetadataProvider.class.getName(); @@ -61,18 +46,6 @@ "$Id: //cms/dev/src/com/arsdigita/cms/search/ContentPageMetadataProvider.java#5 $" + " by $Author: dennis $, $DateTime: 2004/08/17 23:15:09 $"; - public String getTypeSpecificInfo(DomainObject dobj) { - ContentPage item = (ContentPage) dobj; - return ContentItem.LIVE.equals(item.getVersion()) ? - ContentItem.LIVE : ContentItem.DRAFT; - } - - public java.util.Locale getLocale(DomainObject dobj) { - ContentPage item = (ContentPage)dobj; - String lang = item.getLanguage(); - return lang == null ? null : new java.util.Locale(lang,""); - } - public String getTitle(DomainObject dobj) { ContentPage item = (ContentPage)dobj; String title = item.getTitle(); @@ -88,53 +61,4 @@ ContentPage item = (ContentPage)dobj; return item.getSearchSummary(); } - - public ContentProvider[] getContent(DomainObject dobj, - ContentType type) { - List content = new ArrayList(); - - if (type == ContentType.XML) { - if (s_log.isDebugEnabled()) { - s_log.debug("Adding XML Content"); - } - content.add(new ContentPageXMLContentProvider("xml", - (ContentPage)dobj)); - } else if (type == ContentType.TEXT) { - if (s_log.isDebugEnabled()) { - s_log.debug("Adding Text Content"); - } - content.add(new ContentPageTextContentProvider("text", - (ContentPage)dobj)); - } else if (type == ContentType.RAW) { - if (s_log.isDebugEnabled()) { - s_log.debug("Adding Raw Content"); - } - ContentPageAssetExtractor ex = new ContentPageAssetExtractor(); - ex.walk(dobj, ContentPageAssetExtractor.class.getName()); - content.addAll(ex.getContent()); - } - - return (ContentProvider[])content.toArray( - new ContentProvider[content.size()]); - } - - public Date getCreationDate(DomainObject dobj) { - ContentPage item = (ContentPage)dobj; - return item.getCreationDate(); - } - - public Party getCreationParty(DomainObject dobj) { - ContentPage item = (ContentPage)dobj; - return item.getCreationUser(); - } - - public Date getLastModifiedDate(DomainObject dobj) { - ContentPage item = (ContentPage)dobj; - return item.getLastModifiedDate(); - } - - public Party getLastModifiedParty(DomainObject dobj) { - ContentPage item = (ContentPage)dobj; - return item.getLastModifiedUser(); - } } Deleted: ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageRawContentProvider.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageRawContentProvider.java 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageRawContentProvider.java 2005-01-20 09:48:10 UTC (rev 184) @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -package com.arsdigita.cms.search; - - -import com.arsdigita.search.ContentType; -import com.arsdigita.search.ContentProvider; - - -public class ContentPageRawContentProvider implements ContentProvider { - - private byte[] m_content; - private String m_context; - - public ContentPageRawContentProvider(String context, - byte[] content) { - m_context = context; - m_content = content; - } - - public String getContext() { - return m_context; - } - - public ContentType getType() { - return ContentType.RAW; - } - - public byte[] getBytes() { - return m_content; - } - -} Deleted: ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageTextContentProvider.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageTextContentProvider.java 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageTextContentProvider.java 2005-01-20 09:48:10 UTC (rev 184) @@ -1,202 +0,0 @@ -/* - * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -package com.arsdigita.cms.search; - - -import com.arsdigita.cms.CMS; -import com.arsdigita.cms.ContentPage; -import com.arsdigita.search.ContentType; -import com.arsdigita.search.ContentProvider; - -import com.arsdigita.domain.DomainObjectTextRenderer; -import com.arsdigita.domain.DomainObjectTraversal; -import com.arsdigita.domain.DomainObject; -import com.arsdigita.persistence.DataObject; -import com.arsdigita.persistence.DataAssociation; -import com.arsdigita.cms.TextAsset; -import com.arsdigita.persistence.metadata.ObjectType; -import com.arsdigita.persistence.metadata.Property; -import com.arsdigita.domain.DomainServiceInterfaceExposer; -import com.arsdigita.cms.FileAsset; -import com.arsdigita.util.StringUtils; -import com.arsdigita.search.converter.ConverterRegistry; -import com.arsdigita.search.converter.ConversionException; -import com.arsdigita.search.converter.Converter; -import org.apache.log4j.Logger; - -public class ContentPageTextContentProvider implements ContentProvider { - - private ContentPage m_page; - private String m_context; - - public ContentPageTextContentProvider(String context, - ContentPage page) { - m_context = context; - m_page = page; - } - - public String getContext() { - return m_context; - } - - public ContentType getType() { - return ContentType.TEXT; - } - - public byte[] getBytes() { - - // Long term, this should be uncommented and the conversion - // should be moved in to the com.arsdigita.search package. - // But, for now, this is faster/easier - //DomainObjectTextRenderer renderer = - // new DomainObjectTextRenderer(); - TextRenderer renderer = new TextRenderer(); - - renderer.walk(m_page, ContentPageMetadataProvider.class.getName()); - - String text = renderer.getText(); - return text.getBytes(); - } - - /** - * An implementation of the traversal code that converts FileAssets in - * to the appropriate text - */ - public class TextRenderer extends DomainObjectTraversal { - - private Logger s_log = Logger.getLogger(TextRenderer.class); - private StringBuffer m_text; - - /** - */ - public TextRenderer() { - m_text = new StringBuffer(""); - } - - public String getText() { - return m_text.toString(); - } - - protected void beginObject(DomainObject obj, - String path) { - } - - protected void endObject(DomainObject obj, - String path) { - } - - protected void revisitObject(DomainObject obj, - String path) { - } - - protected void handleAttribute(DomainObject obj, - String path, - Property property) { - - Object value = - DomainServiceInterfaceExposer.get(obj, property.getName()); - - if (value != null && - property.isRole() && - (value instanceof DataObject)) { - - ObjectType assetType = ((DataObject)value).getOID().getObjectType(); - String assetTypeName = assetType.getQualifiedName(); - if (assetTypeName.equals(TextAsset.BASE_DATA_OBJECT_TYPE)) { - // add the value of the text asset to search_content - appendTextAsset(new TextAsset((DataObject)value)); - - } else if (assetTypeName.equals(FileAsset.BASE_DATA_OBJECT_TYPE)) { - // add the value of the file asset to search_content - FileAsset fa = new FileAsset((DataObject)value); - appendFileAsset(fa); - } - } else { - if (value != null && !property.isRole()) { - m_text.append(" " + value); - } - } - } - - protected void beginRole(DomainObject obj, - String path, - Property property) { - } - - protected void endRole(DomainObject obj, - String path, - Property property) { - } - - - protected void beginAssociation(DomainObject obj, - String path, - Property property) { - DataAssociation association = - (DataAssociation)DomainServiceInterfaceExposer.get - (obj, property.getName()); - - if (association != null && - association.getObjectType().isSubtypeOf - (FileAsset.BASE_DATA_OBJECT_TYPE)) { - while (association.next()) { - // add the value of the file asset to search_content - appendFileAsset(new FileAsset(association.getDataObject())); - } - } else if (association != null && - association.getObjectType().isSubtypeOf - (TextAsset.BASE_DATA_OBJECT_TYPE)) { - while (association.next()) { - // add the value of the file asset to search_content - appendTextAsset(new TextAsset(association.getDataObject())); - } - } - } - - protected void endAssociation(DomainObject obj, - String path, - Property property) { - } - - private void appendTextAsset(TextAsset asset) { - String content = asset.getText(); - if (content != null) { - m_text.append(" " + StringUtils.htmlToText(content)); - } - } - - private void appendFileAsset(FileAsset asset) { - Converter converter = - ConverterRegistry.getConverter(asset.getMimeType()); - if (converter != null) { - try { - m_text.append - (" " + - converter.convertDocument(asset.getContent())); - } catch (ConversionException e) { - s_log.error("Error converting FileAsset " + asset.getOID()+ - " with MimeType " + asset.getMimeType(), e); - } - } else { - s_log.debug("Skipping FileAsset " + asset.getOID() + - " with MimeType " + asset.getMimeType()); - } - } - } -} Deleted: ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageXMLContentProvider.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageXMLContentProvider.java 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageXMLContentProvider.java 2005-01-20 09:48:10 UTC (rev 184) @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -package com.arsdigita.cms.search; - - -import com.arsdigita.cms.CMS; -import com.arsdigita.cms.ContentPage; -import com.arsdigita.cms.util.GlobalizationUtil; -import com.arsdigita.search.ContentType; -import com.arsdigita.search.ContentProvider; - -import com.arsdigita.domain.DomainObjectXMLRenderer; -import com.arsdigita.xml.Document; -import com.arsdigita.xml.Element; -import com.arsdigita.util.UncheckedWrapperException; - -import org.apache.log4j.Logger; - -public class ContentPageXMLContentProvider implements ContentProvider { - - private static final Logger s_log = Logger - .getLogger(ContentPageXMLContentProvider.class); - - private ContentPage m_page; - private String m_context; - - public ContentPageXMLContentProvider(String context, - ContentPage page) { - m_context = context; - m_page = page; - } - - public String getContext() { - return m_context; - } - - public ContentType getType() { - return ContentType.XML; - } - - public byte[] getBytes() { - - Element root = new Element("cms:item", CMS.CMS_XML_NS); - DomainObjectXMLRenderer renderer = - new DomainObjectXMLRenderer(root); - - renderer.setWrapAttributes(true); - renderer.walk(m_page, ContentPageMetadataProvider.class.getName()); - - Document doc = null; - try { - doc = new Document(root); - } catch (javax.xml.parsers.ParserConfigurationException ex) { - final String message = - (String) GlobalizationUtil.globalize - ("cms.cannot_create_xml_document").localize(); - throw new UncheckedWrapperException(message, ex); - } - if (s_log.isDebugEnabled()) { - s_log.debug("XML is " + doc.toString(true)); - } - - // Hmm, why on earth doesn't this method return - // Element directly ?!?! - String xml = doc.toString(true); - return xml.getBytes(); - } - -} Modified: ccm-cms/trunk/src/com/arsdigita/cms/search/IntermediaQueryEngine.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/IntermediaQueryEngine.java 2005-01-18 14:42:28 UTC (rev 183) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/IntermediaQueryEngine.java 2005-01-20 09:48:10 UTC (rev 184) @@ -47,16 +47,16 @@ public IntermediaQueryEngine() { addColumn("i.version", "version"); - addColumn("p.launch_date", "launch_date"); + //addColumn("p.launch_date", "launch_date"); addColumn("audited.last_modified", "last_modified"); addColumn("audited.modifying_user", "modifying_user"); addColumn("audited.creation_date", "creation_date"); addColumn("audited.creation_user", "creation_user"); addTable("cms_items", "i"); - addTable("cms_pages", "p"); + //addTable("cms_pages", "p"); addTable("acs_auditing", "audited"); addCondition("c.object_id = i.item_id"); - addCondition("c.object_id = p.item_id"); + //addCondition("c.object_id = p.item_id"); addCondition("c.object_id = audited.object_id"); } @@ -71,6 +71,9 @@ } else if (VersionFilterType.KEY.equals(type.getKey())) { addVersionFilter(query, (VersionFilterSpecification)filter); } else if (LaunchDateFilterType.KEY.equals(type.getKey())) { + addColumn("p.launch_date", "launch_date"); + addTable("cms_pages", "p"); + addCondition("c.object_id = p.item_id"); addLaunchDateFilter(query, (DateRangeFilterSpecification)filter); } else if (LastModifiedDateFilterType.KEY.equals(type.getKey())) { addLastModifiedDateFilter(query, (DateRangeFilterSpecification)filter); @@ -96,7 +99,6 @@ addDateRangeFilter(query, filter, "launch_date"); } - protected void addLastModifiedDateFilter(DataQuery query, DateRangeFilterSpecification filter) { // TODO: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=113394 Copied: ccm-cms/trunk/src/com/arsdigita/cms/search/RawContentProvider.java (from rev 170, ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageRawContentProvider.java) =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageRawContentProvider.java 2005-01-05 16:32:08 UTC (rev 170) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/RawContentProvider.java 2005-01-20 09:48:10 UTC (rev 184) @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.search; + + +import com.arsdigita.search.ContentType; +import com.arsdigita.search.ContentProvider; + +import org.apache.log4j.Logger; + +public class RawContentProvider implements ContentProvider { + private static final Logger s_log = + Logger.getLogger( RawContentProvider.class ); + + private byte[] m_content; + private String m_context; + + public RawContentProvider(String context, + byte[] content) { + m_context = context; + m_content = content; + } + + public String getContext() { + return m_context; + } + + public ContentType getType() { + return ContentType.RAW; + } + + public byte[] getBytes() { + if( s_log.isDebugEnabled() ) { + int length = m_content.length > 512 ? 512 : m_content.length; + + s_log.debug( "RAW Content is: " + + new String( m_content, 0, length ) ); + } + + return m_content; + } + +} Copied: ccm-cms/trunk/src/com/arsdigita/cms/search/TextContentProvider.java (from rev 170, ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageTextContentProvider.java) =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageTextContentProvider.java 2005-01-05 16:32:08 UTC (rev 170) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/TextContentProvider.java 2005-01-20 09:48:10 UTC (rev 184) @@ -0,0 +1,240 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.search; + +import com.arsdigita.cms.TextAsset; +import com.arsdigita.cms.FileAsset; + +import com.arsdigita.domain.DomainObject; +import com.arsdigita.domain.DomainObjectTraversal; +import com.arsdigita.domain.DomainServiceInterfaceExposer; +import com.arsdigita.persistence.DataAssociation; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.metadata.ObjectType; +import com.arsdigita.persistence.metadata.Property; +import com.arsdigita.search.ContentProvider; +import com.arsdigita.search.ContentType; +import com.arsdigita.search.converter.ConversionException; +import com.arsdigita.search.converter.Converter; +import com.arsdigita.search.converter.ConverterRegistry; +import com.arsdigita.util.StringUtils; + +import org.apache.log4j.Logger; + +public class TextContentProvider implements ContentProvider { + + private DomainObject m_obj; + private String m_context; + private String m_adapterContext; + + public TextContentProvider(String context, + DomainObject obj, + String adapterContext) { + m_context = context; + m_obj = obj; + m_adapterContext = adapterContext; + } + + public String getContext() { + return m_context; + } + + public ContentType getType() { + return ContentType.TEXT; + } + + public byte[] getBytes() { + + // Long term, this should be uncommented and the conversion + // should be moved in to the com.arsdigita.search package. + // But, for now, this is faster/easier + //DomainObjectTextRenderer renderer = + // new DomainObjectTextRenderer(); + TextRenderer renderer = new TextRenderer(); + + renderer.walk(m_obj, m_adapterContext); + + String text = renderer.getText(); + return text.getBytes(); + } + + /** + * An implementation of the traversal code that converts FileAssets in + * to the appropriate text + */ + public class TextRenderer extends DomainObjectTraversal { + + private Logger s_log = Logger.getLogger(TextRenderer.class); + private StringBuffer m_text; + + /** + */ + public TextRenderer() { + m_text = new StringBuffer(""); + } + + public String getText() { + return m_text.toString(); + } + + protected void beginObject(DomainObject obj, + String path) { + if( obj.getObjectType().isSubtypeOf + ( FileAsset.BASE_DATA_OBJECT_TYPE ) ) { + FileAsset fa = (FileAsset) obj; + appendFileAsset( fa ); + + if( s_log.isDebugEnabled() ) { + s_log.debug( "Adding file asset object " + fa.getOID() ); + } + } + } + + protected void endObject(DomainObject obj, + String path) { + } + + protected void revisitObject(DomainObject obj, + String path) { + } + + protected void handleAttribute(DomainObject obj, + String path, + Property property) { + + Object value = + DomainServiceInterfaceExposer.get(obj, property.getName()); + + if (value != null && + property.isRole() && + (value instanceof DataObject)) { + + ObjectType assetType = ((DataObject)value).getOID().getObjectType(); + String assetTypeName = assetType.getQualifiedName(); + if (assetTypeName.equals(TextAsset.BASE_DATA_OBJECT_TYPE)) { + if( s_log.isDebugEnabled() ) { + s_log.debug( "Adding text asset attribute " + + property.getName() + " for " + + obj.getOID() ); + } + + appendTextAsset(new TextAsset((DataObject)value)); + } else if (assetTypeName.equals(FileAsset.BASE_DATA_OBJECT_TYPE)) { + if( s_log.isDebugEnabled() ) { + s_log.debug( "Adding file asset attribute " + + property.getName() + " for " + + obj.getOID() ); + } + + FileAsset fa = new FileAsset((DataObject)value); + appendFileAsset(fa); + } + } else { + if (value != null && !property.isRole()) { + m_text.append(" " + value); + } + } + } + + protected void beginRole(DomainObject obj, + String path, + Property property) { + } + + protected void endRole(DomainObject obj, + String path, + Property property) { + } + + + protected void beginAssociation(DomainObject obj, + String path, + Property property) { + DataAssociation association = + (DataAssociation)DomainServiceInterfaceExposer.get + (obj, property.getName()); + + if (association != null && + association.getObjectType().isSubtypeOf + (FileAsset.BASE_DATA_OBJECT_TYPE)) { + while (association.next()) { + if( s_log.isDebugEnabled() ) { + s_log.debug( "Adding file asset association " + + property.getName() + " for " + + obj.getOID() ); + } + + appendFileAsset(new FileAsset(association.getDataObject())); + } + } else if (association != null && + association.getObjectType().isSubtypeOf + (TextAsset.BASE_DATA_OBJECT_TYPE)) { + while (association.next()) { + if( s_log.isDebugEnabled() ) { + s_log.debug( "Adding text asset association " + + property.getName() + " for " + + obj.getOID() ); + } + + appendTextAsset(new TextAsset(association.getDataObject())); + } + } + } + + protected void endAssociation(DomainObject obj, + String path, + Property property) { + } + + private void appendTextAsset(TextAsset asset) { + String content = asset.getText(); + if (content != null) { + m_text.append(" " + StringUtils.htmlToText(content)); + } + } + + private void appendFileAsset(FileAsset asset) { + Converter converter = + ConverterRegistry.getConverter(asset.getMimeType()); + if (converter != null) { + if( s_log.isDebugEnabled() ) { + s_log.debug( "Converting " + asset.getOID() + " using " + + converter.getClass().getName() ); + } + + try { + String converted = converter.convertDocument + ( asset.getContent() ); + + if( s_log.isDebugEnabled() ) { + s_log.debug( "Converted file is: " + converted ); + } + + m_text.append( " " ).append( converted ); + } catch (ConversionException e) { + s_log.error("Error converting FileAsset " + asset.getOID()+ + " with MimeType " + asset.getMimeType(), e); + } + } else { + s_log.debug("Skipping FileAsset " + asset.getOID() + + " with MimeType " + asset.getMimeType()); + } + } + } +} Copied: ccm-cms/trunk/src/com/arsdigita/cms/search/XMLContentProvider.java (from rev 170, ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageXMLContentProvider.java) =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/ContentPageXMLContentProvider.java 2005-01-05 16:32:08 UTC (rev 170) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/XMLContentProvider.java 2005-01-20 09:48:10 UTC (rev 184) @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Les... [truncated message content] |
From: <mb...@re...> - 2005-01-18 14:52:24
|
Author: mbooth Date: 2005-01-18 15:42:28 +0100 (Tue, 18 Jan 2005) New Revision: 183 Modified: ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ArticleSection.java ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticle.java Log: Ensure that ArticleSection are in the permission context of their article Modified: ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ArticleSection.java =================================================================== --- ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ArticleSection.java 2005-01-18 13:56:42 UTC (rev 182) +++ ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ArticleSection.java 2005-01-18 14:42:28 UTC (rev 183) @@ -25,6 +25,7 @@ import com.arsdigita.cms.TextAsset; import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DomainObjectFactory; +import com.arsdigita.kernel.permissions.PermissionService; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.OID; import com.arsdigita.persistence.metadata.ObjectType; @@ -42,8 +43,7 @@ * @version $Id: //cms/content-types/mparticle/dev/src/com/arsdigita/cms/contenttypes/ArticleSection.java#7 $ */ public class ArticleSection extends ContentPage { - private static final Logger log = - Logger.getLogger(ArticleSection.class.getName()); + private static final Logger s_log = Logger.getLogger(ArticleSection.class); /** attributes names */ public static final String TEXT = "text"; @@ -159,4 +159,20 @@ public void setPageBreak(boolean val) { set(PAGE_BREAK, new Boolean(val)); } + + protected void afterSave() { + super.afterSave(); + + if( s_log.isDebugEnabled() ) { + s_log.debug( "Saved section " + getOID() ); + } + + // Would prefer to do this in beforeSave(), but getMPArticle() returns + // null + if( null == getLanguage() ) { + setLanguage( getMPArticle().getLanguage() ); + } + + PermissionService.setContext( this, getMPArticle() ); + } } Modified: ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticle.java =================================================================== --- ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticle.java 2005-01-18 13:56:42 UTC (rev 182) +++ ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticle.java 2005-01-18 14:42:28 UTC (rev 183) @@ -111,28 +111,10 @@ super(type); } - protected void afterSave() { - DataAssociationCursor dac = ((DataAssociation) get(SECTIONS)).cursor(); - while( dac.next() ) { - ArticleSection section = (ArticleSection) - DomainObjectFactory.newInstance( dac.getDataObject() ); - - if( s_log.isDebugEnabled() ) { - s_log.debug( "Saving section " + section.getOID() ); - } - - section.setLanguage( getLanguage() ); - section.save(); - } - - super.afterSave(); - } - public String getBaseDataObjectType() { return BASE_DATA_OBJECT_TYPE; } - /** Accessor. Get the summary for this MultiPartArticle. */ public String getSummary() { return (String)get(SUMMARY); @@ -143,7 +125,6 @@ set(SUMMARY, summary); } - /** * Add the specified ArticleSection to this object. Sets the rank * of the association to be after all the other ArticleSections. |
Author: mbooth Date: 2005-01-18 14:56:42 +0100 (Tue, 18 Jan 2005) New Revision: 182 Added: ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticleSectionURLFinder.java Modified: ccm-cms-types-mparticle/trunk/pdl/com/arsdigita/content-types/MultiPartArticle.pdl ccm-cms-types-mparticle/trunk/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/MultiPartArticle.xml ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ArticleSection.java ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticle.java ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticleInitializer.java Log: Index article sections seperately Modified: ccm-cms-types-mparticle/trunk/pdl/com/arsdigita/content-types/MultiPartArticle.pdl =================================================================== --- ccm-cms-types-mparticle/trunk/pdl/com/arsdigita/content-types/MultiPartArticle.pdl 2005-01-18 13:49:26 UTC (rev 181) +++ ccm-cms-types-mparticle/trunk/pdl/com/arsdigita/content-types/MultiPartArticle.pdl 2005-01-18 13:56:42 UTC (rev 182) @@ -26,9 +26,32 @@ // the summary of the article String [0..1] summary = ct_mp_articles.summary VARCHAR(4000); + + reference key ( ct_mp_articles.article_id ); + +} + +association { + composite MultiPartArticle[1..1] mparticle = join ct_mp_sections.article_id + to ct_mp_articles.article_id; component ArticleSection[0..n] sections = join ct_mp_articles.article_id to ct_mp_sections.article_id; +} + +query PageNumberForArticleSection { + Integer pageNumber; - reference key ( ct_mp_articles.article_id ); + do { + + SELECT count (a.section_id) + 1 as page + from ct_mp_sections a, + ct_mp_sections b + where a.page_break=1 + and a.rank < b.rank + and a.article_id = b.article_id + and b.section_id = :section + } map { + pageNumber = page; + } } Modified: ccm-cms-types-mparticle/trunk/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/MultiPartArticle.xml =================================================================== --- ccm-cms-types-mparticle/trunk/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/MultiPartArticle.xml 2005-01-18 13:49:26 UTC (rev 181) +++ ccm-cms-types-mparticle/trunk/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/MultiPartArticle.xml 2005-01-18 13:56:42 UTC (rev 182) @@ -99,21 +99,38 @@ <xrd:property name="/object/sections/image/mimeType/objectType"/> <xrd:property name="/object/sections/image/content"/> </xrd:attributes> + <!-- <xrd:associations rule="include"> <xrd:property name="/object/sections"/> <xrd:property name="/object/sections/text"/> <xrd:property name="/object/sections/image"/> <xrd:property name="/object/sections/image/mimeType"/> </xrd:associations> + --> </xrd:adapter> + <xrd:adapter objectType="com.arsdigita.cms.contenttypes.ArticleSection" extends="com.arsdigita.cms.ContentPage" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> + <xrd:attributes rule="exclude"> + <xrd:property name="/object/text/id"/> + <xrd:property name="/object/text/defaultDomainClass"/> + <xrd:property name="/object/text/objectType"/> + <xrd:property name="/object/text/displayName"/> + <xrd:property name="/object/text/isDeleted"/> + <xrd:property name="/object/text/ancestors"/> + <xrd:property name="/object/text/version"/> + <xrd:property name="/object/text/name"/> + <xrd:property name="/object/text/language"/> + </xrd:attributes> + <xrd:associations rule="include"> + <xrd:property name="/object/text"/> + </xrd:associations> + </xrd:adapter> </xrd:context> <!-- For assets, we want to pull out all HTML, or binary files --> <xrd:context name="com.arsdigita.cms.search.ContentPageAssetExtractor"> - <xrd:adapter objectType="com.arsdigita.cms.contenttypes.MultiPartArticle" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> + <xrd:adapter objectType="com.arsdigita.cms.contenttypes.ArticleSection" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> <xrd:associations rule="include"> - <xrd:property name="/object/sections"/> - <xrd:property name="/object/sections/text"/> + <xrd:property name="/object/text"/> </xrd:associations> </xrd:adapter> </xrd:context> Modified: ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ArticleSection.java =================================================================== --- ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ArticleSection.java 2005-01-18 13:49:26 UTC (rev 181) +++ ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ArticleSection.java 2005-01-18 13:56:42 UTC (rev 182) @@ -24,6 +24,7 @@ import com.arsdigita.cms.ImageAsset; import com.arsdigita.cms.TextAsset; import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.OID; import com.arsdigita.persistence.metadata.ObjectType; @@ -49,6 +50,7 @@ public static final String IMAGE = "image"; public static final String RANK = "rank"; public static final String PAGE_BREAK = "pageBreak"; + public static final String MP_ARTICLE = "mparticle"; public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.ArticleSection"; @@ -111,6 +113,10 @@ set(RANK, rank); } + public MultiPartArticle getMPArticle() { + DataObject obj = (DataObject) get( MP_ARTICLE ); + return (MultiPartArticle) DomainObjectFactory.newInstance( obj ); + } /** Accessor. Get the text associated with this item. */ public TextAsset getText() { Modified: ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticle.java =================================================================== --- ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticle.java 2005-01-18 13:49:26 UTC (rev 181) +++ ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticle.java 2005-01-18 13:56:42 UTC (rev 182) @@ -24,6 +24,7 @@ import com.arsdigita.cms.CustomCopy; import com.arsdigita.cms.ItemCopier; import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.domain.DomainObject; import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.persistence.DataAssociation; import com.arsdigita.persistence.DataAssociationCursor; @@ -47,7 +48,7 @@ */ public class MultiPartArticle extends ContentPage { - private static final Logger log = Logger.getLogger(MultiPartArticle.class); + private static final Logger s_log = Logger.getLogger(MultiPartArticle.class); /** PDL property names */ public static final String SUMMARY = "summary"; @@ -110,10 +111,21 @@ super(type); } - public void beforeSave() { - super.beforeSave(); - - Assert.exists(getContentType(), ContentType.class); + protected void afterSave() { + DataAssociationCursor dac = ((DataAssociation) get(SECTIONS)).cursor(); + while( dac.next() ) { + ArticleSection section = (ArticleSection) + DomainObjectFactory.newInstance( dac.getDataObject() ); + + if( s_log.isDebugEnabled() ) { + s_log.debug( "Saving section " + section.getOID() ); + } + + section.setLanguage( getLanguage() ); + section.save(); + } + + super.afterSave(); } public String getBaseDataObjectType() { @@ -150,7 +162,7 @@ * @param rank the rank of the ArticleSection in the association. */ public void addSection( ArticleSection section, Integer rank ) { - log.info("adding section:" + section.getName() + + s_log.info("adding section:" + section.getName() + " with rank " + rank.toString()); section.setRank(rank); add(SECTIONS,section); @@ -230,8 +242,8 @@ * the max section rank inclusively. */ public void changeSectionRank(ArticleSection source, int destRank) { - if (log.isDebugEnabled()) { - log.debug("*** changeSectionRank, section ID = " + source.getID() + if (s_log.isDebugEnabled()) { + s_log.debug("*** changeSectionRank, section ID = " + source.getID() + "destRank = " + destRank); } Modified: ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticleInitializer.java =================================================================== --- ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticleInitializer.java 2005-01-18 13:49:26 UTC (rev 181) +++ ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticleInitializer.java 2005-01-18 13:56:42 UTC (rev 182) @@ -18,17 +18,11 @@ */ package com.arsdigita.cms.contenttypes; -import com.arsdigita.cms.ContentType; - -import com.arsdigita.db.*; -import com.arsdigita.persistence.pdl.*; -import com.arsdigita.runtime.*; -import com.arsdigita.domain.DomainObject; -import com.arsdigita.domain.DomainObjectFactory; -import com.arsdigita.domain.DomainObjectInstantiator; +import com.arsdigita.cms.search.ContentPageMetadataProvider; +import com.arsdigita.kernel.URLService; import com.arsdigita.persistence.DataObject; -import com.arsdigita.xml.XML; -import com.arsdigita.domain.xml.TraversalHandler; +import com.arsdigita.runtime.LegacyInitEvent; +import com.arsdigita.search.MetadataProviderRegistry; /** * The CMS initializer. @@ -58,4 +52,15 @@ }; } + public void init(LegacyInitEvent evt) { + super.init(evt); + + MetadataProviderRegistry.registerAdapter( + ArticleSection.BASE_DATA_OBJECT_TYPE, + new ContentPageMetadataProvider()); + + URLService.registerFinder( + ArticleSection.BASE_DATA_OBJECT_TYPE, + new MultiPartArticleSectionURLFinder()); + } } Added: ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticleSectionURLFinder.java =================================================================== --- ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticleSectionURLFinder.java 2005-01-18 13:49:26 UTC (rev 181) +++ ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/MultiPartArticleSectionURLFinder.java 2005-01-18 13:56:42 UTC (rev 182) @@ -0,0 +1,97 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Originally created on 11-May-04 + * + * Copyright West Sussex County Council + */ +package com.arsdigita.cms.contenttypes; + +import com.arsdigita.cms.contenttypes.ArticleSection; +import com.arsdigita.cms.contenttypes.MultiPartArticle; +import com.arsdigita.kernel.NoValidURLException; +import com.arsdigita.kernel.URLFinder; +import com.arsdigita.kernel.URLService; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.DataQuery; +import com.arsdigita.persistence.OID; +import com.arsdigita.persistence.SessionManager; + +/** + * @author cgyg9330 + * + * Implementation of URLFinder for a specific ArticleSection + * + */ +public class MultiPartArticleSectionURLFinder implements URLFinder { + public static final String FIND_PAGE_FOR_SECTION_QUERY = "com.arsdigita.cms.contenttypes.PageNumberForArticleSection"; + + /** + * + * find URL for a multipart article section. URL is of the format + * content/folder/articlename?page=X where articlename is the multipart + * article that this section is from and page is the page that the section + * appears on. + * + * @param oid the OID of the article section + */ + public String find(OID oid) throws NoValidURLException { + DataObject dobj = SessionManager.getSession().retrieve(oid); + if (dobj == null) { + throw new NoValidURLException("No such data object " + oid); + } + + if (!dobj + .getObjectType() + .getQualifiedName() + .equals(ArticleSection.BASE_DATA_OBJECT_TYPE)) { + throw new NoValidURLException( + "Data Object is not a multipart article section " + + dobj.getObjectType().getQualifiedName() + + " " + + oid); + } + + ArticleSection thisSection = new ArticleSection(dobj); + MultiPartArticle article = thisSection.getMPArticle(); + StringBuffer articleURL = new StringBuffer(URLService.locate(article.getOID())); + + Integer sectionNumber = thisSection.getRank(); + if (sectionNumber.intValue() != 1) { + DataQuery pageNumber = SessionManager.getSession().retrieveQuery + ( FIND_PAGE_FOR_SECTION_QUERY ); + pageNumber.setParameter("section", thisSection.getID()); + while (pageNumber.next()) { + // just in case there are existing parameters on the url + if (articleURL.toString().indexOf("?") != -1) { + articleURL.append("&"); + } else { + articleURL.append("?"); + } + articleURL.append("page="); + articleURL.append(pageNumber.get("pageNumber")); + } + + } + return articleURL.toString(); + } + + /** + * Simply calls find(OID). context is ignored. + */ + public String find(OID oid, String context) throws NoValidURLException { + return find(oid); + } +} |
From: <mb...@re...> - 2005-01-18 13:59:26
|
Author: mbooth Date: 2005-01-18 14:49:26 +0100 (Tue, 18 Jan 2005) New Revision: 181 Modified: ccm-core/trunk/src/com/arsdigita/search/SearchObserver.java ccm-core/trunk/src/com/arsdigita/search/lucene/DocumentObserver.java ccm-core/trunk/src/com/arsdigita/search/lucene/LuceneSearch.java Log: Some handy debug output Modified: ccm-core/trunk/src/com/arsdigita/search/SearchObserver.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/search/SearchObserver.java 2005-01-14 14:57:52 UTC (rev 180) +++ ccm-core/trunk/src/com/arsdigita/search/SearchObserver.java 2005-01-18 13:49:26 UTC (rev 181) @@ -81,6 +81,10 @@ } } + if( s_log.isDebugEnabled() ) { + s_log.debug("No adapter for " + dobj.getOID()); + } + return false; } Modified: ccm-core/trunk/src/com/arsdigita/search/lucene/DocumentObserver.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/search/lucene/DocumentObserver.java 2005-01-14 14:57:52 UTC (rev 180) +++ ccm-core/trunk/src/com/arsdigita/search/lucene/DocumentObserver.java 2005-01-18 13:49:26 UTC (rev 181) @@ -62,8 +62,10 @@ if (s_log.isDebugEnabled()) { s_log.debug("Processing object " + dobj.getOID() + " using new adapters"); - } + s_log.debug( "Locale: " + adapter.getLocale( dobj ) ); + } + doc.setTypeSpecificInfo(adapter.getTypeSpecificInfo(dobj)); doc.setLocale(adapter.getLocale(dobj)); doc.setTitle(adapter.getTitle(dobj)); Modified: ccm-core/trunk/src/com/arsdigita/search/lucene/LuceneSearch.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/search/lucene/LuceneSearch.java 2005-01-14 14:57:52 UTC (rev 180) +++ ccm-core/trunk/src/com/arsdigita/search/lucene/LuceneSearch.java 2005-01-18 13:49:26 UTC (rev 181) @@ -202,6 +202,8 @@ String language = m_doc.get(Document.LANGUAGE); String country = m_doc.get(Document.COUNTRY); if ("".equals(language) && "".equals(country)) { + LOG.debug( "Document: " + getID() + ", Language: " + language + + ", Country: " + country ); return null; } else { return new Locale(language, country); |
From: <ssk...@re...> - 2005-01-14 15:07:45
|
Author: sskracic Date: 2005-01-14 15:57:52 +0100 (Fri, 14 Jan 2005) New Revision: 180 Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentCheckboxGroupTest.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentComponentTestCase.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentDateTest.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentFormSectionTest.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentFormTest.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentLabelTest.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentMultipleSelectTest.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentOptionTest.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentRadioGroupTest.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentSingleSelectTest.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentSubmitTest.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentTextAreaTest.java ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentTextFieldTest.java Log: s/PersistentComponentFactory/PersistentComponent/g Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentCheckboxGroupTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentCheckboxGroupTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentCheckboxGroupTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -26,7 +26,7 @@ import com.arsdigita.formbuilder.PersistentOption; // Interfaces used by the component base test case -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; import com.arsdigita.bebop.Component; // Reference @@ -81,7 +81,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentCheckboxGroup checkBox = PersistentCheckboxGroup.create(m_checkBoxName); Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentComponentTestCase.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentComponentTestCase.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentComponentTestCase.java 2005-01-14 14:57:52 UTC (rev 180) @@ -24,7 +24,7 @@ import com.arsdigita.dispatcher.TestUtils; // Interface of the class that we are testing -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; // The interface of the reference class import com.arsdigita.bebop.Component; @@ -90,7 +90,7 @@ // Start with the primary use-case - PersistentComponentFactory pcf = createPrimaryPersistentFactory(); + PersistentComponent pcf = createPrimaryPersistentFactory(); if ( pcf == null ) { return; @@ -113,7 +113,7 @@ String testKey = (String)persistentIter.next(); logDebug("secondary use-case " + testKey + " started"); - runTest((PersistentComponentFactory)persistentMap.get(testKey), + runTest((PersistentComponent)persistentMap.get(testKey), (Component)referenceMapBefore.get(testKey), (Component)referenceMapAfter.get(testKey)); @@ -141,7 +141,7 @@ * comparison. We are also comparing the default values after resurrection. * I use serialization for default values. */ - private void runTest(PersistentComponentFactory persistentFactory, + private void runTest(PersistentComponent persistentFactory, Component referenceComponentBefore, Component referenceComponentAfter) { @@ -160,7 +160,7 @@ persistentFactory.save(); BigDecimal id = persistentFactory.getID(); persistentFactory = - (PersistentComponentFactory) + (PersistentComponent) FormBuilderUtil.instantiateObjectOneArg(persistentFactory.getClass().getName(), id); @@ -196,12 +196,12 @@ } /** - * Returns a PersistentComponentFactory setup in a standard way reflecting the + * Returns a PersistentComponent setup in a standard way reflecting the * primary use-case. Every test case needs to at least include this use-case. * The component created by this factory will be compared with the factory returned * by createPrimaryReferenceComponent() */ - protected abstract PersistentComponentFactory createPrimaryPersistentFactory(); + protected abstract PersistentComponent createPrimaryPersistentFactory(); /** * This method creates a new reference component and populates setup in a standard @@ -211,7 +211,7 @@ protected abstract Component createPrimaryReferenceComponent(); /** - * Returns a map with use-case names as keys and PersistentComponentFactory:s as values. + * Returns a map with use-case names as keys and PersistentComponent:s as values. * Each factory is populated with different * data that reflects a secondary use-case. The components created by these factories * will compared with the reference component in the same position in the list returned @@ -243,7 +243,7 @@ * does not have. Those should be checked (after the component has been * retrieved from the database) in this method. */ - protected void checkPersistenceAttributes(PersistentComponentFactory factory) { + protected void checkPersistenceAttributes(PersistentComponent factory) { // Intentionally empty to be optionally implemented by sub classes } Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentDateTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentDateTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentDateTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -23,7 +23,7 @@ import com.arsdigita.formbuilder.PersistentDate; // Interface of the class that we are testing -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; // Interfaces used by the base test case import com.arsdigita.bebop.Component; @@ -70,7 +70,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentDate factory = PersistentDate.create(m_htmlName); @@ -108,7 +108,7 @@ } /** - * Returns a map with use-case names as keys and PersistentComponentFactory:s as values. + * Returns a map with use-case names as keys and PersistentComponent:s as values. * Each factory is populated with different * data that reflects a secondary use-case. The components created by these factories * will compared with the reference component in the same position in the list returned Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentFormSectionTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentFormSectionTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentFormSectionTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -23,7 +23,7 @@ import com.arsdigita.formbuilder.PersistentFormSection; // Interfaces used by the component base test case -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; import com.arsdigita.bebop.Component; // Component factories used @@ -106,7 +106,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentFormSection factory = new PersistentFormSection(); setFormSectionData(factory); @@ -133,7 +133,7 @@ * does not have. Those should be checked (after the component has been * retrieved from the database) in this method. */ - protected void checkPersistenceAttributes(PersistentComponentFactory factory) { + protected void checkPersistenceAttributes(PersistentComponent factory) { PersistentFormSection formSectionFactory = (PersistentFormSection)factory; Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentFormTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentFormTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentFormTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -23,7 +23,7 @@ import com.arsdigita.formbuilder.PersistentForm; // Interfaces used by the component base test case -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; import com.arsdigita.bebop.Component; // Reference @@ -70,7 +70,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentForm persistentForm = PersistentForm.create(m_htmlName); @@ -110,7 +110,7 @@ * does not have. Those should be checked (after the component has been * retrieved from the database) in this method. */ - protected void checkPersistenceAttributes(PersistentComponentFactory factory) { + protected void checkPersistenceAttributes(PersistentComponent factory) { m_formSectionTest.checkPersistenceAttributes(factory); } Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentLabelTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentLabelTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentLabelTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -20,7 +20,7 @@ // Interface of the class that we are testing -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; // The class that we are testing import com.arsdigita.formbuilder.PersistentLabel; @@ -59,7 +59,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentLabel factory = PersistentLabel.create(m_label); Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentMultipleSelectTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentMultipleSelectTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentMultipleSelectTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -26,7 +26,7 @@ import com.arsdigita.formbuilder.PersistentOption; // Interfaces used by the component base test case -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; import com.arsdigita.bebop.Component; // Reference @@ -81,7 +81,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentMultipleSelect select = PersistentMultipleSelect.create(m_selectName); Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentOptionTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentOptionTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentOptionTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -20,7 +20,7 @@ // Interface of the class that we are testing -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; // The class that we are testing import com.arsdigita.formbuilder.PersistentOption; @@ -60,7 +60,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentOption factory = PersistentOption.create(m_parameterValue, m_label); Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentRadioGroupTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentRadioGroupTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentRadioGroupTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -26,7 +26,7 @@ import com.arsdigita.formbuilder.PersistentOption; // Interfaces used by the component base test case -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; import com.arsdigita.bebop.Component; // Reference @@ -81,7 +81,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentRadioGroup radio = PersistentRadioGroup.create(m_radioName); Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentSingleSelectTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentSingleSelectTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentSingleSelectTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -26,7 +26,7 @@ import com.arsdigita.formbuilder.PersistentOption; // Interfaces used by the component base test case -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; import com.arsdigita.bebop.Component; // Reference @@ -81,7 +81,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentSingleSelect select = PersistentSingleSelect.create(m_selectName); Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentSubmitTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentSubmitTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentSubmitTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -23,7 +23,7 @@ import com.arsdigita.formbuilder.PersistentSubmit; // Interface of the class that we are testing -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; import com.arsdigita.bebop.Component; @@ -58,7 +58,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentSubmit factory = PersistentSubmit.create(m_htmlName); Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentTextAreaTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentTextAreaTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentTextAreaTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -23,7 +23,7 @@ import com.arsdigita.formbuilder.PersistentTextArea; // Interface of the class that we are testing -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; // Interfaces used by the base test case import com.arsdigita.bebop.Component; @@ -68,7 +68,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentTextArea factory = PersistentTextArea.create(m_htmlName); Modified: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentTextFieldTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentTextFieldTest.java 2005-01-14 14:56:33 UTC (rev 179) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/PersistentTextFieldTest.java 2005-01-14 14:57:52 UTC (rev 180) @@ -20,7 +20,7 @@ // Interface of the class that we are testing -import com.arsdigita.formbuilder.PersistentComponentFactory; +import com.arsdigita.formbuilder.PersistentComponent; // The class we are testing import com.arsdigita.formbuilder.PersistentTextField; @@ -68,7 +68,7 @@ /** * This method returns an instance of the appropriate factory. */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { + protected PersistentComponent createPrimaryPersistentFactory() { PersistentTextField factory = PersistentTextField.create(m_htmlName); |
From: <ssk...@re...> - 2005-01-14 15:06:17
|
Author: sskracic Date: 2005-01-14 15:56:33 +0100 (Fri, 14 Jan 2005) New Revision: 179 Removed: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/SimpleQuestionnaireTest.java Log: SimpleQuestionnaire class has been removed, dropping its junit test as well. Deleted: ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/SimpleQuestionnaireTest.java =================================================================== --- ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/SimpleQuestionnaireTest.java 2005-01-14 13:25:13 UTC (rev 178) +++ ccm-core/trunk/test/src/com/arsdigita/formbuilder/test/SimpleQuestionnaireTest.java 2005-01-14 14:56:33 UTC (rev 179) @@ -1,161 +0,0 @@ -/* - * Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -package com.arsdigita.formbuilder.test; - - -// Interface of the class that we are testing -import com.arsdigita.formbuilder.PersistentComponentFactory; - -// The class we are testing -import com.arsdigita.formbuilder.SimpleQuestionnaire; - -// Component factories -import com.arsdigita.formbuilder.PersistentTextArea; -import com.arsdigita.formbuilder.PersistentTextField; - -// Some components that we add -import com.arsdigita.bebop.form.TextField; -import com.arsdigita.bebop.form.TextArea; -import com.arsdigita.bebop.form.Submit; -import com.arsdigita.bebop.Label; - -// For the id of the questionnaire -import java.math.BigDecimal; - -// Reference class -import com.arsdigita.bebop.Form; - -// Interfaces used by the component base test case -import com.arsdigita.bebop.Component; - -// logging -import org.apache.log4j.Logger; - - -/** - * Test the SimpleQuestionnaire class. - * - * @author Peter Marklund - * @version $Id: //core-platform/dev/test/src/com/arsdigita/formbuilder/test/SimpleQuestionnaireTest.java#10 $ - * - */ -public class SimpleQuestionnaireTest extends PersistentComponentTestCase { - - public static final String versionId = "$Id: //core-platform/dev/test/src/com/arsdigita/formbuilder/test/SimpleQuestionnaireTest.java#10 $ by $Author: dennis $, $DateTime: 2004/08/16 18:10:38 $"; - - private final static Logger s_log = - Logger.getLogger(SimpleQuestionnaireTest.class.getName()); - - String m_label0 = "Question 0"; - String m_label1 = "Question 1"; - String m_label2 = "Question 2"; - - String m_submitLabel = "go"; - - String m_htmlName = "questionnaire_html_name"; - - String m_adminName = "Questionnaire Admin Name"; - - String m_description = "Questionnaire Description"; - - // The class we are testing - private SimpleQuestionnaire m_questionnaire; - - private BigDecimal m_questionnaireID; - - /** - * JUnit needs this constructor - */ - public SimpleQuestionnaireTest(String name) { - super(name); - } - - // *** Methods inherited from PersistentComponentTestCase - - /** - * This method returns an instance of the appropriate factory. - */ - protected PersistentComponentFactory createPrimaryPersistentFactory() { - - SimpleQuestionnaire questionnaire = - new SimpleQuestionnaire(m_htmlName, m_adminName); - - questionnaire.setDescription(m_description); - - PersistentTextArea widget1 = PersistentTextArea.create(m_label1); - widget1.save(); - PersistentTextField widget0 = PersistentTextField.create(m_label0); - widget0.save(); - PersistentTextArea widget2 = PersistentTextArea.create(m_label2); - widget2.save(); - - // Add a label / text field pair - questionnaire.addQuestion(m_label1, widget1); - - // Add a label / text area pair at position 1 - questionnaire.addQuestion(m_label0, widget0, 1); - - // Set the submit label - questionnaire.setSubmitLabel(m_submitLabel); - - // Add another label and text area - questionnaire.addQuestion(m_label2, widget2); - - // Remove question 1 (at position 2) - questionnaire.removeQuestion(2); - - // Reorder the questions - questionnaire.moveQuestion(2, 1); - - return questionnaire; - } - - /** - * This method creates a new reference component and populates it with - * test data - */ - protected Component createPrimaryReferenceComponent() { - - Form form = new Form(m_htmlName); - - // Remember that we removed question number 1 and reordered question 2 and 0 - form.add(new Label(m_label2)); - form.add(new TextArea(m_label2)); - - form.add(new Label(m_label0)); - form.add(new TextField(m_label0)); - - form.add(new Submit("submit", m_submitLabel)); - - return form; - } - - /** - * Some components have attributes that the corresponding Bebop component - * does not have. Those should be checked (after the component has been - * retrieved from the database) in this method. - */ - protected void checkPersistenceAttributes(PersistentComponentFactory factory) { - - SimpleQuestionnaire questionnaire = (SimpleQuestionnaire)factory; - - assertEquals(questionnaire.getAdminName(), m_adminName); - assertEquals(questionnaire.getDescription(), m_description); - } -} |
From: <ssk...@re...> - 2005-01-14 13:35:09
|
Author: sskracic Date: 2005-01-14 14:25:13 +0100 (Fri, 14 Jan 2005) New Revision: 178 Modified: ccm-core/trunk/src/com/arsdigita/bebop/jsp/DefinePage.java Log: Amending the DefinePage API to support WestSussex improvements. Modified: ccm-core/trunk/src/com/arsdigita/bebop/jsp/DefinePage.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/bebop/jsp/DefinePage.java 2005-01-13 19:49:28 UTC (rev 177) +++ ccm-core/trunk/src/com/arsdigita/bebop/jsp/DefinePage.java 2005-01-14 13:25:13 UTC (rev 178) @@ -29,6 +29,9 @@ import java.io.File; import java.util.HashMap; import java.util.Map; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -76,6 +79,11 @@ // maps URL(/packages/foo/www/asdf.jsp) -> {Page, creation date} private static Map s_pageLocks = new HashMap(); + // Collection of dirty page URLs (ie/packages/foo/www/asdf.jsp). + // Can be set anywhere and is checked here before retreiving page from cache. + private static Set s_dirtyPages = + Collections.synchronizedSet(new HashSet()); + /** * Creates a Bebop Page instance. A page tag is a special case * because we don't expect it to have a parent tag. @@ -85,7 +93,7 @@ String cacheKey = DispatcherHelper.getCurrentResourcePath ((HttpServletRequest)pageContext.getRequest()); Object pageLock; - // First off all we have the global synchronization + // First off all we have the global synchronization // block to get the page's unique sync object. synchronized (s_pageLocks) { pageLock = s_pageLocks.get(cacheKey); @@ -101,11 +109,12 @@ long pageDate = ((Long)pair[1]).longValue(); File jspFile = new File(pageContext.getServletContext() .getRealPath(cacheKey)); - if (jspFile.lastModified() <= pageDate) { - // jsp file is not newer than cached page, so we can use - // the cached page. + if (jspFile.lastModified() <= pageDate && !s_dirtyPages.contains(cacheKey)) { + // jsp file is not newer than cached page, + // and page hasn't been marked as dirty by anyone so we can use the cached page. + Page page = (Page)pair[0]; - + // We may have to for the page to be locked // by another thread while (!page.isLocked()) { @@ -126,11 +135,19 @@ pageContext.setAttribute(getName(), m_page); return SKIP_BODY; } - + + s_log.debug("rebuilding page - first time requested? " + + !s_pageCache.containsKey(cacheKey) + + " marked as dirty? " + + s_dirtyPages.contains(cacheKey) + + " else JSP modified"); + m_page = buildPage(); s_pageCache.put(cacheKey, new Object[] {m_page, new Long(System.currentTimeMillis())}); + s_dirtyPages.remove(cacheKey); + } } else { m_page = buildPage(); @@ -139,6 +156,16 @@ return EVAL_BODY_BUFFERED; } + /** + * pass in resource URL (eg by using DispatcherHelper.getCurrentResourcePath()) + * and page will be rebuilt next time it is requested. + * @param resourceURL URL for page eg /packages/foo/www/asdf.jsp + */ + public static void setPageAsDirty (String resourceURL) { + s_dirtyPages.add(resourceURL); + } + + private Page buildPage() throws JspException { Page page; @@ -239,10 +266,10 @@ (HttpServletRequest)pageContext.getRequest(); HttpServletResponse resp = (HttpServletResponse)pageContext.getResponse(); - + Document doc; PageState state; - + try { doc = new Document (); state = m_page.process (req, resp); |
From: <ssk...@re...> - 2005-01-13 19:59:15
|
Author: sskracic Date: 2005-01-13 20:49:28 +0100 (Thu, 13 Jan 2005) New Revision: 177 Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/CookieManager.java ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig_parameter.properties Log: Adding support for configurable cookie domain that Aplaws authorization cookie will be responsible for. The waf.cookie_domain parameter is optional, if it's not set the cookie will be valid only for the website that delivered it. Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/CookieManager.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/kernel/security/CookieManager.java 2005-01-13 18:52:13 UTC (rev 176) +++ ccm-core/trunk/src/com/arsdigita/kernel/security/CookieManager.java 2005-01-13 19:49:28 UTC (rev 177) @@ -18,14 +18,15 @@ */ package com.arsdigita.kernel.security; +import com.arsdigita.kernel.Kernel; import com.arsdigita.util.ServletUtils; +import com.arsdigita.util.UncheckedWrapperException; import java.util.Map; import javax.security.auth.Subject; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.login.LoginException; import javax.servlet.http.Cookie; import org.apache.log4j.Logger; -import com.arsdigita.util.UncheckedWrapperException; /** * Manages a string value stored in a cookie. @@ -155,6 +156,12 @@ cookie.setPath("/"); cookie.setSecure(getModule().isSecure()); getModule().getResponse().addCookie(cookie); + String domain = Kernel.getSecurityConfig().getCookieDomain(); + if (domain != null) { + cookie.setDomain(domain); + } + s_log.debug("Cookie set: domain - " + cookie.getDomain() + + " name - " + cookie.getName()); } /** Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java 2005-01-13 18:52:13 UTC (rev 176) +++ ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java 2005-01-13 19:49:28 UTC (rev 177) @@ -59,6 +59,8 @@ ("waf.pagemap.permission", Parameter.REQUIRED, "permissions/"); private final Parameter m_permSinglePage = new StringParameter ("waf.pagemap.perm_single", Parameter.REQUIRED, "permissions/one"); + private final Parameter m_cookieDomain = new StringParameter + ("waf.cookie_domain", Parameter.OPTIONAL, null); private final Parameter m_loginConfig = new StringArrayParameter ("waf.login_config", Parameter.REQUIRED, new String[] { "Request:com.arsdigita.kernel.security.AdminLoginModule:sufficient", @@ -84,6 +86,7 @@ register(m_loginRedirectPage); register(m_permissionPage); register(m_permSinglePage); + register(m_cookieDomain); register(m_loginConfig); loadInfo(); } @@ -124,6 +127,9 @@ String getPermSinglePage() { return (String) get(m_permSinglePage); } + String getCookieDomain() { + return (String) get(m_cookieDomain); + } String[] getLoginConfig() { return (String[]) get(m_loginConfig); } Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig_parameter.properties =================================================================== --- ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig_parameter.properties 2005-01-13 18:52:13 UTC (rev 176) +++ ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig_parameter.properties 2005-01-13 19:49:28 UTC (rev 177) @@ -50,3 +50,7 @@ waf.login_config.purpose=Enter JAAS login configuration, using the syntax described in Javadoc for com.arsdigita.kernel.security.LoginConfig waf.login_config.example=Request:com.arsdigita.kernel.security.AdminLoginModule:sufficient,Register:com.arsdigita.kernel.security.LocalLoginModule:requisite waf.login_config.format=[string,string,...] +waf.cookie_domain.title=Cookie Domain +waf.cookie_domain.purpose=Enter the domain to which the Aplaws authentication cookie is presented +waf.cookie_domain.example=.example.com +waf.cookie_domain.format=[string] |
From: <ssk...@re...> - 2005-01-13 19:01:56
|
Author: sskracic Date: 2005-01-13 19:52:13 +0100 (Thu, 13 Jan 2005) New Revision: 176 Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig_parameter.properties Log: New parameter needs to be properly documented. Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig_parameter.properties =================================================================== --- ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig_parameter.properties 2005-01-13 17:55:13 UTC (rev 175) +++ ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig_parameter.properties 2005-01-13 18:52:13 UTC (rev 176) @@ -46,3 +46,7 @@ waf.pagemap.perm_single.purpose=Enter the relative URL for the Single Object permissons administration page waf.pagemap.perm_single.example=permissions/one waf.pagemap.perm_single.format=[string] +waf.login_config.title=Login Configuration +waf.login_config.purpose=Enter JAAS login configuration, using the syntax described in Javadoc for com.arsdigita.kernel.security.LoginConfig +waf.login_config.example=Request:com.arsdigita.kernel.security.AdminLoginModule:sufficient,Register:com.arsdigita.kernel.security.LocalLoginModule:requisite +waf.login_config.format=[string,string,...] |
From: <ssk...@re...> - 2005-01-13 18:05:09
|
Author: sskracic Date: 2005-01-13 18:55:13 +0100 (Thu, 13 Jan 2005) New Revision: 175 Modified: ccm-core/trunk/application.xml ccm-core/trunk/src/com/arsdigita/kernel/security/Initializer.java ccm-core/trunk/src/com/arsdigita/kernel/security/LoginConfig.java ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java Log: It turned out that 'Request' and 'Register' login contexts are not always sufficient. All login contexts are configured through the single parameter waf.login_config, hopefully the syntax is not that horrible. Modified: ccm-core/trunk/application.xml =================================================================== --- ccm-core/trunk/application.xml 2005-01-13 13:06:15 UTC (rev 174) +++ ccm-core/trunk/application.xml 2005-01-13 17:55:13 UTC (rev 175) @@ -3,7 +3,7 @@ <ccm:application name="ccm-core" prettyName="Core" version="6.1.0" - release="20" + release="21" webapp="ROOT" buildHooks="build-hooks.xml" xmlns:ccm="http://ccm.redhat.com/ccm-project"> Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/Initializer.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/kernel/security/Initializer.java 2005-01-13 13:06:15 UTC (rev 174) +++ ccm-core/trunk/src/com/arsdigita/kernel/security/Initializer.java 2005-01-13 17:55:13 UTC (rev 175) @@ -380,9 +380,8 @@ private javax.security.auth.login.Configuration getLoginConfig() throws InitializationException { SecurityConfig conf = Kernel.getSecurityConfig(); - List requestLoginConfig = Arrays.asList(conf.getRequestLoginConfig()); - List registerLoginConfig = Arrays.asList(conf.getRegisterLoginConfig()); - return new LoginConfig(requestLoginConfig, registerLoginConfig); + List loginConfig = Arrays.asList(conf.getLoginConfig()); + return new LoginConfig(loginConfig); } private void checkLoginConfig() throws InitializationException { Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/LoginConfig.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/kernel/security/LoginConfig.java 2005-01-13 13:06:15 UTC (rev 174) +++ ccm-core/trunk/src/com/arsdigita/kernel/security/LoginConfig.java 2005-01-13 17:55:13 UTC (rev 175) @@ -20,6 +20,7 @@ import com.arsdigita.initializer.InitializationException; import com.arsdigita.util.StringUtils; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; @@ -27,6 +28,7 @@ import java.util.Map; import javax.security.auth.login.AppConfigurationEntry; import javax.security.auth.login.Configuration; +import org.apache.log4j.Logger; /** * <p>Parses a login <code>Configuration</code> from an @@ -41,17 +43,25 @@ /** Maps application names to <code>AppConfigurationEntry[]</code>. **/ private Map m_appConfigs = new HashMap(); + private static final Logger s_log = Logger.getLogger(LoginConfig.class); + /** - * <p>Creates a new login configuration. - * Input arguments describe <tt>request</tt> and <tt>register</tt> login contexts. - * Each login context is presented by a <tt>List</tt> of StringS. - * Each list element is formatted like this: + * <p>Creates a new login configuration. <tt>Request</tt> and <tt>Register</tt> + * are mandatory contexts, WAF refuses to start if they are not configured. + * Each login context can span multiple modules. </p> * + * <p> The input <tt>List</tt> comprises of <tt>StringS</tt> adhering to the + * following format: </p> + * * <pre> - * moduleName:controlFlag[:option1[:option2[:...]]] + * context:moduleName:controlFlag[:option1[:option2[:...]]] * </pre> * * <dl> + * + * <dt><i>context</i></dt> + * <dd>String</dd> + * * <dt><i>moduleName</i></dt> * <dd>String</dd> * @@ -67,23 +77,33 @@ * * <p>Example:</p> * - * <p>Request context:</p> * <pre> - * com.arsdigita.kernel.security.CredentialLoginModule:requisite:debug=true + * Request:com.arsdigita.kernel.security.CredentialLoginModule:requisite:debug=true + * Register:com.arsdigita.kernel.security.LocalLoginModule:requisite + * Register:com.arsdigita.kernel.security.UserIDLoginModule:requisite + * Register:com.arsdigita.kernel.security.CredentialLoginModule:optional * </pre> * - * <p>Register context:</p> - * <pre> - * com.arsdigita.kernel.security.LocalLoginModule:requisite - * com.arsdigita.kernel.security.UserIDLoginModule:requisite - * com.arsdigita.kernel.security.CredentialLoginModule:optional - * </pre> - * * @throws InitializationException if there is a parsing error. **/ - public LoginConfig(List requestConfig, List registerConfig) throws InitializationException { - addAppConfig(UserContext.REQUEST_LOGIN_CONTEXT, requestConfig); - addAppConfig(UserContext.REGISTER_LOGIN_CONTEXT, registerConfig); + public LoginConfig(List config) throws InitializationException { + Map contextConfigs = new HashMap(); + for (int i = 0; i < config.size(); i++) { + String tuple = (String) config.get(i); + int pos = tuple.indexOf(':'); + String context = tuple.substring(0, pos); + String moduleConf = tuple.substring(pos+1); + List contextConfig = (List) contextConfigs.get(context); + if (contextConfig == null) { + contextConfig = new ArrayList(); + contextConfigs.put(context, contextConfig); + } + contextConfig.add(moduleConf); + } + for (Iterator it = contextConfigs.keySet().iterator(); it.hasNext(); ) { + String context = (String) it.next(); + addAppConfig(context, (List) contextConfigs.get(context)); + } } private void addAppConfig(String name, List entries) Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java 2005-01-13 13:06:15 UTC (rev 174) +++ ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java 2005-01-13 17:55:13 UTC (rev 175) @@ -59,20 +59,16 @@ ("waf.pagemap.permission", Parameter.REQUIRED, "permissions/"); private final Parameter m_permSinglePage = new StringParameter ("waf.pagemap.perm_single", Parameter.REQUIRED, "permissions/one"); - private final Parameter m_requestLoginConfig = new StringArrayParameter - ("waf.login_config.request", Parameter.REQUIRED, new String[] { - "com.arsdigita.kernel.security.AdminLoginModule:sufficient", - "com.arsdigita.kernel.security.RecoveryLoginModule:sufficient", - "com.arsdigita.kernel.security.CookieLoginModule:requisite" + private final Parameter m_loginConfig = new StringArrayParameter + ("waf.login_config", Parameter.REQUIRED, new String[] { + "Request:com.arsdigita.kernel.security.AdminLoginModule:sufficient", + "Request:com.arsdigita.kernel.security.RecoveryLoginModule:sufficient", + "Request:com.arsdigita.kernel.security.CookieLoginModule:requisite", + "Register:com.arsdigita.kernel.security.LocalLoginModule:requisite", + "Register:com.arsdigita.kernel.security.UserIDLoginModule:requisite", + "Register:com.arsdigita.kernel.security.CookieLoginModule:optional" } ); - private final Parameter m_registerLoginConfig = new StringArrayParameter - ("waf.login_config.register", Parameter.REQUIRED, new String[] { - "com.arsdigita.kernel.security.LocalLoginModule:requisite", - "com.arsdigita.kernel.security.UserIDLoginModule:requisite", - "com.arsdigita.kernel.security.CookieLoginModule:optional" - } - ); public SecurityConfig() { @@ -88,8 +84,7 @@ register(m_loginRedirectPage); register(m_permissionPage); register(m_permSinglePage); - register(m_requestLoginConfig); - register(m_registerLoginConfig); + register(m_loginConfig); loadInfo(); } @@ -129,11 +124,8 @@ String getPermSinglePage() { return (String) get(m_permSinglePage); } - String[] getRequestLoginConfig() { - return (String[]) get(m_requestLoginConfig); + String[] getLoginConfig() { + return (String[]) get(m_loginConfig); } - String[] getRegisterLoginConfig() { - return (String[]) get(m_registerLoginConfig); - } } |
From: <ssk...@re...> - 2005-01-13 13:16:06
|
Author: sskracic Date: 2005-01-13 14:06:15 +0100 (Thu, 13 Jan 2005) New Revision: 174 Modified: ccm-core/trunk/application.xml ccm-core/trunk/src/com/arsdigita/core/enterprise.init ccm-core/trunk/src/com/arsdigita/kernel/security/Initializer.java ccm-core/trunk/src/com/arsdigita/kernel/security/LoginConfig.java ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java Log: Login configuration moved out of enterprise.init into security.properties. Currently, due to immutable parameter names, only two login contexts are provided (hardcoded): waf.login_config.request and waf.login_config.register. Both parameters are of type StringArrayParameter and they accept comma separated list of modules. For more info on syntax, check Javadoc for com.arsdigita.kernel.security.LoginConfig. Bumped release number for ccm-core. Modified: ccm-core/trunk/application.xml =================================================================== --- ccm-core/trunk/application.xml 2005-01-12 21:48:04 UTC (rev 173) +++ ccm-core/trunk/application.xml 2005-01-13 13:06:15 UTC (rev 174) @@ -3,7 +3,7 @@ <ccm:application name="ccm-core" prettyName="Core" version="6.1.0" - release="19" + release="20" webapp="ROOT" buildHooks="build-hooks.xml" xmlns:ccm="http://ccm.redhat.com/ccm-project"> Modified: ccm-core/trunk/src/com/arsdigita/core/enterprise.init =================================================================== --- ccm-core/trunk/src/com/arsdigita/core/enterprise.init 2005-01-12 21:48:04 UTC (rev 173) +++ ccm-core/trunk/src/com/arsdigita/core/enterprise.init 2005-01-13 13:06:15 UTC (rev 174) @@ -35,18 +35,6 @@ init com.arsdigita.kernel.security.Initializer { securityHelperClass = "com.arsdigita.kernel.security.DefaultSecurityHelper"; sessionTrackingMethod = "cookie"; - loginConfig = { - "Request", { - {"com.arsdigita.kernel.security.AdminLoginModule", "sufficient"}, - {"com.arsdigita.kernel.security.RecoveryLoginModule", "sufficient"}, - {"com.arsdigita.kernel.security.CookieLoginModule", "requisite"} - }, - "Register", { - {"com.arsdigita.kernel.security.LocalLoginModule", "requisite"}, - {"com.arsdigita.kernel.security.UserIDLoginModule", "requisite"}, - {"com.arsdigita.kernel.security.CookieLoginModule", "optional"} - } - }; excludedExtensions = { ".jpg", ".gif", ".png", ".pdf" }; Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/Initializer.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/kernel/security/Initializer.java 2005-01-12 21:48:04 UTC (rev 173) +++ ccm-core/trunk/src/com/arsdigita/kernel/security/Initializer.java 2005-01-13 13:06:15 UTC (rev 174) @@ -54,8 +54,6 @@ /** Obsolete parameter name for session tracking method. **/ public static String SESSION_TRACKING_PARAM = "sessionTrackingMethod"; - /** Parameter name for login configuration. **/ - public static String LOGIN_CONFIG_PARAM = "loginConfig"; /** Parameter name for security helper class name. **/ public static String SECURITY_HELPER_PARAM = "securityHelperClass"; /** Parameter name for excluded URI extensions. **/ @@ -85,10 +83,6 @@ "This parameter is obsolete.", String.class); m_conf.initParameter - (LOGIN_CONFIG_PARAM, - "The login configuration.", - List.class); - m_conf.initParameter (EXCLUDED_EXTENSIONS_PARAM, "List of extensions excluded from authentication cookies. " +"Authentication is checked for all requests, but requests " @@ -385,16 +379,10 @@ private javax.security.auth.login.Configuration getLoginConfig() throws InitializationException { - List list = (List)m_conf.getParameter(LOGIN_CONFIG_PARAM); - if (list == null) { - throw new InitializationException - (LOGIN_CONFIG_PARAM+" not defined " - // TODO: remove the following comment eventually - +"(update enterprise.init to get the default login config; " - +"loginConfig replaces loginConfigFileName and eliminates " - +"the need to use a separate file for this information)"); - } - return new LoginConfig(list); + SecurityConfig conf = Kernel.getSecurityConfig(); + List requestLoginConfig = Arrays.asList(conf.getRequestLoginConfig()); + List registerLoginConfig = Arrays.asList(conf.getRegisterLoginConfig()); + return new LoginConfig(requestLoginConfig, registerLoginConfig); } private void checkLoginConfig() throws InitializationException { Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/LoginConfig.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/kernel/security/LoginConfig.java 2005-01-12 21:48:04 UTC (rev 173) +++ ccm-core/trunk/src/com/arsdigita/kernel/security/LoginConfig.java 2005-01-13 13:06:15 UTC (rev 174) @@ -19,6 +19,8 @@ package com.arsdigita.kernel.security; import com.arsdigita.initializer.InitializationException; +import com.arsdigita.util.StringUtils; +import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -40,22 +42,16 @@ private Map m_appConfigs = new HashMap(); /** - * <p>Creates a new login configuration from the given list - * (<code>loginConfig</code>). Grammar: </p> + * <p>Creates a new login configuration. + * Input arguments describe <tt>request</tt> and <tt>register</tt> login contexts. + * Each login context is presented by a <tt>List</tt> of StringS. + * Each list element is formatted like this: * - * <dl> - * <dt><i>loginConfig</i></dt> - * <dd>{ appName1, moduleList1 [, ... , appNameN, moduleListN ] }</dd> + * <pre> + * moduleName:controlFlag[:option1[:option2[:...]]] + * </pre> * - * <dt><i>appName</i></dt> - * <dd>String</dd> - * - * <dt><i>moduleList</i></dt> - * <dd>{ moduleConf1 [, ..., moduleConfN ] }</dd> - * - * <dt><i>moduleConf</i></dt> - * <dd>{ moduleName, controlFlag [, option1, ..., optionN ] }</dd> - * + * <dl> * <dt><i>moduleName</i></dt> * <dd>String</dd> * @@ -71,38 +67,31 @@ * * <p>Example:</p> * + * <p>Request context:</p> * <pre> - * loginConfig = { - * "Request", { - * {"com.arsdigita.kernel.security.CredentialLoginModule", "requisite", - * "debug=true"} - * }, - * "Register", { - * {"com.arsdigita.kernel.security.LocalLoginModule", "requisite"}, - * {"com.arsdigita.kernel.security.UserIDLoginModule", "requisite"}, - * {"com.arsdigita.kernel.security.CredentialLoginModule", "optional"} - * } - * }; + * com.arsdigita.kernel.security.CredentialLoginModule:requisite:debug=true * </pre> * + * <p>Register context:</p> + * <pre> + * com.arsdigita.kernel.security.LocalLoginModule:requisite + * com.arsdigita.kernel.security.UserIDLoginModule:requisite + * com.arsdigita.kernel.security.CredentialLoginModule:optional + * </pre> + * * @throws InitializationException if there is a parsing error. **/ - public LoginConfig(List list) throws InitializationException { - Iterator iter = list.iterator(); - while (iter.hasNext()) { - String name = getString(iter, "application name"); - List entries = getList(iter, "module configs"); - addAppConfig(name, entries); - } + public LoginConfig(List requestConfig, List registerConfig) throws InitializationException { + addAppConfig(UserContext.REQUEST_LOGIN_CONTEXT, requestConfig); + addAppConfig(UserContext.REGISTER_LOGIN_CONTEXT, registerConfig); } private void addAppConfig(String name, List entries) throws InitializationException { AppConfigurationEntry[] array = new AppConfigurationEntry[entries.size()]; - Iterator iter = entries.iterator(); for (int i = 0; i < array.length; i++) { - List entry = getList(iter, "{module, flag, options...}"); + List entry = Arrays.asList( StringUtils.split( (String) entries.get(i), ':')); array[i] = loadAppConfigEntry(entry); } m_appConfigs.put(name, array); @@ -166,17 +155,6 @@ return (String)temp; } - private List getList(Iterator iter, String name) - throws InitializationException { - Object temp = getObject(iter, name); - if (!(temp instanceof List)) { - throw new InitializationException - ("Expected List "+name - +", but got: \""+temp+"\""); - } - return (List)temp; - } - private Object getObject(Iterator iter, String name) throws InitializationException { if (!iter.hasNext()) { Modified: ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java 2005-01-12 21:48:04 UTC (rev 173) +++ ccm-core/trunk/src/com/arsdigita/kernel/security/SecurityConfig.java 2005-01-13 13:06:15 UTC (rev 174) @@ -21,6 +21,7 @@ import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.StringParameter; +import com.arsdigita.util.parameter.StringArrayParameter; import java.io.File; /** @@ -58,6 +59,20 @@ ("waf.pagemap.permission", Parameter.REQUIRED, "permissions/"); private final Parameter m_permSinglePage = new StringParameter ("waf.pagemap.perm_single", Parameter.REQUIRED, "permissions/one"); + private final Parameter m_requestLoginConfig = new StringArrayParameter + ("waf.login_config.request", Parameter.REQUIRED, new String[] { + "com.arsdigita.kernel.security.AdminLoginModule:sufficient", + "com.arsdigita.kernel.security.RecoveryLoginModule:sufficient", + "com.arsdigita.kernel.security.CookieLoginModule:requisite" + } + ); + private final Parameter m_registerLoginConfig = new StringArrayParameter + ("waf.login_config.register", Parameter.REQUIRED, new String[] { + "com.arsdigita.kernel.security.LocalLoginModule:requisite", + "com.arsdigita.kernel.security.UserIDLoginModule:requisite", + "com.arsdigita.kernel.security.CookieLoginModule:optional" + } + ); public SecurityConfig() { @@ -73,6 +88,8 @@ register(m_loginRedirectPage); register(m_permissionPage); register(m_permSinglePage); + register(m_requestLoginConfig); + register(m_registerLoginConfig); loadInfo(); } @@ -112,5 +129,11 @@ String getPermSinglePage() { return (String) get(m_permSinglePage); } + String[] getRequestLoginConfig() { + return (String[]) get(m_requestLoginConfig); + } + String[] getRegisterLoginConfig() { + return (String[]) get(m_registerLoginConfig); + } } |
From: <ssk...@re...> - 2005-01-12 21:57:48
|
Author: sskracic Date: 2005-01-12 22:48:04 +0100 (Wed, 12 Jan 2005) New Revision: 173 Modified: users/sskracic/bin/pgcompare.tcl Log: More testing. Modified: users/sskracic/bin/pgcompare.tcl =================================================================== --- users/sskracic/bin/pgcompare.tcl 2005-01-12 21:44:58 UTC (rev 172) +++ users/sskracic/bin/pgcompare.tcl 2005-01-12 21:48:04 UTC (rev 173) @@ -1,7 +1,7 @@ #! /usr/bin/tclsh # -# $Url$ -# $Id: pgcompare.tcl 171 2005-01-12 21:41:24Z sskracic $ +# $URL$ +# $Id$ # proc has_option {opt} { Property changes on: users/sskracic/bin/pgcompare.tcl ___________________________________________________________________ Name: svn:keywords - Id,Url + Id URL |
From: <ssk...@re...> - 2005-01-12 21:54:51
|
Author: sskracic Date: 2005-01-12 22:44:58 +0100 (Wed, 12 Jan 2005) New Revision: 172 Modified: users/sskracic/bin/pgcompare.tcl Log: Another test. Modified: users/sskracic/bin/pgcompare.tcl =================================================================== --- users/sskracic/bin/pgcompare.tcl 2005-01-12 21:41:24 UTC (rev 171) +++ users/sskracic/bin/pgcompare.tcl 2005-01-12 21:44:58 UTC (rev 172) @@ -1,6 +1,7 @@ #! /usr/bin/tclsh # -# $Id$ +# $Url$ +# $Id: pgcompare.tcl 171 2005-01-12 21:41:24Z sskracic $ # proc has_option {opt} { Property changes on: users/sskracic/bin/pgcompare.tcl ___________________________________________________________________ Name: svn:keywords - Id + Id,Url |