Update Script für Änderungen r645, verschiedene Kommentierungen / Formatierungen ergänzt.

git-svn-id: https://svn.libreccm.org/ccm/trunk@678 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2011-01-10 10:28:54 +00:00
parent 1559f37f53
commit 6366fe3494
21 changed files with 128 additions and 96 deletions

View File

@ -15,8 +15,8 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// $Id: Article.pdl 287 2005-02-22 00:29:02Z sskracic $
// $DateTime: 2004/08/17 23:15:09 $
// $Id: GenericArticle.pdl 287 2011-01-07 00:29:02Z sskracic $
//
model com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.*;

View File

@ -26,8 +26,8 @@ create table cms_contactentries (
contactentry_id integer NOT NULL,
contact_id integer,
"key" character varying(100) NOT NULL,
description character varying(100),
value character varying(100) NOT NULL
description character varying(200),
value character varying(200) NOT NULL
);
ALTER TABLE ONLY cms_contacts

View File

@ -33,7 +33,8 @@ create table cms_organizationalunits_contact_map (
create table cms_organizationalunits_person_map (
organizationalunit_id integer NOT NULL,
person_id integer NOT NULL,
role_name character varying(100)
role_name character varying(100),
status character varying(100)
);
ALTER TABLE ONLY cms_organizationalunits_contact_map

View File

@ -0,0 +1,18 @@
--
-- 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
--
-- $Id: drop_table_cms_article_image_map.sql pboy $
drop table cms_article_image_map;

View File

@ -16,7 +16,7 @@
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: oracle-se-create.sql 1305 2006-09-01 08:54:11Z sskracic $
-- $DateTime: 2004/08/17 23:15:09 $
--
@@ ddl/oracle-se/create.sql
@ -66,7 +66,7 @@
@@ default/content-section/comment-authoring_kits.sql
@@ default/content-section/index-cms_assets_mime_type_idx.sql
@@ default/content-section/index-cms_text_pages_text_id_idx.sql
@@ default/content-section/table-cms_article_image_map.sql
-- @@ default/content-section/table-cms_article_image_map.sql
@@ default/content-section/insert-cms_resource_types.sql
@@ default/content-section/index-cms_resources_type_idx.sql
@@ default/content-section/table-cms_resource_map.sql
@ -102,7 +102,7 @@
@@ default/content-section/index-publish_to_fs_links_target_idx.sql
@@ default/content-section/table-publish_to_fs_notify_broken.sql
@@ default/content-section/index-akit_step_map_step_id_idx.sql
@@ default/content-section/index-cms_artcl_img_map_img_id_idx.sql
-- @@ default/content-section/index-cms_artcl_img_map_img_id_idx.sql
@@ default/content-section/index-cms_itm_tplt_map_tplt_id_idx.sql
@@ default/content-section/index-cms_item_tplt_map_use_ctx_idx.sql
@@ default/content-section/index-cms_sec_tplt_map_tplt_id_idx.sql
@ -117,7 +117,7 @@
@@ default/content-section/index-cms_top_level_pages.sql
@@ default/content-section/index-section_lifecycle_def_map.sql
@@ default/content-section/index-acs_object_cycl_map_itm_idx.sql
@@ default/content-section/index-cms_artcl_imag_map_art_id_idx.sql
-- @@ default/content-section/index-cms_artcl_imag_map_art_id_idx.sql
@@ default/content-section/index-cms_ctgry_tmpl_map_sctn_id_idx.sql
@@ default/content-section/index-cms_ctgry_tmpl_map_tmpl_id_idx.sql
@@ default/content-section/index-cms_ctgry_tmpl_map_type_id_idx.sql

View File

@ -16,7 +16,7 @@
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: postgres-create.sql 1305 2006-09-01 08:54:11Z sskracic $
-- $DateTime: 2004/08/17 23:15:09 $
--
\i ddl/postgres/create.sql
@ -66,7 +66,7 @@
\i default/content-section/comment-authoring_kits.sql
\i default/content-section/index-cms_assets_mime_type_idx.sql
--\i default/content-section/index-cms_text_pages_text_id_idx.sql
\i default/content-section/table-cms_article_image_map.sql
-- \i default/content-section/table-cms_article_image_map.sql
\i default/content-section/insert-cms_resource_types.sql
\i default/content-section/index-cms_resources_type_idx.sql
\i default/content-section/table-cms_resource_map.sql
@ -77,6 +77,7 @@
\i default/content-section/table-cms_wf_notifications.sql
\i default/content-section/insert-task-types.sql
\i default/content-section/table-cw_process_definitions.sql
-- Oracle uses default/content-section/sequence-convert_format_seq.sql here!
\i default/content-section/table-cms_templates.sql
\i default/content-section/comment-cms_templates.sql
\i default/content-section/index-cms_category_template_map.sql
@ -101,7 +102,7 @@
\i default/content-section/index-publish_to_fs_links_target_idx.sql
\i default/content-section/table-publish_to_fs_notify_broken.sql
\i default/content-section/index-akit_step_map_step_id_idx.sql
\i default/content-section/index-cms_artcl_img_map_img_id_idx.sql
-- \i default/content-section/index-cms_artcl_img_map_img_id_idx.sql
\i default/content-section/index-cms_itm_tplt_map_tplt_id_idx.sql
\i default/content-section/index-cms_item_tplt_map_use_ctx_idx.sql
\i default/content-section/index-cms_sec_tplt_map_tplt_id_idx.sql
@ -116,7 +117,7 @@
\i default/content-section/index-cms_top_level_pages.sql
\i default/content-section/index-section_lifecycle_def_map.sql
\i default/content-section/index-acs_object_cycl_map_itm_idx.sql
\i default/content-section/index-cms_artcl_imag_map_art_id_idx.sql
-- \i default/content-section/index-cms_artcl_imag_map_art_id_idx.sql
\i default/content-section/index-cms_ctgry_tmpl_map_sctn_id_idx.sql
\i default/content-section/index-cms_ctgry_tmpl_map_tmpl_id_idx.sql
\i default/content-section/index-cms_ctgry_tmpl_map_type_id_idx.sql

View File

@ -0,0 +1,30 @@
--
-- Copyright (C) 2008 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
--
-- $Id: oracle-se-6.6.0-6.6.1.sql 293 2011-01-07 15:10:39Z pboy $
PROMPT Red Hat Enterprise CMS 6.6.0 -> 6.6.1 Upgrade Script (Oracle)
@@ ../default/upgrade/6.6.0-6.6.1/add_table_cms_addresses.sql
@@ ../default/upgrade/6.6.0-6.6.1/add_tables_cms_contacts.sql
@@ ../default/upgrade/6.6.0-6.6.1/add_tables_cms_persons.sql
@@ ../default/upgrade/6.6.0-6.6.1/add_tables_cms_organisation.sql
@@ ../default/upgrade/6.6.0-6.6.1/add_table_cms_rel_attr.sql
@@ ../default/upgrade/6.6.0-6.6.1/upd_table_cms_publ_links.sql
@@ ../default/upgrade/6.6.0-6.6.1/upd_table_cms_rel_links.sql
@@ ../default/upgrade/6.6.0-6.6.1/upd_table_content_types.sql
@@ ../default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql

View File

@ -29,5 +29,6 @@ begin;
\i ../default/upgrade/6.6.0-6.6.1/upd_table_cms_publ_links.sql
\i ../default/upgrade/6.6.0-6.6.1/upd_table_cms_rel_links.sql
\i ../default/upgrade/6.6.0-6.6.1/upd_table_content_types.sql
\i ../default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql
commit;

View File

@ -35,9 +35,7 @@ public abstract class CMS {
private static final Logger s_log = Logger.getLogger(CMS.class);
/**
* The CMS XML namespace.
*/
/** The CMS XML namespace. */
public final static String CMS_XML_NS = "http://www.arsdigita.com/cms/1.0";
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
* Copyright (C) 2010 pboy (pboy@barkhof.uni-bremen.de) 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

View File

@ -18,6 +18,7 @@
*/
package com.arsdigita.cms.dispatcher;
import com.arsdigita.bebop.Bebop;
import com.arsdigita.bebop.Container;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.Page;
@ -37,18 +38,19 @@ 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.sitenode.BasePresentationManager;
import com.arsdigita.templating.PresentationManager;
import com.arsdigita.templating.Templating;
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;
/**
@ -56,12 +58,10 @@ import org.apache.log4j.Logger;
* 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>
*
* <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>
@ -74,25 +74,16 @@ public class CMSPage extends Page implements ResourceHandler {
private static final Logger s_log = Logger.getLogger(CMSPage.class);
/**
* The CMS XML namespace.
* @deprecated use com.arsdigita.cms.CMS.CMS_XML_NS instead
*/
public final static String CMS_XML_NS = "http://www.arsdigita.com/cms/1.0";
/**
* The global assets URL stub XML parameter name.
*/
/** The global assets URL stub XML parameter name. */
public final static String ASSETS = "ASSETS";
/**
* The XML page class.
*/
/** The XML page class. */
public final static String PAGE_CLASS = "CMS";
// Map of XML parameters
/** Map of XML parameters */
private HashMap m_params;
/** */
private PageTransformer m_transformer;
public CMSPage() {
@ -139,11 +130,14 @@ public class CMSPage extends Page implements ResourceHandler {
// Make sure the error display gets rendered.
getErrorDisplay().setIdAttr("page-body");
final PresentationManager pm = Templating.getPresentationManager();
final PresentationManager pm = Bebop.getConfig().getPresentationManager();
if (pm instanceof PageTransformer) {
m_transformer = (PageTransformer) pm;
}
else {
m_transformer = new PageTransformer();
}
}
/**
@ -187,9 +181,16 @@ public class CMSPage extends Page implements ResourceHandler {
/**
* Fetch the request-local content section.
*
* @deprecated use com.arsdigita.cms.CMS.getContext().getContentSection() instead
* @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.
@ -199,9 +200,14 @@ public class CMSPage extends Page implements ResourceHandler {
/**
* Fetch the request-local content section.
*
* @deprecated use com.arsdigita.cms.CMS.getContext().getContentSection() instead
* @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());
@ -210,9 +216,16 @@ public class CMSPage extends Page implements ResourceHandler {
/**
* Fetch the request-local content item.
*
* @deprecated use com.arsdigita.cms.CMS.getContext().getContentItem() instead
* @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
@ -222,9 +235,13 @@ public class CMSPage extends Page implements ResourceHandler {
/**
* Fetch the request-local content item.
*
* @deprecated use com.arsdigita.cms.CMS.getContext().getContentItem() instead
* @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());
@ -236,6 +253,8 @@ public class CMSPage extends Page implements ResourceHandler {
* @param request The servlet request object
* @param response the servlet response object
* @param actx The request context
*
* @pre m_transformer != null
*/
public void dispatch(final HttpServletRequest request,
final HttpServletResponse response,
@ -283,7 +302,8 @@ public class CMSPage extends Page implements ResourceHandler {
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);
"You do not have privileges to administer item "
+ itemID);
}
} catch (DataObjectNotFoundException donfe) {
s_log.warn("Failed to load content item " + itemID);
@ -292,16 +312,9 @@ public class CMSPage extends Page implements ResourceHandler {
final Document doc = buildDocument(request, response);
if (m_transformer == null) {
final BasePresentationManager pm =
(BasePresentationManager)
BasePresentationManager.getInstance();
pm.servePage(doc, request, response, m_params);
} else {
m_transformer.servePage
(doc, request, response, m_params);
}
Assert.exists(m_transformer,
"Implementation of PresentationManager");
m_transformer.servePage(doc, request, response, m_params);
}
};
try {
@ -311,6 +324,7 @@ public class CMSPage extends Page implements ResourceHandler {
}
}
@Override
protected Element generateXMLHelper(PageState ps, Document parent) {
Element page = super.generateXMLHelper(ps,parent);
User user = getCurrentUser(ps);

View File

@ -30,8 +30,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
/**
* Dispatches to a file
* stored under the CMS package root
* Dispatches to a file stored under the CMS package root
* (<code>/packages/cms/www</code>). This includes both unmanaged
* files copied or created directly in the file system, as well as
* pages and assets published to the file system from CMS.

View File

@ -27,15 +27,13 @@ import com.arsdigita.util.parameter.Parameter;
import org.apache.log4j.Logger;
// import java.io.File;
/**
* LifecycleConfig
*
* @author Peter Boy &lt;pboy@barkhof.uni-bremen.de&gt;
* @version $Id: $
**/
*/
public class LifecycleConfig extends AbstractConfig {
private static final Logger s_log = Logger.getLogger(LifecycleConfig.class);

View File

@ -19,33 +19,10 @@
package com.arsdigita.cms.portlet;
import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.Template;
import com.arsdigita.db.DbHelper;
import com.arsdigita.domain.DomainObject;
// import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.domain.DomainObjectInstantiator;
import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.metadata.MetadataRoot;
import com.arsdigita.persistence.metadata.ObjectType;
import com.arsdigita.runtime.CCMResourceManager;
import com.arsdigita.runtime.CompoundInitializer;
import com.arsdigita.runtime.ConfigError;
import com.arsdigita.runtime.ContextCloseEvent;
import com.arsdigita.runtime.ContextInitEvent;
// import com.arsdigita.runtime.DataInitEvent;
import com.arsdigita.runtime.DomainInitEvent;
// import com.arsdigita.runtime.LegacyInitEvent;
import com.arsdigita.runtime.LegacyInitializer;
import com.arsdigita.runtime.RuntimeConfig;
import com.arsdigita.util.UncheckedWrapperException;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Iterator;
import org.apache.log4j.Logger;

View File

@ -18,12 +18,10 @@
*/
package com.arsdigita.cms.publishToFile;
import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.Template;
import com.arsdigita.db.DbHelper;
import com.arsdigita.domain.DomainObject;
// import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.domain.DomainObjectInstantiator;
import com.arsdigita.persistence.DataObject;
@ -36,8 +34,6 @@ import com.arsdigita.runtime.ContextCloseEvent;
import com.arsdigita.runtime.ContextInitEvent;
// import com.arsdigita.runtime.DataInitEvent;
import com.arsdigita.runtime.DomainInitEvent;
// import com.arsdigita.runtime.LegacyInitEvent;
// import com.arsdigita.runtime.LegacyInitializer;
import com.arsdigita.runtime.RuntimeConfig;
import com.arsdigita.util.UncheckedWrapperException;

View File

@ -20,7 +20,7 @@ package com.arsdigita.cms.publishToFile;
import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.parameter.BooleanParameter;
import com.arsdigita.util.parameter.ClassParameter;
// import com.arsdigita.util.parameter.ClassParameter;
import com.arsdigita.util.parameter.IntegerParameter;
import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.SpecificClassParameter;

View File

@ -24,7 +24,6 @@ import com.arsdigita.cms.CMS;
import com.arsdigita.cms.ContentBundle;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.Folder;
import com.arsdigita.cms.dispatcher.CMSPage;
import com.arsdigita.xml.Element;
import java.util.ArrayList;
import org.apache.log4j.Logger;
@ -87,7 +86,7 @@ public class FolderBreadcrumbNav extends SimpleComponent {
//}
Element component = parent.newChildElement
("cms:folderPathLinks", CMSPage.CMS_XML_NS);
("cms:folderPathLinks", CMS.CMS_XML_NS);
component.addAttribute("id","folderPath");
// root folder of the content section is not in breadcrumb
@ -99,7 +98,7 @@ public class FolderBreadcrumbNav extends SimpleComponent {
while (folders.size() > 0) {
f = (Folder) folders.remove(0);
Element folderElem = component.newChildElement
("cms:folderPathLink", CMSPage.CMS_XML_NS);
("cms:folderPathLink", CMS.CMS_XML_NS);
folderElem.addAttribute("title", f.getLabel());
folderElem.addAttribute
("url", contentSection+f.getPath()+"/");