content-section jetzt legacy free application, alte public site in content-section Liste ausgeblendet, verschiedene Formatierungen und Doku-Ergänzungen.

git-svn-id: https://svn.libreccm.org/ccm/trunk@1489 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2012-02-06 01:32:59 +00:00
parent 5fb8456648
commit 9a3cced24e
110 changed files with 3533 additions and 1863 deletions

View File

@ -11,8 +11,8 @@
<ccm:requires name="ccm-navigation" version="6.6.0" relation="ge"/> <ccm:requires name="ccm-navigation" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-portalworkspace" version="6.6.1" relation="ge"/> <ccm:requires name="ccm-portalworkspace" version="6.6.1" relation="ge"/>
<ccm:requires name="ccm-subsite" version="6.6.0" relation="ge"/> <ccm:requires name="ccm-subsite" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-ldn-terms" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-ldn-search" version="6.6.0" relation="ge"/> <ccm:requires name="ccm-ldn-search" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-ldn-terms" version="6.6.0" relation="ge"/>
</ccm:dependencies> </ccm:dependencies>
<ccm:directories> <ccm:directories>

View File

@ -17,6 +17,7 @@ waf.kernel.primary_user_identifier=email
; if you activate screen_name, forum loader does not work. ; if you activate screen_name, forum loader does not work.
; waf.kernel.primary_user_identifier=screen_name ; waf.kernel.primary_user_identifier=screen_name
waf.kernel.supported_languages=de,en waf.kernel.supported_languages=de,en
waf.kernel.language_independent_items=true
; security.properties: ; security.properties:
waf.auto_registration_on=false waf.auto_registration_on=false
@ -46,7 +47,7 @@ com.arsdigita.cms.default_item_template_path=/default/aplaws-item.jsp
com.arsdigita.cms.default_template_resolver_class=com.arsdigita.subsite.dispatcher.SubsiteItemTemplateResolver com.arsdigita.cms.default_template_resolver_class=com.arsdigita.subsite.dispatcher.SubsiteItemTemplateResolver
; Configure dhtml editor for use in cms content-center ; Configure dhtml editor for use in cms content-center
; Xinha is default and should work out of the box ; Xinha is default and does work out of the box
; A CCM specific configuration file is used to prevent a mess with the standard ; A CCM specific configuration file is used to prevent a mess with the standard
; configuration, default is: ; configuration, default is:
; com.arsdigita.cms.dhtml_editor_config=Xinha.Config,/assets/xinha/CCMcmsXinhaConfig.js ; com.arsdigita.cms.dhtml_editor_config=Xinha.Config,/assets/xinha/CCMcmsXinhaConfig.js

View File

@ -141,8 +141,10 @@
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Content Types --> <!-- Content Types -->
<!-- Without known funcionality <!-- <ccm:application name="ccm-cms-types-motditem"/>
<ccm:application name="ccm-cms-types-motditem"/> --> Current code does not include any xsl templates, conent type does not
appear in the list of types in content center.
For the moment no longer supported (2012-02-06) -->
<!-- Applications --> <!-- Applications -->
<!-- currently doesn't work for unknown reason <!-- currently doesn't work for unknown reason

View File

@ -220,20 +220,20 @@
<servlet-class>com.arsdigita.dispatcher.PortletTypeXSLServlet</servlet-class> <servlet-class>com.arsdigita.dispatcher.PortletTypeXSLServlet</servlet-class>
</servlet> </servlet>
<!-- module ccm-ldn-rss - servlet declaration BEGIN --> <!-- module ccm-rssfeed - servlet declaration BEGIN -->
<servlet> <servlet>
<servlet-name>rss-files</servlet-name> <servlet-name>rssfeed-files</servlet-name>
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
<init-param> <init-param>
<param-name>template-path</param-name> <param-name>template-path</param-name>
<param-value>/templates/ccm-ldn-rss</param-value> <param-value>/templates/ccm-rssfeed</param-value>
</init-param> </init-param>
<init-param> <init-param>
<param-name>file-resolver</param-name> <param-name>file-resolver</param-name>
<param-value>com.arsdigita.london.rss.RSSFileResolver</param-value> <param-value>com.arsdigita.rssfeed.RSSFileResolver</param-value>
</init-param> </init-param>
</servlet> </servlet>
<!-- module ccm-ldn-rss - servlet declaration END --> <!-- module ccm-rssfeed - servlet declaration END -->
<!-- module ccm-ldn-search - servlet declarations BEGIN --> <!-- module ccm-ldn-search - servlet declarations BEGIN -->
<servlet> <servlet>
@ -347,11 +347,12 @@
<url-pattern>/ccm-navigation/files/*</url-pattern> <url-pattern>/ccm-navigation/files/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<!-- module ccm-ldn-rss - servlet mappings --> <!-- module ccm-rssfeed - servlet mappings BEGIN -->
<servlet-mapping> <servlet-mapping>
<servlet-name>rss-files</servlet-name> <servlet-name>rssfeed-files</servlet-name>
<url-pattern>/ccm-ldn-rss/files/*</url-pattern> <url-pattern>/ccm-rssfeed/files/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<!-- module ccm-rssfeed - servlet mappings END -->
<!-- module ccm-ldn-search - servlet mappings BEGIN --> <!-- module ccm-ldn-search - servlet mappings BEGIN -->
<servlet-mapping> <servlet-mapping>
@ -420,7 +421,7 @@
<servlet-mapping> <servlet-mapping>
<servlet-name>legacy-adapter</servlet-name> <servlet-name>legacy-adapter</servlet-name>
<url-pattern>/themes/servlet/legacy-adapter/*</url-pattern> <url-pattern>/templates/servlet/legacy-adapter/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>
@ -460,7 +461,7 @@
<servlet-mapping> <servlet-mapping>
<servlet-name>content-item-xsl</servlet-name> <servlet-name>content-item-xsl</servlet-name>
<url-pattern>/themes/servlet/content-item/*</url-pattern> <url-pattern>/templates/servlet/content-item/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>

View File

@ -17,6 +17,7 @@ waf.kernel.primary_user_identifier=email
; if you activate screen_name, forum loader does not work. ; if you activate screen_name, forum loader does not work.
; waf.kernel.primary_user_identifier=screen_name ; waf.kernel.primary_user_identifier=screen_name
waf.kernel.supported_languages=en,de waf.kernel.supported_languages=en,de
waf.kernel.language_independent_items=true
; security.properties: ; security.properties:
waf.auto_registration_on=false waf.auto_registration_on=false
@ -46,7 +47,7 @@ com.arsdigita.cms.default_item_template_path=/default/aplaws-item.jsp
com.arsdigita.cms.default_template_resolver_class=com.arsdigita.subsite.dispatcher.SubsiteItemTemplateResolver com.arsdigita.cms.default_template_resolver_class=com.arsdigita.subsite.dispatcher.SubsiteItemTemplateResolver
; Configure dhtml editor for use in cms content-center ; Configure dhtml editor for use in cms content-center
; Xinha is default and should work out of the box ; Xinha is default and does work out of the box
; A CCM specific configuration file is used to prevent a mess with the standard ; A CCM specific configuration file is used to prevent a mess with the standard
; configuration, default is: ; configuration, default is:
; com.arsdigita.cms.dhtml_editor_config=Xinha.Config,/assets/xinha/CCMcmsXinhaConfig.js ; com.arsdigita.cms.dhtml_editor_config=Xinha.Config,/assets/xinha/CCMcmsXinhaConfig.js

View File

@ -81,10 +81,10 @@
<ccm:application name="ccm-cms-publicpersonalprofile"/> <ccm:application name="ccm-cms-publicpersonalprofile"/>
<!-- LDN extension --> <!-- LDN extension -->
<!-- temporyrily excluded because configuration has to be cleared <!-- temporarily excluded because configuration issues have to be resolved
<ccm:application name="ccm-ldn-rss"/> <ccm:application name="ccm-ldn-rss"/>
-->
<ccm:application name="ccm-rssfeed"/> <ccm:application name="ccm-rssfeed"/>
-->
@ -134,16 +134,16 @@
--> -->
</ccm:build>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Libre CMS list of OBSOLETE modules --> <!-- Libre CMS list of OBSOLETE modules -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Content Types --> <!-- Content Types -->
<!-- Without known funcionality <!-- <ccm:application name="ccm-cms-types-motditem"/>
<ccm:application name="ccm-cms-types-motditem"/> --> Current code does not include any xsl templates, conent type does not
appear in the list of types in content center.
For the moment no longer supported (2012-02-06) -->
<!-- Applications --> <!-- Applications -->
<!-- currently doesn't work for unknown reason <!-- currently doesn't work for unknown reason
@ -157,11 +157,15 @@
<!-- <ccm:application name="ccm-ldn-aplaws"/> --> <!-- <ccm:application name="ccm-ldn-aplaws"/> -->
<!-- In it's current implementation very ldn / aplaws specific <!-- In it's current implementation very ldn / aplaws specific
<ccm:application name="ccm-ldn-atoz"/> <ccm:application name="ccm-ldn-atoz"/>
<ccm:application name="ccm-ldn-dublin"/> --> <ccm:application name="ccm-ldn-dublin"/>
<ccm:application name="ccm-ldn-types-contact"/>
<ccm:application name="ccm-ldn-types-esdservice"/> -->
<!-- tools will be downloaded from trunk, but does not <!-- tools will be downloaded from trunk, but does not
contain java code to be compiled! contain java code to be compiled!
<ccm:application name="tools"/> --> <ccm:application name="tools"/> -->
</ccm:build>
</ccm:project> </ccm:project>

View File

@ -220,20 +220,20 @@
<servlet-class>com.arsdigita.dispatcher.PortletTypeXSLServlet</servlet-class> <servlet-class>com.arsdigita.dispatcher.PortletTypeXSLServlet</servlet-class>
</servlet> </servlet>
<!-- module ccm-ldn-rss - servlet declaration BEGIN --> <!-- module ccm-rssfeed - servlet declaration BEGIN -->
<servlet> <servlet>
<servlet-name>rss-files</servlet-name> <servlet-name>rssfeed-files</servlet-name>
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
<init-param> <init-param>
<param-name>template-path</param-name> <param-name>template-path</param-name>
<param-value>/templates/ccm-ldn-rss</param-value> <param-value>/templates/ccm-rssfeed</param-value>
</init-param> </init-param>
<init-param> <init-param>
<param-name>file-resolver</param-name> <param-name>file-resolver</param-name>
<param-value>com.arsdigita.london.rss.RSSFileResolver</param-value> <param-value>com.arsdigita.rssfeed.RSSFileResolver</param-value>
</init-param> </init-param>
</servlet> </servlet>
<!-- module ccm-ldn-rss - servlet declaration END --> <!-- module ccm-rssfeed - servlet declaration END -->
<!-- module ccm-ldn-search - servlet declarations BEGIN --> <!-- module ccm-ldn-search - servlet declarations BEGIN -->
<servlet> <servlet>
@ -347,11 +347,12 @@
<url-pattern>/ccm-navigation/files/*</url-pattern> <url-pattern>/ccm-navigation/files/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<!-- module ccm-ldn-rss - servlet mappings --> <!-- module ccm-rssfeed - servlet mappings BEGIN -->
<servlet-mapping> <servlet-mapping>
<servlet-name>rss-files</servlet-name> <servlet-name>rssfeed-files</servlet-name>
<url-pattern>/ccm-ldn-rss/files/*</url-pattern> <url-pattern>/ccm-rssfeed/files/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<!-- module ccm-rssfeed - servlet mappings END -->
<!-- module ccm-ldn-search - servlet mappings BEGIN --> <!-- module ccm-ldn-search - servlet mappings BEGIN -->
<servlet-mapping> <servlet-mapping>
@ -420,7 +421,7 @@
<servlet-mapping> <servlet-mapping>
<servlet-name>legacy-adapter</servlet-name> <servlet-name>legacy-adapter</servlet-name>
<url-pattern>/themes/servlet/legacy-adapter/*</url-pattern> <url-pattern>/templates/servlet/legacy-adapter/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>
@ -460,7 +461,7 @@
<servlet-mapping> <servlet-mapping>
<servlet-name>content-item-xsl</servlet-name> <servlet-name>content-item-xsl</servlet-name>
<url-pattern>/themes/servlet/content-item/*</url-pattern> <url-pattern>/templates/servlet/content-item/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
package com.arsdigita.aplaws.ui; package com.arsdigita.bundle.ui;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -26,7 +26,7 @@ import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.categorization.ui.ACSObjectCategoryForm; import com.arsdigita.categorization.ui.ACSObjectCategoryForm;
import com.arsdigita.cms.CMS; import com.arsdigita.cms.CMS;
import com.arsdigita.cms.ContentItem; import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ui.authoring.*; import com.arsdigita.cms.ui.authoring.ItemCategoryForm;
import com.arsdigita.kernel.ACSObject; import com.arsdigita.kernel.ACSObject;
import com.arsdigita.london.terms.ui.ACSObjectCategoryPicker; import com.arsdigita.london.terms.ui.ACSObjectCategoryPicker;
import com.arsdigita.london.terms.ui.TermWidget; import com.arsdigita.london.terms.ui.TermWidget;

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
package com.arsdigita.aplaws.ui; package com.arsdigita.bundle.ui;
import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.Label; import com.arsdigita.bebop.Label;

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
package com.arsdigita.aplaws.ui; package com.arsdigita.bundle.ui;
import com.arsdigita.london.terms.Domain; import com.arsdigita.london.terms.Domain;
import com.arsdigita.london.terms.ui.AbstractTermItemSummary; import com.arsdigita.london.terms.ui.AbstractTermItemSummary;

View File

@ -1,7 +1,7 @@
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:define="/WEB-INF/bebop-define.tld" xmlns:define="/WEB-INF/bebop-define.tld"
xmlns:show="/WEB-INF/bebop-show.tld" xmlns:show="/WEB-INF/bebop-show.tld"
version="1.2"> version="1.2">
<!-- Anpassung sitemap-Seite, die auch Navigationsspalte und Breadcrumbs enthaelt. --> <!-- Anpassung sitemap-Seite, die auch Navigationsspalte und Breadcrumbs enthaelt. -->

View File

@ -7,7 +7,7 @@
exclude-result-prefixes="bebop cms ui aplaws xsl" exclude-result-prefixes="bebop cms ui aplaws xsl"
version="1.0"> version="1.0">
<xsl:import href="../../heirloom/apps/content-section/xsl/admin.xsl"/> <xsl:import href="../../heirloom/apps/content-section/xsl/content-admin.xsl"/>
<xsl:import href="../../heirloom/packages/bebop/xsl/dcp.xsl"/> <xsl:import href="../../heirloom/packages/bebop/xsl/dcp.xsl"/>
<xsl:import href="category-step.xsl"/> <xsl:import href="category-step.xsl"/>

View File

@ -9,8 +9,8 @@
version="1.0"> version="1.0">
<!-- IMPORT DEFINITIONS ccm-forum installed as separate web application <!-- IMPORT DEFINITIONS ccm-forum installed as separate web application
<xsl:import href="../../../../ROOT/themes/aplaws/category-step.xsl"/> <xsl:import href="../../../../ROOT/themes/static/aplaws/category-step.xsl"/>
<xsl:import href="../../../../ROOT/themes/heirloom/cms/admin/category-step/category-step.xsl"/> <xsl:import href="../../../../ROOT/themes/heirloom/packages/cms/admin/category-step/category-step.xsl"/>
--> -->
<!-- IMPORT DEFINITIONS ccm-forum installed into the main CCM webapp <!-- IMPORT DEFINITIONS ccm-forum installed into the main CCM webapp
--> -->

View File

@ -8,16 +8,9 @@
exclude-result-prefixes="xsl bebop nav search portal forum cms" exclude-result-prefixes="xsl bebop nav search portal forum cms"
version="1.0"> version="1.0">
<!-- IMPORT DEFINITIONS ccm-forum installed as separate web application <xsl:import href="../../../packages/bebop/xsl/bebop.xsl" />
<xsl:import href="../../../../ROOT/themes/heirloom/packages/bebop/xsl/bebop.xsl" /> <xsl:import href="../../../packages/ui/xsl/ui.xsl" />
<xsl:import href="../../../../ROOT/themes/heirloom/packages/ui/xsl/ui.xsl" /> <xsl:import href="../../../packages/bebop/xsl/bebop.xsl" />
<xsl:import href="../../../../ROOT/themes/heirloom/packages/bebop/xsl/bebop.xsl" />
-->
<!-- IMPORT DEFINITIONS ccm-forum installed into the main CCM webapp
-->
<xsl:import href="../../../packages/bebop/xsl/bebop.xsl" />
<xsl:import href="../../../packages/ui/xsl/ui.xsl" />
<xsl:import href="../../../packages/bebop/xsl/bebop.xsl" />
<xsl:import href="lib/header.xsl" /> <xsl:import href="lib/header.xsl" />
<xsl:import href="lib/lib.xsl" /> <xsl:import href="lib/lib.xsl" />

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:forum="http://www.arsdigita.com/forum/1.0" <xsl:stylesheet xmlns:forum="http://www.arsdigita.com/forum/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@ -1303,5 +1304,3 @@
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0"
xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0" xmlns:ui="http://www.arsdigita.com/ui/1.0"
xmlns:ui="http://www.arsdigita.com/ui/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0"
xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:nav="http://ccm.redhat.com/navigation"
xmlns:nav="http://ccm.redhat.com/navigation" xmlns:terms="http://xmlns.redhat.com/london/terms/1.0"
xmlns:terms="http://xmlns.redhat.com/london/terms/1.0" exclude-result-prefixes="xsl bebop aplaws ui nav cms terms"
exclude-result-prefixes="xsl bebop aplaws ui nav cms terms" version="1.0">
version="1.0">
<xsl:import href="../types/ContentTypes.xsl"/> <xsl:import href="../types/ContentTypes.xsl"/>
@ -164,7 +163,7 @@
<a href="/copyright" title="copyright">copyright</a> <a href="/copyright" title="copyright">copyright</a>
<xsl:text disable-output-escaping="yes">&amp;nbsp;|&amp;nbsp;</xsl:text> <xsl:text disable-output-escaping="yes">&amp;nbsp;|&amp;nbsp;</xsl:text>
<a href="/disclaimer" title="disclaimer and privacy statement" accesskey="8">disclaimer and privacy statement</a> <a href="/disclaimer" title="disclaimer and privacy statement" accesskey="8">disclaimer and privacy statement</a>
<xsl:text disable-output-escaping="yes">&amp;nbsp;|&amp;</xsl:text> <xsl:text disable-output-escaping="yes">&amp;nbsp;|&amp;nbsp;</xsl:text>
<a href="/contact" title="contact" accesskey="9">contact</a> <a href="/contact" title="contact" accesskey="9">contact</a>
<xsl:text disable-output-escaping="yes">&amp;nbsp;|&amp;nbsp;</xsl:text> <xsl:text disable-output-escaping="yes">&amp;nbsp;|&amp;nbsp;</xsl:text>
<a href="/accessibility" title="accessibility statement" accesskey="0">accessibility</a> <a href="/accessibility" title="accessibility statement" accesskey="0">accessibility</a>
@ -188,13 +187,6 @@
</xsl:template> </xsl:template>
<xsl:template name="pageContent"> <xsl:template name="pageContent">
<a class="intLink" name="top" /> <a class="intLink" name="top" />
<xsl:choose> <xsl:choose>
@ -203,6 +195,8 @@
<xsl:apply-templates select="cms:contentPanel/cms:item"/> <xsl:apply-templates select="cms:contentPanel/cms:item"/>
<xsl:call-template name="fileAttachments" /> <xsl:call-template name="fileAttachments" />
<xsl:call-template name="associatedLinks" /> <xsl:call-template name="associatedLinks" />
<font family="arial">
</font>
</xsl:when> </xsl:when>
<!-- A-Z --> <!-- A-Z -->
<xsl:when test="cms:alphabetNavigation"> <xsl:when test="cms:alphabetNavigation">

View File

@ -1,11 +1,11 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:admin="http://www.arsdigita.com/admin-ui/1.0" xmlns:admin="http://www.arsdigita.com/admin-ui/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0" xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0" xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0"
exclude-result-prefixes="xsl admin bebop portal portlet" exclude-result-prefixes="xsl admin bebop portal portlet"
version="1.0"> version="1.0">
<xsl:param name="internal-theme"/> <xsl:param name="internal-theme"/>

View File

@ -1,23 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:admin="http://www.arsdigita.com/admin-ui/1.0" xmlns:admin="http://www.arsdigita.com/admin-ui/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0" xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0" xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0"
exclude-result-prefixes="xsl admin bebop portal portlet" exclude-result-prefixes="xsl admin bebop portal portlet"
version="1.0"> version="1.0">
<xsl:import href="login-portlet.xsl"/>
<xsl:import href="directory-portlet.xsl"/>
<xsl:import href="content-sections-portlet.xsl"/>
<xsl:import href="time-of-day-portlet.xsl"/>
<xsl:import href="freeform-html-portlet.xsl"/>
<xsl:import href="rss-feed-portlet.xsl"/>
<xsl:import href="tasklist-portlet.xsl"/>
<xsl:import href="application-directory-portlet.xsl"/>
<xsl:import href="workspace-directory-portlet.xsl"/>
<xsl:import href="content-item-portlet.xsl"/>
<xsl:import href="login-portlet.xsl"/>
<xsl:import href="directory-portlet.xsl"/>
<xsl:import href="content-sections-portlet.xsl"/>
<xsl:import href="time-of-day-portlet.xsl"/>
<xsl:import href="freeform-html-portlet.xsl"/>
<xsl:import href="rss-feed-portlet.xsl"/>
<xsl:import href="tasklist-portlet.xsl"/>
<xsl:import href="application-directory-portlet.xsl"/>
<xsl:import href="workspace-directory-portlet.xsl"/>
<xsl:import href="content-item-portlet.xsl"/>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -1,12 +1,11 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:admin="http://www.arsdigita.com/admin-ui/1.0"
xmlns:admin="http://www.arsdigita.com/admin-ui/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0" xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0"
xmlns:portlet="http://www.uk.arsdigita.com/portlet/1.0" exclude-result-prefixes="xsl admin bebop portal portlet"
exclude-result-prefixes="xsl admin bebop portal portlet" version="1.0">
version="1.0">
<xsl:template match="portlet:timeOfDay"> <xsl:template match="portlet:timeOfDay">
<xsl:value-of select="@date"/> <xsl:value-of select="@date"/>

View File

@ -40,7 +40,7 @@
<xsl:call-template name="CT_Event_graphics"/> <xsl:call-template name="CT_Event_graphics"/>
</xsl:template> </xsl:template>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SimpleAddress' and not(@useContext = 'itemAdminSummary')]"> <xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SimpleAddress' and not(@useContext = 'itemAdminSummary')]">
<xsl:call-template name="CT_Address_graphics"/> <xsl:call-template name="CT_SimpleAddress_graphics"/>
</xsl:template> </xsl:template>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Agenda' and not(@useContext = 'itemAdminSummary')]"> <xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Agenda' and not(@useContext = 'itemAdminSummary')]">
<xsl:call-template name="CT_Agenda_graphics"/> <xsl:call-template name="CT_Agenda_graphics"/>

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0"

View File

@ -20,5 +20,13 @@
</ccm:contacts> </ccm:contacts>
<ccm:description> <ccm:description>
The Message of the Day Item Content Type for the Red Hat CCM CMS. The Message of the Day Item Content Type for the Red Hat CCM CMS.
It is supposed to provide an entry field for a message of the day test and
an associated file, presumably downloadable. Presentation logic unkown.
Status Note:
The current code lacks any xsl template. The content type does not appear
in the list of content types in content center. So it is currently
unsupported.
</ccm:description> </ccm:description>
</ccm:application> </ccm:application>

View File

@ -0,0 +1,18 @@
<dispatcher-configuration>
<url-mapping>
<url></url>
<page-class>com.arsdigita.cms.ui.CMSPageWorkspacePage</page-class>
</url-mapping>
<url-mapping>
<url>index/</url>
<page-class>com.arsdigita.cms.ui.CMSPageWorkspacePage</page-class>
</url-mapping>
<url-mapping>
<url>searchredirect/</url>
<page-class>com.arsdigita.cms.ui.SearchResultRedirector</page-class>
</url-mapping>
<url-mapping>
<url>item-search/</url>
<page-class>com.arsdigita.cms.ui.ItemSearchPage</page-class>
</url-mapping>
</dispatcher-configuration>

View File

@ -470,22 +470,39 @@ public final class CMSConfig extends AbstractConfig {
* SortKey|Alphabetical is initialized in constructor! See below. * SortKey|Alphabetical is initialized in constructor! See below.
*/ */
private final Parameter m_categoryTreeOrdering = private final Parameter m_categoryTreeOrdering =
new EnumerationParameter( new EnumerationParameter(
"com.arsdigita.cms.category_tree_order", "com.arsdigita.cms.category_tree_order",
Parameter.OPTIONAL, Parameter.OPTIONAL,
Category.SORT_KEY); Category.SORT_KEY);
/** /**
* Allow content creation in section listing. Allows you to turn off * Allow content creation in Workspace (content center) section listing.
* the ability to create content in the section listing * Allows you to turn off the ability to create content in the section listing
*/ */
private final Parameter m_allowContentCreateInSectionListing = private final Parameter m_allowContentCreateInSectionListing =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.allow_content_create_in_section_listing", "com.arsdigita.cms.allow_content_create_in_section_listing",
Parameter.REQUIRED, Parameter.REQUIRED,
new Boolean(true)); new Boolean(true));
/**
* Hide the legacy public site link in Workspace (content center) section
* listing. Legacy public site display is replaced by navigation based
* presentation (or by portlets) and should be hidden in the admin ui
* be default now.
*/
private final Parameter m_hideLegacyPublicSiteLink =
new BooleanParameter(
"com.arsdigita.cms.hide_legacy_public_site_link",
Parameter.REQUIRED,
new Boolean(true));
// /////////////////////////////////////////// // ///////////////////////////////////////////
// Notification related parameters // Notification related parameters
// /////////////////////////////////////////// // ///////////////////////////////////////////
/** /**
* Delete Sent Workflow Notifications. Decide whether successfully sent * Delete Sent Workflow Notifications. Decide whether successfully sent
* notifications and messages should be deleted from the system * notifications and messages should be deleted from the system
@ -670,6 +687,7 @@ public final class CMSConfig extends AbstractConfig {
register(m_hasContactsAuthoringStep); register(m_hasContactsAuthoringStep);
register(m_hideTextAssetUploadFile); register(m_hideTextAssetUploadFile);
register(m_allowContentCreateInSectionListing); register(m_allowContentCreateInSectionListing);
register(m_hideLegacyPublicSiteLink);
// Content Center (Workspace) config related parameters // Content Center (Workspace) config related parameters
register(m_contentCenterMap); register(m_contentCenterMap);
@ -1079,6 +1097,14 @@ public final class CMSConfig extends AbstractConfig {
booleanValue(); booleanValue();
} }
/**
* Hide the (no longer used) legacy public site link in Workspace
* (content center) section listing, true by default.
*/
public final boolean getHideLegacyPublicSiteLink() {
return ((Boolean) get(m_hideLegacyPublicSiteLink)).booleanValue();
}
public String getItemSearchDefaultTab() { public String getItemSearchDefaultTab() {
return (String) get(m_itemSearchDefaultTab); return (String) get(m_itemSearchDefaultTab);
} }

