From 5b5564c5701c565f48c3dd6021d74cf383500627 Mon Sep 17 00:00:00 2001 From: pb Date: Tue, 21 Feb 2012 01:10:10 +0000 Subject: [PATCH] =?UTF-8?q?Nachtr=C3=A4ge,=20insbesondere=20web.xml=20f.?= =?UTF-8?q?=20ldn-aplaws.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@1519 8810af33-2d31-482b-a856-94f89814c4df --- .../cms/contentassets/RelatedLink.java | 12 +++ .../src/com/arsdigita/cms/ServiceServlet.java | 4 +- .../src/com/arsdigita/mail/MailConfig.java | 38 ++++++-- .../src/com/arsdigita/web/Application.java | 27 ++++-- ccm-ldn-aplaws/bundles/custom/cfg/web.xml | 71 +++++++++++--- ccm-ldn-aplaws/bundles/demo/cfg/web.xml | 89 +++++++++++------ ccm-ldn-aplaws/bundles/devel/cfg/web.xml | 69 +++++++++++--- ccm-ldn-aplaws/bundles/extended/cfg/web.xml | 95 +++++++++++++------ ccm-ldn-aplaws/bundles/standard/cfg/web.xml | 94 +++++++++++++----- ccm-sci-bundle/bundles/devel/cfg/web-sci.xml | 12 ++- 10 files changed, 378 insertions(+), 133 deletions(-) diff --git a/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/RelatedLink.java b/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/RelatedLink.java index 0f5f2b138..d9eb0fa30 100755 --- a/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/RelatedLink.java +++ b/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/RelatedLink.java @@ -175,6 +175,18 @@ public class RelatedLink extends Link { } + /** + * Convenient (compatiblility) method to retrieve related links for a + * given content item without a specific name for the link list). + * + * @param item The item to return links for + * @param name Name of the link list + * @return + */ + public static DataCollection getRelatedLinks(ContentItem item) { + return getRelatedLinks(item,"NONE"); + } + /** * Retrieves related links for a given content item * diff --git a/ccm-cms/src/com/arsdigita/cms/ServiceServlet.java b/ccm-cms/src/com/arsdigita/cms/ServiceServlet.java index 6385cc856..16e5f84b0 100644 --- a/ccm-cms/src/com/arsdigita/cms/ServiceServlet.java +++ b/ccm-cms/src/com/arsdigita/cms/ServiceServlet.java @@ -52,7 +52,7 @@ import org.xml.sax.helpers.DefaultHandler; * into a cache of services on a request by request basis (lazy loading). * * @author Peter Boy - * @version $Id: WorkspaceServlet.java 2161 2011-02-02 00:16:13Z pboy $ + * @version $Id: ServiceServlet.java 2161 2011-02-02 00:16:13Z pboy $ */ public class ServiceServlet extends BaseApplicationServlet { @@ -113,7 +113,7 @@ public class ServiceServlet extends BaseApplicationServlet { /** * Implements the (abstract) doService method of BaseApplicationServlet to - * create the Worspace page. + * create the perform the services. * * @see com.arsdigita.web.BaseApplicationServlet#doService * (HttpServletRequest, HttpServletResponse, Application) diff --git a/ccm-core/src/com/arsdigita/mail/MailConfig.java b/ccm-core/src/com/arsdigita/mail/MailConfig.java index 4670f23b9..53856c936 100755 --- a/ccm-core/src/com/arsdigita/mail/MailConfig.java +++ b/ccm-core/src/com/arsdigita/mail/MailConfig.java @@ -58,6 +58,10 @@ public final class MailConfig extends AbstractConfig { ("waf.mail.send_html_mail", Parameter.OPTIONAL, Boolean.FALSE); + /** + * Constructor registers the parameter ands loads values from config file. + * + */ public MailConfig() { register(m_javamail); register(m_debug); @@ -88,6 +92,10 @@ public final class MailConfig extends AbstractConfig { return m_props; } + /** + * + * @return + */ public String getDefaultFrom() { String from = (String) get(m_defaultFrom); if (null == from) @@ -96,15 +104,35 @@ public final class MailConfig extends AbstractConfig { return from; } + /** + * + * @return + */ public boolean isDebug() { return get(m_debug).equals(Boolean.TRUE); } + /** + * determine whether messages with mime type text/html + * should be sent as html emails (with plain text alternative) or + * just sent as translated plain text + * @return + */ + public boolean sendHTMLMessageAsHTMLEmail () { + return ((Boolean)get(m_sendHTML)).booleanValue(); + } + + + + /** + * + */ private static class PropertyFileParameter extends URLParameter { PropertyFileParameter(String name, int multiplicity, Object defaalt) { super(name, multiplicity, defaalt); } + @Override protected void doValidate(Object value, ErrorList errors) { super.doValidate(value, errors); @@ -126,14 +154,4 @@ public final class MailConfig extends AbstractConfig { } } - /** - * determine whether messages with mime type text/html - * should be sent as html emails (with plain text alternative) or - * just sent as translated plain text - * @return - */ - public boolean sendHTMLMessageAsHTMLEmail () { - return ((Boolean)get(m_sendHTML)).booleanValue(); - } - } diff --git a/ccm-core/src/com/arsdigita/web/Application.java b/ccm-core/src/com/arsdigita/web/Application.java index 1a24cf88f..f17c378e5 100755 --- a/ccm-core/src/com/arsdigita/web/Application.java +++ b/ccm-core/src/com/arsdigita/web/Application.java @@ -385,7 +385,13 @@ public class Application extends Resource { return (Application) result; } - // Can return null. + /** + * + * Can return null. + * @param siteNode + * @return + * @deprecated + */ public static Application retrieveApplicationForSiteNode (SiteNode siteNode) { DataQuery query = SessionManager.getSession().retrieveQuery @@ -737,18 +743,20 @@ public class Application extends Resource { /** * Returns a canonical application URL. This is a utility method * that constructs a URL fragment (just the path relative to the - * protocol and server) by trimming the with both leading and - * trailing slashes. + * protocol and server) by trimming white spaces and the ensuring both + * leading and trailing slashes. * */ public static String getCanonicalURL(String url) { - // Remove whitespace - url = url.trim(); + + String canonicalURL; + url = url.trim(); // Remove whitespace // Verify leading and trailing characters - String canonicalURL = url.startsWith(SLASH) ? url : (SLASH + url); + canonicalURL = url.startsWith(SLASH) ? url : (SLASH + url); + canonicalURL = url.endsWith(SLASH) ? canonicalURL : (canonicalURL + SLASH); - return url.endsWith(SLASH) ? canonicalURL : (canonicalURL + SLASH); + return canonicalURL ; } public String getContextPath() { @@ -782,6 +790,11 @@ public class Application extends Resource { * /ccm-applicationName/files/* * * + * NOTE: According to Servlet API the path always starts with a leading '/' + * and includes either the servlet name or a path to the servlet, but does + * not include any extra path information or a query string. Returns an + * empry string ("") is the servlet used was matched using the "/*" pattern. + * * @return path name to the applications servlet/JSP */ public String getServletPath() { diff --git a/ccm-ldn-aplaws/bundles/custom/cfg/web.xml b/ccm-ldn-aplaws/bundles/custom/cfg/web.xml index 4bbeef61a..614bd934b 100755 --- a/ccm-ldn-aplaws/bundles/custom/cfg/web.xml +++ b/ccm-ldn-aplaws/bundles/custom/cfg/web.xml @@ -123,6 +123,26 @@ com.arsdigita.versioning.VersioningServlet + + webdevsupport + com.arsdigita.webdevsupport.WebDevSupportServlet + + + + webadmin + com.arsdigita.ui.admin.AdminServlet + + + + webadmin-sitemap + com.arsdigita.ui.sitemap.SiteMapServlet + + + + webadmin-permissions + com.arsdigita.ui.permissions.PermissionsServlet + + oid-redirect com.arsdigita.web.OIDRedirectServlet @@ -158,6 +178,7 @@ com.arsdigita.cms.dispatcher.TemplateXSLServlet + TextOnlyServlet Text Only Servlet @@ -205,11 +226,11 @@ - portal-files + portalworkspace-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-portal + /templates/ccm-portalworkspace @@ -231,20 +252,20 @@ com.arsdigita.dispatcher.PortletTypeXSLServlet - + - rss-files + rssfeed-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-rss + /templates/ccm-rssfeed file-resolver - com.arsdigita.london.rss.RSSFileResolver + com.arsdigita.rssfeed.RSSFileResolver - + @@ -355,8 +376,8 @@ - portal-files - /ccm-ldn-portal/files/* + portalworkspace-files + /ccm-portalworkspace/files/* @@ -364,11 +385,12 @@ /ccm-navigation/files/* - + - rss-files - /ccm-ldn-rss/files/* + rssfeed-files + /ccm-rssfeed/files/* + @@ -437,7 +459,7 @@ legacy-adapter - /themes/servlet/legacy-adapter/* + /templates/servlet/legacy-adapter/* @@ -455,6 +477,26 @@ /versioning/* + + webdevsupport + /webdevsupport/* + + + + webadmin + /admin/* + + + + webadmin-sitemap + /admin-sitemap/* + + + + webadmin-permissions + /admin-permissions/* + + oid-redirect /redirect/* @@ -477,7 +519,7 @@ content-item-xsl - /themes/servlet/content-item/* + /templates/servlet/content-item/* @@ -500,7 +542,6 @@ /print/* - diff --git a/ccm-ldn-aplaws/bundles/demo/cfg/web.xml b/ccm-ldn-aplaws/bundles/demo/cfg/web.xml index ea98f8a28..771eeab52 100755 --- a/ccm-ldn-aplaws/bundles/demo/cfg/web.xml +++ b/ccm-ldn-aplaws/bundles/demo/cfg/web.xml @@ -27,10 +27,7 @@ subsite - /ccm/* - @@ -98,6 +95,26 @@ com.arsdigita.versioning.VersioningServlet + + webdevsupport + com.arsdigita.webdevsupport.WebDevSupportServlet + + + + webadmin + com.arsdigita.ui.admin.AdminServlet + + + + webadmin-sitemap + com.arsdigita.ui.sitemap.SiteMapServlet + + + + webadmin-permissions + com.arsdigita.ui.permissions.PermissionsServlet + + oid-redirect com.arsdigita.web.OIDRedirectServlet @@ -180,14 +197,12 @@ - - - portal-files + portalworkspace-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-portal + /templates/ccm-portalworkspace @@ -209,20 +224,20 @@ com.arsdigita.dispatcher.PortletTypeXSLServlet - + - rss-files + rssfeed-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-rss + /templates/ccm-rssfeed file-resolver - com.arsdigita.london.rss.RSSFileResolver + com.arsdigita.rssfeed.RSSFileResolver - + @@ -281,33 +296,33 @@ - + theme-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-theme + /templates/ccm-themedirector ThemeDownload - com.arsdigita.london.theme.dispatcher.ThemeDownloadServlet + com.arsdigita.themedirector.dispatcher.ThemeDownloadServlet ThemePreviewServlet Servlet to allow admins to preview look/feel - com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet + com.arsdigita.themedirector.dispatcher.InternalThemePrefixerServlet prefix /theme - + + - rss-files - /ccm-ldn-rss/files/* + rssfeed-files + /ccm-rssfeed/files/* + @@ -380,7 +396,7 @@ - + theme-files /theme-files/* @@ -395,7 +411,7 @@ ThemePreviewServlet /theme/* - + diff --git a/ccm-ldn-aplaws/bundles/devel/cfg/web.xml b/ccm-ldn-aplaws/bundles/devel/cfg/web.xml index 509bcaced..ebbf50373 100755 --- a/ccm-ldn-aplaws/bundles/devel/cfg/web.xml +++ b/ccm-ldn-aplaws/bundles/devel/cfg/web.xml @@ -123,6 +123,26 @@ com.arsdigita.versioning.VersioningServlet + + webdevsupport + com.arsdigita.webdevsupport.WebDevSupportServlet + + + + webadmin + com.arsdigita.ui.admin.AdminServlet + + + + webadmin-sitemap + com.arsdigita.ui.sitemap.SiteMapServlet + + + + webadmin-permissions + com.arsdigita.ui.permissions.PermissionsServlet + + oid-redirect com.arsdigita.web.OIDRedirectServlet @@ -205,11 +225,11 @@ - portal-files + portalworkspace-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-portal + /templates/ccm-portalworkspace @@ -231,20 +251,20 @@ com.arsdigita.dispatcher.PortletTypeXSLServlet - + - rss-files + rssfeed-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-rss + /templates/ccm-rssfeed file-resolver - com.arsdigita.london.rss.RSSFileResolver + com.arsdigita.rssfeed.RSSFileResolver - + @@ -355,8 +375,8 @@ - portal-files - /ccm-ldn-portal/files/* + portalworkspace-files + /ccm-portalworkspace/files/* @@ -364,11 +384,12 @@ /ccm-navigation/files/* - + - rss-files - /ccm-ldn-rss/files/* + rssfeed-files + /ccm-rssfeed/files/* + @@ -437,7 +458,7 @@ legacy-adapter - /themes/servlet/legacy-adapter/* + /templates/servlet/legacy-adapter/* @@ -455,6 +476,26 @@ /versioning/* + + webdevsupport + /webdevsupport/* + + + + webadmin + /admin/* + + + + webadmin-sitemap + /admin-sitemap/* + + + + webadmin-permissions + /admin-permissions/* + + oid-redirect /redirect/* @@ -477,7 +518,7 @@ content-item-xsl - /themes/servlet/content-item/* + /templates/servlet/content-item/* diff --git a/ccm-ldn-aplaws/bundles/extended/cfg/web.xml b/ccm-ldn-aplaws/bundles/extended/cfg/web.xml index d8642e5c7..614bd934b 100755 --- a/ccm-ldn-aplaws/bundles/extended/cfg/web.xml +++ b/ccm-ldn-aplaws/bundles/extended/cfg/web.xml @@ -32,12 +32,12 @@ shortcuts - com.arsdigita.london.shortcuts.ShortcutFilter + com.arsdigita.shortcuts.ShortcutFilter subsite - com.arsdigita.london.subsite.SubsiteFilter + com.arsdigita.subsite.SubsiteFilter - portal-files + portalworkspace-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-portal + /templates/ccm-portalworkspace @@ -231,20 +252,20 @@ com.arsdigita.dispatcher.PortletTypeXSLServlet - + - rss-files + rssfeed-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-rss + /templates/ccm-rssfeed file-resolver - com.arsdigita.london.rss.RSSFileResolver + com.arsdigita.rssfeed.RSSFileResolver - + @@ -271,26 +292,26 @@ - + shortcuts-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-shortcuts + /templates/ccm-shortcuts - + subsite-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-subsite + /templates/ccm-subsite - + @@ -355,8 +376,8 @@ - portal-files - /ccm-ldn-portal/files/* + portalworkspace-files + /ccm-portalworkspace/files/* @@ -364,11 +385,12 @@ /ccm-navigation/files/* - + - rss-files - /ccm-ldn-rss/files/* + rssfeed-files + /ccm-rssfeed/files/* + @@ -382,18 +404,18 @@ - + shortcuts-files - /ccm-ldn-shortcuts/files/* + /ccm-shortcuts/files/* - + subsite-files - /ccm-ldn-subsite/files/* + /ccm-subsite/files/* - + @@ -437,7 +459,7 @@ legacy-adapter - /themes/servlet/legacy-adapter/* + /templates/servlet/legacy-adapter/* @@ -455,6 +477,26 @@ /versioning/* + + webdevsupport + /webdevsupport/* + + + + webadmin + /admin/* + + + + webadmin-sitemap + /admin-sitemap/* + + + + webadmin-permissions + /admin-permissions/* + + oid-redirect /redirect/* @@ -477,7 +519,7 @@ content-item-xsl - /themes/servlet/content-item/* + /templates/servlet/content-item/* @@ -500,7 +542,6 @@ /print/* - diff --git a/ccm-ldn-aplaws/bundles/standard/cfg/web.xml b/ccm-ldn-aplaws/bundles/standard/cfg/web.xml index 52bfcb18f..614bd934b 100755 --- a/ccm-ldn-aplaws/bundles/standard/cfg/web.xml +++ b/ccm-ldn-aplaws/bundles/standard/cfg/web.xml @@ -32,12 +32,12 @@ shortcuts - com.arsdigita.london.shortcuts.ShortcutFilter + com.arsdigita.shortcuts.ShortcutFilter subsite - com.arsdigita.london.subsite.SubsiteFilter + com.arsdigita.subsite.SubsiteFilter - portal-files + portalworkspace-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-portal + /templates/ccm-portalworkspace @@ -231,20 +252,20 @@ com.arsdigita.dispatcher.PortletTypeXSLServlet - + - rss-files + rssfeed-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-rss + /templates/ccm-rssfeed file-resolver - com.arsdigita.london.rss.RSSFileResolver + com.arsdigita.rssfeed.RSSFileResolver - + @@ -271,26 +292,26 @@ - + shortcuts-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-shortcuts + /templates/ccm-shortcuts - + subsite-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-subsite + /templates/ccm-subsite - + @@ -355,8 +376,8 @@ - portal-files - /ccm-ldn-portal/files/* + portalworkspace-files + /ccm-portalworkspace/files/* @@ -364,11 +385,12 @@ /ccm-navigation/files/* - + - rss-files - /ccm-ldn-rss/files/* + rssfeed-files + /ccm-rssfeed/files/* + @@ -382,18 +404,18 @@ - + shortcuts-files - /ccm-ldn-shortcuts/files/* + /ccm-shortcuts/files/* - + subsite-files - /ccm-ldn-subsite/files/* + /ccm-subsite/files/* - + @@ -437,7 +459,7 @@ legacy-adapter - /themes/servlet/legacy-adapter/* + /templates/servlet/legacy-adapter/* @@ -455,6 +477,26 @@ /versioning/* + + webdevsupport + /webdevsupport/* + + + + webadmin + /admin/* + + + + webadmin-sitemap + /admin-sitemap/* + + + + webadmin-permissions + /admin-permissions/* + + oid-redirect /redirect/* @@ -477,7 +519,7 @@ content-item-xsl - /themes/servlet/content-item/* + /templates/servlet/content-item/* diff --git a/ccm-sci-bundle/bundles/devel/cfg/web-sci.xml b/ccm-sci-bundle/bundles/devel/cfg/web-sci.xml index 8d7d2ef0d..a27f152ea 100644 --- a/ccm-sci-bundle/bundles/devel/cfg/web-sci.xml +++ b/ccm-sci-bundle/bundles/devel/cfg/web-sci.xml @@ -32,7 +32,7 @@ shortcuts - com.arsdigita.london.shortcuts.ShortcutFilter + com.arsdigita.shortcuts.ShortcutFilter @@ -52,6 +52,7 @@ --> + subsite /* @@ -177,6 +178,7 @@ com.arsdigita.cms.dispatcher.TemplateXSLServlet + TextOnlyServlet Text Only Servlet @@ -280,13 +282,13 @@ - + shortcuts-files com.arsdigita.web.ApplicationFileServlet template-path - /templates/ccm-ldn-shortcuts + /templates/ccm-shortcuts @@ -386,10 +388,10 @@ - + shortcuts-files - /ccm-ldn-shortcuts/files/* + /ccm-shortcuts/files/*