diff --git a/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/DaBInImporter.java b/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/DaBInImporter.java index cbca40284..5ffbd9d96 100644 --- a/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/DaBInImporter.java +++ b/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/DaBInImporter.java @@ -3035,7 +3035,11 @@ public class DaBInImporter extends Program { getPlace()); publisherDe = new Publisher(); publisherDe.setTitle(publisherData.getName()); - publisherDe.setName(publisherData.getName().toLowerCase()); + publisherDe.setName(publisherData.getName(). + replace(",", ""). + replace("/", ""). + replaceAll("\\s\\s+", " "). + replace(' ', '-').toLowerCase()); publisherDe.setPlace(publisherData.getPlace()); publisherDe.setLanguage("de"); publisherDe.setLifecycle(createLifecycle()); @@ -3047,7 +3051,11 @@ public class DaBInImporter extends Program { getPlace()); publisherEn = new Publisher(); publisherEn.setTitle(publisherData.getName()); - publisherEn.setName(publisherData.getName().toLowerCase()); + publisherEn.setName(publisherData.getName(). + replace(",", ""). + replace("/", ""). + replaceAll("\\s\\s+", " "). + replace(' ', '-').toLowerCase()); publisherEn.setPlace(publisherData.getPlace()); publisherEn.setLanguage("en"); publisherEn.setLifecycle(createLifecycle()); @@ -3151,7 +3159,11 @@ public class DaBInImporter extends Program { int colonIndex = normalizedData.indexOf(':'); if (colonIndex < 0) { - publisher.setName(normalizedData); + publisher.setName(normalizedData. + replace(",", ""). + replace("/", ""). + replaceAll("\\s\\s+", " "). + replace(' ', '-').toLowerCase()); } else { String name; String place; @@ -3188,7 +3200,11 @@ public class DaBInImporter extends Program { System.out.printf("\tprevDelimIndex = %d\n", prevDelimIndex); place = normalizedData.substring(prevDelimIndex, colonIndex); - publisher.setName(name.trim()); + publisher.setName(name.trim(). + replace(",", ""). + replace("/", ""). + replaceAll("\\s\\s+", " "). + replace(' ', '-').toLowerCase()); publisher.setPlace(place.trim()); } diff --git a/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/PublicationData.java b/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/PublicationData.java index c464194bd..a5fa2c455 100644 --- a/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/PublicationData.java +++ b/ccm-cms-dabinimporter/src/com/arsdigita/cms/dabin/PublicationData.java @@ -67,9 +67,10 @@ public class PublicationData { public void setLink(String link) { if (link.length() < 200) { - this.link = link; + this.link = link; } else { - System.out.println("\n***WARNING: Link value too long. Truncating.\n"); + System.out.println( + "\n***WARNING: Link value too long. Truncating.\n"); this.link = link.substring(0, 200); } } @@ -84,10 +85,18 @@ public class PublicationData { public String getUrl() { if (name.length() < 200) { - return name; + return name.replace(",", ""). + replace("/", ""). + replaceAll("\\s\\s+", " "). + replace(' ', '-').toLowerCase(); } else { - System.out.println("\t***WARNING: Title of publication is too long for URL. Triming to title to a length of 200 characters for URL."); - return name.substring(0,200); + System.out.println( + "\t***WARNING: Title of publication is too long for URL. Triming to title to a length of 200 characters for URL."); + return name.substring(0, 200). + replace(",", ""). + replace("/", ""). + replaceAll("\\s\\s+", " "). + replace(' ', '-').toLowerCase(); } } diff --git a/ccm-cms/src/com/arsdigita/cms/FileAsset.java b/ccm-cms/src/com/arsdigita/cms/FileAsset.java index 559973ba1..946f1d07b 100755 --- a/ccm-cms/src/com/arsdigita/cms/FileAsset.java +++ b/ccm-cms/src/com/arsdigita/cms/FileAsset.java @@ -250,6 +250,7 @@ public class FileAsset extends BinaryAsset { } + @Override protected void beforeSave() { if( null == getLanguage() ) { setLanguage( Locale.getDefault().getLanguage() ); diff --git a/ccm-core/src/com/arsdigita/dispatcher/OrionDefaultServlet.java b/ccm-core/src/com/arsdigita/dispatcher/OrionDefaultServlet.java deleted file mode 100755 index 73c8e1951..000000000 --- a/ccm-core/src/com/arsdigita/dispatcher/OrionDefaultServlet.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2002-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.dispatcher; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.apache.log4j.Logger; - -/** - * - * @version $Id: OrionDefaultServlet.java 287 2005-02-22 00:29:02Z sskracic $ - */ -public class OrionDefaultServlet extends HttpServlet - implements DispatcherConstants { - - private static final Logger s_log = - Logger.getLogger(OrionDefaultServlet.class); - - public void service(HttpServletRequest req, HttpServletResponse resp) - throws ServletException { - - ServletContext ctx = getServletContext(); - RequestDispatcher rd = ctx.getNamedDispatcher("orion.filehandler"); - - try { - rd.include(req, resp); - } catch (Exception e) { - s_log.error("caught error", e); - throw new ServletException(e.getMessage()); - } - } -} diff --git a/ccm-core/src/com/arsdigita/web/ServletRequestWrapper.java b/ccm-core/src/com/arsdigita/web/ServletRequestWrapper.java index bc9c85fcf..8447bc6c4 100755 --- a/ccm-core/src/com/arsdigita/web/ServletRequestWrapper.java +++ b/ccm-core/src/com/arsdigita/web/ServletRequestWrapper.java @@ -28,6 +28,7 @@ import javax.servlet.RequestDispatcher; import javax.servlet.ServletInputStream; import javax.servlet.ServletRequest; + public class ServletRequestWrapper implements ServletRequest { private final ServletRequest m_req; diff --git a/ccm-sci-publications/doc/README.txt b/ccm-sci-publications/doc/README.txt new file mode 100644 index 000000000..fd606a430 --- /dev/null +++ b/ccm-sci-publications/doc/README.txt @@ -0,0 +1,14 @@ +The ccm-sci-publications module +=============================== + +The ccm-sci-publications module provides several content types for +managing publications. The content types and forms have no special +characteristics, except that they are using many associations between +them. For displaying nice lists of publications, a special template is +necessary, together with support in the theme for the XML produced by +the template. + +The key is the activate the specialize object feature in the item +lists. An example for a template for publication lists can be found in +the ccm-zes-aplaws module. The Mandalay theme supports publications +since revision 161. diff --git a/ccm-sci-publications/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/PublicationWithPublisher.xml b/ccm-sci-publications/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/PublicationWithPublisher.xml index f9f414f1e..1aca537ba 100644 --- a/ccm-sci-publications/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/PublicationWithPublisher.xml +++ b/ccm-sci-publications/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/PublicationWithPublisher.xml @@ -11,6 +11,7 @@ + diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationBasePanel.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationBasePanel.java index b841a1b6b..f0fab8e0c 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationBasePanel.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationBasePanel.java @@ -40,7 +40,14 @@ import java.util.Set; import org.apache.log4j.Logger; /** - * Base class for all panels of the sci-types-organization module. + * Base class for all panels of the sci-types-organization module. The panels + * are displaying the information of an organization type ( + * SciOrganization, SciDepartment, + * SciProject) similar to the MultiPartArticle. For + * each information, e.g. members, there is a link, which replaces the + * information shown. To use this as an index item, a special template is + * necessary. An example of such a template can be found in the ccm-zes-aplaws + * module. * * @see SciOrganizationPanel * @see SciDepartmentPanel