Update script vervollständigt.

git-svn-id: https://svn.libreccm.org/ccm/trunk@682 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2011-01-16 09:24:58 +00:00
parent da4084cf66
commit bc166abc1f
7 changed files with 49 additions and 95 deletions

View File

@ -0,0 +1,21 @@
--
-- 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: upd_table_cms_articles.sql pboy $
alter table cms_articles add column text_id integer ;
update cms_articles set text_id = (select text_id from cms_text_pages
where cms_text_pages.item_id = cms_articles.article_id);
drop table cms_text_pages;

View File

@ -28,3 +28,4 @@ PROMPT Red Hat Enterprise CMS 6.6.0 -> 6.6.1 Upgrade Script (Oracle)
@@ ../default/upgrade/6.6.0-6.6.1/upd_table_cms_rel_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/upd_table_content_types.sql
@@ ../default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql @@ ../default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql
@@ ../default/upgrade/6.6.0-6.6.1/upd_table_cms_articles.sql

View File

@ -30,5 +30,6 @@ begin;
\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_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/upd_table_content_types.sql
\i ../default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql \i ../default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql
\i ../default/upgrade/6.6.0-6.6.1/upd_table_cms_articles.sql
commit; commit;

View File

@ -98,7 +98,7 @@ public class ContentSection extends Application {
public static final String BASE_DATA_OBJECT_TYPE = public static final String BASE_DATA_OBJECT_TYPE =
"com.arsdigita.cms.ContentSection"; "com.arsdigita.cms.ContentSection";
public static final String PACKAGE_TYPE = "content-section"; public static final String PACKAGE_TYPE = "content-section";
public final static String STYLESHEET = "/packages/content-section/xsl/cms.xsl"; // public final static String STYLESHEET = "/packages/content-section/xsl/cms.xsl";
protected static final String ID = "id"; protected static final String ID = "id";
protected static final String PACKAGE = "package"; protected static final String PACKAGE = "package";
protected static final String NAME = "label"; protected static final String NAME = "label";
@ -1305,8 +1305,8 @@ public class ContentSection extends Application {
return URL.SERVLET_DIR + "/content-section"; return URL.SERVLET_DIR + "/content-section";
} }
@Override // @Override
public String getStylesheetPath() { // public String getStylesheetPath() {
return STYLESHEET; // return STYLESHEET;
} // }
} }

View File