View File

@ -250,47 +250,10 @@ public class ContentSection extends Application {
set(NAME, name); set(NAME, name);
} }
// Left-over from content section as old-style application based on kernel
// PackageType and Sitenode instead on new style web.Application.
// Retained for reference purpose until the packages Workspace and Service are
// migrated to new style application as well.
// /**
// * Get the package instance for this content section. Each section is
// * associated with exactly one package instance.
// *
// * @return the package instance associated with this content section.
// * @post return != null
// */
// public PackageInstance getPackageInstance() {
// DataObject pkg = (DataObject) get(PACKAGE);
// Assert.exists(pkg, "package instance");
// return new PackageInstance(pkg);
// }
//
// /**
// * Set the package instance for this content section.
// *
// * @param pkg The package instance
// * @pre ( pkg != null )
// */
// protected void setPackageInstance(PackageInstance pkg) {
// Assert.exists(pkg, "package instance");
// setAssociation(PACKAGE, pkg);
// }
//
// /**
// * Fetch the site node on which the content section is mounted.
// * A content section should be mounted on exactly one site node. If it
// * is mounted on more than one site node, only the first site node will
// * be returned.
// *
// * @return The site node
// */
// public SiteNode getSiteNode() {
// return getPackageInstance().getDefaultMountPoint();
// }
/** /**
* Finds the location of the content section. * Finds the location of the content section from the HTTP request. Therefore
* it contains the static prefix (if one is configured, "ccm" by default)
* and must not be used to construct an url for internal links!
* *
* @return The URL of the site node on which the content section is mounted. * @return The URL of the site node on which the content section is mounted.
* This URL includes the webapp context path. * This URL includes the webapp context path.
@ -316,7 +279,10 @@ public class ContentSection extends Application {
} }
/** /**
* Gets the full path of the content section. * Gets the full path of the content section from the dispatcher
*
* Currently a guess: It includes the static dispatcher prefix
* (if any is configured, "ccm" by default).
* *
* @return returns the path of this application including the dispatcher path. * @return returns the path of this application including the dispatcher path.
* The path does not end in a slash. Does not return null * The path does not end in a slash. Does not return null
@ -325,16 +291,6 @@ public class ContentSection extends Application {
return URL.getDispatcherPath() + getPath(); return URL.getDispatcherPath() + getPath();
} }
// Left over, see above
// public final String getPath() {
// final String path = getSiteNode().getURL();
//
// if (Assert.isEnabled()) {
// Assert.isTrue(path.endsWith("/"));
// }
//
// return path.substring(0, path.length() - 1);
// }
/** /**
* Get the folder in which all draft items are contained, directly or * Get the folder in which all draft items are contained, directly or
* indirectly. This folder will in general contain different kinds of * indirectly. This folder will in general contain different kinds of

View File

@ -33,6 +33,7 @@ import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.globalization.GlobalizationHelper; import com.arsdigita.globalization.GlobalizationHelper;
import com.arsdigita.kernel.ACSObjectCache; import com.arsdigita.kernel.ACSObjectCache;
import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.KernelContext;
import com.arsdigita.kernel.Party; import com.arsdigita.kernel.Party;
import com.arsdigita.kernel.User; import com.arsdigita.kernel.User;
import com.arsdigita.persistence.AbstractTransactionListener; import com.arsdigita.persistence.AbstractTransactionListener;
@ -41,8 +42,10 @@ import com.arsdigita.persistence.Session;
import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.SessionManager;
import com.arsdigita.persistence.TransactionContext; import com.arsdigita.persistence.TransactionContext;
import com.arsdigita.util.Assert; import com.arsdigita.util.Assert;
import com.arsdigita.util.Classes;
import com.arsdigita.versioning.Versions; import com.arsdigita.versioning.Versions;
import com.arsdigita.web.Application; import com.arsdigita.web.Application;
import com.arsdigita.web.ApplicationFileResolver;
import com.arsdigita.web.BaseApplicationServlet; import com.arsdigita.web.BaseApplicationServlet;
import com.arsdigita.web.LoginSignal; import com.arsdigita.web.LoginSignal;
import com.arsdigita.web.Web; import com.arsdigita.web.Web;
@ -55,62 +58,129 @@ import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.servlet.RequestDispatcher; import javax.servlet.RequestDispatcher;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /*
* Content Section's application servlet * NOTE:
*
* Repaired ItemURLCache to save multilingual items with automatic * Repaired ItemURLCache to save multilingual items with automatic
* language negotiation. The cahce now uses the remaining url part * language negotiation. The cache now uses the remaining url part
* and the language concatinated as a hash table key. The delimiter * and the language concatinated as a hash table key. The delimiter
* is CACHE_KEY_DELIMITER. * is CACHE_KEY_DELIMITER.
*/
/*
* NOTE 2:
* In a process of refactoring from legacy compatible to legacy free applications.
* TODO:
* - replace url check using RequestContext which resolves to SiteNodeRequest
* implementation
* - Refactor content item UI bebop ApplicationPage or PageFactory instead of
* legacy infected sitenode / package dispatchers.
*/
/**
* Content Section's Application Servlet according CCM core web application
* structure {@see com.arsdigita.web.Application} implements the content
* section UI.
*
* It handles the UI for content items and delegates the UI for sections and
* folders to jsp templates.
* *
* @author unknown * @author unknown
* @author Sören Bernstein <sbernstein@quasiweb.de> * @author Sören Bernstein <sbernstein@quasiweb.de>
* @author Peter Boy <pboy@barkhof.uni-bremen.de>
*/ */
public class ContentSectionServlet extends BaseApplicationServlet { public class ContentSectionServlet extends BaseApplicationServlet {
/** Creates a s_logging category with name = full name of class */
private static final Logger s_log = private static final Logger s_log =
Logger.getLogger(ContentSectionServlet.class); Logger.getLogger(ContentSectionServlet.class);
/** Stringarray of file name patterns for index files. Should be made /** Stringarray of file name patterns for index files. */
configurable. */
private static final String[] WELCOME_FILES = new String[] { private static final String[] WELCOME_FILES = new String[] {
"index.jsp", "index.html" "index.jsp", "index.html"
}; };
/** The context (in url) for previewing items */
private ContentItemDispatcher m_disp = new ContentItemDispatcher();
public static Map s_itemResolverCache = Collections
.synchronizedMap(new HashMap());
/** cache the content items */
private static Map s_itemURLCacheMap = null;
/** The context for previewing items */
public static final String PREVIEW = "/preview"; public static final String PREVIEW = "/preview";
/** Template files */
public static final String FILE_SUFFIX = ".jsp"; public static final String FILE_SUFFIX = ".jsp";
public static final String INDEX_FILE = "/index"; public static final String INDEX_FILE = "/index";
public static final String CONTENT_ITEM = public static final String CONTENT_ITEM =
"com.arsdigita.cms.dispatcher.item"; "com.arsdigita.cms.dispatcher.item";
public static final String CONTENT_SECTION = public static final String CONTENT_SECTION =
"com.arsdigita.cms.dispatcher.section"; "com.arsdigita.cms.dispatcher.section";
public static final String XML_SUFFIX = ".xml"; public static final String XML_SUFFIX = ".xml";
public static final String XML_MODE = "xmlMode"; public static final String XML_MODE = "xmlMode";
public static final String MEDIA_TYPE = "templateContext"; public static final String MEDIA_TYPE = "templateContext";
private static boolean s_cacheItems = true;
private static final String CACHE_KEY_DELIMITER = "%"; private static final String CACHE_KEY_DELIMITER = "%";
private ContentItemDispatcher m_disp = new ContentItemDispatcher();
public static Map s_itemResolverCache = Collections
.synchronizedMap(new HashMap());
/** cache the content items */
private static Map s_itemURLCacheMap = null;
private static boolean s_cacheItems = true;
/** Path to directory containg ccm-cms template files */
private String m_templatePath;
/** Resolvers to find templages (JSP) and other stuff stored in file system.*/
private ApplicationFileResolver m_resolver;
/** /**
* Implements the service method of BaseApplicationServlet * Init method overwrites parents init to pass in optional parameters
* @see com.arsdigita.web.BaseApplicationServlet#doService * {@link com.arsdigita.web.BaseServlet}.
* (HttpServletRequest, HttpServletResponse, Application) * If not specified system wide defaults are used.
*/
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
// optional init-param named template-path from ~/WEB-INF/web.xml
String templatePath = config.getInitParameter("template-path");
if (templatePath == null) {
m_templatePath = ContentSection.getConfig().getTemplateRoot();
} else {
m_templatePath = config.getInitParameter("template-path");
}
Assert.exists(m_templatePath, String.class);
Assert.isTrue(m_templatePath.startsWith("/"),
"template-path must start with '/'");
Assert.isTrue(!m_templatePath.endsWith("/"),
"template-path must not end with '/'");
// optional init-param named file-resolver from ~/WEB-INF/web.xml
String resolverName = config.getInitParameter("file-resolver");
if (resolverName == null) {
m_resolver = Web.getConfig().getApplicationFileResolver();
} else {
m_resolver = (ApplicationFileResolver)Classes.newInstance(resolverName);
}
if (s_log.isDebugEnabled()) {
s_log.debug("Template path is " + m_templatePath +
" with resolver " + m_resolver.getClass().getName());
}
}
/**
* Implementation of parent's (abstract) doService method checks HTTP request
* to determine whether to handle a content item or other stuff which is
* delegated to jsp templates.
*
* {@see com.arsdigita.web.BaseApplicationServlet#doService
* (HttpServletRequest, HttpServletResponse, Application)}
*/ */
protected void doService( HttpServletRequest sreq, protected void doService( HttpServletRequest sreq,
HttpServletResponse sresp, HttpServletResponse sresp,
@ -118,9 +188,13 @@ public class ContentSectionServlet extends BaseApplicationServlet {
throws ServletException, IOException { throws ServletException, IOException {
ContentSection section = (ContentSection) app; ContentSection section = (ContentSection) app;
RequestContext ctx = DispatcherHelper.getRequestContext();
String requestUri = sreq.getRequestURI();
/*
* NOTE:
* Resolves currently to SiteNodeRequestContext which will be removed.
*/
RequestContext ctx = DispatcherHelper.getRequestContext();
String url = ctx.getRemainingURLPart(); // here SiteNodeRequestContext String url = ctx.getRemainingURLPart(); // here SiteNodeRequestContext
if (s_log.isInfoEnabled()) { if (s_log.isInfoEnabled()) {
@ -161,38 +235,13 @@ public class ContentSectionServlet extends BaseApplicationServlet {
if (s_log.isInfoEnabled()) { if (s_log.isInfoEnabled()) {
s_log.info("NOT serving content item"); s_log.info("NOT serving content item");
} }
/* Store content section in http request to make it available
* or admin index,jsp */
sreq.setAttribute(CONTENT_SECTION, section); sreq.setAttribute(CONTENT_SECTION, section);
String packageURL = ctx.getPageBase() + RequestDispatcher rd = m_resolver.resolve(m_templatePath,
ctx.getRemainingURLPart(); sreq, sresp, app);
if (s_log.isDebugEnabled()) {
s_log.debug("Forwarding onto file " + packageURL);
}
if (packageURL.endsWith("/")) {
for (int i = 0 ; i < WELCOME_FILES.length ; i++) {
if (s_log.isDebugEnabled()) {
s_log.debug("Trying welcome resource " +
packageURL + WELCOME_FILES[i]);
}
RequestDispatcher rd =
DispatcherHelper.getRequestContext(sreq).
getServletContext().getRequestDispatcher(packageURL + WELCOME_FILES[i]);
if (rd != null &&
DispatcherHelper.getRequestContext(sreq).
getServletContext().getResource(packageURL + WELCOME_FILES[i]) != null) {
if (s_log.isDebugEnabled()) {
s_log.debug("Got dispatcher " + rd);
}
sreq = DispatcherHelper.restoreOriginalRequest(sreq);
rd.forward(sreq,sresp);
return;
}
}
}
RequestDispatcher rd =
DispatcherHelper.getRequestContext(sreq).
getServletContext().getRequestDispatcher(packageURL);
if (rd != null) { if (rd != null) {
if (s_log.isDebugEnabled()) { if (s_log.isDebugEnabled()) {
s_log.debug("Got dispatcher " + rd); s_log.debug("Got dispatcher " + rd);
@ -200,7 +249,8 @@ public class ContentSectionServlet extends BaseApplicationServlet {
sreq = DispatcherHelper.restoreOriginalRequest(sreq); sreq = DispatcherHelper.restoreOriginalRequest(sreq);
rd.forward(sreq,sresp); rd.forward(sreq,sresp);
} else { } else {
sresp.sendError(404, packageURL + " not found on this server."); // sresp.sendError(404, packageURL + " not found on this server.");
sresp.sendError(404, requestUri + " not found on this server.");
} }
} }
} }
@ -284,6 +334,17 @@ public class ContentSectionServlet extends BaseApplicationServlet {
//use ContentItemDispatcher //use ContentItemDispatcher
m_disp.dispatch(sreq,sresp,ctx); m_disp.dispatch(sreq,sresp,ctx);
} }
/**
* Fetches the content section from the request attributes.
*
* @param request The HTTP request
* @return The content section
* @pre ( request != null )
*/
public static ContentSection getContentSection(HttpServletRequest request) {
return (ContentSection) request.getAttribute(CONTENT_SECTION);
}
/** /**
* Fetches the ItemResolver for a content section. Checks cache first. * Fetches the ItemResolver for a content section. Checks cache first.
@ -308,6 +369,9 @@ public class ContentSectionServlet extends BaseApplicationServlet {
return ir; return ir;
} }
/**
*
*/
public ContentItem getItem(ContentSection section, String url, public ContentItem getItem(ContentSection section, String url,
ItemResolver itemResolver) { ItemResolver itemResolver) {
@ -540,4 +604,25 @@ public class ContentSectionServlet extends BaseApplicationServlet {
} }
} }
/**
* Checks that the current user has permission to access the admin pages.
**/
public static boolean checkAdminAccess(HttpServletRequest request,
ContentSection section) {
User user ;
KernelContext kernelContext = Kernel.getContext();
if ( kernelContext.getParty() instanceof User ) {
user = (User) kernelContext.getParty();
} else {
// Should not happen, at this stage the user has to be logged in.
return false;
}
SecurityManager sm = new SecurityManager(section);
return sm.canAccess(user, SecurityManager.ADMIN_PAGES);
}
} }

View File

@ -175,9 +175,29 @@ public class Initializer extends CompoundInitializer {
s_log.debug("CMS.Initializer.init(DomainInitEvent) invoked"); s_log.debug("CMS.Initializer.init(DomainInitEvent) invoked");
super.init(e); super.init(e);
/* Register object instantiator for Workspace (Content Center) */
e.getFactory().registerInstantiator
(Workspace.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dobj) {
return new Workspace(dobj);
}
} );
LanguageUtil.setSupportedLanguages( LanguageUtil.setSupportedLanguages(
Kernel.getConfig().getSupportedLanguages()); Kernel.getConfig().getSupportedLanguages());
/* Register object instantiator for CMS Service */
e.getFactory().registerInstantiator
(Service.BASE_DATA_OBJECT_TYPE,
new ACSObjectInstantiator() {
@Override
public DomainObject doNewInstance(DataObject dobj) {
return new Service(dobj);
}
} );
URLService.registerFinder(ContentPage.BASE_DATA_OBJECT_TYPE, URLService.registerFinder(ContentPage.BASE_DATA_OBJECT_TYPE,
new ItemURLFinder()); new ItemURLFinder());
URLService.registerFinder(ContentBundle.BASE_DATA_OBJECT_TYPE, URLService.registerFinder(ContentBundle.BASE_DATA_OBJECT_TYPE,

View File

@ -196,40 +196,24 @@ public class Loader extends PackageLoader {
* Loads and instantiates the Workspace subpackage (content-center) in the * Loads and instantiates the Workspace subpackage (content-center) in the
* database. * database.
* It is made public to be able to invoke it from the update script * It is made public to be able to invoke it from the update script
* (e.g. 6.6.1-6.6.2). * (e.g. 6.6.1-6.6.2). We need separate steps for loading and instantiating
* because update skript require.
*/ */
public static ApplicationType loadWorkspaceApplicationType() { public static ApplicationType loadWorkspaceApplicationType() {
s_log.debug("Creating CMS Workspace..."); s_log.debug("Creating CMS Workspace...");
// Creating of Workspace package using new style c.ad.web.Application // ////////////// Current style to create app type ///////////////
// in legacy compatible mode. Needs refactoring of the Workspace package. /* Create new stype legacy compatible application type */
// In a first step these instructions replace c.ad.installer.WorkspaceInstaller ApplicationType type = ApplicationType
.createApplicationType(Workspace.PACKAGE_KEY,
Workspace.INSTANCE_NAME,
Workspace.BASE_DATA_OBJECT_TYPE);
type.setDescription("The content center workspace for content creators.");
type.setDispatcherClass(Workspace.DISPATCHER_CLASS);
type.save();
// create application type
ApplicationSetup appsetup = new ApplicationSetup(s_log);
// new style properties
appsetup.setApplicationObjectType(Workspace.BASE_DATA_OBJECT_TYPE);
appsetup.setTitle(Workspace.INSTANCE_NAME); // same as for instance
// there is only one
appsetup.setDescription("The content center workspace for content creators.");
// old style / legacy compatible properties
appsetup.setKey(Workspace.PACKAGE_KEY);
appsetup.setDispatcherClass(Workspace.DISPATCHER_CLASS);
// should not be needed anymore, stypesheets handled by StylesheetResolver
appsetup.setSingleton(true);
appsetup.setPortalApplication(false);
appsetup.setInstantiator(new ACSObjectInstantiator() {
@Override
protected DomainObject doNewInstance(DataObject dataObject) {
return new Workspace(dataObject);
}
});
ApplicationType workspaceType = appsetup.run();
workspaceType.save();
s_log.debug("CMS Workspace type created."); s_log.debug("CMS Workspace type created.");
return type;
return workspaceType;
} }
/** /**
@ -242,14 +226,14 @@ public class Loader extends PackageLoader {
// old-style package key used as url fragment where to install the instance // old-style package key used as url fragment where to install the instance
s_log.debug("Creating CMS Workspace instance ..."); s_log.debug("Creating CMS Workspace instance ...");
Workspace app = (Workspace) Application.createApplication( Workspace app = (Workspace) Application.createApplication(
workspaceType, // type Workspace.BASE_DATA_OBJECT_TYPE, // type
Workspace.PACKAGE_KEY, // url fragment Workspace.PACKAGE_KEY, // url fragment
Workspace.INSTANCE_NAME,// title Workspace.INSTANCE_NAME,// title
null); // parent null); // parent
app.setDescription("The default CMS workspace instance."); app.setDescription("The default CMS workspace instance.");
app.save(); app.save();
s_log.debug("CMS Workspace instance " + Workspace.PACKAGE_KEY + " created.");
s_log.debug("CMS Workspace instance " + Workspace.PACKAGE_KEY + " created.");
s_log.debug("Done loading CMS Workspace."); s_log.debug("Done loading CMS Workspace.");
} }
@ -269,25 +253,34 @@ public class Loader extends PackageLoader {
// In a first step these instructions replace c.ad.installer.ServiceInstaller // In a first step these instructions replace c.ad.installer.ServiceInstaller
// create application type // create application type
ApplicationSetup appsetup = new ApplicationSetup(s_log); // ApplicationSetup appsetup = new ApplicationSetup(s_log);
// new style properties // // new style properties
appsetup.setApplicationObjectType(Service.BASE_DATA_OBJECT_TYPE); // appsetup.setApplicationObjectType(Service.BASE_DATA_OBJECT_TYPE);
appsetup.setTitle(Service.INSTANCE_NAME); // same as for instance // appsetup.setTitle(Service.INSTANCE_NAME); // same as for instance
// there is only one // there is only one
appsetup.setDescription("Services to store global resources and assets."); // appsetup.setDescription("Services to store global resources and assets.");
// old style / legacy compatible properties // old style / legacy compatible properties
appsetup.setKey(Service.PACKAGE_KEY); // appsetup.setKey(Service.PACKAGE_KEY);
appsetup.setDispatcherClass(Service.DISPATCHER_CLASS); // appsetup.setDispatcherClass(Service.DISPATCHER_CLASS);
appsetup.setSingleton(true); // appsetup.setSingleton(true);
appsetup.setPortalApplication(false); // appsetup.setPortalApplication(false);
appsetup.setInstantiator(new ACSObjectInstantiator() { // appsetup.setInstantiator(new ACSObjectInstantiator() {
@Override // @Override
protected DomainObject doNewInstance(DataObject dataObject) { // protected DomainObject doNewInstance(DataObject dataObject) {
return new Service(dataObject); // return new Service(dataObject);
} // }
}); // });
ApplicationType serviceType = appsetup.run(); // ApplicationType serviceType = appsetup.run();
// serviceType.save();
// ////////////// Current style to create app type ///////////////
/* Create new stype legacy compatible application type */
ApplicationType serviceType = ApplicationType
.createApplicationType(Service.PACKAGE_KEY,
Service.INSTANCE_NAME,
Service.BASE_DATA_OBJECT_TYPE);
serviceType.setDescription("Services to store global resources and assets.");
serviceType.setDispatcherClass(Service.DISPATCHER_CLASS);
serviceType.save(); serviceType.save();
return serviceType; return serviceType;
@ -334,34 +327,12 @@ public class Loader extends PackageLoader {
// Step 1: Create content section application type // Step 1: Create content section application type
// prerequisite for concrete content-section instance creation. // prerequisite for concrete content-section instance creation.
// ////////////// Deprecated style to create app type ///////////////
// ////////////// Delete when migration process completed ///////////////
// ApplicationSetup appType = new ApplicationSetup(s_log);
// appType.setApplicationObjectType(ContentSection.BASE_DATA_OBJECT_TYPE);
// appType.setKey(ContentSection.PACKAGE_TYPE); // by default: content-section
// appType.setTitle("CMS Content Section");
// appType.setDescription("A CMS Content Section");
// appType.setPortalApplication(false);
//setup.setDispatcherClass(ContentItemDispatcher.class.getName());
// contains the xsl to generate the page
// ApplicationSetup requires an Instantiator which has to be set here /* Create new type legacy compatible application type */
// Setting it up in Initializer prior to creating the application type // ApplicationType type = ApplicationType
// doesn't work! // .createApplicationType(ContentSection.PACKAGE_TYPE,
// appType.setInstantiator(new ACSObjectInstantiator() { // "CMS Content Section",
// @Override // ContentSection.BASE_DATA_OBJECT_TYPE);
// public DomainObject doNewInstance(DataObject dataObject) {
// return new ContentSection(dataObject);
// }
// });
// appType.run();
// ////////////////////////////////////////////////////////////////////////
/* Create new stype legacy compatible application type */
ApplicationType type = ApplicationType
.createApplicationType(ContentSection.PACKAGE_TYPE,
"CMS Content Section",
ContentSection.BASE_DATA_OBJECT_TYPE);
/* Create legacy-free application type /* Create legacy-free application type
* NOTE: The wording in the title parameter of ApplicationType * NOTE: The wording in the title parameter of ApplicationType
@ -370,10 +341,10 @@ public class Loader extends PackageLoader {
* replacing blanks between words and illegal characters with an * replacing blanks between words and illegal characters with an
* hyphen and converted to lower case. * hyphen and converted to lower case.
* "Content Section" will become "content-section". */ * "Content Section" will become "content-section". */
// ApplicationType type = new ApplicationType( ApplicationType type = new ApplicationType(
// "Content Section", "Content Section",
// ContentSection.BASE_DATA_OBJECT_TYPE ); ContentSection.BASE_DATA_OBJECT_TYPE );
type.setDescription("A CMS Content Section."); type.setDescription("The CMS Content Section application.");
type.save(); type.save();
// Step 2: Load CMS specific privileges into central (core) privilege // Step 2: Load CMS specific privileges into central (core) privilege

View File

@ -45,8 +45,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* <p>Security class used for checking and granting privileges in * <p>Security class used for checking and granting privileges in CMS.</p>
* CMS.</p>
* *
* @author Michael Pih * @author Michael Pih
* @version $Id: SecurityManager.java 2161 2011-02-02 00:16:13Z pboy $ * @version $Id: SecurityManager.java 2161 2011-02-02 00:16:13Z pboy $

View File

@ -0,0 +1,148 @@
/*
* Copyright (C) 2012 Peter Boy 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;
import com.arsdigita.cms.dispatcher.SimpleCache;
import com.arsdigita.developersupport.DeveloperSupport;
import com.arsdigita.kernel.security.UserContext;
import com.arsdigita.kernel.security.Util;
import com.arsdigita.ui.login.LoginHelper;
import com.arsdigita.web.Application;
import com.arsdigita.web.BaseApplicationServlet;
import com.arsdigita.web.LoginSignal;
import com.arsdigita.web.Web;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
/**
* CMS Workspace (content-center) application servlet serves all request made
* within the Content Center application.
*
* @author Peter Boy <pboy@barkhof.uni-bremen.de>
* @version $Id: WorkspaceServlet.java 2161 2011-02-02 00:16:13Z pboy $
*/
public class WorkspaceServlet extends BaseApplicationServlet {
/**Error logging */
private static Logger s_log = Logger
.getLogger(WorkspaceServlet.class.getName());
/** The path of the file that maps resources. */
public final static String DEFAULT_MAP_FILE =
"/WEB-INF/resources/content-center-map.xml";
/** Mapping between a relative URL and the class name of a ResourceHandler.*/
private static HashMap s_pageClasses = WorkspaceSetup.getURLToClassMap();
private static HashMap s_pageURLs = WorkspaceSetup.getClassToURLMap();
/**
* Instantiated ResourceHandlers cache. This allows for lazy loading.
*/
private static SimpleCache s_pages = new SimpleCache();
// private Dispatcher m_notFoundHandler;
private ArrayList m_trailingSlashList = new ArrayList();
/**
* Implements the (abstract) doService method of BaseApplicationServlet to
* create the Worspace page.
*
* @see com.arsdigita.web.BaseApplicationServlet#doService
* (HttpServletRequest, HttpServletResponse, Application)
*/
protected void doService( HttpServletRequest sreq,
HttpServletResponse sresp,
Application app)
throws ServletException, IOException {
if (s_log.isDebugEnabled()) {
s_log.info("starting doService method");
}
DeveloperSupport.startStage("ContentCenterServlet.doService");
// Check user access.
checkUserAccess(sreq, sresp);
DeveloperSupport.endStage("ContentCenterServlet.doService");
if (s_log.isDebugEnabled()) {
s_log.info("doService method competed");
}
}
/**
* Verify that the user is logged in and is able to view the
* page. Subclasses can override this method if they need to, but
* should always be sure to call super.checkUserAccess(...)
*
* @param request The HTTP request
* @param response The HTTP response
* @param actx The request context
**/
protected void checkUserAccess(final HttpServletRequest request,
final HttpServletResponse response //,
/// final RequestContext actx
)
throws ServletException {
if (!Web.getUserContext().isLoggedIn()) {
throw new LoginSignal(request);
}
}
/**
* Redirects the client to the login page, setting the return url to
* the current request URI.
*
* @exception ServletException If there is an exception thrown while
* trying to redirect, wrap that exception in a ServletException
**/
protected void redirectToLoginPage(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException {
String url = Util.getSecurityHelper()
.getLoginURL(req)
+"?"+LoginHelper.RETURN_URL_PARAM_NAME
+"="+UserContext.encodeReturnURL(req);
try {
LoginHelper.sendRedirect(req, resp, url);
} catch (IOException e) {
s_log.error("IO Exception", e);
throw new ServletException(e.getMessage(), e);
}
}
}

View File

@ -257,8 +257,9 @@ public class CMSPage extends Page implements ResourceHandler {
* @pre m_transformer != null * @pre m_transformer != null
*/ */
public void dispatch(final HttpServletRequest request, public void dispatch(final HttpServletRequest request,
final HttpServletResponse response, final HttpServletResponse response ,
RequestContext actx) RequestContext actx
)
throws IOException, ServletException { throws IOException, ServletException {
DeveloperSupport.startStage("CMSPage.dispatch: serve page"); DeveloperSupport.startStage("CMSPage.dispatch: serve page");

View File

@ -76,7 +76,7 @@ public class ContentCenterDispatcher extends LockableImpl
* The path of the file that maps resources. * The path of the file that maps resources.
*/ */
public final static String DEFAULT_MAP_FILE = public final static String DEFAULT_MAP_FILE =
"/WEB-INF/resources/content-center-map.xml"; "/WEB-INF/resources/content-center-old-map.xml";
/** /**
* Error logging. * Error logging.
@ -138,7 +138,8 @@ public class ContentCenterDispatcher extends LockableImpl
} }
// Check user access. // Check user access.
checkUserAccess(request, response, actx); // checkUserAccess(request, response, actx);
checkUserAccess(request, response);
ResourceHandler page = getResource(url); ResourceHandler page = getResource(url);
if ( page != null ) { if ( page != null ) {
@ -171,7 +172,8 @@ public class ContentCenterDispatcher extends LockableImpl
* creating virtual directories, so that relative URLs and redirects * creating virtual directories, so that relative URLs and redirects
* work. * work.
*/ */
public void requireTrailingSlash(String url) { // public void requireTrailingSlash(String url) {
private void requireTrailingSlash(String url) {
m_trailingSlashList.add(url); m_trailingSlashList.add(url);
} }
@ -266,8 +268,9 @@ public class ContentCenterDispatcher extends LockableImpl
* @param actx The request context * @param actx The request context
**/ **/
protected void checkUserAccess(final HttpServletRequest request, protected void checkUserAccess(final HttpServletRequest request,
final HttpServletResponse response, final HttpServletResponse response // ,
final RequestContext actx) // final RequestContext actx
)
throws ServletException { throws ServletException {
if (!Web.getUserContext().isLoggedIn()) { if (!Web.getUserContext().isLoggedIn()) {
throw new LoginSignal(request); throw new LoginSignal(request);

View File

@ -25,6 +25,8 @@ import com.arsdigita.dispatcher.Dispatcher;
import com.arsdigita.dispatcher.DispatcherChain; import com.arsdigita.dispatcher.DispatcherChain;
import com.arsdigita.dispatcher.RequestContext; import com.arsdigita.dispatcher.RequestContext;
import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.KernelContext;
import com.arsdigita.kernel.SiteNode; import com.arsdigita.kernel.SiteNode;
import com.arsdigita.kernel.User; import com.arsdigita.kernel.User;
import com.arsdigita.sitenode.SiteNodeRequestContext; import com.arsdigita.sitenode.SiteNodeRequestContext;
@ -41,7 +43,7 @@ import javax.servlet.http.HttpServletResponse;
* @author Karl Goldstein (karlg@arsdigita.com) * @author Karl Goldstein (karlg@arsdigita.com)
* @version $Revision: #9 $ $DateTime: 2004/08/17 23:15:09 $ * @version $Revision: #9 $ $DateTime: 2004/08/17 23:15:09 $
* @version $Id: ContentSectionDispatcher.java 2090 2010-04-17 08:04:14Z pboy $ * @version $Id: ContentSectionDispatcher.java 2090 2010-04-17 08:04:14Z pboy $
**/ */
public class ContentSectionDispatcher implements Dispatcher { public class ContentSectionDispatcher implements Dispatcher {
public static final String CONTENT_ITEM = "com.arsdigita.cms.dispatcher.item"; public static final String CONTENT_ITEM = "com.arsdigita.cms.dispatcher.item";
@ -121,8 +123,15 @@ public class ContentSectionDispatcher implements Dispatcher {
public static boolean checkAdminAccess(HttpServletRequest request, public static boolean checkAdminAccess(HttpServletRequest request,
ContentSection section) { ContentSection section) {
User user = Utilities.getCurrentUser(request); User user ;
KernelContext kernelContext = Kernel.getContext();
if ( kernelContext.getParty() instanceof User ) {
user = (User) kernelContext.getParty();
} else {
// Should not happen, at this stage the user has to be logged in.
return false;
}
SecurityManager sm = new SecurityManager(section); SecurityManager sm = new SecurityManager(section);
return sm.canAccess(user, SecurityManager.ADMIN_PAGES); return sm.canAccess(user, SecurityManager.ADMIN_PAGES);

View File

@ -46,6 +46,7 @@ import java.util.Map;
/** /**
* <p>This class provides many utility functions for the Content Management * <p>This class provides many utility functions for the Content Management
* System.</p> * System.</p>
* Specifically used by various JSP templates.
* *
* @author Michael Pih (pihman@arsdigita.com) * @author Michael Pih (pihman@arsdigita.com)
* @version $Id: Utilities.java 2140 2011-01-16 12:04:20Z pboy $ * @version $Id: Utilities.java 2140 2011-01-16 12:04:20Z pboy $
@ -64,6 +65,8 @@ public class Utilities {
/** /**
* Fetch the location of the CMS Workspace package. Caches the result. * Fetch the location of the CMS Workspace package. Caches the result.
* @return The URL of the CMS Workspace package * @return The URL of the CMS Workspace package
* @deprecated without direct replacement yet, refactor code to use
* legacy free code in com.arsdigita.web
*/ */
public static String getWorkspaceURL() { public static String getWorkspaceURL() {
String url = (String) m_cache.get(CMS.WORKSPACE_PACKAGE_KEY); String url = (String) m_cache.get(CMS.WORKSPACE_PACKAGE_KEY);
@ -166,6 +169,7 @@ public class Utilities {
* Fetches the URL of a mounted instance of a package. * Fetches the URL of a mounted instance of a package.
* @param key The package key * @param key The package key
* @return The URL where the package is mounted * @return The URL where the package is mounted
* @deprecated without direct replacement yet
*/ */
private static String getSingletonPackageURL(String key) { private static String getSingletonPackageURL(String key) {
PackageType type = null; PackageType type = null;
@ -206,6 +210,13 @@ public class Utilities {
return url.toString(); return url.toString();
} }
/**
*
* @param key
* @return
* @deprecated without replacement (singleton package is not a supported
* property for legacy free applications.)
*/
private static String getSingletonPackageURLSansContext(String key) { private static String getSingletonPackageURLSansContext(String key) {
PackageType type = null; PackageType type = null;
type = PackageType.findByKey(key); type = PackageType.findByKey(key);

View File

@ -86,11 +86,11 @@ public abstract class BaseAdminPane extends SelectionPanel
super(title, builder); super(title, builder);
} }
protected final static GlobalizedMessage gz(final String key) { protected static GlobalizedMessage gz(final String key) {
return GlobalizationUtil.globalize(key); return GlobalizationUtil.globalize(key);
} }
protected final static String lz(final String key) { protected static String lz(final String key) {
return (String) gz(key).localize(); return (String) gz(key).localize();
} }
} }

View File

@ -0,0 +1,346 @@
/*
* 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.cms.ui;
import com.arsdigita.cms.dispatcher.*;
import com.arsdigita.bebop.Bebop;
import com.arsdigita.bebop.Container;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.Page;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.page.PageTransformer;
import com.arsdigita.cms.CMSExcursion;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.SecurityManager;
import com.arsdigita.developersupport.DeveloperSupport;
import com.arsdigita.dispatcher.RequestContext;
import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.KernelHelper;
import com.arsdigita.kernel.User;
import com.arsdigita.kernel.permissions.PermissionDescriptor;
import com.arsdigita.kernel.permissions.PermissionService;
import com.arsdigita.persistence.OID;
import com.arsdigita.templating.PresentationManager;
import com.arsdigita.util.Assert;
import com.arsdigita.web.Application;
import com.arsdigita.xml.Document;
import com.arsdigita.xml.Element;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.HashMap;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
/**
* <p>A <tt>CMSPage</tt> is a Bebop {@link com.arsdigita.bebop.Page}
* implementation of the {@link com.arsdigita.cms.dispatcher.ResourceHandler}
* interface.</p>
*
* <p>It stores the current {@link com.arsdigita.cms.ContentSection} and, if
* applicable, the {@link com.arsdigita.cms.ContentItem} in the page state as
* request local objects. Components that are part of the <tt>CMSPage</tt>
* may access these objects by calling:</p>
* <blockquote><code><pre>
* getContentSection(PageState state);
* </pre></code></blockquote>
*
* @author Michael Pih (pihman@arsdigita.com)
* @author Uday Mathur (umathur@arsdigita.com)
* @version $Id: CMSPage.java 2140 2011-01-16 12:04:20Z pboy $
*/
public class CMSApplicationPage extends Page {
private static final Logger s_log = Logger.getLogger(CMSApplicationPage.class);
/** The global assets URL stub XML parameter name. */
public final static String ASSETS = "ASSETS";
/** The XML page class. */
public final static String PAGE_CLASS = "CMS";
/** Map of XML parameters */
private HashMap m_params;
/** */
private PageTransformer m_transformer;
public CMSApplicationPage() {
super();
buildPage();
}
public CMSApplicationPage(String title) {
super(title);
buildPage();
}
public CMSApplicationPage(String title, Container panel) {
super(title, panel);
buildPage();
}
public CMSApplicationPage(Label title) {
super(title);
buildPage();
}
public CMSApplicationPage(Label title, Container panel) {
super(title, panel);
buildPage();
}
/**
* Builds the page.
*/
protected void buildPage() {
// Set the class attribute.
setClassAttr(PAGE_CLASS);
// Global XML params.
// MP: This only works with older versions of Xalan.
m_params = new HashMap();
setXMLParameter(ASSETS, Utilities.getGlobalAssetsURL());
// MP: This is a hack to so that the XML params work with the newer
// version of Xalan.
setAttribute(ASSETS, Utilities.getGlobalAssetsURL());
// Make sure the error display gets rendered.
getErrorDisplay().setIdAttr("page-body");
final PresentationManager pm = Bebop.getConfig().getPresentationManager();
if (pm instanceof PageTransformer) {
m_transformer = (PageTransformer) pm;
}
else {
m_transformer = new PageTransformer();
}
}
/**
* Finishes and locks the page. If the page is already locked, does nothing.
*
* This method is called by the {@link com.arsdigita.dispatcher.Dispatcher}
* that initializes this page.
*/
public synchronized void init() {
s_log.debug("Initializing the page");
if (!isLocked()) {
s_log.debug("The page hasn't been locked; locking it now");
lock();
}
}
/**
* Fetches the value of the XML parameter.
*
* @param name The parameter name
* @return The parameter value
* @pre (name != null)
*/
public String getXMLParameter(String name) {
return (String) m_params.get(name);
}
/**
* Set an XML parameter.
*
* @param name The parameter name
* @param value The parameter value
* @pre (name != null)
*/
public void setXMLParameter(String name, String value) {
m_params.put(name, value);
}
/**
* Fetch the request-local content section.
*
* @param request The HTTP request
* @return The current content section
*
* @deprecated use com.arsdigita.cms.CMS.getContext().getContentSection()
* instead
* Despite of being deprecated it can not be removed because it
* is required by the interface Resourcehandler which is
* implemented by this class.
* On the other hand, if deprecated, implementing ResourceHandler
* may not be required
*/
public ContentSection getContentSection(HttpServletRequest request) {
// Resets all content sections associations.
return ContentSectionDispatcher.getContentSection(request);
}
/**
* Fetch the request-local content section.
*
* @param state The page state
* @return The current content section
*
* @deprecated use com.arsdigita.cms.CMS.getContext().getContentSection()
* instead
* Despite of being deprecated it can not be removed because it
* is required by ContentItemPage which extends CMSPage and
* uses this method.
*/
public ContentSection getContentSection(PageState state) {
return getContentSection(state.getRequest());
}
/**
* Fetch the request-local content item.
*
* @param request The HTTP request
* @return The current content item
*
* @deprecated use com.arsdigita.cms.CMS.getContext().getContentItem()
* instead
* Despite of being deprecated it can not be removed because it
* is required by the interface Resourcehandler which is
* implemented by this class.
* On the other hand, if deprecated, implementing ResourceHandler
* may not be required
*/
public ContentItem getContentItem(HttpServletRequest request) {
// resets all content item associations
return ContentSectionDispatcher.getContentItem(request);
}
/**
* Fetch the request-local content item.
*
* @param state The page state
* @return The current content item
* @deprecated use com.arsdigita.cms.CMS.getContext().getContentItem()
* instead.
* Despite of being deprecated it can not be removed because it
* is required by ContentItemPage which extends CMSPage and
* uses this method.
*/
public ContentItem getContentItem(PageState state) {
return getContentItem(state.getRequest());
}
/**
* Services the Bebop page.
*
* @param request The servlet request object
* @param response the servlet response object
*
* @pre m_transformer != null
*/
public void dispatch(final HttpServletRequest request,
final HttpServletResponse response // ,
// RequestContext actx
)
throws IOException, ServletException {
DeveloperSupport.startStage("CMSPage.dispatch: serve page");
CMSExcursion excursion = new CMSExcursion() {
public void excurse() throws IOException, ServletException {
Application app = Application.getCurrentApplication(request);
ContentSection section = null;
if (app == null) {
// We're at the content center; do nothing.
} else if (app instanceof ContentSection) {
section = (ContentSection) app;
} else {
// hack to deal with category browser mounted
// under section app.
app = app.getParentApplication();
if (app instanceof ContentSection) {
section = (ContentSection) app;
}
}
if (section != null) {
setContentSection(section);
setSecurityManager(new SecurityManager(section));
}
final String itemID = request.getParameter("item_id");
if (itemID != null) {
try {
ContentItem item =
(ContentItem) DomainObjectFactory.newInstance
(new OID(ContentItem.BASE_DATA_OBJECT_TYPE,
new BigDecimal(itemID)));
setContentItem(item);
PermissionDescriptor perm = new PermissionDescriptor(
SecurityManager.CMS_PREVIEW_ITEM_DESCRIPTOR,
item,
Kernel.getContext().getParty() );
if (!PermissionService.checkPermission(perm)) {
s_log.warn("No perm to CMS_PREVIEW_ITEM " + itemID);
throw new AccessDeniedException(
"You do not have privileges to administer item "
+ itemID);
}
} catch (DataObjectNotFoundException donfe) {
s_log.warn("Failed to load content item " + itemID);
}
}
final Document doc = buildDocument(request, response);
Assert.exists(m_transformer,
"Implementation of PresentationManager");
m_transformer.servePage(doc, request, response, m_params);
}
};
try {
excursion.run();
} finally {
DeveloperSupport.endStage("CMSPage.dispatch: serve page");
}
}
@Override
protected Element generateXMLHelper(PageState ps, Document parent) {
Element page = super.generateXMLHelper(ps,parent);
User user = getCurrentUser(ps);
if ( user != null ) {
page.addAttribute("name",user.getDisplayName());
}
return page;
}
/**
* @deprecated Use Kernel.getContext().getParty() if possible and
* Web.getContext().getUser() if necessary.
*/
public static User getCurrentUser(PageState state) {
return KernelHelper.getCurrentUser(state.getRequest());
}
}

View File

@ -0,0 +1,204 @@
/*
* 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.cms.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.Link;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SimpleContainer;
import com.arsdigita.bebop.TabbedPane;
import com.arsdigita.bebop.event.ActionEvent;
import com.arsdigita.bebop.event.ActionListener;
import com.arsdigita.bebop.event.PrintEvent;
import com.arsdigita.bebop.event.PrintListener;
import com.arsdigita.bebop.parameters.BigDecimalParameter;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.ContentType;
import com.arsdigita.cms.dispatcher.CMSPage;
import com.arsdigita.cms.ui.workspace.TasksPanel;
import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.kernel.KernelHelper;
import com.arsdigita.kernel.User;
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
import com.arsdigita.ui.DebugPanel;
/**
* <p>The Content Center page.</p>
*
* @author Jack Chung (flattop@arsdigita.com)
* @author Michael Pih (pihman@arsdigita.com)
* @version $Id: CMSPageWorkspacePage.java 2090 2010-04-17 08:04:14Z pboy $
*/
public class CMSPageWorkspacePage extends CMSPage implements ActionListener {
private final static String XSL_CLASS = "CMS Admin";
private TabbedPane m_tabbedPane;
private TasksPanel m_tasks;
private ItemSearch m_search;
private ACSObjectSelectionModel m_typeSel;
private ACSObjectSelectionModel m_sectionSel;
public static final String CONTENT_TYPE = "type_id";
public static final String CONTENT_SECTION = "section_id";
/**
* Construct a new CMSPageWorkspacePage
*/
public CMSPageWorkspacePage() { // Constructor Page
super(new Label( GlobalizationUtil.globalize
("cms.ui.content_center")),
new SimpleContainer());
setClassAttr("cms-admin");
BigDecimalParameter typeId = new BigDecimalParameter(CONTENT_TYPE);
addGlobalStateParam(typeId);
m_typeSel = new ACSObjectSelectionModel
(ContentType.class.getName(), ContentType.BASE_DATA_OBJECT_TYPE, typeId);
BigDecimalParameter sectionId = new BigDecimalParameter
(CONTENT_SECTION);
addGlobalStateParam(sectionId);
m_sectionSel = new ACSObjectSelectionModel
(ContentSection.class.getName(),
ContentSection.BASE_DATA_OBJECT_TYPE,
sectionId);
add( new WorkspaceContextBar() );
add( new GlobalNavigation() );
m_tasks = getTasksPane(m_typeSel, m_sectionSel);
m_search = getSearchPane();
m_tabbedPane = createTabbedPane();
m_tabbedPane.setIdAttr("page-body");
add(m_tabbedPane);
add(new DebugPanel());
}
/**
* Creates, and then caches, the Tasks pane. Overriding this
* method to return null will prevent this tab from appearing.
**/
protected TasksPanel getTasksPane(ACSObjectSelectionModel typeModel,
ACSObjectSelectionModel sectionModel) {
if (m_tasks == null) {
m_tasks = new TasksPanel(typeModel,sectionModel);
}
return m_tasks;
}
/**
* Creates, and then caches, the Search pane. Overriding this
* method to return null will prevent this tab from appearing.
**/
protected ItemSearch getSearchPane() {
if (m_search == null) {
m_search = new ItemSearch(ContentItem.DRAFT);
}
return m_search;
}
private SimpleContainer makeHeader() {
PrintListener l = new PrintListener() {
public void prepare(PrintEvent event) {
PageState state = event.getPageState();
Link link = (Link) event.getTarget();
User user = KernelHelper.getCurrentUser(state.getRequest());
link.setChild(new Label(user.getName()));
link.setTarget("/pvt/");
}
};
SimpleContainer sc = new SimpleContainer();
Label welcomeLabel = new Label(GlobalizationUtil.globalize("cms.ui.welcome"));
Link nameLink = new Link(l);
sc.add(welcomeLabel);
sc.add(nameLink);
return sc;
}
/**
* Created the TabbedPane to use for this page. Sets the class
* attribute for this tabbed pane. The default implementation uses a
* {@link com.arsdigita.bebop.TabbedPane} and sets the class
* attribute to "CMS Admin." This implementation also adds tasks,
* content sections, and search panes.
*
*<p>
*
* Developers can override this method to add only the tabs they
* want, or to add additional tabs after the default CMS tabs are
* added.
**/
protected TabbedPane createTabbedPane() {
TabbedPane pane = new TabbedPane();
pane.setClassAttr(XSL_CLASS);
addToPane(pane, "Tasks/Sections", getTasksPane(m_typeSel, m_sectionSel));
addToPane(pane, "Search", getSearchPane());
pane.addActionListener(this);
return pane;
}
/**
* Adds the specified component, with the specified tab name, to the
* tabbed pane only if it is not null.
*
* @param pane The pane to which to add the tab
* @param tabName The name of the tab if it's added
* @param comp The component to add to the pane
**/
protected void addToPane(TabbedPane pane, String tabName, Component comp) {
if (comp != null) {
pane.addTab(tabName, comp);
}
}
/**
* When a new tab is selected, reset the state of the
* formerly-selected pane.
*
* @param event The event fired by selecting a tab
*/
public void actionPerformed(ActionEvent event) {
PageState state = event.getPageState();
Component pane = m_tabbedPane.getCurrentPane(state);
if ( pane == m_tasks ) {
m_tasks.reset(state);
} else if ( pane == m_search ) {
m_search.reset(state);
}
}
}

View File

@ -33,6 +33,7 @@ import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.ContentType; import com.arsdigita.cms.ContentType;
import com.arsdigita.cms.dispatcher.CMSPage; import com.arsdigita.cms.dispatcher.CMSPage;
import com.arsdigita.cms.ui.workspace.TasksPanel;
import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.kernel.KernelHelper; import com.arsdigita.kernel.KernelHelper;
import com.arsdigita.kernel.User; import com.arsdigita.kernel.User;
@ -45,7 +46,7 @@ import com.arsdigita.ui.DebugPanel;
* *
* @author Jack Chung (flattop@arsdigita.com) * @author Jack Chung (flattop@arsdigita.com)
* @author Michael Pih (pihman@arsdigita.com) * @author Michael Pih (pihman@arsdigita.com)
* @version $Id: WorkspacePage.java 2090 2010-04-17 08:04:14Z pboy $ * @version $Id: CMSPageWorkspacePage.java 2090 2010-04-17 08:04:14Z pboy $
*/ */
public class WorkspacePage extends CMSPage implements ActionListener { public class WorkspacePage extends CMSPage implements ActionListener {
@ -62,9 +63,9 @@ public class WorkspacePage extends CMSPage implements ActionListener {
public static final String CONTENT_SECTION = "section_id"; public static final String CONTENT_SECTION = "section_id";
/** /**
* Construct a new WorkspacePage * Construct a new CMSPageWorkspacePage
*/ */
public WorkspacePage() { public WorkspacePage() { // Constructor Page
super(new Label( GlobalizationUtil.globalize super(new Label( GlobalizationUtil.globalize
("cms.ui.content_center")), ("cms.ui.content_center")),
new SimpleContainer()); new SimpleContainer());
@ -80,10 +81,12 @@ public class WorkspacePage extends CMSPage implements ActionListener {
(CONTENT_SECTION); (CONTENT_SECTION);
addGlobalStateParam(sectionId); addGlobalStateParam(sectionId);
m_sectionSel = new ACSObjectSelectionModel m_sectionSel = new ACSObjectSelectionModel
(ContentSection.class.getName(), ContentSection.BASE_DATA_OBJECT_TYPE, sectionId); (ContentSection.class.getName(),
ContentSection.BASE_DATA_OBJECT_TYPE,
sectionId);
add(new WorkspaceContextBar()); add( new WorkspaceContextBar() );
add(new GlobalNavigation()); add( new GlobalNavigation() );
m_tasks = getTasksPane(m_typeSel, m_sectionSel); m_tasks = getTasksPane(m_typeSel, m_sectionSel);
m_search = getSearchPane(); m_search = getSearchPane();
@ -99,7 +102,8 @@ public class WorkspacePage extends CMSPage implements ActionListener {
* Creates, and then caches, the Tasks pane. Overriding this * Creates, and then caches, the Tasks pane. Overriding this
* method to return null will prevent this tab from appearing. * method to return null will prevent this tab from appearing.
**/ **/
protected TasksPanel getTasksPane(ACSObjectSelectionModel typeModel, ACSObjectSelectionModel sectionModel) { protected TasksPanel getTasksPane(ACSObjectSelectionModel typeModel,
ACSObjectSelectionModel sectionModel) {
if (m_tasks == null) { if (m_tasks == null) {
m_tasks = new TasksPanel(typeModel,sectionModel); m_tasks = new TasksPanel(typeModel,sectionModel);
} }

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.ui; package com.arsdigita.cms.ui.workspace;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -44,12 +44,11 @@ import com.arsdigita.cms.ContentSectionCollection;
import com.arsdigita.cms.Folder; import com.arsdigita.cms.Folder;
import com.arsdigita.cms.PageLocations; import com.arsdigita.cms.PageLocations;
import com.arsdigita.cms.SecurityManager; import com.arsdigita.cms.SecurityManager;
import com.arsdigita.cms.dispatcher.Utilities; import com.arsdigita.cms.ui.CMSContainer;
import com.arsdigita.cms.ui.authoring.NewItemForm; import com.arsdigita.cms.ui.authoring.NewItemForm;
import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.SiteNode;
import com.arsdigita.kernel.User; import com.arsdigita.kernel.User;
import com.arsdigita.kernel.permissions.PermissionService; import com.arsdigita.kernel.permissions.PermissionService;
import com.arsdigita.kernel.permissions.PrivilegeDescriptor; import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
@ -59,12 +58,11 @@ import com.arsdigita.web.Web;
/** /**
* Displays all the content sections in table, with links to the admin * Displays all the content sections in table, with links to the admin
* and public pages. Also displays a form for each content section to * (and in legacy mode to legacy public pages as well). Also displays a form for
* create an object of a given type. The list of available types is * each content section to create an object of a given type. The list of
* retrieved for each content section. * available types retrieved for each content section.
* *
* <p> * <p>
*
* This class is a container for two other components: a form and a * This class is a container for two other components: a form and a
* table. The form represents the drop down list of the content types * table. The form represents the drop down list of the content types
* available in a particular content section. It is an extension of * available in a particular content section. It is an extension of
@ -110,11 +108,15 @@ public class ContentSectionContainer extends CMSContainer {
add(m_table); add(m_table);
} }
@Override
public void register(Page p) { public void register(Page p) {
super.register(p); super.register(p);
p.setVisibleDefault(m_formContainer, false); p.setVisibleDefault(m_formContainer, false);
} }
/**
*
*/
private class FormContainer extends CMSContainer { private class FormContainer extends CMSContainer {
private StaticNewItemForm m_form; private StaticNewItemForm m_form;
@ -145,32 +147,36 @@ public class ContentSectionContainer extends CMSContainer {
folder = section.getRootFolder(); folder = section.getRootFolder();
} }
if (! sm.canAccess(state.getRequest(), SecurityManager.NEW_ITEM, folder)) { if (! sm.canAccess(state.getRequest(),
throw new FormProcessException( (String) GlobalizationUtil.globalize("cms.ui.insufficient_privileges").localize()); SecurityManager.NEW_ITEM, folder)) {
throw new FormProcessException(
(String) GlobalizationUtil.globalize(
"cms.ui.insufficient_privileges").localize());
} }
} }
}); });
m_form.addProcessListener(new FormProcessListener() { m_form.addProcessListener(new FormProcessListener() {
/** /**
* Process listener: redirects to the authoring kit to create a new item. * Process listener: redirects to the authoring kit to create a new item.
*/ */
public void process(FormSectionEvent e) throws FormProcessException { public void process(FormSectionEvent e) throws FormProcessException {
StaticNewItemForm form = (StaticNewItemForm) e.getSource(); StaticNewItemForm form = (StaticNewItemForm) e.getSource();
PageState state = e.getPageState(); PageState state = e.getPageState();
BigDecimal typeId = form.getTypeID(state); BigDecimal typeId = form.getTypeID(state);
if( typeId != null ) { if( typeId != null ) {
BigDecimal sectionId = form.getContentSectionID(state); BigDecimal sectionId = form.getContentSectionID(state);
m_sectionSel.setSelectedKey(state, sectionId); m_sectionSel.setSelectedKey(state, sectionId);
m_typeSel.setSelectedKey(state, typeId); m_typeSel.setSelectedKey(state, typeId);
}
} }
}); }
});
add(m_form); add(m_form);
} }
@Override
public void register(Page p) { public void register(Page p) {
super.register(p); super.register(p);
p.addComponentStateParam(this, m_sectionIdParam); p.addComponentStateParam(this, m_sectionIdParam);
@ -272,6 +278,8 @@ public class ContentSectionContainer extends CMSContainer {
**/ **/
private ContentSectionTable() { private ContentSectionTable() {
super(); super();
Integer colNo = 0;
Label emptyView = new Label Label emptyView = new Label
("There are currently no content sections installed."); ("There are currently no content sections installed.");
@ -282,16 +290,20 @@ public class ContentSectionContainer extends CMSContainer {
// add columns to the table // add columns to the table
TableColumnModel columnModel = getColumnModel(); TableColumnModel columnModel = getColumnModel();
TableColumn contentSectionColumn = new TableColumn(0, COLUMN_SECTION);
TableColumn locationColumn = new TableColumn(1, COLUMN_LOCATION); TableColumn contentSectionColumn = new TableColumn(colNo, COLUMN_SECTION);
TableColumn actionColumn = new TableColumn(2, COLUMN_ACTION);
contentSectionColumn.setCellRenderer(new AdminURLTableCellRenderer()); contentSectionColumn.setCellRenderer(new AdminURLTableCellRenderer());
locationColumn.setCellRenderer(new URLTableCellRenderer());
actionColumn.setCellRenderer(new ActionTableCellRenderer());
columnModel.add(contentSectionColumn); columnModel.add(contentSectionColumn);
columnModel.add(locationColumn);
if( !ContentSection.getConfig().getHideLegacyPublicSiteLink() ) {
TableColumn locationColumn = new TableColumn(colNo ++,
COLUMN_LOCATION);
locationColumn.setCellRenderer(new URLTableCellRenderer());
columnModel.add(locationColumn);
}
TableColumn actionColumn = new TableColumn(colNo ++, COLUMN_ACTION);
actionColumn.setCellRenderer(new ActionTableCellRenderer());
columnModel.add(actionColumn); columnModel.add(actionColumn);
setModelBuilder(new ContentSectionTableModelBuilder()); setModelBuilder(new ContentSectionTableModelBuilder());
@ -346,7 +358,7 @@ public class ContentSectionContainer extends CMSContainer {
* table. This implementation orders the content sections by * table. This implementation orders the content sections by
* <code>lower(label)</code>. * <code>lower(label)</code>.
**/ **/
protected ContentSectionCollection getContentSectionCollection() { private ContentSectionCollection getContentSectionCollection() {
ContentSectionCollection sections = ContentSection.getAllSections(); ContentSectionCollection sections = ContentSection.getAllSections();
sections.addOrder("lower(label)"); sections.addOrder("lower(label)");
return sections; return sections;
@ -433,8 +445,14 @@ public class ContentSectionContainer extends CMSContainer {
SecurityManager sm = new SecurityManager(section); SecurityManager sm = new SecurityManager(section);
if (! sm.canAccess(state.getRequest(), SecurityManager.NEW_ITEM, folder) if (! sm.canAccess(state.getRequest(), SecurityManager.NEW_ITEM, folder)
|| !ContentSection.getConfig().getAllowContentCreateInSectionListing()) { || !ContentSection.getConfig().getAllowContentCreateInSectionListing()
return new Label("&nbsp;", false); ) {
return new Label("&nbsp;&nbsp;&nbsp;-&nbsp;-&nbsp;&nbsp;&nbsp;"+
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;",
false);
} else { } else {
// set the value of the sectionIdParameter in the form // set the value of the sectionIdParameter in the form
// to this section // to this section
@ -454,70 +472,43 @@ public class ContentSectionContainer extends CMSContainer {
**/ **/
public static class URLTableCellRenderer implements TableCellRenderer { public static class URLTableCellRenderer implements TableCellRenderer {
private static final String URL_STUB = "/";
/** /**
* The object passed in is the current content section. This * The object passed in is the current content section. This
* returns a Link whose name and target are the url to the * returns a Link whose name and target are the url to the
* public pages. * public pages.
**/ *
public Component getComponent(Table table, PageState state, Object value, * @return Link whose name and target are the url to the public pages
boolean isSelected, Object key, * of the current (passed in) content section
int row, int column) { * or a Label if current use does not habe acces priviledge
* for the content section
*/
public Component getComponent(Table table,
PageState state,
Object value,
boolean isSelected,
Object key,
int row,
int column) {
/* cast to ContentSection for further processing */
ContentSection section = (ContentSection) value; ContentSection section = (ContentSection) value;
String baseUrl = getBaseURL();
String name = section.getName(); String name = section.getName();
String path = section.getPath() ; // from Application
// If the user has no access, return a Label instead of a Link // If the user has no access, return a Label instead of a Link
SecurityManager sm = new SecurityManager(section); SecurityManager sm = new SecurityManager(section);
if (sm.canAccess(state.getRequest(), SecurityManager.PUBLIC_PAGES)) { if (sm.canAccess(state.getRequest(), SecurityManager.PUBLIC_PAGES)
return new Link(baseUrl + name + "/", baseUrl + generateURL(name)); && !ContentSection.getConfig().getHideLegacyPublicSiteLink()
) {
return new Link("/"+name+"/", path+"/");
} else { } else {
return new Label(baseUrl + name + "/", false); return new Label("/"+name+"/", false);
} }
} }
/**
* Trims leading slashes, if any, on the specified string.
*
* @param string The string for which we want to remove
* leading slashes
**/
protected String trimSlashes(String string) {
while (string != null && string.length() > 0 &&
string.charAt(0) == '/') {
string = string.substring(1);
}
return string;
}
/**
* Generates the url for the specified prefix. Always returns
* something that does not start with a forward slash.
*
* @param prefix The prefix of the URL
**/
protected String generateURL(String prefix) {
return trimSlashes(prefix) + URL_STUB;
}
/**
* Returns the current url stub from the webapp context and
* the requested site node. Always returns something that ends
* with a forward slash.
**/
protected String getBaseURL() {
// Generate the base URL stub.
StringBuffer buf = new StringBuffer(15);
buf.append(Utilities.getWebappContext())
.append(SiteNode.getRootSiteNode().getURL());
String url = buf.toString();
if (url.endsWith("/")) {
return url;
}
return url + "/";
}
} }
@ -532,6 +523,7 @@ public class ContentSectionContainer extends CMSContainer {
/** /**
* The object passed in is the current content section * The object passed in is the current content section
**/ **/
@Override
public Component getComponent(Table table, PageState state, Object value, public Component getComponent(Table table, PageState state, Object value,
boolean isSelected, Object key, boolean isSelected, Object key,
int row, int column) { int row, int column) {

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.ui; package com.arsdigita.cms.ui.workspace;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -52,6 +52,8 @@ import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.ContentType; import com.arsdigita.cms.ContentType;
import com.arsdigita.cms.Folder; import com.arsdigita.cms.Folder;
import com.arsdigita.cms.ui.CMSContainer;
import com.arsdigita.cms.ui.ContentItemPage;
import com.arsdigita.cms.ui.authoring.CreationSelector; import com.arsdigita.cms.ui.authoring.CreationSelector;
import com.arsdigita.cms.ui.folder.FolderSelectionModel; import com.arsdigita.cms.ui.folder.FolderSelectionModel;
import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.cms.util.GlobalizationUtil;
@ -121,8 +123,10 @@ public class TasksPanel extends CMSContainer {
private static final String SORT_WORKFLOW = "workflow"; private static final String SORT_WORKFLOW = "workflow";
// IMAGES // IMAGES
public static final String UP_ARROW_IMAGE = "/themes/heirfloom/images/gray-triangle-up.gif"; public static final String UP_ARROW_IMAGE =
public static final String DOWN_ARROW_IMAGE = "/themes/heirfloom/images/gray-triangle-down.gif"; "/themes/heirfloom/images/gray-triangle-up.gif";
public static final String DOWN_ARROW_IMAGE =
"/themes/heirfloom/images/gray-triangle-down.gif";
// CREATION PANE CONSTANTS // CREATION PANE CONSTANTS
private Label m_selectorLabel; private Label m_selectorLabel;
@ -168,7 +172,8 @@ public class TasksPanel extends CMSContainer {
/** /**
* Adds the components to this tasks panel * Adds the components to this tasks panel
**/ **/
protected void addComponents() { // protected void addComponents() {
private void addComponents() {
m_creationPane = new BoxPanel(BoxPanel.VERTICAL); m_creationPane = new BoxPanel(BoxPanel.VERTICAL);
// A label that says "Create $content_type in $section" // A label that says "Create $content_type in $section"
@ -181,7 +186,9 @@ public class TasksPanel extends CMSContainer {
ContentSection sec = ContentSection sec =
(ContentSection) m_sectionSel.getSelectedObject(s); (ContentSection) m_sectionSel.getSelectedObject(s);
StringBuffer buf = new StringBuffer(GlobalizationUtil.globalize("cms.ui.create").localize() + " "); StringBuffer buf = new StringBuffer(
GlobalizationUtil
.globalize("cms.ui.create").localize() + " ");
buf.append(type.getLabel()); buf.append(type.getLabel());
buf.append(" in "); buf.append(" in ");
buf.append(sec.getName()); buf.append(sec.getName());
@ -217,7 +224,9 @@ public class TasksPanel extends CMSContainer {
} }
}); });
m_viewLockLink = new ActionLink(new Label(GlobalizationUtil.globalize("cms.ui.workflow.task.view_locked"))); m_viewLockLink = new ActionLink(new
Label(GlobalizationUtil
.globalize("cms.ui.workflow.task.view_locked")));
m_viewLockLink.addActionListener(new ActionListener() { m_viewLockLink.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
PageState ps = e.getPageState(); PageState ps = e.getPageState();
@ -225,7 +234,9 @@ public class TasksPanel extends CMSContainer {
} }
}); });
m_viewUnlockLink = new ActionLink(new Label(GlobalizationUtil.globalize("cms.ui.workflow.task.view_unlocked"))); m_viewUnlockLink = new ActionLink(new
Label(GlobalizationUtil
.globalize("cms.ui.workflow.task.view_unlocked")));
m_viewUnlockLink.addActionListener(new ActionListener() { m_viewUnlockLink.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
PageState ps = e.getPageState(); PageState ps = e.getPageState();
@ -233,7 +244,9 @@ public class TasksPanel extends CMSContainer {
} }
}); });
m_viewAllLockLink = new ActionLink(new Label(GlobalizationUtil.globalize("cms.ui.workflow.task.view_all"))); m_viewAllLockLink = new ActionLink(new
Label(GlobalizationUtil
.globalize("cms.ui.workflow.task.view_all")));
m_viewAllLockLink.addActionListener(new ActionListener() { m_viewAllLockLink.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
PageState ps = e.getPageState(); PageState ps = e.getPageState();
@ -241,11 +254,14 @@ public class TasksPanel extends CMSContainer {
} }
}); });
m_viewLockLabel = new Label(GlobalizationUtil.globalize("cms.ui.workflow.task.view_locked")); m_viewLockLabel = new Label(GlobalizationUtil
.globalize("cms.ui.workflow.task.view_locked"));
m_viewLockLabel.setFontWeight(Label.BOLD); m_viewLockLabel.setFontWeight(Label.BOLD);
m_viewUnlockLabel = new Label(GlobalizationUtil.globalize("cms.ui.workflow.task.view_unlocked")); m_viewUnlockLabel = new Label(GlobalizationUtil
.globalize("cms.ui.workflow.task.view_unlocked"));
m_viewUnlockLabel.setFontWeight(Label.BOLD); m_viewUnlockLabel.setFontWeight(Label.BOLD);
m_viewAllLockLabel = new Label(GlobalizationUtil.globalize("cms.ui.workflow.task.view_all")); m_viewAllLockLabel = new Label(GlobalizationUtil
.globalize("cms.ui.workflow.task.view_all"));
m_viewAllLockLabel.setFontWeight(Label.BOLD); m_viewAllLockLabel.setFontWeight(Label.BOLD);
add(new Label("<br />",false)); add(new Label("<br />",false));
@ -267,6 +283,11 @@ public class TasksPanel extends CMSContainer {
// m_actionLabel.setClassAttr("action"); // m_actionLabel.setClassAttr("action");
} }
/**
*
* @param p
*/
@Override
public void register(Page p) { public void register(Page p) {
super.register(p); super.register(p);
@ -381,15 +402,18 @@ public class TasksPanel extends CMSContainer {
CompoundFilter authorFilter = ff.and(); CompoundFilter authorFilter = ff.and();
//cg query changed to refer to task type id //cg query changed to refer to task type id
authorFilter.addFilter(ff.equals("taskType",CMSTaskType.AUTHOR)); authorFilter.addFilter(ff.equals("taskType",CMSTaskType.AUTHOR));
authorFilter.addFilter(getTaskFilter(CMSTaskType.retrieve(CMSTaskType.AUTHOR), party, ff)); authorFilter.addFilter(getTaskFilter(CMSTaskType.retrieve(CMSTaskType.AUTHOR),
party, ff));
CompoundFilter approveFilter = ff.and(); CompoundFilter approveFilter = ff.and();
approveFilter.addFilter(ff.equals("taskType",CMSTaskType.EDIT)); approveFilter.addFilter(ff.equals("taskType",CMSTaskType.EDIT));
approveFilter.addFilter(getTaskFilter(CMSTaskType.retrieve(CMSTaskType.EDIT), party, ff)); approveFilter.addFilter(getTaskFilter(CMSTaskType.retrieve(CMSTaskType.EDIT),
party, ff));
CompoundFilter deployFilter = ff.and(); CompoundFilter deployFilter = ff.and();
deployFilter.addFilter(ff.equals("taskType",CMSTaskType.DEPLOY)); deployFilter.addFilter(ff.equals("taskType",CMSTaskType.DEPLOY));
deployFilter.addFilter(getTaskFilter(CMSTaskType.retrieve(CMSTaskType.DEPLOY), party, ff)); deployFilter.addFilter(getTaskFilter(CMSTaskType.retrieve(CMSTaskType.DEPLOY),
party, ff));
CompoundFilter permissionFilter = ff.or(); CompoundFilter permissionFilter = ff.or();
permissionFilter.addFilter(authorFilter); permissionFilter.addFilter(authorFilter);
@ -416,6 +440,7 @@ public class TasksPanel extends CMSContainer {
m_sectionSel = sectionSel; m_sectionSel = sectionSel;
} }
@Override
protected BigDecimal getRootFolderID(PageState s) { protected BigDecimal getRootFolderID(PageState s) {
ContentSection sec = (ContentSection) m_sectionSel.getSelectedObject(s); ContentSection sec = (ContentSection) m_sectionSel.getSelectedObject(s);
Assert.exists(sec); Assert.exists(sec);
@ -468,12 +493,14 @@ public class TasksPanel extends CMSContainer {
} }
private RequestLocal m_taskCount = new RequestLocal() { private RequestLocal m_taskCount = new RequestLocal() {
@Override
public Object initialValue(PageState state) { public Object initialValue(PageState state) {
DataQuery query = makeQuery(state); DataQuery query = makeQuery(state);
return new Long(query.size()); return new Long(query.size());
} }
}; };
@Override
public void generateXML(PageState state, public void generateXML(PageState state,
Element parent) { Element parent) {
Element content = parent.newChildElement("cms:tasksPanel", CMS.CMS_XML_NS); Element content = parent.newChildElement("cms:tasksPanel", CMS.CMS_XML_NS);
@ -540,7 +567,8 @@ public class TasksPanel extends CMSContainer {
sections.put(sectionID, sectionPath); sections.put(sectionID, sectionPath);
} }
Element task = content.newChildElement("cms:tasksPanelTask", CMS.CMS_XML_NS); Element task = content.newChildElement("cms:tasksPanelTask",
CMS.CMS_XML_NS);
BigDecimal itemID = (BigDecimal)query.get("itemID"); BigDecimal itemID = (BigDecimal)query.get("itemID");
String taskType = (String)query.get("taskType"); String taskType = (String)query.get("taskType");
@ -590,9 +618,11 @@ public class TasksPanel extends CMSContainer {
} }
if ("Deploy".equals(taskType)) { if ("Deploy".equals(taskType)) {
task.addAttribute("editTabNumber", String.valueOf(ContentItemPage.PUBLISHING_TAB)); task.addAttribute("editTabNumber",
String.valueOf(ContentItemPage.PUBLISHING_TAB));
} else { } else {
task.addAttribute("editTabNumber", String.valueOf(ContentItemPage.AUTHORING_TAB)); task.addAttribute("editTabNumber",
String.valueOf(ContentItemPage.AUTHORING_TAB));
} }
} }
@ -635,6 +665,7 @@ public class TasksPanel extends CMSContainer {
} }
@Override
public void respond(PageState state) throws ServletException { public void respond(PageState state) throws ServletException {
String key = state.getControlEventName(); String key = state.getControlEventName();
String value = state.getControlEventValue(); String value = state.getControlEventValue();
@ -666,7 +697,9 @@ public class TasksPanel extends CMSContainer {
} }
} }
String redirectURL = Web.getConfig().getDispatcherServletPath() + sectionPath + "/admin/item.jsp?item_id=" + itemID + "&set_tab=" + tabNumber; String redirectURL = Web.getConfig().getDispatcherServletPath()
+ sectionPath + "/admin/item.jsp?item_id="
+ itemID + "&set_tab=" + tabNumber;
throw new RedirectSignal(redirectURL,true); throw new RedirectSignal(redirectURL,true);
} catch (DataObjectNotFoundException ex) { } catch (DataObjectNotFoundException ex) {
throw new ServletException("Unknown content ID" + itemID); throw new ServletException("Unknown content ID" + itemID);
@ -684,7 +717,8 @@ public class TasksPanel extends CMSContainer {
} }
} }
private static Filter getTaskFilter(CMSTaskType taskType, Party party, FilterFactory factory) { private static Filter getTaskFilter(CMSTaskType taskType
, Party party, FilterFactory factory) {
PrivilegeDescriptor privilege; PrivilegeDescriptor privilege;
String queryName; String queryName;
String queryType; String queryType;

View File

@ -1,8 +1,8 @@
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
<jsp:directive.page import="com.arsdigita.cms.ui.ContentSectionPage"/> <jsp:directive.page import="com.arsdigita.cms.ui.ContentSectionPage"/>
<jsp:directive.page import="com.arsdigita.cms.dispatcher.ContentSectionDispatcher"/>
<jsp:directive.page import="com.arsdigita.cms.ContentSection"/> <jsp:directive.page import="com.arsdigita.cms.ContentSection"/>
<jsp:directive.page import="com.arsdigita.cms.ContentSectionServlet"/>
<jsp:directive.page import="com.arsdigita.cms.dispatcher.Utilities"/> <jsp:directive.page import="com.arsdigita.cms.dispatcher.Utilities"/>
<jsp:directive.page import="com.arsdigita.dispatcher.*"/> <jsp:directive.page import="com.arsdigita.dispatcher.*"/>
<jsp:directive.page import="com.arsdigita.web.LoginSignal"/> <jsp:directive.page import="com.arsdigita.web.LoginSignal"/>
@ -19,11 +19,11 @@
DispatcherHelper.cacheDisable(response); DispatcherHelper.cacheDisable(response);
ContentSection section = ContentSection section =
ContentSectionDispatcher.getContentSection(request); ContentSectionServlet.getContentSection(request);
if (Web.getContext().getUser() == null) { if (Web.getContext().getUser() == null) {
throw new LoginSignal(request); throw new LoginSignal(request);
} else if (! ContentSectionDispatcher.checkAdminAccess(request, section)) { } else if (! ContentSectionServlet.checkAdminAccess(request, section)) {
throw new com.arsdigita.cms.dispatcher.AccessDeniedException(); throw new com.arsdigita.cms.dispatcher.AccessDeniedException();
} }

View File

@ -2,7 +2,7 @@
<jsp:directive.page import="com.arsdigita.bebop.Page"/> <jsp:directive.page import="com.arsdigita.bebop.Page"/>
<jsp:directive.page import="com.arsdigita.cms.ui.ContentItemPage"/> <jsp:directive.page import="com.arsdigita.cms.ui.ContentItemPage"/>
<jsp:directive.page import="com.arsdigita.cms.dispatcher.ContentSectionDispatcher"/> <jsp:directive.page import="com.arsdigita.cms.ContentSectionServlet"/>
<jsp:directive.page import="com.arsdigita.cms.ContentSection"/> <jsp:directive.page import="com.arsdigita.cms.ContentSection"/>
<jsp:directive.page import="com.arsdigita.cms.dispatcher.Utilities"/> <jsp:directive.page import="com.arsdigita.cms.dispatcher.Utilities"/>
<jsp:directive.page import="com.arsdigita.dispatcher.*"/> <jsp:directive.page import="com.arsdigita.dispatcher.*"/>
@ -28,12 +28,12 @@
request = DispatcherHelper.getRequest(); request = DispatcherHelper.getRequest();
ContentSection section = ContentSection section =
ContentSectionDispatcher.getContentSection(request); ContentSectionServlet.getContentSection(request);
if (Web.getContext().getUser() == null) { if (Web.getContext().getUser() == null) {
throw new LoginSignal(request); throw new LoginSignal(request);
} else if (! ContentSectionDispatcher.checkAdminAccess(request, section)) { } else if (! ContentSectionServlet.checkAdminAccess(request, section)) {
throw new com.arsdigita.cms.dispatcher.AccessDeniedException(); throw new com.arsdigita.cms.dispatcher.AccessDeniedException();
} }

View File

@ -1,7 +1,7 @@
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
<jsp:directive.page import="com.arsdigita.cms.ui.ItemSearchPage"/> <jsp:directive.page import="com.arsdigita.cms.ui.ItemSearchPage"/>
<jsp:directive.page import="com.arsdigita.cms.dispatcher.ContentSectionDispatcher"/> <jsp:directive.page import="com.arsdigita.cms.ContentSectionServlet"/>
<jsp:directive.page import="com.arsdigita.cms.ContentSection"/> <jsp:directive.page import="com.arsdigita.cms.ContentSection"/>
<jsp:directive.page import="com.arsdigita.cms.dispatcher.Utilities"/> <jsp:directive.page import="com.arsdigita.cms.dispatcher.Utilities"/>
<jsp:directive.page import="com.arsdigita.dispatcher.*"/> <jsp:directive.page import="com.arsdigita.dispatcher.*"/>
@ -17,9 +17,9 @@
DispatcherHelper.cacheDisable(response); DispatcherHelper.cacheDisable(response);
ContentSection section = ContentSection section =
ContentSectionDispatcher.getContentSection(request); ContentSectionServlet.getContentSection(request);
if (! ContentSectionDispatcher.checkAdminAccess(request, section)) { if (! ContentSectionServlet.checkAdminAccess(request, section)) {
throw new com.arsdigita.cms.dispatcher.AccessDeniedException(); throw new com.arsdigita.cms.dispatcher.AccessDeniedException();
} }

View File

@ -6,6 +6,14 @@
// Version: $Revision: #1 $ $DateTime: 2003/11/06 11:50:38 $ // Version: $Revision: #1 $ $DateTime: 2003/11/06 11:50:38 $
// See: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=108722 // See: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=108722
// FIXME: the text below needs to be prettified and globalized. // FIXME: the text below needs to be prettified and globalized.
//
// Wild Guess: JSP to handle the legacy presentation based on either folder
// structure or content section specific categories. Now replaced by
// navigation and terms, therefore no longer used.
// Link to this jsp is still part of CMS UI (part of content section
// listing in content-center but hidden by configuration parameter
// com.arsdigita.cms.hide_legacy_public_site_link
// in CMSConfig
</jsp:scriptlet> </jsp:scriptlet>
<jsp:scriptlet> <jsp:scriptlet>

View File

@ -60,6 +60,7 @@ public class FormProcessException extends ServletException {
* printed twice, which is not that big of a deal in the grand scheme of * printed twice, which is not that big of a deal in the grand scheme of
* things. * things.
*/ */
@Override
public void printStackTrace() { public void printStackTrace() {
super.printStackTrace(); super.printStackTrace();
if (getRootCause() != null) { if (getRootCause() != null) {
@ -71,6 +72,7 @@ public class FormProcessException extends ServletException {
/** /**
* @see #printStackTrace() * @see #printStackTrace()
*/ */
@Override
public void printStackTrace(java.io.PrintStream s) { public void printStackTrace(java.io.PrintStream s) {
super.printStackTrace(s); super.printStackTrace(s);
if (getRootCause() != null) { if (getRootCause() != null) {
@ -82,6 +84,7 @@ public class FormProcessException extends ServletException {
/** /**
* @see #printStackTrace() * @see #printStackTrace()
*/ */
@Override
public void printStackTrace(java.io.PrintWriter s) { public void printStackTrace(java.io.PrintWriter s) {
super.printStackTrace(s); super.printStackTrace(s);
if (getRootCause() != null) { if (getRootCause() != null) {
@ -95,7 +98,7 @@ public class FormProcessException extends ServletException {
* #getRootCause()}.<code>getMessage()</code>.</p> * #getRootCause()}.<code>getMessage()</code>.</p>
**/ **/
public String getMessages() { public String getMessages() {
StringBuffer result = new StringBuffer(getMessage()); StringBuilder result = new StringBuilder(getMessage());
if ( getRootCause() != null ) { if ( getRootCause() != null ) {
result.append(" (root cause: ") result.append(" (root cause: ")
.append(getRootCause().getMessage()) .append(getRootCause().getMessage())

View File

@ -161,6 +161,7 @@ public class SimpleContainer extends BlockStylable implements Container {
* Returns all the components of this container. * Returns all the components of this container.
* @return all the components of this container. * @return all the components of this container.
*/ */
@Override
public Iterator children() { public Iterator children() {
return m_components.iterator(); return m_components.iterator();
} }

View File

@ -63,7 +63,7 @@ import com.arsdigita.util.UncheckedWrapperException;
public class MultipartHttpServletRequest implements HttpServletRequest { public class MultipartHttpServletRequest implements HttpServletRequest {
private static final Category s_log = Category.getInstance private static final Category s_log = Category.getInstance
(MultipartHttpServletRequest.class); (MultipartHttpServletRequest.class);
private HttpServletRequest m_request; private HttpServletRequest m_request;
private Map m_parameters = null; private Map m_parameters = null;
@ -205,9 +205,17 @@ public class MultipartHttpServletRequest implements HttpServletRequest {
return m_request.getRequestURI(); return m_request.getRequestURI();
} }
// public StringBuffer getRequestURL() {
// throw new UnsupportedOperationException
// ("This is a Servlet 2.3 feature that we do not currently support");
// }
/* Obviously there was a problem with this method in early implementations
* of Servlet specification 2.3 which was resolved later. So it should be
* save to use it now. (2012-02-06)
*/
public StringBuffer getRequestURL() { public StringBuffer getRequestURL() {
throw new UnsupportedOperationException return m_request.getRequestURL();
("This is a Servlet 2.3 feature that we do not currently support");
} }
public String getServletPath() { public String getServletPath() {

View File

@ -39,12 +39,9 @@ import java.util.Locale;
* *
* rootExcursion.run(); * rootExcursion.run();
* </code> * </code>
* @version $Id: KernelExcursion.java 287 2005-02-22 00:29:02Z sskracic $
*/ */
public abstract class KernelExcursion implements Runnable { public abstract class KernelExcursion implements Runnable {
public static final String versionId =
"$Id: KernelExcursion.java 287 2005-02-22 00:29:02Z sskracic $" +
"$Author: sskracic $" +
"$DateTime: 2004/08/16 18:10:38 $";
private static final Logger s_log = Logger.getLogger private static final Logger s_log = Logger.getLogger
(KernelExcursion.class); (KernelExcursion.class);

View File

@ -24,10 +24,12 @@ import com.arsdigita.dispatcher.InitialRequestContext;
import com.arsdigita.dispatcher.RequestContext; import com.arsdigita.dispatcher.RequestContext;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/**
*
* @version $Id: KernelRequestContext.java 287 2005-02-22 00:29:02Z sskracic $
*/
public class KernelRequestContext extends InitialRequestContext { public class KernelRequestContext extends InitialRequestContext {
public static final String versionId = "$Id: KernelRequestContext.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
private static final Logger s_cat = private static final Logger s_cat =
Logger.getLogger(KernelRequestContext.class.getName()); Logger.getLogger(KernelRequestContext.class.getName());

View File

@ -57,8 +57,9 @@ public class User extends Party {
* object type is either this base type or a subtype of this base type. * object type is either this base type or a subtype of this base type.
*/ */
public static final String BASE_DATA_OBJECT_TYPE = public static final String BASE_DATA_OBJECT_TYPE =
"com.arsdigita.kernel.User"; "com.arsdigita.kernel.User";
@Override
protected String getBaseDataObjectType() { protected String getBaseDataObjectType() {
return BASE_DATA_OBJECT_TYPE; return BASE_DATA_OBJECT_TYPE;
} }

View File

@ -482,14 +482,14 @@ public class UserContext {
* parameter values are doubly-encoded so that they are decoded * parameter values are doubly-encoded so that they are decoded
* appropriately. * appropriately.
* *
* @deprecated This should be moved to a more appropriate class.
* *
* @param req the request to encode * @param req the request to encode
* *
* @return the URL-encoded parameter * @return the URL-encoded parameter
* @deprecated This should be moved to a more appropriate class.
*/ */
public static String encodeReturnURL(HttpServletRequest req) { public static String encodeReturnURL(HttpServletRequest req) {
StringBuffer returnURL = new StringBuffer(100); StringBuilder returnURL = new StringBuilder(100);
returnURL.append(Web.getContext().getRequestURL().getRequestURI()); returnURL.append(Web.getContext().getRequestURL().getRequestURI());
returnURL.append('?'); returnURL.append('?');

View File

@ -66,10 +66,8 @@ import org.apache.log4j.Logger;
* </pre> * </pre>
* *
* <p> * <p>
* You may use the * You may use the <code>com.arsdigita.templating.stylesheet_paths</code> system
* <code>com.arsdigita.templating.stylesheet_paths</code> system * property to change the file from which the stylesheet patterns are drawn.
* property to change the file from which the stylesheet patterns are
* drawn.
* </p> * </p>
* *
* <p> * <p>
@ -118,19 +116,19 @@ public class PatternStylesheetResolver implements StylesheetResolver {
/** Logger instance for debugging. */ /** Logger instance for debugging. */
private static final Logger s_log = Logger.getLogger private static final Logger s_log = Logger.getLogger
(PatternStylesheetResolver.class); (PatternStylesheetResolver.class);
/** List of registered pattern generators which are queried in turn. */ /** List of registered pattern generators which are queried in turn. */
private static final HashMap s_generators = new HashMap(); private static final HashMap s_generators = new HashMap();
/** /**
* Registers a new pattern generator for the given key. * Registers a new pattern generator for the given key.
* *
* @param key the key as it appears in the pattern string * @param key the key as it appears in the pattern string
* @param gen a pattern generator for producing values to be * @param gen a pattern generator for producing values to be
* substituted for <code>key</code> * substituted for <code>key</code>
**/ */
public static void registerPatternGenerator(String key, public static void registerPatternGenerator(String key,
PatternGenerator gen) { PatternGenerator gen) {
s_generators.put(key, gen); s_generators.put(key, gen);
@ -159,6 +157,10 @@ public class PatternStylesheetResolver implements StylesheetResolver {
// This is a List of Lists. // This is a List of Lists.
private List m_paths = null; private List m_paths = null;
/**
*
* @param path
*/
private void loadPaths(String path) { private void loadPaths(String path) {
if (s_log.isInfoEnabled()) { if (s_log.isInfoEnabled()) {
s_log.info("Loading paths from " + path); s_log.info("Loading paths from " + path);
@ -200,6 +202,11 @@ public class PatternStylesheetResolver implements StylesheetResolver {
} }
} }
/**
*
* @param request
* @return
*/
public URL resolve(HttpServletRequest request) { public URL resolve(HttpServletRequest request) {
synchronized(this) { synchronized(this) {
if (m_paths == null) { if (m_paths == null) {
@ -271,6 +278,13 @@ public class PatternStylesheetResolver implements StylesheetResolver {
("no path to XSL stylesheet found; " + "try modifying " + m_path); ("no path to XSL stylesheet found; " + "try modifying " + m_path);
} }
/**
*
* @param inBits
* @param paths
* @param values
* @param request
*/
private void expandPlaceholders(String[] inBits, private void expandPlaceholders(String[] inBits,
ArrayList paths, ArrayList paths,
HashMap values, HashMap values,
@ -324,6 +338,13 @@ public class PatternStylesheetResolver implements StylesheetResolver {
} }
} }
/**
*
* @param key
* @param values
* @param request
* @return
*/
private String[] getValues(String key, private String[] getValues(String key,
HashMap values, HashMap values,
HttpServletRequest request) { HttpServletRequest request) {

View File

@ -30,8 +30,8 @@ import javax.servlet.jsp.tagext.BodyTagSupport;
* *
* <p>Usage:</p> * <p>Usage:</p>
* *
* <pre><code>&lt;acs:master path="path/to/master.jsp" /> * <pre><code>&lt;acs:master path="path/to/master.jsp" /&gt;</code></pre>
**/ */
public class QueryTag extends BodyTagSupport { public class QueryTag extends BodyTagSupport {
private String name = null; private String name = null;
@ -46,6 +46,7 @@ public class QueryTag extends BodyTagSupport {
this.name = name; this.name = name;
} }
@Override
public int doStartTag() throws JspTagException { public int doStartTag() throws JspTagException {
Session session = SessionManager.getSession(); Session session = SessionManager.getSession();

View File

@ -0,0 +1,4 @@
Only used by components/master.jsp and related files which seem to be
outdated.
Might be deleted.

View File

Before

Width:  |  Height:  |  Size: 836 B

After

Width:  |  Height:  |  Size: 836 B

View File

@ -24,7 +24,7 @@
"open" : "closed"; "open" : "closed";
%> %>
<tr><td><img src="<%= request.getContextPath() %>/packages/content-section/www/assets/folder-<%=folderGraphic%>.gif" width=17 height=17></td><td colspan="2">&nbsp;<a href="<%=section.getURL()%><%=topFolderPath%>index.jsp"><%=topFolders.get("folderLabel")%></a></td></tr> <tr><td><img src="<%= request.getContextPath() %>/templates/ccm-cms/content-section/assets/folder-<%=folderGraphic%>.gif" width=17 height=17></td><td colspan="2">&nbsp;<a href="<%=section.getURL()%><%=topFolderPath%>index.jsp"><%=topFolders.get("folderLabel")%></a></td></tr>
<% if (folderPath.startsWith((String) topFolders.get("folderName"))) { %> <% if (folderPath.startsWith((String) topFolders.get("folderName"))) { %>
<!-- Begin subfolder block --> <!-- Begin subfolder block -->
@ -42,7 +42,7 @@
"selected" : "closed"; "selected" : "closed";
%> %>
<tr><td width=17 height=17 bgcolor="white"><img src="<%= request.getContextPath() %>/packages/content-section/www/assets/blank.gif" width=17 height=17><td><img src="<%= request.getContextPath() %>/packages/content-section/www/assets/folder-<%=subFolderGraphic%>.gif" width=17 height=17><td>&nbsp;<a href="<%=section.getURL()%><%=subFolderPath%>index.jsp"><%=subFolders.get("folderLabel")%></a></td></tr> <tr><td width=17 height=17 bgcolor="white"><img src="<%= request.getContextPath() %>/templates/ccm-cms/content-section/assets/blank.gif" width=17 height=17><td><img src="<%= request.getContextPath() %>/templates/ccm-cms/content-section/assets/folder-<%=subFolderGraphic%>.gif" width=17 height=17><td>&nbsp;<a href="<%=section.getURL()%><%=subFolderPath%>index.jsp"><%=subFolders.get("folderLabel")%></a></td></tr>
<% } %> <% } %>
<!-- End subfolder loop --> <!-- End subfolder loop -->

View File

@ -1,5 +1,4 @@
<%@ taglib uri="/WEB-INF/jsp-template.tld" prefix="acs" %> <%@ taglib uri="/WEB-INF/jsp-template.tld" prefix="acs" %>
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html> <html>
<head> <head>

View File

@ -0,0 +1,19 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>com.arsdigita.templating.jsp</title>
</head>
<body>
<p>
Example for using JSP tags with the templating system.
</p>
<p>
File master.jsp is referenced as usabe example in
com.arsdigita.templating.jsp.QueryTag.java
</p>
<p>
Content of this directory is probably outdated!
</p>
</body>
</html>

View File

@ -1,15 +1,16 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html> <html>
<head> <head>
<title>com.arsdigita.templating.jsp</title> <title>com.arsdigita.templating.jsp</title>
</head> </head>
<body bgcolor="white"> <body>
<p> <p>
JSP tags that integrate with the templating system.
JSP tags that integrate with the templating system.
</p> </p>
<p>
Now no longer in use. All pages are either dynamically created (and rendered
using XSL transformation) or exported in html format.
</p>
</body> </body>
</html> </html>

View File

@ -597,9 +597,14 @@ public class Application extends Resource {
} }
/** /**
* Returns the path to this application through the dispatcher. * Returns the path to this application through the dispatcher. It does not
* contain the static prefix (if configured, "ccm" by default), so it can
* be used to construct url's for internal links.
*
* The path does not end in a slash. This method will not return * The path does not end in a slash. This method will not return
* null. * null.
*
* @return Path string including w/o static prefix (if configured)
*/ */
public final String getPath() { public final String getPath() {
final String path = (String) get(PRIMARY_URL); final String path = (String) get(PRIMARY_URL);
@ -613,7 +618,7 @@ public class Application extends Resource {
} }
} }
// XXX primary URL doesn't keep in sync with sitenode hierarchY // XXX primary URL doesn't keep in sync with sitenode hierarchy
// We need to use a trigger-like mechanism to keep the primaryURL // We need to use a trigger-like mechanism to keep the primaryURL
// denormalization correct. // denormalization correct.
/** /**

View File

@ -30,7 +30,6 @@ import com.arsdigita.kernel.security.UserContext;
import com.arsdigita.sitenode.SiteNodeRequestContext; import com.arsdigita.sitenode.SiteNodeRequestContext;
import com.arsdigita.util.Assert; import com.arsdigita.util.Assert;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.web.Application;
import java.io.IOException; import java.io.IOException;
import javax.servlet.ServletException; import javax.servlet.ServletException;

View File

@ -24,6 +24,10 @@ import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.Cookie; import javax.servlet.http.Cookie;
/**
*
* @author unknown
*/
public class HttpServletRequestWrapper extends ServletRequestWrapper public class HttpServletRequestWrapper extends ServletRequestWrapper
implements HttpServletRequest { implements HttpServletRequest {
private final HttpServletRequest m_req; private final HttpServletRequest m_req;

View File

@ -51,6 +51,14 @@ public class ResourceServlet extends BaseServlet {
private static final Logger s_log = private static final Logger s_log =
Logger.getLogger(ResourceServlet.class); Logger.getLogger(ResourceServlet.class);
/**
*
* @param sreq
* @param sresp
* @throws ServletException
* @throws IOException
*/
@Override
protected void doService(HttpServletRequest sreq, protected void doService(HttpServletRequest sreq,
HttpServletResponse sresp) HttpServletResponse sresp)
throws ServletException, IOException { throws ServletException, IOException {

View File

@ -916,7 +916,11 @@ public class URL {
} }
} }
public static final String getDispatcherPath() { /**
*
* @return
*/
public static String getDispatcherPath() {
final WebConfig config = Web.getConfig(); final WebConfig config = Web.getConfig();
final HttpServletRequest req = Web.getRequest(); final HttpServletRequest req = Web.getRequest();

View File

@ -51,11 +51,11 @@ public class Web {
private static final Logger s_log = Logger.getLogger(Web.class); private static final Logger s_log = Logger.getLogger(Web.class);
private static final ThreadLocal s_request = private static final ThreadLocal s_request =
new InternalRequestLocal(); new InternalRequestLocal();
private static final ThreadLocal s_servletContext = private static final ThreadLocal s_servletContext =
new InternalRequestLocal(); new InternalRequestLocal();
private static final ThreadLocal s_userContext = private static final ThreadLocal s_userContext =
new InternalRequestLocal(); new InternalRequestLocal();
private static final Map s_contexts = new HashMap(); private static final Map s_contexts = new HashMap();

View File

@ -0,0 +1,9 @@
The address
/templates/servlet/*
is used by some servlets to create a virtual temporary location to pass
in dynamic information at runtime.
Example:
Servlet content-sectionr uses
/templates/servlet/content-item/*
to pass in runtime information.

View File

@ -0,0 +1,11 @@
The address
/themes/servlet/*
is used by some servlets to create a virtual temporary location to pass
in dynamic information for theme files (*.css / *.xsl) which need to be
collected at runtime.
Example:
Servlet portlet-type-xsl used
/themes/servlet/portlet-type/*
to pass in at runtime a list of actually installed portlet's default xsl
templates to use as fallback.

View File

@ -70,7 +70,10 @@
<!-- <ccm:application name="ccm-cms-types-job"/> --> <!-- <ccm:application name="ccm-cms-types-job"/> -->
<!-- <ccm:application name="ccm-cms-types-legalnotice"/> --> <!-- <ccm:application name="ccm-cms-types-legalnotice"/> -->
<!-- <ccm:application name="ccm-cms-types-minutes"/> --> <!-- <ccm:application name="ccm-cms-types-minutes"/> -->
<!-- <ccm:application name="ccm-cms-types-motditem"/> --> <!-- <ccm:application name="ccm-cms-types-motditem"/>
Current code does not include any xsl templates, conent type does not
appear in the list of types in content center.
For the moment no longer supported (2012-02-06) -->
<!-- <ccm:application name="ccm-cms-types-mparticle"/> --> <!-- <ccm:application name="ccm-cms-types-mparticle"/> -->
<!-- <ccm:application name="ccm-cms-types-newsitem"/> --> <!-- <ccm:application name="ccm-cms-types-newsitem"/> -->
<!-- <ccm:application name="ccm-cms-types-organization"/> --> <!-- <ccm:application name="ccm-cms-types-organization"/> -->

View File

@ -4,7 +4,8 @@ waf.bebop.base_page=com.arsdigita.aplaws.ui.SimplePage
# #
; dhtml editor to use (system wide) ; dhtml editor to use (system wide)
; Xinha is default ; Xinha is default
; waf.bebop.dhtml_editor=Xinha ; default: Xinha editor & src=/assets/xinha/XinhaLoader.js
; To use FCKeditor configure:
; waf.bebop.dhtml_editor=FCKeditor ; waf.bebop.dhtml_editor=FCKeditor
waf.categorization.show_internal_name=true waf.categorization.show_internal_name=true
@ -13,9 +14,10 @@ waf.dispatcher.default_expiry=3600
; ;
waf.kernel.data_permission_check_enabled=false waf.kernel.data_permission_check_enabled=false
waf.kernel.primary_user_identifier=email waf.kernel.primary_user_identifier=email
; if you activate screen_name, forum loader doesn't work. ; if you activate screen_name, forum loader does not work.
; waf.kernel.primary_user_identifier=screen_name ; waf.kernel.primary_user_identifier=screen_name
waf.kernel.supported_languages=en,de waf.kernel.supported_languages=en,de
waf.kernel.language_independent_items=true
; security.properties: ; security.properties:
waf.auto_registration_on=false waf.auto_registration_on=false
@ -98,7 +100,6 @@ com.arsdigita.cms.contenttypes.newsitem.start_year=2000
com.arsdigita.cms.contenttypes.newsitem.end_year_delta=5 com.arsdigita.cms.contenttypes.newsitem.end_year_delta=5
# Forum application # Forum application
com.arsdigita.forum.show_new_tabs=true com.arsdigita.forum.show_new_tabs=true
com.arsdigita.forum.use_wysiwyg_editor=true com.arsdigita.forum.use_wysiwyg_editor=true
@ -116,18 +117,21 @@ com.arsdigita.london.atoz.root_category_picker=com.arsdigita.london.terms.ui.Roo
com.arsdigita.navigation.category_menu_show_grand_children=false com.arsdigita.navigation.category_menu_show_grand_children=false
; com.arsdigita.navigation.category_menu_show_nephews=false ; com.arsdigita.navigation.category_menu_show_nephews=false
com.arsdigita.navigation.default_cat_root_path=/navigation/ com.arsdigita.navigation.default_cat_root_path=/navigation/
com.arsdigita.navigation.default_template=/packages/navigation/templates/default.jsp com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/sci-default.jsp
; com.arsdigita.navigation.templates_file=bundle/navigation/sci-templates.txt
# ccm-ldn-search application # ccm-search application
com.arsdigita.london.search.show_sponsored_links=true com.arsdigita.london.search.show_sponsored_links=true
# ccm-ldn-subsite application # ccm-subsite application
com.arsdigita.london.subsite.root_category_picker=com.arsdigita.london.terms.ui.RootCategoryPicker com.arsdigita.subsite.root_category_picker=com.arsdigita.london.terms.ui.RootCategoryPicker
# ccm-themedirector application # ccm-themedirector application
themedirector.default_theme_context=
# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf
themedirector.default_theme_path=themes/static/aplaws themedirector.default_theme_path=themes/static/aplaws
com.arsdigita.london.cms.dublin.audience_domain=LGAL com.arsdigita.london.cms.dublin.audience_domain=LGAL

View File

@ -50,7 +50,10 @@
<ccm:application name="ccm-cms-types-job"/> <ccm:application name="ccm-cms-types-job"/>
<ccm:application name="ccm-cms-types-legalnotice"/> <ccm:application name="ccm-cms-types-legalnotice"/>
<ccm:application name="ccm-cms-types-minutes"/> <ccm:application name="ccm-cms-types-minutes"/>
<!-- Currently no known function --> <!-- <ccm:application name="ccm-cms-types-motditem"/>
Current code does not include any xsl templates, conent type does not
appear in the list of types in content center.
For the moment no longer supported (2012-02-06) -->
<ccm:application name="ccm-cms-types-motditem"/> <ccm:application name="ccm-cms-types-motditem"/>
<ccm:application name="ccm-cms-types-mparticle"/> <ccm:application name="ccm-cms-types-mparticle"/>
<ccm:application name="ccm-cms-types-newsitem"/> <ccm:application name="ccm-cms-types-newsitem"/>

View File

@ -86,8 +86,12 @@
<!-- <ccm:application name="ccm-forum-categorised"/> --> <!-- <ccm:application name="ccm-forum-categorised"/> -->
<!-- <ccm:application name="ccm-cms-types-image"/> --> <!-- <ccm:application name="ccm-cms-types-image"/> -->
<!-- <ccm:application name="ccm-cms-assets-notes"/> --> <!-- <ccm:application name="ccm-cms-assets-notes"/> -->
<!-- Without any useful known function -->
<!-- <ccm:application name="ccm-cms-types-motditem"/> --> <!-- <ccm:application name="ccm-cms-types-motditem"/>
Current code does not include any xsl templates, conent type does not
appear in the list of types in content center.
For the moment no longer supported (2012-02-06) -->
<!-- <ccm:application name="ccm-portalserver"/> --> <!-- <ccm:application name="ccm-portalserver"/> -->
<!-- Completely untested --> <!-- Completely untested -->
<!-- <ccm:application name="ccm-portlet"/> --> <!-- <ccm:application name="ccm-portlet"/> -->

View File

@ -7,7 +7,7 @@
exclude-result-prefixes="bebop cms ui aplaws xsl" exclude-result-prefixes="bebop cms ui aplaws xsl"
version="1.0"> version="1.0">
<xsl:import href="../../heirloom/apps/content-section/xsl/admin.xsl"/> <xsl:import href="../../heirloom/apps/content-section/xsl/content-admin.xsl"/>
<xsl:import href="../../heirloom/packages/bebop/xsl/dcp.xsl"/> <xsl:import href="../../heirloom/packages/bebop/xsl/dcp.xsl"/>
<xsl:import href="category-step.xsl"/> <xsl:import href="category-step.xsl"/>

View File

@ -60,6 +60,9 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
public static final String PATH_COOKIE_NAME = "ad_path"; public static final String PATH_COOKIE_NAME = "ad_path";
public static final char PATH_COOKIE_SEPARATOR = '|'; public static final char PATH_COOKIE_SEPARATOR = '|';
/**
*
*/
@Override @Override
public RequestDispatcher resolve(String templatePath, public RequestDispatcher resolve(String templatePath,
HttpServletRequest sreq, HttpServletRequest sreq,

View File

@ -49,16 +49,13 @@ import com.arsdigita.util.Assert;
* *
* @author <a href="mailto:teadams@arsdigita.com">Tracy Adams</a> * @author <a href="mailto:teadams@arsdigita.com">Tracy Adams</a>
* @version $Revision: #6 $ $Date: 2004/08/17 $ * @version $Revision: #6 $ $Date: 2004/08/17 $
*/ * @version $Id: //portalserver/dev/src/com/arsdigita/portalserver/ApplicationPage.java#6 $
/* XXX Have to control links with permissions and
* add access control
*/ */
public class ApplicationPage extends CWPage { public class ApplicationPage extends CWPage {
public static final String versionId =
"$Id: //portalserver/dev/src/com/arsdigita/portalserver/ApplicationPage.java#6 $" + /* XXX Have to control links with permissions and
"$Author: dennis $" + * add access control
"$DateTime: 2004/08/17 23:19:25 $"; */
private static org.apache.log4j.Logger log = private static org.apache.log4j.Logger log =
org.apache.log4j.Logger.getLogger(ApplicationPage.class.getName()); org.apache.log4j.Logger.getLogger(ApplicationPage.class.getName());
@ -75,6 +72,7 @@ public class ApplicationPage extends CWPage {
} }
} }
@Override
public void lock() { public void lock() {
buildPage(); buildPage();
@ -108,7 +106,9 @@ public class ApplicationPage extends CWPage {
} }
protected void buildGlobal(Container global) { protected void buildGlobal(Container global) {
Link link = new Link( new Label(GlobalizationUtil.globalize("cw.workspace.sign_out")), "/register/logout"); Link link = new Link( new Label(
GlobalizationUtil.globalize("cw.workspace.sign_out")),
"/register/logout");
link.setClassAttr("signoutLink"); link.setClassAttr("signoutLink");
@ -145,7 +145,8 @@ public class ApplicationPage extends CWPage {
// Assert.assertNotNull(party, "Party party"); // Assert.assertNotNull(party, "Party party");
Assert.exists(party, "Party party"); Assert.exists(party, "Party party");
link.setChild(new Label(GlobalizationUtil.globalize("cw.workspace.personal_workspace"))); link.setChild(new Label(GlobalizationUtil
.globalize("cw.workspace.personal_workspace")));
link.setTarget("/personal-portal/" + party.getID() + "/"); link.setTarget("/personal-portal/" + party.getID() + "/");
} }
} }

View File

@ -40,19 +40,16 @@ import org.apache.log4j.Logger;
* *
* @author <a href="mailto:elorenzo@arsdigita.com">Eric Lorenzo</a> * @author <a href="mailto:elorenzo@arsdigita.com">Eric Lorenzo</a>
* @version $Revision: #5 $ $Date: 2004/08/17 $ * @version $Revision: #5 $ $Date: 2004/08/17 $
*/ * @version $Id: //portalserver/dev/src/com/arsdigita/portalserver/CWPage.java#5 $
/* XXX Have to control links with permissions and
* add access control
*/ */
public class CWPage extends Page { public class CWPage extends Page {
public static final String versionId =
"$Id: //portalserver/dev/src/com/arsdigita/portalserver/CWPage.java#5 $" +
"$Author: dennis $" +
"$DateTime: 2004/08/17 23:19:25 $";
private static final Logger s_log = Logger.getLogger(CWPage.class); private static final Logger s_log = Logger.getLogger(CWPage.class);
/* XXX Have to control links with permissions and
* add access control
*/
private final Container m_global; private final Container m_global;
private final Container m_header; private final Container m_header;
private final Container m_body; private final Container m_body;
@ -133,7 +130,11 @@ public class CWPage extends Page {
setSelected(ps, null); setSelected(ps, null);
} }
/**
*
*/
private class Panel extends SimpleContainer { private class Panel extends SimpleContainer {
@Override
public void generateXML(PageState ps, Element p) { public void generateXML(PageState ps, Element p) {
Component selected = getSelected(ps); Component selected = getSelected(ps);
if (selected == null) { if (selected == null) {

View File

@ -16,8 +16,8 @@
</ccm:dependencies> </ccm:dependencies>
<ccm:directories> <ccm:directories>
<!-- pdl is empty and not used, buf required because we use sql for <!-- pdl is empty and not used, but required because we use sql for
some update3 scripts. --> some update scripts. -->
<ccm:directory name="pdl"/> <ccm:directory name="pdl"/>
<ccm:directory name="src"/> <ccm:directory name="src"/>
<ccm:directory name="sql"/> <ccm:directory name="sql"/>

View File

@ -17,6 +17,7 @@ waf.kernel.primary_user_identifier=email
; if you activate screen_name, forum loader does not work. ; if you activate screen_name, forum loader does not work.
; waf.kernel.primary_user_identifier=screen_name ; waf.kernel.primary_user_identifier=screen_name
waf.kernel.supported_languages=de,en waf.kernel.supported_languages=de,en
waf.kernel.language_independent_items=true
; security.properties: ; security.properties:
waf.auto_registration_on=false waf.auto_registration_on=false
@ -46,7 +47,7 @@ com.arsdigita.cms.default_item_template_path=/default/aplaws-item.jsp
com.arsdigita.cms.default_template_resolver_class=com.arsdigita.subsite.dispatcher.SubsiteItemTemplateResolver com.arsdigita.cms.default_template_resolver_class=com.arsdigita.subsite.dispatcher.SubsiteItemTemplateResolver
; Configure dhtml editor for use in cms content-center ; Configure dhtml editor for use in cms content-center
; Xinha is default and should work out of the box ; Xinha is default and does work out of the box
; A CCM specific configuration file is used to prevent a mess with the standard ; A CCM specific configuration file is used to prevent a mess with the standard
; configuration, default is: ; configuration, default is:
; com.arsdigita.cms.dhtml_editor_config=Xinha.Config,/assets/xinha/CCMcmsXinhaConfig.js ; com.arsdigita.cms.dhtml_editor_config=Xinha.Config,/assets/xinha/CCMcmsXinhaConfig.js
@ -94,7 +95,12 @@ com.arsdigita.forum.disable_page_caching=true
# ccm-navigation application # ccm-navigation application
; com.arsdigita.navigation.category_menu_show_grand_children_min=1
; com.arsdigita.navigation.category_menu_show_grand_children=adaptive
; com.arsdigita.navigation.category_menu_show_grand_children_limit=1
; com.arsdigita.navigation.category_menu_show_grand_children_max=65536
com.arsdigita.navigation.category_menu_show_grand_children=false com.arsdigita.navigation.category_menu_show_grand_children=false
; com.arsdigita.navigation.category_menu_show_nephews=false
com.arsdigita.navigation.default_cat_root_path=/navigation/ com.arsdigita.navigation.default_cat_root_path=/navigation/
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/sci-default.jsp com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/sci-default.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/sci-templates.txt com.arsdigita.navigation.templates_file=bundle/navigation/sci-templates.txt
@ -112,7 +118,6 @@ com.arsdigita.subsite.root_category_picker=com.arsdigita.london.terms.ui.RootCat
themedirector.default_theme_context= themedirector.default_theme_context=
# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf # themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf
themedirector.default_theme_path=themes/static/aplaws-generic themedirector.default_theme_path=themes/static/aplaws-generic
themedirector.file_extensions=bmp css gif jpeg jpg js png xml xsl
# ccm-sci-bundle (Loader only) # ccm-sci-bundle (Loader only)

View File

@ -84,8 +84,8 @@
<ccm:application name="ccm-portalserver"/> <ccm:application name="ccm-portalserver"/>
<!-- LDN extension --> <!-- LDN extension -->
<!-- temporyrily excluded because configuration has to be cleared <!-- temporarily excluded because configuration issues have to be resolved
<ccm:application name="ccm-ldn-rss"/> <ccm:application name="ccm-rssfeed"/>
--> -->
<!-- SCI extension --> <!-- SCI extension -->
@ -104,7 +104,7 @@
<!-- Scientific CMS potential ADD-ONS packages --> <!-- Scientific CMS potential ADD-ONS packages -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Content Types --> <!-- CMS Content Types -->
<!-- <!--
<ccm:application name="ccm-cms-types-agenda"/> <ccm:application name="ccm-cms-types-agenda"/>
<ccm:application name="ccm-cms-types-faqitem"/> <ccm:application name="ccm-cms-types-faqitem"/>
@ -121,7 +121,7 @@
<ccm:application name="ccm-cms-types-xmlfeed"/> <ccm:application name="ccm-cms-types-xmlfeed"/>
--> -->
<!-- Applications --> <!-- Applications -->
<!-- <!--
<ccm:application name="ccm-auth-http"/> <ccm:application name="ccm-auth-http"/>
<ccm:application name="ccm-bookmarks"/> <ccm:application name="ccm-bookmarks"/>
@ -151,8 +151,10 @@
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Content Types --> <!-- Content Types -->
<!-- Without known funcionality <!-- <ccm:application name="ccm-cms-types-motditem"/>
<ccm:application name="ccm-cms-types-motditem"/> --> Current code does not include any xsl templates, conent type does not
appear in the list of types in content center.
For the moment no longer supported (2012-02-06) -->
<!-- Applications --> <!-- Applications -->
<!-- currently doesn't work for unknown reason <!-- currently doesn't work for unknown reason

View File

@ -220,20 +220,20 @@
<servlet-class>com.arsdigita.dispatcher.PortletTypeXSLServlet</servlet-class> <servlet-class>com.arsdigita.dispatcher.PortletTypeXSLServlet</servlet-class>
</servlet> </servlet>
<!-- module ccm-ldn-rss - servlet declaration BEGIN --> <!-- module ccm-rssfeed - servlet declaration BEGIN -->
<servlet> <servlet>
<servlet-name>rss-files</servlet-name> <servlet-name>rssfeed-files</servlet-name>
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
<init-param> <init-param>
<param-name>template-path</param-name> <param-name>template-path</param-name>
<param-value>/templates/ccm-ldn-rss</param-value> <param-value>/templates/ccm-rssfeed</param-value>
</init-param> </init-param>
<init-param> <init-param>
<param-name>file-resolver</param-name> <param-name>file-resolver</param-name>
<param-value>com.arsdigita.london.rss.RSSFileResolver</param-value> <param-value>com.arsdigita.rssfeed.RSSFileResolver</param-value>
</init-param> </init-param>
</servlet> </servlet>
<!-- module ccm-ldn-rss - servlet declaration END --> <!-- module ccm-rssfeed - servlet declaration END -->
<!-- module ccm-ldn-search - servlet declarations BEGIN --> <!-- module ccm-ldn-search - servlet declarations BEGIN -->
<servlet> <servlet>
@ -347,11 +347,12 @@
<url-pattern>/ccm-navigation/files/*</url-pattern> <url-pattern>/ccm-navigation/files/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<!-- module ccm-ldn-rss - servlet mappings --> <!-- module ccm-rssfeed - servlet mappings BEGIN -->
<servlet-mapping> <servlet-mapping>
<servlet-name>rss-files</servlet-name> <servlet-name>rssfeed-files</servlet-name>
<url-pattern>/ccm-ldn-rss/files/*</url-pattern> <url-pattern>/ccm-rssfeed/files/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<!-- module ccm-rssfeed - servlet mappings END -->
<!-- module ccm-ldn-search - servlet mappings BEGIN --> <!-- module ccm-ldn-search - servlet mappings BEGIN -->
<servlet-mapping> <servlet-mapping>
@ -420,7 +421,7 @@
<servlet-mapping> <servlet-mapping>
<servlet-name>legacy-adapter</servlet-name> <servlet-name>legacy-adapter</servlet-name>
<url-pattern>/themes/servlet/legacy-adapter/*</url-pattern> <url-pattern>/templates/servlet/legacy-adapter/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>
@ -460,7 +461,7 @@
<servlet-mapping> <servlet-mapping>
<servlet-name>content-item-xsl</servlet-name> <servlet-name>content-item-xsl</servlet-name>
<url-pattern>/themes/servlet/content-item/*</url-pattern> <url-pattern>/templates/servlet/content-item/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>

View File

@ -17,6 +17,7 @@ waf.kernel.primary_user_identifier=email
; if you activate screen_name, forum loader does not work. ; if you activate screen_name, forum loader does not work.
; waf.kernel.primary_user_identifier=screen_name ; waf.kernel.primary_user_identifier=screen_name
waf.kernel.supported_languages=de,en waf.kernel.supported_languages=de,en
waf.kernel.language_independent_items=true
; security.properties: ; security.properties:
waf.auto_registration_on=false waf.auto_registration_on=false
@ -56,6 +57,7 @@ com.arsdigita.cms.default_template_resolver_class=com.arsdigita.subsite.dispatch
; com.arsdigita.cms.dhtml_editor_hidden_buttons= ; com.arsdigita.cms.dhtml_editor_hidden_buttons=
; com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS ; com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS
com.arsdigita.cms.allow_content_create_in_section_listing=false
com.arsdigita.cms.disable_item_pfs=true com.arsdigita.cms.disable_item_pfs=true
com.arsdigita.cms.hide_admin_tabs=true com.arsdigita.cms.hide_admin_tabs=true
@ -94,7 +96,12 @@ com.arsdigita.forum.disable_page_caching=true
# ccm-navigation application # ccm-navigation application
; com.arsdigita.navigation.category_menu_show_grand_children_min=1
; com.arsdigita.navigation.category_menu_show_grand_children=adaptive
; com.arsdigita.navigation.category_menu_show_grand_children_limit=1
; com.arsdigita.navigation.category_menu_show_grand_children_max=65536
com.arsdigita.navigation.category_menu_show_grand_children=false com.arsdigita.navigation.category_menu_show_grand_children=false
; com.arsdigita.navigation.category_menu_show_nephews=false
com.arsdigita.navigation.default_cat_root_path=/navigation/ com.arsdigita.navigation.default_cat_root_path=/navigation/
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/sci-default.jsp com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/sci-default.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/sci-templates.txt com.arsdigita.navigation.templates_file=bundle/navigation/sci-templates.txt

View File

@ -106,7 +106,7 @@
<!-- Scientific CMS potential ADD-ONS packages --> <!-- Scientific CMS potential ADD-ONS packages -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Content Types --> <!-- CMS Content Types -->
<!-- <!--
--> -->
<ccm:application name="ccm-cms-types-agenda"/> <ccm:application name="ccm-cms-types-agenda"/>
@ -135,7 +135,8 @@
several others. several others.
<ccm:application name="ccm-portlet-latestnews"/> <ccm:application name="ccm-portlet-latestnews"/>
--> -->
<!-- Applications -->
<!-- Applications -->
<!-- <!--
<ccm:application name="ccm-auth-http"/> <ccm:application name="ccm-auth-http"/>
<ccm:application name="ccm-bookmarks"/> <ccm:application name="ccm-bookmarks"/>
@ -158,13 +159,16 @@
--> -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Scientific CMS list of OBSOLETE modules --> <!-- Scientific CMS list of OBSOLETE modules -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Content Types --> <!-- Content Types -->
<!-- Without known funcionality --> <!-- <ccm:application name="ccm-cms-types-motditem"/>
<ccm:application name="ccm-cms-types-motditem"/> Current code does not include any xsl templates, conent type does not
appear in the list of types in content center.
For the moment no longer supported (2012-02-06) -->
<!-- Applications --> <!-- Applications -->
<!-- currently doesn't work for unknown reason <!-- currently doesn't work for unknown reason
@ -187,8 +191,6 @@
contain java code to be compiled! contain java code to be compiled!
<ccm:application name="tools"/> --> <ccm:application name="tools"/> -->
</ccm:build> </ccm:build>
</ccm:project> </ccm:project>

View File

@ -421,7 +421,7 @@
<servlet-mapping> <servlet-mapping>
<servlet-name>legacy-adapter</servlet-name> <servlet-name>legacy-adapter</servlet-name>
<url-pattern>/themes/servlet/legacy-adapter/*</url-pattern> <url-pattern>/templates/servlet/legacy-adapter/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>
@ -461,7 +461,7 @@
<servlet-mapping> <servlet-mapping>
<servlet-name>content-item-xsl</servlet-name> <servlet-name>content-item-xsl</servlet-name>
<url-pattern>/themes/servlet/content-item/*</url-pattern> <url-pattern>/templates/servlet/content-item/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>

View File

@ -1,14 +1,14 @@
# Scientific CMS devel bundle integration.properties # Scientific CMS devel bundle integration.properties
# #
waf.bebop.base_page=com.arsdigita.aplaws.ui.SimplePage waf.bebop.base_page=com.arsdigita.bundle.ui.SimplePage
# #
; dhtml editor to use (system wide) ; dhtml editor to use (system wide)
; Xinha is default ; Xinha is default
; default: Xinha editor & src=/assets/xinha/XinhaLoader.js ; default: Xinha editor & src=/assets/xinha/XinhaLoader.js
#waf.bebop.dhtml_editor=FCKeditor ; To use FCKeditor configure:
; waf.bebop.dhtml_editor=FCKeditor
waf.categorization.show_internal_name=true waf.categorization.show_internal_name=true
waf.categorization.supported_languages=de,en
waf.dispatcher.default_expiry=3600 waf.dispatcher.default_expiry=3600
; ;
@ -40,25 +40,22 @@ waf.xml.activate_full_date_formatter=true
# ccm-cms parameters # ccm-cms parameters
com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker com.arsdigita.cms.category_authoring_add_form=com.arsdigita.bundle.ui.ItemCategoryPicker
com.arsdigita.cms.default_folder_template_path=/default/aplaws-folder.jsp com.arsdigita.cms.default_folder_template_path=/default/aplaws-folder.jsp
com.arsdigita.cms.default_item_template_path=/default/aplaws-item.jsp com.arsdigita.cms.default_item_template_path=/default/aplaws-item.jsp
com.arsdigita.cms.default_template_resolver_class=com.arsdigita.subsite.dispatcher.SubsiteItemTemplateResolver com.arsdigita.cms.default_template_resolver_class=com.arsdigita.subsite.dispatcher.SubsiteItemTemplateResolver
; Configure dhtml editor for use in cms content-center ; Configure dhtml editor for use in cms content-center
; Xinha is default and should work out of the box ; Xinha is default and does work out of the box
; com.arsdigita.cms.dhtml_editor_config=XinhaConfig,/assets/xinha/XinhaConfig.js ; A CCM specific configuration file is used to prevent a mess with the standard
; as a temporary measure a different configuration file which includes a link selection box for CCM items ; configuration, default is:
; and CCM images should be specified: ; com.arsdigita.cms.dhtml_editor_config=Xinha.Config,/assets/xinha/CCMcmsXinhaConfig.js
com.arsdigita.cms.dhtml_editor_config=XinhaConfig,/assets/xinha/CCMcmsXinhaConfig.js
; to use FCKeditor: ; to use FCKeditor:
; com.arsdigita.cms.dhtml_editor_config=FCKEditor.Config.StyleDefault?,/assets/fckeditor/config/fckconfigOpenCCM.js ; com.arsdigita.cms.dhtml_editor_config=FCKEditor.Config.StyleDefault?,/assets/fckeditor/config/fckconfigOpenCCM.js
; com.arsdigita.cms.dhtml_editor_config=XinhaConfig,/assets/xinha/XinhaConfig.js
; com.arsdigita.cms.dhtml_editor_hidden_buttons= ; com.arsdigita.cms.dhtml_editor_hidden_buttons=
; com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS ; com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS
com.arsdigita.cms.dhtml_editor_plugins=
com.arsdigita.cms.disable_item_pfs=true com.arsdigita.cms.disable_item_pfs=true
@ -75,7 +72,10 @@ com.arsdigita.cms.use_streamlined_creation=true
# ccm-cms-types-event parameters # ccm-cms-types-event parameters
com.arsdigita.cms.contenttypes.event.hide_cost=true com.arsdigita.cms.contenttypes.event.hide_cost=true
com.arsdigita.cms.contenttypes.event.hide_date_description=false
com.arsdigita.cms.contenttypes.event.hide_event_type=true
com.arsdigita.cms.contenttypes.event.hide_link_to_map=true com.arsdigita.cms.contenttypes.event.hide_link_to_map=true
com.arsdigita.cms.contenttypes.event.hide_main_contributor=true
com.arsdigita.cms.contenttypes.event.use_html_date_description=false com.arsdigita.cms.contenttypes.event.use_html_date_description=false
com.arsdigita.cms.contenttypes.event.start_year=2000 com.arsdigita.cms.contenttypes.event.start_year=2000
com.arsdigita.cms.contenttypes.event.end_year_delta=5 com.arsdigita.cms.contenttypes.event.end_year_delta=5
@ -101,15 +101,15 @@ com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/s
com.arsdigita.navigation.templates_file=bundle/navigation/sci-templates.txt com.arsdigita.navigation.templates_file=bundle/navigation/sci-templates.txt
# ccm-ldn-search application # ccm-search application
com.arsdigita.london.search.show_sponsored_links=true com.arsdigita.london.search.show_sponsored_links=true
# ccm-ldn-subsite application # ccm-subsite application
com.arsdigita.london.subsite.root_category_picker=com.arsdigita.london.terms.ui.RootCategoryPicker com.arsdigita.subsite.root_category_picker=com.arsdigita.london.terms.ui.RootCategoryPicker
# ccm-ldn-themedirector application # ccm-themedirector application
themedirector.default_theme_context= themedirector.default_theme_context=
#themedirector.default_theme_manifest=ccm-jp-aplaws.web.mf #themedirector.default_theme_manifest=ccm-jp-aplaws.web.mf
themedirector.default_theme_path=themes/static/aplaws-generic themedirector.default_theme_path=themes/static/aplaws-generic
@ -117,8 +117,9 @@ themedirector.file_extensions=bmp css gif jpeg jpg js png xml xsl
# ccm-sci-bundle (Loader only) # ccm-sci-bundle (Loader only)
# com.arsdigita.bundle.category_files=bundle/categories/sci-nav-domain-1.00.xml,WEB-INF/sci/sci-nav-hierarchy-1.00.xml #com.arsdigita.bundle.loader.category_files=bundle/categories/sci-nav-domain-1.00.xml,bundle/categories/sci-nav-hierarchy-1.00.xml
#com.arsdigita.bundle.loader.custom_app_instances=com.arsdigita.navigation.Navigation:scimenu:ScientificCMS Navigation Menu,com.arsdigita.navigation.Navigation:libmenu:LibreCMS Navigation Menu
#com.arsdigita.bundle.loader.domain_mappings=STD-NAV:/navigation/,STD-NAV:/generic/,STD-NAV:/portal/
# ============================================================================================= # =============================================================================================
# runtime specific configurations # runtime specific configurations

View File

@ -0,0 +1,540 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Scientific CMS</display-name>
<description>Content and Collaboration Management for Scientific Institutions</description>
<!-- path and filename of the log4j user accessible config file
WEB-INF/conf/log4j.properties is the built-in default value -->
<context-param>
<param-name>log4j-conf-file</param-name>
<param-value>WEB-INF/conf/log4j.properties</param-value>
</context-param>
<!-- Require secure connection by redirect to host-port part
of parameter waf.web.secure_server
<filter>
<filter-name>secured</filter-name>
<filter-class>com.arsdigita.web.SecureFilter</filter-class>
</filter>
-->
<!-- Initialize Profiler timers
NOT USED with standard / production
<filter>
<filter-name>profiler</filter-name>
<filter-class>com.arsdigita.profiler.ProfilerFilter</filter-class>
</filter>
-->
<filter>
<filter-name>shortcuts</filter-name>
<filter-class>com.arsdigita.london.shortcuts.ShortcutFilter</filter-class>
</filter>
<filter>
<filter-name>subsite</filter-name>
<filter-class>com.arsdigita.subsite.SubsiteFilter</filter-class>
</filter>
<!-- NOT USED HERE
<filter-mapping>
<filter-name>secured</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>profiler</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
<filter-mapping>
<filter-name>subsite</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>shortcuts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Context Listener
required and used to initialize the runtime environment before any other
task is performed or any servlet initialized.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<listener>
<listener-class>com.arsdigita.web.CCMApplicationContextListener</listener-class>
</listener>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BASE SERVLET DECLARATIONS SECTION
basically requirred by ccm-core
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet>
<servlet-name>reg</servlet-name>
<servlet-class>com.arsdigita.web.ContextRegistrationServlet</servlet-class>
<init-param>
<param-name>uri</param-name>
<param-value>/</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>legacy-dispatcher</servlet-name>
<servlet-class>com.arsdigita.sitenode.SiteNodeDispatcher</servlet-class>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet>
<servlet-name>ccm-dispatcher</servlet-name>
<servlet-class>com.arsdigita.web.DispatcherServlet</servlet-class>
<init-param>
<param-name>fallback-servlet</param-name>
<param-value>legacy-dispatcher</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>legacy-adapter</servlet-name>
<servlet-class>com.arsdigita.web.LegacyAdapterServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>cache-manager</servlet-name>
<servlet-class>com.arsdigita.caching.CacheServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>db-test</servlet-name>
<servlet-class>com.arsdigita.web.monitoring.DBTestServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>versioning-log</servlet-name>
<servlet-class>com.arsdigita.versioning.VersioningServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>oid-redirect</servlet-name>
<servlet-class>com.arsdigita.web.OIDRedirectServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>resource-resolver</servlet-name>
<servlet-class>com.arsdigita.web.ResourceServlet</servlet-class>
</servlet>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ADDITIONAL SERVLET DECLARATIONS SECTION
basically requirred by ccm-cms
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet>
<servlet-name>content-section</servlet-name>
<servlet-class>com.arsdigita.cms.ContentSectionServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>content-type-xsl</servlet-name>
<servlet-class>com.arsdigita.cms.dispatcher.ContentTypeXSLServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>content-item-xsl</servlet-name>
<servlet-class>com.arsdigita.cms.dispatcher.ContentItemXSLServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>template-xsl</servlet-name>
<servlet-class>com.arsdigita.cms.dispatcher.TemplateXSLServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>TextOnlyServlet</servlet-name>
<display-name>Text Only Servlet</display-name>
<servlet-class>
com.arsdigita.web.InternalPrefixerServlet
</servlet-class>
<init-param>
<param-name>prefix</param-name>
<param-value>/text</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>PrintFriendlyServlet</servlet-name>
<display-name>Printer Friendly Output Servlet</display-name>
<servlet-class>
com.arsdigita.web.InternalPrefixerServlet
</servlet-class>
<init-param>
<param-name>prefix</param-name>
<param-value>/print</param-value>
</init-param>
</servlet>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MODULES SERVLET DECLARATIONS SECTION
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- module ccm-forum - servlet declarations BEGIN -->
<servlet>
<servlet-name>forum-main</servlet-name>
<servlet-class>com.arsdigita.forum.ForumServlet</servlet-class>
</servlet>
<!-- module ccm-forum - servlet declarations END -->
<servlet>
<servlet-name>portalworkspace-files</servlet-name>
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
<init-param>
<param-name>template-path</param-name>
<param-value>/templates/ccm-portalworkspace</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>navigation-files</servlet-name>
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
<init-param>
<param-name>template-path</param-name>
<param-value>/templates/ccm-navigation</param-value>
</init-param>
<init-param>
<param-name>file-resolver</param-name>
<param-value>com.arsdigita.navigation.NavigationFileResolver</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>portlet-type-xsl</servlet-name>
<servlet-class>com.arsdigita.dispatcher.PortletTypeXSLServlet</servlet-class>
</servlet>
<!-- module ccm-rssfeed - servlet declaration BEGIN -->
<servlet>
<servlet-name>rssfeed-files</servlet-name>
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
<init-param>
<param-name>template-path</param-name>
<param-value>/templates/ccm-rssfeed</param-value>
</init-param>
<init-param>
<param-name>file-resolver</param-name>
<param-value>com.arsdigita.rssfeed.RSSFileResolver</param-value>
</init-param>
</servlet>
<!-- module ccm-rssfeed - servlet declaration END -->
<!-- module ccm-ldn-search - servlet declarations BEGIN -->
<servlet>
<servlet-name>worker</servlet-name>
<servlet-class>com.arsdigita.london.search.SearchWorkerServlet</servlet-class>
<load-on-startup>4</load-on-startup>
</servlet>
<servlet>
<servlet-name>search-files</servlet-name>
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
<init-param>
<param-name>template-path</param-name>
<param-value>/templates/ccm-ldn-search</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>AxisServlet</servlet-name>
<display-name>Apache-Axis Servlet</display-name>
<servlet-class>
org.apache.axis.transport.http.AxisServlet
</servlet-class>
</servlet>
<!-- module ccm-ldn-search - servlet declarations END -->
<!-- module ccm-ldn-shortcuts - servlet definitions -->
<servlet>
<servlet-name>shortcuts-files</servlet-name>
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
<init-param>
<param-name>template-path</param-name>
<param-value>/templates/ccm-ldn-shortcuts</param-value>
</init-param>
</servlet>
<!-- module ccm-ldn-subsite - servlet declarations BEGIN -->
<servlet>
<servlet-name>subsite-files</servlet-name>
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
<init-param>
<param-name>template-path</param-name>
<param-value>/templates/ccm-subsite</param-value>
</init-param>
</servlet>
<!-- module ccm-ldn-subsite - servlet declarations END -->
<!-- module ccm-ldn-terms - servlet declarations BEGIN -->
<servlet>
<servlet-name>terms-files</servlet-name>
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
<init-param>
<param-name>template-path</param-name>
<param-value>/templates/ccm-ldn-terms</param-value>
</init-param>
</servlet>
<!-- module ccm-ldn-terms - servlet declarations END -->
<!-- module ccm-themedirector - servlet declarations BEGIN -->
<servlet>
<servlet-name>theme-files</servlet-name>
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
<init-param>
<param-name>template-path</param-name>
<param-value>/templates/ccm-themedirector</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>ThemeDownload</servlet-name>
<servlet-class>com.arsdigita.themedirector.dispatcher.ThemeDownloadServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>ThemePreviewServlet</servlet-name>
<display-name>Servlet to allow admins to preview look/feel</display-name>
<servlet-class>
com.arsdigita.themedirector.dispatcher.InternalThemePrefixerServlet
</servlet-class>
<init-param>
<param-name>prefix</param-name>
<param-value>/theme</param-value>
</init-param>
</servlet>
<!-- module ccm-themedirector - servlet declarations END -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MODULES SERVLET MAPPINGS SECTION
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- module ccm-forum - servlet mappings BEGIN -->
<servlet-mapping>
<servlet-name>forum-main</servlet-name>
<url-pattern>/forum-main/main/*</url-pattern>
</servlet-mapping>
<!-- module ccm-forum - servlet mappings END -->
<servlet-mapping>
<servlet-name>portlet-type-xsl</servlet-name>
<url-pattern>/themes/servlet/portlet-type/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>portalworkspace-files</servlet-name>
<url-pattern>/ccm-portalworkspace/files/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>navigation-files</servlet-name>
<url-pattern>/ccm-navigation/files/*</url-pattern>
</servlet-mapping>
<!-- module ccm-rssfeed - servlet mappings BEGIN -->
<servlet-mapping>
<servlet-name>rssfeed-files</servlet-name>
<url-pattern>/ccm-rssfeed/files/*</url-pattern>
</servlet-mapping>
<!-- module ccm-rssfeed - servlet mappings END -->
<!-- module ccm-ldn-search - servlet mappings BEGIN -->
<servlet-mapping>
<servlet-name>search-files</servlet-name>
<url-pattern>/ccm-ldn-search/files/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<!-- module ccm-ldn-search - servlet mappings END -->
<!-- module ccm-ldn-shortcuts - servlet mappings -->
<servlet-mapping>
<servlet-name>shortcuts-files</servlet-name>
<url-pattern>/ccm-ldn-shortcuts/files/*</url-pattern>
</servlet-mapping>
<!-- module ccm-ldn-subsite - servlet mappings BEGIN -->
<servlet-mapping>
<servlet-name>subsite-files</servlet-name>
<url-pattern>/ccm-subsite/files/*</url-pattern>
</servlet-mapping>
<!-- module ccm-ldn-subsite - servlet mappings END -->
<!-- module ccm-ldn-terms - servlet mappings BEGIN -->
<servlet-mapping>
<servlet-name>terms-files</servlet-name>
<url-pattern>/ccm-ldn-terms/files/*</url-pattern>
</servlet-mapping>
<!-- module ccm-ldn-terms - servlet mappings END -->
<!-- module ccm-themedirector - servlet mappings BEGIN -->
<servlet-mapping>
<servlet-name>theme-files</servlet-name>
<url-pattern>/theme-files/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ThemeDownload</servlet-name>
<url-pattern>/theme-files/download/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ThemePreviewServlet</servlet-name>
<url-pattern>/theme/*</url-pattern>
</servlet-mapping>
<!-- module ccm-themedirector - servlet mappings END -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BASE SERVLET MAPPINGS SECTION
basically requirred by ccm-core
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet-mapping>
<servlet-name>reg</servlet-name>
<url-pattern>/themes/null/reg/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ccm-dispatcher</servlet-name>
<url-pattern>/ccm/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>legacy-adapter</servlet-name>
<url-pattern>/templates/servlet/legacy-adapter/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>cache-manager</servlet-name>
<url-pattern>/expireCache/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>db-test</servlet-name>
<url-pattern>/dbtest</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>versioning-log</servlet-name>
<url-pattern>/versioning/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>oid-redirect</servlet-name>
<url-pattern>/redirect/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>resource-resolver</servlet-name>
<url-pattern>/resource/*</url-pattern>
</servlet-mapping>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ADDITIONAL SERVLET MAPPINGS SECTION
basically requirred by ccm-cms
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet-mapping>
<servlet-name>content-section</servlet-name>
<url-pattern>/themes/servlet/content-section/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>content-item-xsl</servlet-name>
<url-pattern>/templates/servlet/content-item/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>content-type-xsl</servlet-name>
<url-pattern>/themes/servlet/content-type/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>template-xsl</servlet-name>
<url-pattern>/themes/servlet/template/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>TextOnlyServlet</servlet-name>
<url-pattern>/text/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PrintFriendlyServlet</servlet-name>
<url-pattern>/print/*</url-pattern>
</servlet-mapping>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ERROR PAGES
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<error-page>
<exception-type>com.arsdigita.dispatcher.AccessDeniedException</exception-type>
<location>/error/access-denied.jsp</location>
</error-page>
<error-page>
<exception-type>com.arsdigita.dispatcher.ObjectNotFoundException</exception-type>
<location>/error/object-not-found.jsp</location>
</error-page>
<error-page>
<exception-type>com.arsdigita.kernel.permissions.PermissionException</exception-type>
<location>/error/permission-denied.jsp</location>
</error-page>
<error-page>
<exception-type>com.arsdigita.persistence.DbNotAvailableException</exception-type>
<location>/error/db-not-available.jsp</location>
</error-page>
<error-page>
<exception-type>com.arsdigita.db.DbNotAvailableException</exception-type>
<location>/error/db-not-available.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error/general.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Error</exception-type>
<location>/error/general.jsp</location>
</error-page>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TAG LIBS
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<taglib>
<taglib-uri>/WEB-INF/bebop-show.tld</taglib-uri>
<taglib-location>/WEB-INF/bebop-show.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/bebop-define.tld</taglib-uri>
<taglib-location>/WEB-INF/bebop-define.tld</taglib-location>
</taglib>
</web-app>

Some files were not shown because too many files have changed in this diff Show More