@ -40,7 +40,7 @@ import com.arsdigita.kernel.KernelExcursion;
import com.arsdigita.kernel.PackageInstance; import com.arsdigita.kernel.PackageInstance;
import com.arsdigita.kernel.PackageType; import com.arsdigita.kernel.PackageType;
import com.arsdigita.kernel.SiteNode; import com.arsdigita.kernel.SiteNode;
import com.arsdigita.kernel.Stylesheet; // import com.arsdigita.kernel.Stylesheet;
import com.arsdigita.kernel.permissions.PrivilegeDescriptor; import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.loader.PackageLoader; import com.arsdigita.loader.PackageLoader;
import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.DataObject;
@ -132,8 +132,8 @@ public class Loader extends PackageLoader {
* Stylesheet which has to be assigned as part of a legacy application * Stylesheet which has to be assigned as part of a legacy application
* creation. * creation.
*/ */
private final static String CMS_STYLESHEET = // private final static String CMS_STYLESHEET =
"/packages/content-section/xsl/cms.xsl"; // "/packages/content-section/xsl/cms.xsl";
// /** // /**
// * Constant string used as key for creating Workspace (content-center) as a // * Constant string used as key for creating Workspace (content-center) as a
// * legacy application. // * legacy application.
@ -300,10 +300,16 @@ public class Loader extends PackageLoader {
type.setDispatcherClass(WORKSPACE_DISPATCHER_CLASS); type.setDispatcherClass(WORKSPACE_DISPATCHER_CLASS);
// Register a stylesheet to the Content Center package. // Register a stylesheet to the Content Center package.
Stylesheet ss = // Registering a Stylesheet referrs to the old LegacyStylesheetResolver
Stylesheet.createStylesheet(WORKSPACE_STYLESHEET); // which uses a database entry to determine an appropriate stylesheet.
ss.save(); // New way is a pattern based search algorithm. Preserved here for easy
type.addStylesheet(ss); // reference during transition (removal of corresponding classes)
// see com.arsdigita.templating
// content center works without registering a style sheet here.
// Stylesheet ss =
// Stylesheet.createStylesheet(WORKSPACE_STYLESHEET);
// ss.save();
// type.addStylesheet(ss);
type.save(); type.save();
@ -356,7 +362,6 @@ public class Loader extends PackageLoader {
appsetup.setKey(Workspace.PACKAGE_KEY); appsetup.setKey(Workspace.PACKAGE_KEY);
appsetup.setDispatcherClass(Workspace.DISPATCHER_CLASS); appsetup.setDispatcherClass(Workspace.DISPATCHER_CLASS);
// should not be needed anymore, stypesheets handled by StylesheetResolver // should not be needed anymore, stypesheets handled by StylesheetResolver
appsetup.setStylesheet(Workspace.STYLESHEET);
appsetup.setSingleton(true); appsetup.setSingleton(true);
appsetup.setPortalApplication(false); appsetup.setPortalApplication(false);
appsetup.setInstantiator(new ACSObjectInstantiator() { appsetup.setInstantiator(new ACSObjectInstantiator() {
@ -491,7 +496,6 @@ public class Loader extends PackageLoader {
appType.setDescription("A CMS Content Section"); appType.setDescription("A CMS Content Section");
appType.setPortalApplication(false); appType.setPortalApplication(false);
//setup.setDispatcherClass(ContentItemDispatcher.class.getName()); //setup.setDispatcherClass(ContentItemDispatcher.class.getName());
appType.setStylesheet(CMS_STYLESHEET); // by default: /pack./c-s/xml/cms.xml
// contains the xsl to generate the page // contains the xsl to generate the page
appType.setInstantiator(new ACSObjectInstantiator() { appType.setInstantiator(new ACSObjectInstantiator() {

View File

@ -19,17 +19,12 @@
package com.arsdigita.cms; package com.arsdigita.cms;
//import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.BooleanParameter;
// import com.arsdigita.util.parameter.IntegerParameter;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.StringArrayParameter; import com.arsdigita.util.parameter.StringArrayParameter;
import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.StringParameter;
// import com.arsdigita.util.parameter.ResourceParameter;
// import com.arsdigita.util.parameter.URLParameter;
// import java.io.InputStream;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
@ -113,7 +108,8 @@ public final class LoaderConfig extends AbstractConfig {
* List of Paths to XML files that contain content type definition(s). * List of Paths to XML files that contain content type definition(s).
* Example: * Example:
* contentTypeDefinitions = { "/WEB-INF/content-types/Template.xml" }; * contentTypeDefinitions = { "/WEB-INF/content-types/Template.xml" };
* List currently contains only one path/filename. * An entry in this list is required by internal content types (see package
* ccm-cms/src/com/arsdigita/cms/contenttypes)
*/ */
private final Parameter private final Parameter
m_ctDefFiles = new StringArrayParameter( m_ctDefFiles = new StringArrayParameter(
@ -561,67 +557,4 @@ public final class LoaderConfig extends AbstractConfig {
return Arrays.asList(contentTypes); return Arrays.asList(contentTypes);
} }
// public final String[] getTaskAlerts() {
// return (String[]) get(m_taskAlerts);
// }
// Parameters controlling Overdue Task alerts:
// Currently not a loader task, see above
// /**
// * getSendOverdueAlerts: Retrieve wether we should send alerts about
// * overdue tasks at all?
// */
// public final boolean getSendOverdueAlerts() {
// return ((Boolean) get(m_sendOverdueAlerts)).booleanValue(); }
// /**
// * getTaskDuration: Retrieve the time between when a task is enabled
// * (it is made available for completion) and when it is considered
// * overdue (in HOURS)
// */
// public final Integer getTaskDuration() {
// return ((Integer) get(m_taskDuration)); }
// /**
// * getAlertInterval: Retrieve the time to wait between sending successive
// * alerts on the same overdue task (in HOURS)
// */
// public final Integer getOverdueAlertInterval() {
// return ((Integer) get(m_overdueAlertInterval)); }
// /**
// * maxAlerts: Retrieve the maximum number of alerts to send about any one
// * overdue task
// */
// public final Integer getMaxAlerts() {
// return ((Integer) get(m_maxAlerts)); }
// End section task alerts
// InputStream getTraversalAdapters() {
// return (InputStream) get(m_adapters);
// }
// public String getDefaultLayout() {
// return (String) get(m_defaultLayout);
// }
// public boolean getCreateUserWorkspaces() {
// return ((Boolean) get(m_createUserWorkspaces)).booleanValue();
// }
// public List getExcludedPortletTypes() {
// String[] excludedTypes = (String[]) get(m_excludedPortletTypes);
// return Arrays.asList(excludedTypes);
// }
// public List getAdminPortletTypes() {
// String[] adminTypes = (String[]) get(m_adminPortletTypes);
// return Arrays.asList(adminTypes);
// }
} }

View File

@ -19,20 +19,14 @@
package com.arsdigita.cms.contentsection; package com.arsdigita.cms.contentsection;
//import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.BooleanParameter;
//import com.arsdigita.util.parameter.ErrorList;
import com.arsdigita.util.parameter.IntegerParameter; import com.arsdigita.util.parameter.IntegerParameter;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
//import com.arsdigita.util.parameter.ParameterError; //import com.arsdigita.util.parameter.ParameterError;
import com.arsdigita.util.parameter.StringArrayParameter; import com.arsdigita.util.parameter.StringArrayParameter;
import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.StringParameter;
// import com.arsdigita.util.parameter.ResourceParameter;
// import com.arsdigita.util.parameter.URLParameter;
//import com.arsdigita.util.StringUtils;
// import java.io.InputStream;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
@ -64,10 +58,6 @@ public final class ContentSectionConfig extends AbstractConfig {
public static final synchronized ContentSectionConfig getInstance() { public static final synchronized ContentSectionConfig getInstance() {
if (s_config == null) { if (s_config == null) {
s_config = new ContentSectionConfig(); s_config = new ContentSectionConfig();
// deprecated
// s_config.require("ccm-core/runtime.properties");
// use instead:
// read values from the persistent storage
s_config.load(); s_config.load();
} }
@ -112,8 +102,12 @@ public final class ContentSectionConfig extends AbstractConfig {
* In the new Initializer system we use a specifically formatted String Array * In the new Initializer system we use a specifically formatted String Array
* because we have no List parameter. Format: * because we have no List parameter. Format:
* - A string for each task to handle, possible values: Authoring, Approval, * - A string for each task to handle, possible values: Authoring, Approval,
* Depploy * Deploy
* - Each String: [taskName]:[alert_1]:...:[alert_n] * - Each Task String: [taskName]:[alert_1]:...:[alert_n]
* The specially formatted string is not handled by StringArray parameter,
* but forwarded untouched to the initializer which has the duty to process
* it!
*
* Currently there is no way to persist taskAlerts section specific. So all * Currently there is no way to persist taskAlerts section specific. So all
* sections have to treated equally. * sections have to treated equally.
* Default values are provided here. * Default values are provided here.