You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(48) |
Dec
(31) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(22) |
Feb
(68) |
Mar
(185) |
Apr
(11) |
May
(21) |
Jun
(23) |
Jul
(46) |
Aug
(69) |
Sep
(211) |
Oct
(26) |
Nov
(51) |
Dec
(52) |
2006 |
Jan
(13) |
Feb
(13) |
Mar
(8) |
Apr
(21) |
May
(17) |
Jun
(100) |
Jul
(34) |
Aug
(23) |
Sep
(26) |
Oct
(16) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(66) |
Oct
(10) |
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(3) |
May
(8) |
Jun
(5) |
Jul
(31) |
Aug
(8) |
Sep
(11) |
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
(13) |
Feb
(2) |
Mar
(9) |
Apr
(6) |
May
(24) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(120) |
2013 |
Jan
(6) |
Feb
(35) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <pb...@fe...> - 2012-12-01 16:48:50
|
Author: pboy Date: 2012-12-01 16:48:43 +0000 (Sat, 01 Dec 2012) New Revision: 2336 Modified: releases/2.0.0/ccm-navigation/src/com/arsdigita/navigation/ui/GreetingItem.java releases/2.0.0/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java Log: Fixed xml generation GreetingItem. Modified: releases/2.0.0/ccm-navigation/src/com/arsdigita/navigation/ui/GreetingItem.java =================================================================== --- releases/2.0.0/ccm-navigation/src/com/arsdigita/navigation/ui/GreetingItem.java 2012-12-01 16:41:23 UTC (rev 2335) +++ releases/2.0.0/ccm-navigation/src/com/arsdigita/navigation/ui/GreetingItem.java 2012-12-01 16:48:43 UTC (rev 2336) @@ -146,7 +146,7 @@ for (ExtraXMLGenerator generator : baseItem.getExtraXMLGenerators()) { try { - generator.generateXML(baseItem, content, new PageState(null, + generator.generateXML(baseItem, itemEl, new PageState(null, request, response)); } catch (ServletException ex) { Modified: releases/2.0.0/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java =================================================================== --- releases/2.0.0/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java 2012-12-01 16:41:23 UTC (rev 2335) +++ releases/2.0.0/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java 2012-12-01 16:48:43 UTC (rev 2336) @@ -111,19 +111,19 @@ /* Diese Methode wird vom Servlet aufgerufen */ public Element generateXML(HttpServletRequest request, - HttpServletResponse response) { + HttpServletResponse response) { Element content = Navigation.newElement("complexObjectList"); - + if (m_customName != null) { content.addAttribute(CUSTOM_NAME, m_customName); } - + for (Map.Entry<String, String> attribute : m_customAttributes.entrySet()) { content.addAttribute(attribute.getKey(), attribute.getValue()); } - + content.addContent(generateObjectListXML(request, response)); - + return content; } } |
From: <pb...@fe...> - 2012-12-01 15:37:27
|
Author: pboy Date: 2012-12-01 15:37:17 +0000 (Sat, 01 Dec 2012) New Revision: 2334 Added: trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchPage.java trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchParameter.java trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java Log: Added new tab in ItemSearchWidget. Displays a shallow list of all items of specific type. Enables to filter the list by name / title. Additionally usability improved: IF field is hidden now, replaced by a text field displaying the title of selected item. ToDo: Accept a string entered in that field of ItemSearchWidget. Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties 2012-12-01 15:29:28 UTC (rev 2333) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties 2012-12-01 15:37:17 UTC (rev 2334) @@ -1092,3 +1092,9 @@ cms.ui.lifecycle.publish.error=An error occured while publishing this item.The system administrator has been notified about this problem. This item will stay locked until the lock is removed by the system administrator manually. cms.ui.delete_confirmation=Permanently delete this item? cms.ui.lifecycle.details.last_published=Item last (re-)published +cms.ui.item_search.flat.filter=Filter list +cms.ui.item_search.flat.no_items=No items matching the filter found +cms.ui.item_search.flat.title=Title +cms.ui.item_search.flat.place=Place +cms.ui.item_search.flat.type=Type +cms.ui.item_search.flatBrowse=Select item Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties 2012-12-01 15:29:28 UTC (rev 2333) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties 2012-12-01 15:37:17 UTC (rev 2334) @@ -1083,3 +1083,9 @@ cms.ui.lifecycle.publish.error=W\u00e4hrend des Publizierens ist ein Fehler aufgetreten. Der System-Administrator wurde per \u00fcber das Problem informiert. Dieses Item bleibt besperrt, bis der Administrator die Sperre manuell entfernt. cms.ui.delete_confirmation=Wollen Sie dieses Content-Item l\u00f6schen? cms.ui.lifecycle.details.last_published=Das Item wurde zuletzt republiziert am +cms.ui.item_search.flat.filter=Liste filtern +cms.ui.item_search.flat.no_items=Kein Item entspricht dem Filter +cms.ui.item_search.flat.title=Titel +cms.ui.item_search.flat.place=Ort +cms.ui.item_search.flat.type=Typ +cms.ui.item_search.flatBrowse=Item ausw\u00e4hlen Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties 2012-12-01 15:29:28 UTC (rev 2333) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties 2012-12-01 15:37:17 UTC (rev 2334) @@ -31,3 +31,9 @@ cms.ui.lifecycle.publish.error= cms.ui.delete_confirmation= cms.ui.lifecycle.details.last_published= +cms.ui.item_search.flat.filter= +cms.ui.item_search.flat.no_items= +cms.ui.item_search.flat.title=Title +cms.ui.item_search.flat.place=Place +cms.ui.item_search.flat.type=Type +cms.ui.item_search.flatBrowse=Select item Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties 2012-12-01 15:29:28 UTC (rev 2333) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties 2012-12-01 15:37:17 UTC (rev 2334) @@ -562,3 +562,9 @@ cms.ui.lifecycle.publish.error= cms.ui.delete_confirmation= cms.ui.lifecycle.details.last_published= +cms.ui.item_search.flat.filter= +cms.ui.item_search.flat.no_items= +cms.ui.item_search.flat.title=Title +cms.ui.item_search.flat.place=Place +cms.ui.item_search.flat.type=Type +cms.ui.item_search.flatBrowse=Select item Added: trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java 2012-12-01 15:37:17 UTC (rev 2334) @@ -0,0 +1,239 @@ +package com.arsdigita.cms.ui; + +import com.arsdigita.bebop.BoxPanel; +import com.arsdigita.bebop.Component; +import com.arsdigita.bebop.Form; +import com.arsdigita.bebop.FormData; +import com.arsdigita.bebop.FormProcessException; +import com.arsdigita.bebop.Label; +import com.arsdigita.bebop.Link; +import com.arsdigita.bebop.Page; +import com.arsdigita.bebop.PageState; +import com.arsdigita.bebop.Table; +import com.arsdigita.bebop.event.FormInitListener; +import com.arsdigita.bebop.event.FormProcessListener; +import com.arsdigita.bebop.event.FormSectionEvent; +import com.arsdigita.bebop.form.TextField; +import com.arsdigita.bebop.parameters.BigDecimalParameter; +import com.arsdigita.bebop.parameters.StringParameter; +import com.arsdigita.bebop.table.TableCellRenderer; +import com.arsdigita.bebop.table.TableColumn; +import com.arsdigita.bebop.table.TableColumnModel; +import com.arsdigita.bebop.table.TableModel; +import com.arsdigita.bebop.table.TableModelBuilder; +import com.arsdigita.cms.ContentBundle; +import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.ContentPage; +import com.arsdigita.cms.ContentType; +import com.arsdigita.cms.Folder; +import com.arsdigita.cms.util.GlobalizationUtil; +import com.arsdigita.domain.DomainObjectFactory; +import com.arsdigita.persistence.DataCollection; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.Session; +import com.arsdigita.persistence.SessionManager; +import com.arsdigita.util.LockableImpl; +import java.math.BigDecimal; + +/** + * + * @author Jens Pelzetter <je...@jp...> + * @version $Id$ + */ +public class ItemSearchFlatBrowsePane extends Form implements FormInitListener, FormProcessListener { + + private static final String QUERY_PARAM = "query"; + public static final String WIDGET_PARAM = "widget"; + public static final String SEARCHWIDGET_PARAM = "searchWidget"; + private final Table resultsTable; + private final StringParameter queryParam; + + + public ItemSearchFlatBrowsePane(final String name) { + super(name); + + queryParam = new StringParameter(QUERY_PARAM); + + final BoxPanel boxPanel = new BoxPanel(BoxPanel.HORIZONTAL); + boxPanel.add(new Label(GlobalizationUtil.globalize("cms.ui.item_search.flat.filter"))); + final TextField filter = new TextField(new StringParameter(QUERY_PARAM)); + boxPanel.add(filter); + add(boxPanel); + + resultsTable = new ResultsTable(); + add(resultsTable); + + addInitListener(this); + addProcessListener(this); + } + + @Override + public void register(final Page page) { + super.register(page); + page.addComponentStateParam(this, queryParam); + } + + public void init(final FormSectionEvent fse) throws FormProcessException { + + } + + public void process(final FormSectionEvent fse) throws FormProcessException { + final FormData data = fse.getFormData(); + final PageState state = fse.getPageState(); + + state.setValue(queryParam, data.get(QUERY_PARAM)); + } + + private class ResultsTable extends Table { + + private static final String TABLE_COL_TITLE = "title"; + private static final String TABLE_COL_PLACE = "place"; + private static final String TABLE_COL_TYPE = "type"; + + public ResultsTable() { + super(); + setEmptyView(new Label(GlobalizationUtil.globalize("cms.ui.item_search.flat.no_items"))); + + final TableColumnModel columnModel = getColumnModel(); + columnModel.add(new TableColumn(0, + GlobalizationUtil.globalize("cms.ui.item_search.flat.title").localize(), + TABLE_COL_TITLE)); + columnModel.add(new TableColumn(1, + GlobalizationUtil.globalize("cms.ui.item_search.flat.place").localize(), + TABLE_COL_PLACE)); + columnModel.add(new TableColumn(2, + GlobalizationUtil.globalize("cms.ui.item_search.flat.type").localize(), + TABLE_COL_TYPE)); + + setModelBuilder(new ResultsTableModelBuilder()); + + columnModel.get(0).setCellRenderer(new TitleCellRenderer()); + } + + } + + private class ResultsTableModelBuilder extends LockableImpl implements TableModelBuilder { + + public TableModel makeModel(final Table table, final PageState state) { + return new ResultsTableModel(table, state); + } + + } + + private class ResultsTableModel implements TableModel { + + private final Table table; + private final DataCollection collection; + private ContentItem currentItem; + + public ResultsTableModel(final Table table, final PageState state) { + this.table = table; + final Session session = SessionManager.getSession(); + final BigDecimal typeId = (BigDecimal) state.getValue(new BigDecimalParameter(ItemSearch.SINGLE_TYPE_PARAM)); + if (typeId == null) { + collection = session.retrieve(ContentPage.BASE_DATA_OBJECT_TYPE); + } else { + final ContentType type = new ContentType(typeId); + collection = session.retrieve(type.getClassName()); + } + + final String query = (String) state.getValue(queryParam); + if ((query != null) && !query.isEmpty()) { + collection.addFilter(String.format("(lower(%s) like lower('%%%s%%')) or (lower(%s) like lower('%%%s%%'))", + ContentItem.NAME, query, + ContentPage.TITLE, query)); + } + } + + public int getColumnCount() { + return table.getColumnModel().size(); + } + + public boolean nextRow() { + boolean ret; + + if ((collection != null) && collection.next()) { + currentItem = (ContentItem) DomainObjectFactory.newInstance(collection.getDataObject()); + ret = true; + } else { + ret = false; + } + + return ret; + } + + public Object getElementAt(final int columnIndex) { + switch (columnIndex) { + case 0: + if (currentItem instanceof ContentPage) { + return ((ContentPage) currentItem).getTitle(); + } else { + return currentItem.getName(); + } + case 1: + return getItemPath(currentItem); + case 2: + return currentItem.getContentType().getLabel(); + default: + return null; + } + } + + private String getItemPath(final ContentItem item) { + final StringBuilder path = new StringBuilder(item.getName()); + + ContentItem current = item; + + while (current.getParent() != null) { + if (current.getParent() instanceof ContentBundle) { + current = (ContentBundle) current.getParent(); + } else if (current.getParent() instanceof Folder) { + current = (Folder) current.getParent(); + if (!current.getName().equals("/")) { + path.insert(0, '/'); + path.insert(0, current.getName()); + } + } + } + + path.insert(0, ":/"); + path.insert(0, item.getContentSection().getName()); + + return path.toString(); + } + + public Object getKeyAt(final int columnIndex) { + return currentItem.getID(); + } + } + + private class TitleCellRenderer extends LockableImpl implements TableCellRenderer { + + public Component getComponent(final Table table, + final PageState state, + final Object value, + final boolean isSelected, + final Object key, + final int row, + final int column) { + final Link link = new Link(value.toString(), ""); + + final String widget = (String) state.getValue(new StringParameter(WIDGET_PARAM)); + final String searchWidget = (String) state.getValue(new StringParameter(SEARCHWIDGET_PARAM)); + + final ContentPage page = new ContentPage((BigDecimal) key); + + link.setOnClick(String.format( + "window.opener.document.%s.value=\"%s\";window.opener.document.%s.value=\"%s\";self.close();return false;", + widget, + key.toString(), + searchWidget, + page.getTitle())); + + return link; + } + + + + } +} Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchPage.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchPage.java 2012-12-01 15:29:28 UTC (rev 2333) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchPage.java 2012-12-01 15:37:17 UTC (rev 2334) @@ -54,6 +54,7 @@ private final static String XSL_CLASS = "CMS Admin"; private TabbedPane m_tabbedPane; + private ItemSearchFlatBrowsePane m_flatBrowse; private ItemSearchBrowsePane m_browse; private ItemSearchPopup m_search; //private ItemSearchCreateItemPane m_create; @@ -72,11 +73,13 @@ addGlobalStateParam(new BigDecimalParameter(ItemSearch.SINGLE_TYPE_PARAM)); addGlobalStateParam(new StringParameter(ItemSearchPopup.WIDGET_PARAM)); + addGlobalStateParam(new StringParameter("searchWidget")); m_sectionId = new BigDecimalParameter(CONTENT_SECTION); addGlobalStateParam(m_sectionId); m_browse = getBrowsePane(); + m_flatBrowse = getFlatBrowsePane(); m_search = getSearchPane(); // m_create = getCreatePane(); @@ -98,6 +101,14 @@ return m_browse; } + protected ItemSearchFlatBrowsePane getFlatBrowsePane() { + if (m_flatBrowse == null) { + m_flatBrowse = new ItemSearchFlatBrowsePane("flatBrowse"); + } + + return m_flatBrowse; + } + /** * Creates, and then caches, the Creation pane. Overriding this * method to return null will prevent this tab from appearing. @@ -135,6 +146,7 @@ TabbedPane pane = new TabbedPane(); pane.setClassAttr(XSL_CLASS); + addToPane(pane, "flatBrowse", getFlatBrowsePane()); addToPane(pane, "browse", getBrowsePane()); addToPane(pane, "search", getSearchPane()); // addToPane(pane, "create", getCreatePane()); Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchParameter.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchParameter.java 2012-12-01 15:29:28 UTC (rev 2333) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchParameter.java 2012-12-01 15:37:17 UTC (rev 2334) @@ -38,7 +38,6 @@ * * @author <a href="mailto:ss...@re...">Scott Seago</a> */ - public class ItemSearchParameter extends StringParameter { private ContentType m_contentType; @@ -50,10 +49,9 @@ * @param name the name of the request parameter from which item */ public ItemSearchParameter(String name) { - this(name,null); + this(name, null); } - /** * Create a new item search parameter corresponding to a request parameter * with the given name. @@ -62,10 +60,10 @@ * @param contentType If not null, search will be limited to the * specified content type */ - public ItemSearchParameter(String name, - ContentType contentType) { + public ItemSearchParameter(String name, + ContentType contentType) { super(name); - m_contentType = contentType; + m_contentType = contentType; } /** @@ -80,22 +78,27 @@ */ @Override public Object transformValue(HttpServletRequest request) - throws IllegalArgumentException { + throws IllegalArgumentException { String itemStr = Globalization.decodeParameter(request, getName()); - + return unmarshal(itemStr); } @Override public Object unmarshal(String encoded) - throws IllegalArgumentException { + throws IllegalArgumentException { // As stated above, if we get an invalid address just return null. if (encoded == null || encoded.length() < 1) { return null; - } - String idStr = encoded.substring(0,encoded.indexOf(' ')); + } + String idStr; + if (encoded.indexOf(' ') < 0) { + idStr = encoded; + } else { + idStr = encoded.substring(0, encoded.indexOf(' ')); + } if (idStr == null || idStr.length() < 1) { return null; } @@ -105,19 +108,15 @@ } ContentItem contentItem; try { - contentItem = (ContentItem) DomainObjectFactory.newInstance - (new OID(ContentItem.BASE_DATA_OBJECT_TYPE, itemID)); + contentItem = (ContentItem) DomainObjectFactory.newInstance(new OID(ContentItem.BASE_DATA_OBJECT_TYPE, + itemID)); } catch (DataObjectNotFoundException e) { - throw new IllegalArgumentException - (encoded + - " is not a valid contentItem." + - e.getMessage()); + throw new IllegalArgumentException(encoded + " is not a valid contentItem." + e.getMessage()); } - - if (m_contentType != null && - !contentItem.isContentType(m_contentType)) { - return null; - } + + if (m_contentType != null && !contentItem.isContentType(m_contentType)) { + return null; + } return contentItem; } @@ -126,11 +125,11 @@ if (value == null) { return null; } else { - ContentPage theItem = (ContentPage) value; - return (theItem.getID().toString() + " (" + theItem.getTitle() + ")"); + ContentPage theItem = (ContentPage) value; + return (theItem.getID().toString() + " (" + theItem.getTitle() + ")"); } } - + @Override public Class getValueClass() { return ContentPage.class; Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java 2012-12-01 15:29:28 UTC (rev 2333) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java 2012-12-01 15:37:17 UTC (rev 2334) @@ -30,10 +30,12 @@ import com.arsdigita.bebop.event.FormSubmissionListener; import com.arsdigita.bebop.event.PrintEvent; import com.arsdigita.bebop.event.PrintListener; +import com.arsdigita.bebop.form.Hidden; import com.arsdigita.bebop.form.Submit; import com.arsdigita.bebop.form.TextField; import com.arsdigita.bebop.parameters.BigDecimalParameter; import com.arsdigita.bebop.parameters.ParameterModel; +import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.bebop.util.BebopConstants; import com.arsdigita.cms.CMS; import com.arsdigita.cms.ContentItem; @@ -55,6 +57,7 @@ implements BebopConstants, FormSubmissionListener, FormInitListener { private static final Logger s_log = Logger.getLogger(ItemSearchWidget.class); + private Hidden m_selected; private TextField m_item; private Submit m_search; private Submit m_clear; @@ -67,7 +70,9 @@ private String m_searchName; private String m_clearName; private ParameterModel m_model; + private ParameterModel m_searchModel; public static final String BEBOP_ITEM_SEARCH = "bebop:itemSearch"; + public static final String SEARCH = "search"; public static final boolean LIMIT_TO_CONTENT_SECTION = false; private class ItemFragment extends TextField { @@ -77,7 +82,7 @@ public ItemFragment(ParameterModel parameter, ItemSearchWidget parent) { super(parameter); this.parent = parent; - this.setReadOnly(); + //this.setReadOnly(); this.setSize(35); } } @@ -89,7 +94,7 @@ public SearchFragment(String name, ItemSearchWidget parent) { super(name, "Search"); this.parent = parent; - this.setAttribute("onClick", "return " + parent.m_item.getName(). + this.setAttribute("onClick", "return " + parent.m_selected.getName(). //+ parent.m_item.getName(). replace('.', '_') + "Popup(this.form)"); this.setAttribute("value", "Search"); } @@ -109,7 +114,7 @@ public ClearFragment(String name, ItemSearchWidget parent) { super(name, "Clear"); this.parent = parent; - this.setAttribute("onClick", "this.form." + parent.m_item.getName() + this.setAttribute("onClick", "this.form." + parent.m_selected.getName() //parent.m_item.getName() + ".value = \"\"; return false;"); this.setAttribute("value", "Clear"); } @@ -199,9 +204,13 @@ } else { typeURLFrag = null; } + + m_searchModel = new StringParameter(SEARCH); m_contentType = contentType; - m_item = new ItemFragment(model, this); + m_selected = new Hidden(model); + //m_item = new ItemFragment(model, this); + m_item = new TextField(m_searchModel); m_search = new SearchFragment(m_searchName, this); m_clear = new ClearFragment(m_clearName, this); m_jsLabel = new LabelFragment("", false, this); @@ -215,8 +224,9 @@ ParameterMap params = new ParameterMap(); params.setParameter("section_id", CMS.getContext().getContentSection().getID()); - params.setParameter("widget", formName + ".elements['" + m_item. + params.setParameter("widget", formName + ".elements['" + m_selected. //m_item. getName() + "']"); + params.setParameter("searchWidget", formName + ".elements['" + m_item.getName() + "']"); if (typeURLFrag != null) { params.setParameter("single_type", typeURLFrag); } @@ -235,10 +245,12 @@ t.setLabel(" <script language=javascript> " + " <!-- \n" + " function " - + m_item.getName().replace('.', '_') + //+ m_item.getName().replace('.', '_') + + m_selected.getName().replace('.', '_') + "Popup(theForm) { \n" - + " aWindow = window.open(\"" + url - + "\", \"search\", \"toolbar=no,width=800,height=600,status=no,scrollbars=yes,resize=yes,menubar=no\");\n return false;\n" + + " aWindow = window.open(\"" + url + "\", " + + "\"search\", \"toolbar=no,width=800,height=600,status=no,scrollbars=yes,resize=yes\");\n" + + "return false;\n" + " } \n" + " --> \n" + " </script> "); @@ -249,6 +261,7 @@ FormSection searchSection = new FormSection(new BoxPanel( BoxPanel.HORIZONTAL)); searchSection.add(m_item); + searchSection.add(m_selected); searchSection.add(m_search); searchSection.add(m_clear); searchSection.add(m_jsLabel); |
From: <pb...@fe...> - 2012-12-01 15:29:39
|
Author: pboy Date: 2012-12-01 15:29:28 +0000 (Sat, 01 Dec 2012) New Revision: 2333 Modified: trunk/ccm-cms/web/assets/xinha/CCMcmsXinhaConfig.js Log: Added support for formulae in Xinha and Mandalay theme. Modified: trunk/ccm-cms/web/assets/xinha/CCMcmsXinhaConfig.js =================================================================== --- trunk/ccm-cms/web/assets/xinha/CCMcmsXinhaConfig.js 2012-12-01 15:25:39 UTC (rev 2332) +++ trunk/ccm-cms/web/assets/xinha/CCMcmsXinhaConfig.js 2012-12-01 15:29:28 UTC (rev 2333) @@ -13,7 +13,7 @@ xinha_editors=xinha_editors?xinha_editors:["myTextArea","anotherOne"]; xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","CharCounter", "ContextMenu","DefinitionList","FindReplace","ListType","QuickTag", - "SmartReplace","Stylist","TableOperations","UnFormat"]; + "SmartReplace","Stylist","TableOperations","UnFormat","Equation"]; if(!Xinha.loadPlugins(xinha_plugins,xinha_init)){ return; } |
From: <pb...@fe...> - 2012-12-01 15:25:46
|
Author: pboy Date: 2012-12-01 15:25:39 +0000 (Sat, 01 Dec 2012) New Revision: 2332 Modified: trunk/tools-ng/common/xsl/build-template.xsl trunk/tools-ng/ecdc/conf/build.properties trunk/tools-ng/ecdc/local.build.properties Log: Improved build system: Parameter for compile target version added. (compile.target=1.x) Modified: trunk/tools-ng/common/xsl/build-template.xsl =================================================================== --- trunk/tools-ng/common/xsl/build-template.xsl 2012-12-01 15:22:13 UTC (rev 2331) +++ trunk/tools-ng/common/xsl/build-template.xsl 2012-12-01 15:25:39 UTC (rev 2332) @@ -164,6 +164,8 @@ <property value="off" name="compile.deprecation"/> <property value="off" name="compile.verbose"/> <property value="off" name="compile.nowarn"/> + <!-- By default build target for the JVM version used by the actual build system --> + <property value="${{ant.java.version}}" name="compile.target"/> <property value="rulesets/design.xml,rulesets/imports.xml" name="pmd.rulesets"/> @@ -557,6 +559,8 @@ <!-- Usually true by default setting, main work is done here! --> <xsl:if test="$hassrcdir"> <mkdir dir="{$name}/${{build.src.dir}}"/> + <echo message="Build system version: ${{ant.java.version}} " /> + <echo message="Compile target version: ${{compile.target}} " /> <xsl:if test="$jdodirs"> <if> <not> @@ -2230,6 +2234,7 @@ deprecation="${{compile.deprecation}}" verbose="${{compile.verbose}}" nowarn="${{compile.nowarn}}" + target="${{compile.target}}" destdir="{$destdir}" classpathref="{$classpathref}"> <src refid="{$srcpathref}"/> Modified: trunk/tools-ng/ecdc/conf/build.properties =================================================================== --- trunk/tools-ng/ecdc/conf/build.properties 2012-12-01 15:22:13 UTC (rev 2331) +++ trunk/tools-ng/ecdc/conf/build.properties 2012-12-01 15:25:39 UTC (rev 2332) @@ -43,6 +43,10 @@ compile.verbose=off compile.nowarn=on +# Optionally specifiy version of target JVM. +# By default the version of the build system is determined and used as target. +#compile.target=1.6 + # These properties are specific to Jikes build.compiler.emacs=off build.compiler.pedantic=off Modified: trunk/tools-ng/ecdc/local.build.properties =================================================================== --- trunk/tools-ng/ecdc/local.build.properties 2012-12-01 15:22:13 UTC (rev 2331) +++ trunk/tools-ng/ecdc/local.build.properties 2012-12-01 15:25:39 UTC (rev 2332) @@ -28,8 +28,6 @@ # Set to Eclipse JDT batch compiler (requires ecj.jar) #build.compiler=org.eclipse.jdt.core.JDTCompilerAdapter -#ant.build.javac.source=1.6 -#ant.build.javac.target=1.6 # These properties apply to Javac and Jikes #compile.debug=on @@ -38,6 +36,10 @@ #compile.verbose=off #compile.nowarn=on +# Optionally specifiy version of target JVM. +# By default the version of the build system is determined and used as target. +#compile.target=1.6 + # These properties are specific to Jikes #build.compiler.emacs=off #build.compiler.pedantic=off |
Author: pboy Date: 2012-12-01 15:22:13 +0000 (Sat, 01 Dec 2012) New Revision: 2331 Modified: trunk/ccm-atoz/pdl/com/arsdigita/atoz/AtoZ.pdl trunk/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ui/ArticlePropertyForm.java trunk/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertyForm.java trunk/ccm-cms-types-htmlform/src/com/arsdigita/cms/contenttypes/ui/HTMLFormPropertyForm.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericArticlePropertyForm.java trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java trunk/ccm-navigation/src/com/arsdigita/navigation/Loader.java trunk/ccm-webpage/src/com/arsdigita/cms/webpage/ui/authoring/WebpagePropertiesForm.java Log: (a) Another try to improve checking for unique URL. Various PropertyForms use in their validate(FormSectionEvent)-method not super.validate(FormSectionEvent). Because of this BasicPageForm.validate() will not be executed. This problem may exist in another content types, probably all classes derived from BasicPageForm have to be checked. (b) Improved error message in ccm-navigation, if template directory can not be found. Modified: trunk/ccm-atoz/pdl/com/arsdigita/atoz/AtoZ.pdl =================================================================== --- trunk/ccm-atoz/pdl/com/arsdigita/atoz/AtoZ.pdl 2012-12-01 09:32:20 UTC (rev 2330) +++ trunk/ccm-atoz/pdl/com/arsdigita/atoz/AtoZ.pdl 2012-12-01 15:22:13 UTC (rev 2331) @@ -22,5 +22,5 @@ // In contrast to other applications atoz_app is needed here and used in // associations, e.g. AtoZProvider. object type AtoZ extends Application { - reference key (atoz_app.application_id); + reference key (atoz_app.application_id); } Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericArticlePropertyForm.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericArticlePropertyForm.java 2012-12-01 09:32:20 UTC (rev 2330) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericArticlePropertyForm.java 2012-12-01 15:22:13 UTC (rev 2331) @@ -72,7 +72,7 @@ @Override public void validate(FormSectionEvent e) throws FormProcessException { - FormData d = e.getFormData(); + super.validate(e); } /** Form initialisation hook. Fills widgets with data. */ Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java 2012-12-01 09:32:20 UTC (rev 2330) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java 2012-12-01 15:22:13 UTC (rev 2331) @@ -31,6 +31,7 @@ import com.arsdigita.bebop.parameters.ParameterData; import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.cms.ContentBundle; +import com.arsdigita.cms.ContentItem; import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.Folder; @@ -43,12 +44,12 @@ import java.util.Date; /** - * A form for editing subclasses of ContentPage. This is just a convenience - * class. + * A form for editing subclasses of ContentPage. This is just a convenience class. * * @author Stanislav Freidin (st...@ar...) * @version $Revision: #22 $ $DateTime: 2004/08/17 23:15:09 $ - **/ + * + */ public abstract class BasicPageForm extends BasicItemForm { private FormSection m_widgetSection; @@ -59,8 +60,7 @@ * Construct a new BasicPageForm * * @param formName the name of this form - * @param itemModel The {@link ItemSelectionModel} which will - * be responsible for loading the current item + * @param itemModel The {@link ItemSelectionModel} which will be responsible for loading the current item */ public BasicPageForm(String formName, ItemSelectionModel itemModel) { super(formName, itemModel); @@ -71,8 +71,7 @@ * * @param formName the name of this form * @param columnPanel the columnpanel of the form - * @param itemModel The {@link ItemSelectionModel} which will - * be responsible for loading the current item + * @param itemModel The {@link ItemSelectionModel} which will be responsible for loading the current item */ public BasicPageForm(String formName, ColumnPanel columnPanel, @@ -81,8 +80,8 @@ } /** - * Add various widgets to the form. Child classes should override - * this method to perform all their widget-adding needs + * Add various widgets to the form. Child classes should override this method to perform all their widget-adding + * needs */ @Override protected void addWidgets() { @@ -109,13 +108,10 @@ } /** - * Utility method to initialize the name/title widgets. Child classes - * may call this method from the init listener + * Utility method to initialize the name/title widgets. Child classes may call this method from the init listener * - * @param e the {@link FormSectionEvent} which was passed to the - * init listener - * @return the ContentPage instance which was extracted from the - * ItemSelectionModel + * @param e the {@link FormSectionEvent} which was passed to the init listener + * @return the ContentPage instance which was extracted from the ItemSelectionModel */ public ContentPage initBasicWidgets(FormSectionEvent e) { Assert.exists(getItemSelectionModel()); @@ -143,9 +139,10 @@ return item; } - /*@Override + @Override public void validate(final FormSectionEvent fse) throws FormProcessException { - ACSObject parent = getItemSelectionModel().getSelectedItem(fse.getPageState()).getParent(); + final ContentItem item = getItemSelectionModel().getSelectedItem(fse.getPageState()); + ACSObject parent = item.getParent(); if (parent instanceof ContentBundle) { @@ -154,16 +151,18 @@ if (parent instanceof Folder) { final Folder folder = (Folder) parent; Assert.exists(folder); - validateNameUniqueness(folder, fse); + final FormData data = fse.getFormData(); + final String name = data.getString(NAME); + if (!item.getName().equals(name)) { + validateNameUniqueness(folder, fse); + } } - }*/ + } /** - * Utility method to process the name/title widgets. Child classes - * may call this method from the process listener. + * Utility method to process the name/title widgets. Child classes may call this method from the process listener. * - * @param e the {@link FormSectionEvent} which was passed to the - * process listener + * @param e the {@link FormSectionEvent} which was passed to the process listener */ public ContentPage processBasicWidgets(FormSectionEvent e) { Assert.exists(getItemSelectionModel()); @@ -187,15 +186,11 @@ } /** - * A utility method that will create a new item and tell the selection - * model to select the new item. Creation components may call this method - * in the process listener of their form. See {@link PageCreate} for - * an example. + * A utility method that will create a new item and tell the selection model to select the new item. Creation + * components may call this method in the process listener of their form. See {@link PageCreate} for an example. * * @param state the current page state - * @return the new content item (or a proper subclass thereof) - * @pre state != null - * @post return != null + * @return the new content item (or a proper subclass thereof) @pre state != null @post return != null */ public ContentPage createContentPage(PageState state) throws FormProcessException { @@ -220,7 +215,8 @@ } /** - * Constructs a new <code>LaunchDateValidationListener</code>. + * Constructs a new + * <code>LaunchDateValidationListener</code>. */ public class LaunchDateValidationListener implements ParameterListener { @@ -235,6 +231,5 @@ return; } } - } } Modified: trunk/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ui/ArticlePropertyForm.java =================================================================== --- trunk/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ui/ArticlePropertyForm.java 2012-12-01 09:32:20 UTC (rev 2330) +++ trunk/ccm-cms-types-article/src/com/arsdigita/cms/contenttypes/ui/ArticlePropertyForm.java 2012-12-01 15:22:13 UTC (rev 2331) @@ -96,7 +96,7 @@ @Override public void validate(FormSectionEvent e) throws FormProcessException { - FormData d = e.getFormData(); + super.validate(e); } /** Form initialisation hook. Fills widgets with data. */ Modified: trunk/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertyForm.java =================================================================== --- trunk/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertyForm.java 2012-12-01 09:32:20 UTC (rev 2330) +++ trunk/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertyForm.java 2012-12-01 15:22:13 UTC (rev 2331) @@ -242,6 +242,8 @@ @Override public void validate(FormSectionEvent e) throws FormProcessException { + super.validate(e); + FormData d = e.getFormData(); java.util.Date startDate = d.getDate(START_DATE); java.util.Date endDate = d.getDate(END_DATE); Modified: trunk/ccm-cms-types-htmlform/src/com/arsdigita/cms/contenttypes/ui/HTMLFormPropertyForm.java =================================================================== --- trunk/ccm-cms-types-htmlform/src/com/arsdigita/cms/contenttypes/ui/HTMLFormPropertyForm.java 2012-12-01 09:32:20 UTC (rev 2330) +++ trunk/ccm-cms-types-htmlform/src/com/arsdigita/cms/contenttypes/ui/HTMLFormPropertyForm.java 2012-12-01 15:22:13 UTC (rev 2331) @@ -94,7 +94,7 @@ @Override public void validate(FormSectionEvent e) throws FormProcessException { - FormData d = e.getFormData(); + super.validate(e); } /** Form initialisation hook. Fills widgets with data. */ Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/Loader.java =================================================================== --- trunk/ccm-navigation/src/com/arsdigita/navigation/Loader.java 2012-12-01 09:32:20 UTC (rev 2330) +++ trunk/ccm-navigation/src/com/arsdigita/navigation/Loader.java 2012-12-01 15:22:13 UTC (rev 2331) @@ -182,6 +182,9 @@ String templatesFile = (String)get(m_templatesFile); InputStream file = Thread.currentThread().getContextClassLoader() .getResourceAsStream(templatesFile); + if (file == null) { + throw new UncheckedWrapperException(String.format("Failed to open templates files %s.", templatesFile)); + } BufferedReader templates = new BufferedReader( new InputStreamReader( file ) ); Modified: trunk/ccm-webpage/src/com/arsdigita/cms/webpage/ui/authoring/WebpagePropertiesForm.java =================================================================== --- trunk/ccm-webpage/src/com/arsdigita/cms/webpage/ui/authoring/WebpagePropertiesForm.java 2012-12-01 09:32:20 UTC (rev 2330) +++ trunk/ccm-webpage/src/com/arsdigita/cms/webpage/ui/authoring/WebpagePropertiesForm.java 2012-12-01 15:22:13 UTC (rev 2331) @@ -104,8 +104,9 @@ } + @Override public void validate(FormSectionEvent e) throws FormProcessException { - FormData d = e.getFormData(); + super.validate(e); } /** Form initialisation hook. Fills widgets with data. */ |
From: <pb...@fe...> - 2012-12-01 09:36:32
|
Author: pboy Date: 2012-12-01 09:11:26 +0000 (Sat, 01 Dec 2012) New Revision: 2326 Modified: trunk/ccm-cms/src/com/arsdigita/cms/contentsection/ContentSectionSetup.java trunk/ccm-core/src/com/arsdigita/loader/CoreLoader.java Log: Fixed unclosed result sets. Modified: trunk/ccm-cms/src/com/arsdigita/cms/contentsection/ContentSectionSetup.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contentsection/ContentSectionSetup.java 2012-12-01 08:59:18 UTC (rev 2325) +++ trunk/ccm-cms/src/com/arsdigita/cms/contentsection/ContentSectionSetup.java 2012-12-01 09:11:26 UTC (rev 2326) @@ -204,6 +204,7 @@ if(partyColl.next()) { role.add(partyColl.getParty()); } + partyColl.close(); return role; } Modified: trunk/ccm-core/src/com/arsdigita/loader/CoreLoader.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/loader/CoreLoader.java 2012-12-01 08:59:18 UTC (rev 2325) +++ trunk/ccm-core/src/com/arsdigita/loader/CoreLoader.java 2012-12-01 09:11:26 UTC (rev 2326) @@ -453,7 +453,8 @@ groupColl.filter("Site-wide Administrators"); if(groupColl.next()) { groupColl.getGroup().addMember(sa); - } + } + groupColl.close(); s_log.debug("Adding administrator: \"" + givenName + " " + familyName + "\" <" + emailAddress + ">"); |
From: <pb...@fe...> - 2012-12-01 09:32:27
|
Author: pboy Date: 2012-12-01 09:32:20 +0000 (Sat, 01 Dec 2012) New Revision: 2330 Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java Log: Reverted r2326 because of regression. Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java 2012-12-01 09:22:43 UTC (rev 2329) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java 2012-12-01 09:32:20 UTC (rev 2330) @@ -30,11 +30,13 @@ import com.arsdigita.bebop.parameters.DateParameter; import com.arsdigita.bebop.parameters.ParameterData; import com.arsdigita.bebop.parameters.ParameterModel; +import com.arsdigita.cms.ContentBundle; import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.Folder; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.util.GlobalizationUtil; +import com.arsdigita.kernel.ACSObject; import com.arsdigita.util.Assert; import javax.servlet.ServletException; @@ -141,13 +143,21 @@ return item; } - @Override + /*@Override public void validate(final FormSectionEvent fse) throws FormProcessException { - final Folder folder = (Folder) getItemSelectionModel().getSelectedItem(fse.getPageState()).getParent(); - Assert.exists(folder); - validateNameUniqueness(folder, fse); - } + ACSObject parent = getItemSelectionModel().getSelectedItem(fse.getPageState()).getParent(); + + if (parent instanceof ContentBundle) { + parent = ((ContentBundle) parent).getParent(); + } + if (parent instanceof Folder) { + final Folder folder = (Folder) parent; + Assert.exists(folder); + validateNameUniqueness(folder, fse); + } + }*/ + /** * Utility method to process the name/title widgets. Child classes * may call this method from the process listener. |
From: <pb...@fe...> - 2012-12-01 09:22:50
|
Author: pboy Date: 2012-12-01 09:22:43 +0000 (Sat, 01 Dec 2012) New Revision: 2329 Modified: trunk/ccm-core/pdl/com/arsdigita/categorization/Category.pdl Log: Improved handling of category sort_key. Modified: trunk/ccm-core/pdl/com/arsdigita/categorization/Category.pdl =================================================================== --- trunk/ccm-core/pdl/com/arsdigita/categorization/Category.pdl 2012-12-01 09:21:45 UTC (rev 2328) +++ trunk/ccm-core/pdl/com/arsdigita/categorization/Category.pdl 2012-12-01 09:22:43 UTC (rev 2329) @@ -117,7 +117,8 @@ ELSE max(sort_key) END + 1 - from cat_object_category_map) + from cat_object_category_map + where category_id = :categories.id) ELSE (:sortKey) END |
From: <pb...@fe...> - 2012-12-01 09:21:51
|
Author: pboy Date: 2012-12-01 09:21:45 +0000 (Sat, 01 Dec 2012) New Revision: 2328 Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java Log: Improved validation of unique URL Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java 2012-12-01 09:20:26 UTC (rev 2327) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java 2012-12-01 09:21:45 UTC (rev 2328) @@ -32,6 +32,7 @@ import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentSection; +import com.arsdigita.cms.Folder; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.util.Assert; @@ -49,7 +50,6 @@ public abstract class BasicPageForm extends BasicItemForm { private FormSection m_widgetSection; - // public static final String DESCRIPTION = ContentPage.DESCRIPTION; public static final String LAUNCH_DATE = ContentPage.LAUNCH_DATE; @@ -72,13 +72,12 @@ * @param itemModel The {@link ItemSelectionModel} which will * be responsible for loading the current item */ - public BasicPageForm(String formName, - ColumnPanel columnPanel, + public BasicPageForm(String formName, + ColumnPanel columnPanel, ItemSelectionModel itemModel) { super(formName, columnPanel, itemModel); } - /** * Add various widgets to the form. Child classes should override * this method to perform all their widget-adding needs @@ -95,11 +94,9 @@ // add(description); // if (!ContentSection.getConfig().getHideLaunchDate()) { - add(new Label(GlobalizationUtil. - globalize("cms.ui.authoring.page_launch_date"))); + add(new Label(GlobalizationUtil.globalize("cms.ui.authoring.page_launch_date"))); ParameterModel launchDateParam = new DateParameter(LAUNCH_DATE); - com.arsdigita.bebop.form.Date launchDate - = new com.arsdigita.bebop.form.Date(launchDateParam); + com.arsdigita.bebop.form.Date launchDate = new com.arsdigita.bebop.form.Date(launchDateParam); if (ContentSection.getConfig().getRequireLaunchDate()) { launchDate.addValidationListener(new LaunchDateValidationListener()); // if launch date is required, help user by suggesting today's date @@ -124,7 +121,7 @@ FormData data = e.getFormData(); PageState state = e.getPageState(); ContentPage item = - (ContentPage)getItemSelectionModel().getSelectedObject(state); + (ContentPage) getItemSelectionModel().getSelectedObject(state); if (item != null) { // Preset fields @@ -134,16 +131,23 @@ if (!ContentSection.getConfig().getHideLaunchDate()) { data.put(LAUNCH_DATE, item.getLaunchDate()); // if launch date is required, help user by suggesting today's date - if (ContentSection.getConfig().getRequireLaunchDate() - && item.getLaunchDate() == null) { - data.put(LAUNCH_DATE, new Date()); - } + if (ContentSection.getConfig().getRequireLaunchDate() + && item.getLaunchDate() == null) { + data.put(LAUNCH_DATE, new Date()); + } } } return item; } + @Override + public void validate(final FormSectionEvent fse) throws FormProcessException { + final Folder folder = (Folder) getItemSelectionModel().getSelectedItem(fse.getPageState()).getParent(); + Assert.exists(folder); + validateNameUniqueness(folder, fse); + } + /** * Utility method to process the name/title widgets. Child classes * may call this method from the process listener. @@ -157,15 +161,15 @@ FormData data = e.getFormData(); PageState state = e.getPageState(); ContentPage item = - (ContentPage)getItemSelectionModel().getSelectedObject(state); + (ContentPage) getItemSelectionModel().getSelectedObject(state); if (item != null) { // Update attributes - item.setName((String)data.get(NAME)); - item.setTitle((String)data.get(TITLE)); + item.setName((String) data.get(NAME)); + item.setTitle((String) data.get(TITLE)); // item.setDescription((String)data.get(DESCRIPTION)); if (!ContentSection.getConfig().getHideLaunchDate()) { - item.setLaunchDate((Date)data.get(LAUNCH_DATE)); + item.setLaunchDate((Date) data.get(LAUNCH_DATE)); } } @@ -183,8 +187,8 @@ * @pre state != null * @post return != null */ - public ContentPage createContentPage(PageState state) - throws FormProcessException { + public ContentPage createContentPage(PageState state) + throws FormProcessException { ItemSelectionModel m = getItemSelectionModel(); Assert.exists(m); @@ -195,8 +199,8 @@ try { item = (ContentPage) m.createItem(); } catch (ServletException ex) { - throw new - FormProcessException((String)GlobalizationUtil.globalize("cms.ui.authoring.couldnt_create_contentpage").localize(), ex); + throw new FormProcessException((String) GlobalizationUtil.globalize( + "cms.ui.authoring.couldnt_create_contentpage").localize(), ex); } // Make sure the item will be remembered across requests @@ -211,16 +215,16 @@ public class LaunchDateValidationListener implements ParameterListener { @Override - public void validate(final ParameterEvent e) { - - final ParameterData data = e.getParameterData(); - final Object value = data.getValue(); + public void validate(final ParameterEvent e) { - if (value == null) { - data.addError("launch date is required"); - return; - } - } + final ParameterData data = e.getParameterData(); + final Object value = data.getValue(); + + if (value == null) { + data.addError("launch date is required"); + return; + } + } + } - } |
From: <pb...@fe...> - 2012-12-01 09:20:33
|
Author: pboy Date: 2012-12-01 09:20:26 +0000 (Sat, 01 Dec 2012) New Revision: 2327 Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionDefinition.java trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionRenderer.java trunk/ccm-navigation/src/com/arsdigita/navigation/cms/CMSDataCollectionDefinition.java trunk/ccm-navigation/src/com/arsdigita/navigation/ui/AbstractObjectList.java trunk/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java Log: Improved security / permission handling (navigation) Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionDefinition.java =================================================================== --- trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionDefinition.java 2012-12-01 09:11:26 UTC (rev 2326) +++ trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionDefinition.java 2012-12-01 09:20:26 UTC (rev 2327) @@ -5,12 +5,12 @@ * 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 @@ -66,8 +66,8 @@ public final void setObjectType(String objectType) { Assert.isUnlocked(this); + m_objectType = objectType; validateObjectType(objectType); - m_objectType = objectType; } public final void setSpecificObjectType(String specificObjectType) { @@ -86,6 +86,12 @@ } public void setDateAttribute(DataCollectionRenderer renderer) { + + // Stop here, if the set object type is invalid a.k.a. not installed + if(this.hasInvalidObjectType()) { + return; + } + ObjectType type = SessionManager.getMetadataRoot().getObjectType( m_objectType); s_log.debug("set date attribute for collection of " + type. @@ -124,10 +130,21 @@ private final void validateObjectType(String objectType) { ObjectType type = SessionManager.getMetadataRoot().getObjectType( objectType); - Assert.exists(type, ObjectType.class); - validateObjectType(type); + + // WTF: I don't need an exception if the requested objecttype doesn't exists + // That will only ruin your website + //Assert.exists(type, ObjectType.class); + if(type == null) { + m_objectType = ""; + } else { + validateObjectType(type); + } } + public boolean hasInvalidObjectType() { + return m_objectType.isEmpty(); + } + protected void validateObjectType(ObjectType type) { // Nada } @@ -153,7 +170,7 @@ } /** - * Activates a filter for content types which are blacklisted + * Activates a filter for content types which are blacklisted * in the AtoZ module. */ public void setBlackListTypes(boolean blackListTypes) { @@ -181,6 +198,11 @@ public final DataCollection getDataCollection(NavigationModel model) { Assert.isLocked(this); + // Stop here, if the set object type is invalid a.k.a. not installed + if(this.hasInvalidObjectType()) { + return null; + } + DataCollection objects = SessionManager.getSession().retrieve( m_objectType); Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionRenderer.java =================================================================== --- trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionRenderer.java 2012-12-01 09:11:26 UTC (rev 2326) +++ trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionRenderer.java 2012-12-01 09:20:26 UTC (rev 2327) @@ -123,7 +123,7 @@ } /** - * @param objects + * @param objects * @param pageNumber current page, starting from 1 * @return */ @@ -132,9 +132,9 @@ Assert.isLocked(this); // Quasimodo: Begin - // If objects is empty, do not insert objectList-element but do insert noContent-element - // and return immediately - if (objects.isEmpty()) { + // If objects is null or empty, do not insert objectList-element + // but do insert noContent-element and return immediately + if (objects == null || objects.isEmpty()) { return Navigation.newElement("noContent"); } // Quasimodo: End Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/cms/CMSDataCollectionDefinition.java =================================================================== --- trunk/ccm-navigation/src/com/arsdigita/navigation/cms/CMSDataCollectionDefinition.java 2012-12-01 09:11:26 UTC (rev 2326) +++ trunk/ccm-navigation/src/com/arsdigita/navigation/cms/CMSDataCollectionDefinition.java 2012-12-01 09:20:26 UTC (rev 2327) @@ -5,12 +5,12 @@ * 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 @@ -22,18 +22,16 @@ import com.arsdigita.cms.CMS; import com.arsdigita.cms.ContentItem; import com.arsdigita.cms.SecurityManager; -import com.arsdigita.navigation.DataCollectionDefinition; -import com.arsdigita.navigation.NavigationModel; import com.arsdigita.kernel.ACSObject; import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Party; import com.arsdigita.kernel.permissions.PermissionService; import com.arsdigita.kernel.permissions.PrivilegeDescriptor; +import com.arsdigita.navigation.DataCollectionDefinition; +import com.arsdigita.navigation.NavigationModel; import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.Filter; - import com.arsdigita.persistence.metadata.ObjectType; - import com.arsdigita.util.Assert; @@ -42,6 +40,7 @@ private boolean m_filterSection = false; private String m_filterVersion = ContentItem.LIVE; + @Override protected void validateObjectType(ObjectType type) { Assert.isTrue(type.isSubtypeOf(ContentItem.BASE_DATA_OBJECT_TYPE), "object type is a content item"); @@ -51,12 +50,13 @@ Assert.isUnlocked(this); m_filterSection = filterSection; } - + public final void setFilterVersion(String version) { Assert.isUnlocked(this); m_filterVersion = version; } + @Override protected void applyFilters(DataCollection objects, NavigationModel model) { super.applyFilters(objects, model); @@ -71,18 +71,19 @@ CMS.getContext().getContentSection() ); } - + if (m_filterVersion != null) { - objects.addEqualsFilter(ContentItem.VERSION, + objects.addEqualsFilter(ContentItem.VERSION, m_filterVersion); } - + objects.addPath("masterVersion.id"); // Can remove once bz 104102 is fixed objects.addPath("masterVersion.objectType"); } + @Override protected void checkPermissions(DataCollection objects) { // parties are assigned the cms_read_item privilege on content items // rather than the primitive READ @@ -97,6 +98,7 @@ party.getOID()); } + @Override protected String getCategorizedObjectPath(String fragment) { return "parent." + fragment; } Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/ui/AbstractObjectList.java =================================================================== --- trunk/ccm-navigation/src/com/arsdigita/navigation/ui/AbstractObjectList.java 2012-12-01 09:11:26 UTC (rev 2326) +++ trunk/ccm-navigation/src/com/arsdigita/navigation/ui/AbstractObjectList.java 2012-12-01 09:20:26 UTC (rev 2327) @@ -5,12 +5,12 @@ * 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 @@ -60,8 +60,14 @@ protected DataCollection getObjects(HttpServletRequest request, HttpServletResponse response) { - // definition needs to know if the renderer is rendering a date - // attribute so that it can decide whether to order by date for + + // Stop here, if the set object type is invalid a.k.a. not installed + if (m_definition.hasInvalidObjectType()) { + return null; + } + + // definition needs to know if the renderer is rendering a date + // attribute so that it can decide whether to order by date for // a date order category m_definition.setDateAttribute(m_renderer); @@ -103,8 +109,7 @@ addFilter(ff.equals("language", com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale().getLanguage())). addFilter(ff.and(). addFilter(ff.equals("language", GlobalizationHelper.LANG_INDEPENDENT)). - addFilter(ff.notIn("parent", "com.arsdigita.navigation.getParentIDsOfMatchedItems") - .set("language", com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale().getLanguage()))); + addFilter(ff.notIn("parent", "com.arsdigita.navigation.getParentIDsOfMatchedItems").set("language", com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale().getLanguage()))); objects.addFilter(filter); } else { objects.addEqualsFilter("language", com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale().getLanguage()); Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java =================================================================== --- trunk/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java 2012-12-01 09:11:26 UTC (rev 2326) +++ trunk/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java 2012-12-01 09:20:26 UTC (rev 2327) @@ -3,10 +3,13 @@ * * Autor: Sören Bernstein * - * Diese Klasse realisiert eine ObjectList für Navigation, der man Filterbefehle für die SQL-Abfrage mitgeben kann. Auf - * diese Weise lassen sich Objekte listen, die bestimmte Kriterien erfüllen. + * Diese Klasse realisiert eine ObjectList für Navigation, + * der man Filterbefehle für die SQL-Abfrage mitgeben kann. + * Auf diese Weise lassen sich Objekte listen, die bestimmte + * Kriterien erfüllen. * - * Angelegt wurde Sie für die Auflistung der aktuellen News und Veranstalungen auf einer Navigationsseite. + * Angelegt wurde Sie für die Auflistung der aktuellen News + * und Veranstalungen auf einer Navigationsseite. */ package com.arsdigita.navigation.ui.object; @@ -36,7 +39,7 @@ protected String m_filter = null; protected Map m_filterParameters = new HashMap(); protected Map<String, String> m_customAttributes = - new HashMap<String, String>(); + new HashMap<String, String>(); public void setCustomName(String name) { m_customName = name; @@ -47,9 +50,10 @@ } /** - * Hinzufügen eines SQL-Filter zur Abfrage Verarbeitet einen boolschen Filter, der SQL-konform Formatiert ist. Siehe - * PostgreSQL-Handbuch zur where-Klausel - * + * Hinzufügen eines SQL-Filter zur Abfrage + * Verarbeitet einen boolschen Filter, der SQL-konform Formatiert ist. + * Siehe PostgreSQL-Handbuch zur where-Klausel +(??) * @param sqlfilter */ public void setSQLFilter(String sqlfilter) { @@ -73,42 +77,43 @@ } /* - * Diese Methode überschreibt die Methode aus der Eltern-Klasse, um die SQL-Filter berücksichtigen zu können + * die SQL-Filter berücksichtigen zu können */ @Override protected DataCollection getObjects(HttpServletRequest request, - HttpServletResponse response) { + HttpServletResponse response) { DataCollection objects = super.getObjects(request, response); - // Setze den Filter - if (m_filter != null) { + // Don't try do anything with a null object + if (objects != null) { - FilterFactory fact = objects.getFilterFactory(); - Filter sql = fact.simple(m_filter); + // Setze den Filter + if (m_filter != null) { - // Setze die Parameter - Iterator params = m_filterParameters.entrySet().iterator(); - while (params.hasNext()) { + FilterFactory fact = objects.getFilterFactory(); + Filter sql = fact.simple(m_filter); - Map.Entry entry = (Map.Entry) params.next(); - String param = (String) entry.getKey(); - Object value = (Object) entry.getValue(); - if (value != null) { - sql.set(param, value); + // Setze die Parameter + Iterator params = m_filterParameters.entrySet().iterator(); + while (params.hasNext()) { + + Map.Entry entry = (Map.Entry) params.next(); + String param = (String) entry.getKey(); + Object value = (Object) entry.getValue(); + if (value != null) { + sql.set(param, value); + } + } + objects.addFilter(sql); + } - - objects.addFilter(sql); - } - return objects; } - /* - * Diese Methode wird vom Servlet aufgerufen - */ + /* Diese Methode wird vom Servlet aufgerufen */ public Element generateXML(HttpServletRequest request, HttpServletResponse response) { Element content = Navigation.newElement("complexObjectList"); @@ -120,9 +125,9 @@ for (Map.Entry<String, String> attribute : m_customAttributes.entrySet()) { content.addAttribute(attribute.getKey(), attribute.getValue()); } - + content.addContent(generateObjectListXML(request, response)); - + return content; } } |
Author: pboy Date: 2012-12-01 08:59:18 +0000 (Sat, 01 Dec 2012) New Revision: 2325 Modified: trunk/ccm-cms/src/com/arsdigita/cms/ContentItemXMLRenderer.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonExtraXmlGenerator.java trunk/ccm-cms/src/com/arsdigita/cms/dispatcher/SimpleXMLGenerator.java trunk/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java trunk/ccm-core/src/com/arsdigita/domain/DomainObjectXMLRenderer.java trunk/ccm-ldn-aplaws/bundles/devel/cfg/web.xml trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionRenderer.java trunk/ccm-navigation/src/com/arsdigita/navigation/Navigation.java trunk/ccm-navigation/src/com/arsdigita/navigation/cms/CMSDataCollectionRenderer.java trunk/ccm-navigation/src/com/arsdigita/navigation/ui/GreetingItem.java trunk/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java Log: Greeting Item XML generation fixed, various formatting fixed. Modified: trunk/ccm-cms/src/com/arsdigita/cms/ContentItemXMLRenderer.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ContentItemXMLRenderer.java 2012-12-01 08:39:36 UTC (rev 2324) +++ trunk/ccm-cms/src/com/arsdigita/cms/ContentItemXMLRenderer.java 2012-12-01 08:59:18 UTC (rev 2325) @@ -48,7 +48,8 @@ final String path, final String context, final DomainObject linkObject) { - + final long start = System.nanoTime(); + DomainObject nObj = obj; if (nObj instanceof ContentBundle) { @@ -58,6 +59,8 @@ } super.walk(adapter, nObj, path, context, linkObject); + + System.out.printf("Walked object in %d ms\n", (System.nanoTime() - start) / 1000000); } @Override Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonExtraXmlGenerator.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonExtraXmlGenerator.java 2012-12-01 08:39:36 UTC (rev 2324) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonExtraXmlGenerator.java 2012-12-01 08:59:18 UTC (rev 2325) @@ -13,31 +13,31 @@ /** * - * @author Jens Pelzetter + * @author Jens Pelzetter * @version $Id$ */ public class GenericPersonExtraXmlGenerator implements ExtraXMLGenerator { public void generateXML(final ContentItem item, final Element element, - final PageState state) { + final PageState state) { if (!(item instanceof GenericPerson)) { throw new IllegalArgumentException( "The GenericPersonExtraXmlGenerator can only process " + "instances of GenericPerson"); - } + } final GenericPerson person = (GenericPerson) item; - final GenericPersonContactCollection contacts = person.getContacts(); + final GenericPersonContactCollection contacts = person.getContacts(); final Element contactsElem = element.newChildElement("contacts"); - while (contacts.next()) { + while (contacts.next()) { + final GenericContact contact = contacts.getContact(GlobalizationHelper.getNegotiatedLocale().getLanguage()); generateContactXml( - contactsElem, - contacts.getContact(GlobalizationHelper.getNegotiatedLocale(). - getLanguage()), - state); - } + contactsElem, + contact, + state); + } } private void generateContactXml(final Element contactsElem, @@ -52,7 +52,7 @@ public void addGlobalStateParams(final Page page) { //Nothing } - + @Override public void setListMode(final boolean listMode) { //nothing Modified: trunk/ccm-cms/src/com/arsdigita/cms/dispatcher/SimpleXMLGenerator.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/dispatcher/SimpleXMLGenerator.java 2012-12-01 08:39:36 UTC (rev 2324) +++ trunk/ccm-cms/src/com/arsdigita/cms/dispatcher/SimpleXMLGenerator.java 2012-12-01 08:59:18 UTC (rev 2325) @@ -133,13 +133,15 @@ * @param useContext The use context */ public void generateXML(PageState state, Element parent, String useContext) { - - ContentSection section = CMS.getContext().getContentSection(); + final long start = System.nanoTime(); + + //ContentSection section = CMS.getContext().getContentSection(); ContentItem item = getContentItem(state); + System.out.printf("After getting contentitem: %d ms\n", (System.nanoTime() - start) / 1000000); + s_log.info("Generate XML for item " + item.getOID()); - Party currentParty = Kernel.getContext().getParty(); if (currentParty == null) { currentParty = Kernel.getPublicUser(); @@ -164,6 +166,8 @@ } String className = item.getDefaultDomainClass(); + System.out.printf("After creating permission attributes: %d ms\n", (System.nanoTime() - start) / 1000000); + // Ensure correct subtype of ContentItem is instantiated if (!item.getClass().getName().equals(className)) { s_log.info("Specializing item"); @@ -178,6 +182,8 @@ ex); } } + + System.out.printf("After checking type: %d ms\n", (System.nanoTime() - start) / 1000000); // Implementing XMLGenerator directly is now deprecated if (item instanceof XMLGenerator) { @@ -205,6 +211,8 @@ renderer.setRevisitFullObject(true); renderer.walk(item, ADAPTER_CONTEXT); + + System.out.printf("After getting rendering standard item xml: %d ms\n", (System.nanoTime() - start) / 1000000); //parent.addContent(content); @@ -222,6 +230,8 @@ generator.generateXML(item, content, state); } } + + System.out.printf("After rendering extra xml: %d ms\n", (System.nanoTime() - start) / 1000000); } } Modified: trunk/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java 2012-12-01 08:39:36 UTC (rev 2324) +++ trunk/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java 2012-12-01 08:59:18 UTC (rev 2325) @@ -40,33 +40,23 @@ import org.apache.log4j.Logger; /** - * <p>This class provides a general purpose framework for iterating - * over a domain object's properties, processing attributes and - * traversing associations as required.</p> + * <p>This class provides a general purpose framework for iterating over a domain object's properties, processing + * attributes and traversing associations as required.</p> * - * <p>Subclasses should implement the startXXX and endXXX methods to - * provide whatever processing logic they require upon encountering - * attributes, roles, associations and objects.</p> + * <p>Subclasses should implement the startXXX and endXXX methods to provide whatever processing logic they require upon + * encountering attributes, roles, associations and objects.</p> * - * <p>The {@link com.arsdigita.domain.DomainObjectTraversalAdapter} - * provides a means to control which properties are processed and, - * most importantly, which associations are traversed. When - * registering an adapter, a 'use context' is supplied allowing - * different adapters to be used according to the requirements of any - * implementing subclass. It is recommended that the use context be - * based on the fully qualified name of the class using - * DomainObjectTraversal, e.g., + * <p>The {@link com.arsdigita.domain.DomainObjectTraversalAdapter} provides a means to control which properties are + * processed and, most importantly, which associations are traversed. When registering an adapter, a 'use context' is + * supplied allowing different adapters to be used according to the requirements of any implementing subclass. It is + * recommended that the use context be based on the fully qualified name of the class using DomainObjectTraversal, e.g., * com.arsdigita.cms.ui.DomainObjectRenderer.</p> * - * <p>The path argument provided to the adapter and the startXXX ad - * endXXX methods indicates which associations are currently being - * traversed. The first element in the path is always '/object'. If it - * then starts to traverse the 'rootCategory' association, the path - * will become '/object/rootCategory'. For self-recursive - * associations, rather than building up a long repeating string, the - * path will be shortened by adding a '+' for each element that is - * repeated. For example, '/object/container+' indicates that the - * container association has been followed two or more times.</p> + * <p>The path argument provided to the adapter and the startXXX ad endXXX methods indicates which associations are + * currently being traversed. The first element in the path is always '/object'. If it then starts to traverse the + * 'rootCategory' association, the path will become '/object/rootCategory'. For self-recursive associations, rather than + * building up a long repeating string, the path will be shortened by adding a '+' for each element that is repeated. + * For example, '/object/container+' indicates that the container association has been followed two or more times.</p> */ public abstract class DomainObjectTraversal { @@ -77,39 +67,37 @@ public final static String LINK_NAME = "link"; /** - * Registers a traversal adapter for an object type in a given - * context. + * Registers a traversal adapter for an object type in a given context. * * @param type the object type whose items will be traversed * @param adapter the adapter for controlling object traversal * @param context the context in which the adapter should be used */ public static void registerAdapter(final ObjectType type, - final DomainObjectTraversalAdapter adapter, - final String context) { + final DomainObjectTraversalAdapter adapter, + final String context) { Assert.exists(adapter, - "The DomainObjectTraversalAdapter is null for context '" - + context + "' and object type '" + type); + "The DomainObjectTraversalAdapter is null for context '" + + context + "' and object type '" + type); Assert.exists(type, "The ObjectType for context '" + context - + "' and adapter '" + adapter + "' is null"); + + "' and adapter '" + adapter + "' is null"); Assert.exists(context, String.class); if (s_log.isDebugEnabled()) { s_log.debug("Registering adapter " + adapter.getClass() - + " for object type " + type.getQualifiedName() - + " in context " + context); + + " for object type " + type.getQualifiedName() + + " in context " + context); } s_adapters.put(new AdapterKey(type, context), adapter); } /** - * Unregisters a traversal adapter for an object type in a - * given context + * Unregisters a traversal adapter for an object type in a given context * * @param type the object type whose items will be traversed * @param context the context in which the adapter should be used */ public static void unregisterAdapter(final ObjectType type, - final String context) { + final String context) { Assert.exists(type, ObjectType.class); Assert.exists(context, String.class); @@ -121,37 +109,34 @@ } /** - * Registers a traversal adapter for an object type in a given - * context. + * Registers a traversal adapter for an object type in a given context. * * @param type the object type whose items will be traversed * @param adapter the adapter for controlling object traversal * @param context the context in which the adapter should be used */ public static void registerAdapter(final String type, - final DomainObjectTraversalAdapter adapter, - final String context) { + final DomainObjectTraversalAdapter adapter, + final String context) { registerAdapter(SessionManager.getMetadataRoot().getObjectType(type), - adapter, - context); + adapter, + context); } /** - * Unregisters a traversal adapter for an object type in a - * given context + * Unregisters a traversal adapter for an object type in a given context * * @param type the object type whose items will be traversed * @param context the context in which the adapter should be used */ public static void unregisterAdapter(final String type, - final String context) { + final String context) { unregisterAdapter(SessionManager.getMetadataRoot().getObjectType(type), - context); + context); } /** - * Retrieves the traversal adapter for an object type in a given - * context. + * Retrieves the traversal adapter for an object type in a given context. * * @param type the object type to lookup * @param context the adapter context @@ -163,7 +148,7 @@ Assert.exists(context, String.class); if (s_log.isDebugEnabled()) { s_log.debug("lookupAdapter for type " + type.getQualifiedName() - + " in context " + context); + + " in context " + context); } @@ -172,21 +157,20 @@ } /** - * Retrieves the closest matching traversal adapter for an object type - * in a given context. The algorithm looks for an exact match, then - * considers the supertype, and the supertype's supertype. If no match - * could be found at all, returns null + * Retrieves the closest matching traversal adapter for an object type in a given context. The algorithm looks for + * an exact match, then considers the supertype, and the supertype's supertype. If no match could be found at all, + * returns null * * @param type the object type to search for * @param context the adapter context */ public static DomainObjectTraversalAdapter findAdapter(ObjectType type, - final String context) { + final String context) { Assert.exists(type, ObjectType.class); Assert.exists(context, String.class); if (s_log.isDebugEnabled()) { s_log.debug("findAdapter for type " + type.getQualifiedName() - + " in context " + context); + + " in context " + context); StringBuilder buf = new StringBuilder(); buf.append("Adapters contain:\n"); @@ -212,19 +196,18 @@ } /** - * Walks over properties of a domain object, invoking - * methods to handle associations, roles and attributes. + * Walks over properties of a domain object, invoking methods to handle associations, roles and attributes. * * @param obj the domain object to traverse * @param context the context for the traversal adapter */ public void walk(final DomainObject obj, - final String context) { + final String context) { final DomainObjectTraversalAdapter adapter = findAdapter(obj.getObjectType(), - context); + context); if (adapter == null) { final String errorMsg = "No adapter for object " + obj.getOID() - + " in context " + context; + + " in context " + context; s_log.error(errorMsg); throw new IllegalArgumentException(errorMsg); } @@ -232,8 +215,8 @@ } protected void walk(final DomainObject obj, - final String context, - final DomainObjectTraversalAdapter adapter) { + final String context, + final DomainObjectTraversalAdapter adapter) { Assert.exists(adapter, DomainObjectTraversalAdapter.class); walk(adapter, obj, "/object", context, null); } @@ -245,12 +228,12 @@ // content item during XML generation, I have to test for ContentBundle and // negotiate the language version. This is not possible in com.arsdigita.ccm. protected void walk(final DomainObjectTraversalAdapter adapter, - final DomainObject obj, - final String path, - final String context, - final DomainObject linkObject) { + final DomainObject obj, + final String path, + final String context, + final DomainObject linkObject) { s_log.debug(String.format("Walking with path %s and context %s...", path, - context)); + context)); OID oid = obj.getOID(); OID linkOid = null; if (linkObject != null) { @@ -271,10 +254,10 @@ if (linkObject != null) { beginLink(linkObject, path); walk(adapter, - linkObject, - appendToPath(path, LINK_NAME), - context, - null); + linkObject, + appendToPath(path, LINK_NAME), + context, + null); endLink(linkObject, path); } @@ -286,12 +269,13 @@ String propName = prop.getName(); if (!adapter.processProperty(obj, - appendToPath(path, prop.getName()), - prop, - context)) { + appendToPath(path, prop.getName()), + prop, + context)) { if (s_log.isDebugEnabled()) { - s_log.debug("Not processing " + appendToPath(path, prop.getName()) + " in object " + oid + " and context " - + context + " with adapter " + adapter.getClass(). + s_log.debug("Not processing " + appendToPath(path, prop.getName()) + " in object " + oid + + " and context " + + context + " with adapter " + adapter.getClass(). getName()); } continue; @@ -300,7 +284,7 @@ if (propValue == null) { if (s_log.isDebugEnabled()) { s_log.debug("Object " + oid.toString() + " doesn't " - + "contain property " + propName); + + "contain property " + propName); } continue; } @@ -317,10 +301,10 @@ beginRole(obj, path, prop); walk(adapter, - DomainObjectFactory.newInstance((DataObject) propValue), - appendToPath(path, propName), - context, - null); + DomainObjectFactory.newInstance((DataObject) propValue), + appendToPath(path, propName), + context, + null); endRole(obj, path, prop); } else if (propValue instanceof DataAssociation) { @@ -332,11 +316,11 @@ if (prop.getName().equals("fileAttachments") && !Domain.getConfig().queryBlobContentForFileAttachments()) { // make true a config DataQuery fileAttachmentsQuery = - SessionManager.getSession().retrieveQuery( + SessionManager.getSession().retrieveQuery( "com.arsdigita.cms.contentassets.fileAttachmentsQuery"); fileAttachmentsQuery.setParameter("item_id", - obj.getOID().get("id")); + obj.getOID().get("id")); DataCollection files = new DataQueryDataCollectionAdapter( fileAttachmentsQuery, "file"); @@ -344,47 +328,34 @@ while (files.next()) { DataObject file = files.getDataObject(); walk(adapter, - DomainObjectFactory.newInstance(file), - appendToPath(path, propName), - context, - null); + DomainObjectFactory.newInstance(file), + appendToPath(path, propName), + context, + null); } } else { //2010-11-08: Moved to seperate Methods to allow simple //extending of the handling of data assocications - /*if (s_log.isDebugEnabled()) { - s_log.debug(prop.getName() + " is a DataAssociation"); - } - beginAssociation(obj, path, prop); - - DataAssociationCursor daCursor = - ((DataAssociation) propValue). - getDataAssociationCursor(); - - while (daCursor.next()) { - s_log.debug("Processing data assoication cursor..."); - DataObject link = daCursor.getLink(); - DomainObject linkObj = null; - if (link != null) { - linkObj = new LinkDomainObject(link); - } - walk(adapter, - DomainObjectFactory.newInstance(daCursor. - getDataObject()), - appendToPath(path, propName), - context, - linkObj); - } - endAssociation(obj, path, prop);*/ + /* + * if (s_log.isDebugEnabled()) { s_log.debug(prop.getName() + " is a DataAssociation"); } + * beginAssociation(obj, path, prop); + * + * DataAssociationCursor daCursor = ((DataAssociation) propValue). getDataAssociationCursor(); + * + * while (daCursor.next()) { s_log.debug("Processing data assoication cursor..."); DataObject link = + * daCursor.getLink(); DomainObject linkObj = null; if (link != null) { linkObj = new + * LinkDomainObject(link); } walk(adapter, DomainObjectFactory.newInstance(daCursor. + * getDataObject()), appendToPath(path, propName), context, linkObj); } endAssociation(obj, path, prop); + */ walkDataAssociations(adapter, - obj, - path, - context, - prop, - propName, - propValue); + obj, + path, + context, + prop, + propName, + propValue); } } else { // Unknown property value type - do nothing @@ -396,129 +367,120 @@ } protected void walkDataAssociations(DomainObjectTraversalAdapter adapter, - DomainObject obj, - String path, - String context, - Property prop, - String propName, - Object propValue) { + DomainObject obj, + String path, + String context, + Property prop, + String propName, + Object propValue) { s_log.debug(String.format("%s is a DataAssociation", prop.getName())); beginAssociation(obj, path, prop); DataAssociationCursor daCursor = - ((DataAssociation) propValue).getDataAssociationCursor(); + ((DataAssociation) propValue).getDataAssociationCursor(); while (daCursor.next()) { walkDataAssociation(adapter, - obj, - path, - context, - propName, - daCursor); + obj, + path, + context, + propName, + daCursor); } endAssociation(obj, path, prop); } protected void walkDataAssociation(DomainObjectTraversalAdapter adapter, - DomainObject obj, - String path, - String context, - String propName, - DataAssociationCursor daCursor) { + DomainObject obj, + String path, + String context, + String propName, + DataAssociationCursor daCursor) { s_log.debug(String.format("Processing data assoication cursor for object '%s'...", - obj.getOID().toString())); + obj.getOID().toString())); DataObject link = daCursor.getLink(); DomainObject linkObj = null; if (link != null) { linkObj = new LinkDomainObject(link); } walk(adapter, - DomainObjectFactory.newInstance(daCursor.getDataObject()), - appendToPath(path, propName), - context, - linkObj); + DomainObjectFactory.newInstance(daCursor.getDataObject()), + appendToPath(path, propName), + context, + linkObj); } /** - * Method called when the processing of an object - * starts + * Method called when the processing of an object starts */ protected abstract void beginObject(DomainObject obj, - String path); + String path); /** - * Method called when the procesing of an object - * completes + * Method called when the procesing of an object completes */ protected abstract void endObject(DomainObject obj, - String path); + String path); /** - * Method called when the processing of a Link Object - * starts + * Method called when the processing of a Link Object starts */ protected void beginLink(DomainObject obj, String path) { s_log.debug(String.format("Starting link with path = %s", path)); } /** - * Method called when the procesing of a Link Object - * completes + * Method called when the procesing of a Link Object completes */ protected void endLink(DomainObject obj, String path) { s_log.debug(String.format("Finished link with path = %s", path)); } /** - * Method called when a previously visited object - * is encountered for a second time. + * Method called when a previously visited object is encountered for a second time. */ protected abstract void revisitObject(DomainObject obj, - String path); + String path); /** * Method called when an attribute is encountered */ protected abstract void handleAttribute(DomainObject obj, - String path, - Property property); + String path, + Property property); /** - * Method called when the processing of a role - * starts + * Method called when the processing of a role starts */ protected abstract void beginRole(DomainObject obj, - String path, - Property property); + String path, + Property property); /** - * Method called when the procesing of a role - * completes + * Method called when the procesing of a role completes */ protected abstract void endRole(DomainObject obj, - String path, - Property property); + String path, + Property property); /** - * Method called when the processing of an association - * starts + * Method called when the processing of an association starts */ protected abstract void beginAssociation(DomainObject obj, - String path, - Property property); + String path, + Property property); /** - * Method called when the procesing of an association - * completes + * Method called when the procesing of an association completes */ protected abstract void endAssociation(DomainObject obj, - String path, - Property property); + String path, + Property property); protected String appendToPath(String path, - String name) { + String name) { if (path.endsWith("/" + name)) { path = path + "+"; } else if (!path.endsWith("/" + name + "+")) { @@ -556,7 +518,7 @@ private final String m_context; public AdapterKey(ObjectType type, - String context) { + String context) { Assert.exists(type, ObjectType.class); Assert.exists(context, String.class); m_type = type; @@ -585,8 +547,7 @@ } /** - * this is simply a subclass since DomainObject is abstract - * but we don't have any other domain object to use. + * this is simply a subclass since DomainObject is abstract but we don't have any other domain object to use. */ protected class LinkDomainObject extends DomainObject { Modified: trunk/ccm-core/src/com/arsdigita/domain/DomainObjectXMLRenderer.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/domain/DomainObjectXMLRenderer.java 2012-12-01 08:39:36 UTC (rev 2324) +++ trunk/ccm-core/src/com/arsdigita/domain/DomainObjectXMLRenderer.java 2012-12-01 08:59:18 UTC (rev 2325) @@ -37,10 +37,8 @@ import org.apache.log4j.Logger; /** - * An implementation of DomainObjectTraversal that generates an XML - * tree representing the DomainObject. The output format of the XML - * can be controlled using the various setWrapXXX methods detailed - * below. + * An implementation of DomainObjectTraversal that generates an XML tree representing the DomainObject. The output + * format of the XML can be controlled using the various setWrapXXX methods detailed below. * * @version $Id$ */ @@ -61,69 +59,64 @@ private String m_context; /** - * Registers a traversal formatter for an object type in a given - * context. + * Registers a traversal formatter for an object type in a given context. * * @param type the object type whose items will be traversed * @param formatter the formatter for controlling object traversal * @param context the context in which the formatter should be used */ public static void registerFormatter(ObjectType type, - DomainObjectXMLFormatter formatter, - String context) { + DomainObjectXMLFormatter formatter, + String context) { s_formatters.put(new AdapterKey(type, context), formatter); } /** - * Unregisteres a traversal formatter for an object type in a - * given context + * Unregisteres a traversal formatter for an object type in a given context * * @param type the object type whose items will be traversed * @param context the context in which the formatter should be used */ public static void unregisterFormatter(ObjectType type, - String context) { + String context) { s_formatters.remove(new AdapterKey(type, context)); } /** - * Registers a traversal formatter for an object type in a given - * context. + * Registers a traversal formatter for an object type in a given context. * * @param type the object type whose items will be traversed * @param formatter the formatter for controlling object traversal * @param context the context in which the formatter should be used */ public static void registerFormatter(String type, - DomainObjectXMLFormatter formatter, - String context) { + DomainObjectXMLFormatter formatter, + String context) { if (s_log.isDebugEnabled()) { s_log.debug("Registering formatter " - + formatter.getClass().getName() + " for type " + type - + " in context " + context); + + formatter.getClass().getName() + " for type " + type + + " in context " + context); } registerFormatter(MetadataRoot.getMetadataRoot().getObjectType(type), - formatter, - context); + formatter, + context); } /** - * Unregisteres a traversal formatter for an object type in a - * given context + * Unregisteres a traversal formatter for an object type in a given context * * @param type the object type whose items will be traversed * @param context the context in which the formatter should be used */ public static void unregisterFormatter(String type, - String context) { + String context) { unregisterFormatter(MetadataRoot.getMetadataRoot().getObjectType(type), - context); + context); } /** - * Retrieves the traversal formatter for an object type in a given - * context. + * Retrieves the traversal formatter for an object type in a given context. * * @param type the object type to lookup * @param context the formatter context @@ -135,16 +128,15 @@ } /** - * Retrieves the closest matching traversal formatter for an object type - * in a given context. The algorithm looks for an exact match, then - * considers the supertype, and the supertype's supertype. If no match - * could be found at all, returns null + * Retrieves the closest matching traversal formatter for an object type in a given context. The algorithm looks for + * an exact match, then considers the supertype, and the supertype's supertype. If no match could be found at all, + * returns null * * @param type the object type to search for * @param context the formatter context */ public static DomainObjectXMLFormatter findFormatter(ObjectType type, - String context) { + String context) { DomainObjectXMLFormatter formatter = null; while (formatter == null && type != null) { formatter = getFormatter(type, context); @@ -157,9 +149,7 @@ } /** - * Creates a new DomainObject XML renderer - * that outputs XML into the element passed into - * the constructor. + * Creates a new DomainObject XML renderer that outputs XML into the element passed into the constructor. * * @param root the XML element in which to output children */ @@ -169,20 +159,20 @@ } public void setNamespace(String prefix, - String uri) { + String uri) { m_namespacePrefix = prefix; m_namespaceURI = uri; } protected Object format(DomainObject obj, - String path, - Property prop, - Object value) { + String path, + Property prop, + Object value) { if (m_formatter != null) { String propertyPath = appendToPath(path, prop.getName()); Object rendered = m_formatter.format(obj, - propertyPath, - prop, value); + propertyPath, + prop, value); if (s_log.isDebugEnabled()) { s_log.debug("FORMAT " + obj + " m_formatter=" + m_formatter + " rendered=" + rendered); } @@ -198,7 +188,8 @@ rendered = null; } if (s_log.isDebugEnabled()) { - s_log.debug("FALLBACK supertype " + objectType + " formatter=" + formatter + " rendered=" + rendered); + s_log.debug("FALLBACK supertype " + objectType + " formatter=" + formatter + " rendered=" + + rendered); } objectType = objectType.getSupertype(); } @@ -213,11 +204,11 @@ @Override protected void walk(DomainObject obj, - String context, - DomainObjectTraversalAdapter adapter) { + String context, + DomainObjectTraversalAdapter adapter) { if (s_log.isDebugEnabled()) { s_log.debug("Traversing " + obj + " for context " + context + " " - + "using adapter " + adapter); + + "using adapter " + adapter); } m_formatter = findFormatter(obj.getObjectType(), context); @@ -231,43 +222,33 @@ } /** - * Determines XML output for root object. - * If set to true a separate element will - * be output for the root object, if false, - * then the element passed into the constructor - * will be used. + * Determines XML output for root object. If set to true a separate element will be output for the root object, if + * false, then the element passed into the constructor will be used. */ public void setWrapRoot(boolean value) { m_wrapRoot = value; } /** - * Determines XML output used for objects. - * If set to true, then a wrapper XML element - * will be generated for the association, - * and then individual elements generated for - * each object. If false then no wrapper - * XML element will be produced. + * Determines XML output used for objects. If set to true, then a wrapper XML element will be generated for the + * association, and then individual elements generated for each object. If false then no wrapper XML element will be + * produced. */ public void setWrapObjects(boolean value) { m_wrapObjects = value; } /** - * Determines XML output used for scalar - * attributes. If set to true, then each - * attribute is output as a separate element, - * otherwise, attributes are output as simple - * attributes. + * Determines XML output used for scalar attributes. If set to true, then each attribute is output as a separate + * element, otherwise, attributes are output as simple attributes. */ public void setWrapAttributes(boolean value) { m_wrapAttributes = value; } /** - * Determines XML output used for objects. - * If set to true, then repeated objects will generate full xml. - * If false then only the OID will be printed. + * Determines XML output used for objects. If set to true, then repeated objects will generate full xml. If false + * then only the OID will be printed. */ public void setRevisitFullObject(boolean value) { m_revisitFullObject = value; @@ -286,7 +267,7 @@ } protected void beginObject(DomainObject obj, - String path) { + String path) { if (m_wrapRoot || !path.equals("/object")) { String name = m_wrapObjects ? "object" : nameFromPath(path); Element element = newElement(m_element, name); @@ -301,14 +282,14 @@ } protected void endObject(DomainObject obj, - String path) { + String path) { if (m_wrapRoot || !path.equals("/object")) { m_element = (Element) m_elements.pop(); } } protected void revisitObject(DomainObject obj, - String path) { + String path) { Element priorElement = null; if (m_revisitFullObject) { priorElement = (Element) m_objectElements.get(obj.getOID()); @@ -324,8 +305,8 @@ } protected void handleAttribute(DomainObject obj, - String path, - Property property) { + String path, + Property property) { String name = property.getName(); Object value = obj.get(name); @@ -346,7 +327,7 @@ Date date = (Date) value; Calendar calDate = Calendar.getInstance(); calDate.setTime(date); - + // locale-independent date output element.addAttribute("year", Integer.toString(calDate.get(Calendar.YEAR))); element.addAttribute("month", Integer.toString(calDate.get(Calendar.MONTH) + 1)); @@ -364,21 +345,22 @@ element.addAttribute("date", dateFormatter.format(date)); element.addAttribute("longDate", longDateFormatter.format(date)); element.addAttribute("time", timeFormatter.format(date)); - element.addAttribute("monthName", calDate.getDisplayName(Calendar.MONTH, Calendar.LONG, negLocale)); + element.addAttribute("monthName", calDate.getDisplayName(Calendar.MONTH, Calendar.LONG, + negLocale)); // Quasimodo: END } } } else { m_element.addAttribute(property.getName(), - (String) format(obj, path, property, value)); + (String) format(obj, path, property, value)); } } } protected void beginRole(DomainObject obj, - String path, - Property property) { + String path, + Property property) { if (m_wrapObjects) { Element element = newElement(m_element, property.getName()); m_elements.push(m_element); @@ -387,16 +369,16 @@ } protected void endRole(DomainObject obj, - String path, - Property property) { + String path, + Property property) { if (m_wrapObjects) { m_element = (Element) m_elements.pop(); } } protected void beginAssociation(DomainObject obj, - String path, - Property property) { + String path, + Property property) { if (m_wrapObjects) { Element element = newElement(m_element, property.getName()); m_elements.push(m_element); @@ -405,8 +387,8 @@ } protected void endAssociation(DomainObject obj, - String path, - Property property) { + String path, + Property property) { if (m_wrapObjects) { m_element = (Element) m_elements.pop(); } @@ -425,20 +407,20 @@ } protected Element newElement(Element parent, - String name) { + String name) { return m_namespaceURI == null - ? parent.newChildElement(name) - : parent.newChildElement(m_namespacePrefix + ":" + name, - m_namespaceURI); + ? parent.newChildElement(name) + : parent.newChildElement(m_namespacePrefix + ":" + name, + m_namespaceURI); } protected Element newElement(Element parent, - String name, - Element copy) { + String name, + Element copy) { return m_namespaceURI == null - ? parent.newChildElement(name, copy) - : parent.newChildElement(m_namespacePrefix + ":" + name, - m_namespaceURI, - copy); + ? parent.newChildElement(name, copy) + : parent.newChildElement(m_namespacePrefix + ":" + name, + m_namespaceURI, + copy); } } Modified: trunk/ccm-ldn-aplaws/bundles/devel/cfg/web.xml =================================================================== --- trunk/ccm-ldn-aplaws/bundles/devel/cfg/web.xml 2012-12-01 08:39:36 UTC (rev 2324) +++ trunk/ccm-ldn-aplaws/bundles/devel/cfg/web.xml 2012-12-01 08:59:18 UTC (rev 2325) @@ -89,6 +89,7 @@ <servlet> <servlet-name>ccm-dispatcher</servlet-name> + <servlet-class>com.arsdigita.web.DispatcherServlet</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet> Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionRenderer.java =================================================================== --- trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionRenderer.java 2012-12-01 08:39:36 UTC (rev 2324) +++ trunk/ccm-navigation/src/com/arsdigita/navigation/DataCollectionRenderer.java 2012-12-01 08:59:18 UTC (rev 2325) @@ -140,7 +140,7 @@ // Quasimodo: End Element content = Navigation.newElement("objectList"); - + //Return the empty nav:item & nav:paginator tags. // Quasimodo: Why should I??? There is no need for a paginator if there aren't any elements if (!m_navItems) { @@ -203,9 +203,9 @@ paginator.addAttribute("objectCount", new Long(objectCount).toString()); content.addContent(paginator); - + int index = 0; - while (objects.next()) { + while (objects.next()) { DataObject dobj = objects.getDataObject(); ACSObject object = null; if (m_specializeObjects) { @@ -214,35 +214,34 @@ s_log.error(String.format("Failed to specialize object with with id %s. Skiping object.", dobj.getOID().toString())); continue; } else { - s_log.error("Specializing successful."); + s_log.debug("Specializing successful."); } - } + } + Element item = Navigation.newElement(content, "item"); - Element item = Navigation.newElement("item"); - Iterator attributes = m_attributes.iterator(); while (attributes.hasNext()) { String name = (String) attributes.next(); String[] paths = StringUtils.split(name, '.'); outputValue(item, dobj, name, paths, 0); } - + Iterator properties = m_properties.iterator(); while (properties.hasNext()) { DataCollectionPropertyRenderer property = (DataCollectionPropertyRenderer) properties.next(); property.render(objects, item); } - - Element path = Navigation.newElement("path"); + + Element path = Navigation.newElement(item, "path"); path.setText(getStableURL(dobj, object)); - item.addContent(path); + //item.addContent(path); generateItemXML(item, dobj, object, index); index++; - content.addContent(item); + //content.addContent(item); } - + return content; } Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/Navigation.java =================================================================== --- trunk/ccm-navigation/src/com/arsdigita/navigation/Navigation.java 2012-12-01 08:39:36 UTC (rev 2324) +++ trunk/ccm-navigation/src/com/arsdigita/navigation/Navigation.java 2012-12-01 08:59:18 UTC (rev 2325) @@ -63,6 +63,11 @@ NavigationConstants.NAV_NS); } + public static Element newElement(final Element parent, final String name) { + return parent.newChildElement(String.format("%s:%s", NavigationConstants.NAV_PREFIX, name), + NavigationConstants.NAV_NS); + } + public static String redirectURL(OID oid) { ParameterMap map = new ParameterMap(); map.setParameter( NavigationConstants.OID, oid.toString() ); Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/cms/CMSDataCollectionRenderer.java =================================================================== --- trunk/ccm-navigation/src/com/arsdigita/navigation/cms/CMSDataCollectionRenderer.java 2012-12-01 08:39:36 UTC (rev 2324) +++ trunk/ccm-navigation/src/com/arsdigita/navigation/cms/CMSDataCollectionRenderer.java 2012-12-01 08:59:18 UTC (rev 2325) @@ -61,7 +61,7 @@ DataObject dobj, ACSObject obj, int index) { - if (obj != null) { + if (obj != null) { ContentItemXMLRenderer renderer = new ContentItemXMLRenderer(item); renderer.setRevisitFullObject(false); renderer.setWrapAttributes(true); @@ -74,7 +74,7 @@ * possible to set the adapter context used from a JSP template, * using DataCollectionRenderer#setSpecializeObjectsContext(String). */ - renderer.walk(obj, getSpecializeObjectsContext()); + renderer.walk(obj, getSpecializeObjectsContext()); if ((obj instanceof ContentItem) && useExtraXml) { final ContentItem contentItem = (ContentItem) obj; @@ -84,7 +84,7 @@ generator.generateXML(contentItem, item, null); } - } + } } } } Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/ui/GreetingItem.java =================================================================== --- trunk/ccm-navigation/src/com/arsdigita/navigation/ui/GreetingItem.java 2012-12-01 08:39:36 UTC (rev 2324) +++ trunk/ccm-navigation/src/com/arsdigita/navigation/ui/GreetingItem.java 2012-12-01 08:59:18 UTC (rev 2325) @@ -146,7 +146,7 @@ for (ExtraXMLGenerator generator : baseItem.getExtraXMLGenerators()) { try { - generator.generateXML(baseItem, content, new PageState(null, + generator.generateXML(baseItem, itemEl, new PageState(null, request, response)); } catch (ServletException ex) { Modified: trunk/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java =================================================================== --- trunk/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java 2012-12-01 08:39:36 UTC (rev 2324) +++ trunk/ccm-navigation/src/com/arsdigita/navigation/ui/object/ComplexObjectList.java 2012-12-01 08:59:18 UTC (rev 2325) @@ -3,13 +3,10 @@ * * Autor: Sören Bernstein * - * Diese Klasse realisiert eine ObjectList für Navigation, - * der man Filterbefehle für die SQL-Abfrage mitgeben kann. - * Auf diese Weise lassen sich Objekte listen, die bestimmte - * Kriterien erfüllen. + * Diese Klasse realisiert eine ObjectList für Navigation, der man Filterbefehle für die SQL-Abfrage mitgeben kann. Auf + * diese Weise lassen sich Objekte listen, die bestimmte Kriterien erfüllen. * - * Angelegt wurde Sie für die Auflistung der aktuellen News - * und Veranstalungen auf einer Navigationsseite. + * Angelegt wurde Sie für die Auflistung der aktuellen News und Veranstalungen auf einer Navigationsseite. */ package com.arsdigita.navigation.ui.object; @@ -50,9 +47,9 @@ } /** - * Hinzufügen eines SQL-Filter zur Abfrage - * Verarbeitet einen boolschen Filter, der SQL-konform Formatiert ist. - * Siehe PostgreSQL-Handbuch zur where-Klausel + * Hinzufügen eines SQL-Filter zur Abfrage Verarbeitet einen boolschen Filter, der SQL-konform Formatiert ist. Siehe + * PostgreSQL-Handbuch zur where-Klausel + * * @param sqlfilter */ public void setSQLFilter(String sqlfilter) { @@ -75,8 +72,8 @@ m_customAttributes.put(attribute, value); } - /* Diese Methode überschreibt die Methode aus der Eltern-Klasse, um - * die SQL-Filter berücksichtigen zu können + /* + * Diese Methode überschreibt die Methode aus der Eltern-Klasse, um die SQL-Filter berücksichtigen zu können */ @Override protected DataCollection getObjects(HttpServletRequest request, @@ -109,7 +106,9 @@ return objects; } - /* Diese Methode wird vom Servlet aufgerufen */ + /* + * Diese Methode wird vom Servlet aufgerufen + */ public Element generateXML(HttpServletRequest request, HttpServletResponse response) { Element content = Navigation.newElement("complexObjectList"); @@ -121,9 +120,9 @@ for (Map.Entry<String, String> attribute : m_customAttributes.entrySet()) { content.addAttribute(attribute.getKey(), attribute.getValue()); } - + content.addContent(generateObjectListXML(request, response)); - + return content; } } |
Author: pboy Date: 2012-05-18 01:23:09 +0000 (Fri, 18 May 2012) New Revision: 2323 Removed: releases/2.0.0/tools-legacy/ releases/2.0.0/www/ Modified: releases/2.0.0/ccm-bundle/bundles/demo/cfg/integration.properties releases/2.0.0/ccm-bundle/bundles/devel/cfg/integration.properties releases/2.0.0/ccm-ldn-aplaws/bundles/base/cfg/integration.properties releases/2.0.0/ccm-ldn-aplaws/bundles/complete/cfg/integration.properties releases/2.0.0/ccm-ldn-aplaws/bundles/demo/cfg/integration.properties releases/2.0.0/ccm-ldn-aplaws/bundles/devel/cfg/integration.properties releases/2.0.0/ccm-ldn-aplaws/bundles/standard/cfg/integration.properties releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/dispatcher/ThemeDownloadServlet.java releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeControlPanel.java releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeXSLParameterGenerator.java Log: Integrated r2322 (fixed configuration), removed unnecessary files (tools-legacy). Modified: releases/2.0.0/ccm-bundle/bundles/demo/cfg/integration.properties =================================================================== --- releases/2.0.0/ccm-bundle/bundles/demo/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) +++ releases/2.0.0/ccm-bundle/bundles/demo/cfg/integration.properties 2012-05-18 01:23:09 UTC (rev 2323) @@ -117,10 +117,11 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-bundle.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws-generic -themedirector.file_extensions=bmp css gif jpeg jpg js png xml xsl # ccm-bundle (Loader only) Modified: releases/2.0.0/ccm-bundle/bundles/devel/cfg/integration.properties =================================================================== --- releases/2.0.0/ccm-bundle/bundles/devel/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) +++ releases/2.0.0/ccm-bundle/bundles/devel/cfg/integration.properties 2012-05-18 01:23:09 UTC (rev 2323) @@ -118,10 +118,11 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-bundle.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws-generic -themedirector.file_extensions=bmp css gif jpeg jpg js png xml xsl # ccm-bundle (Loader only) Modified: releases/2.0.0/ccm-ldn-aplaws/bundles/base/cfg/integration.properties =================================================================== --- releases/2.0.0/ccm-ldn-aplaws/bundles/base/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) +++ releases/2.0.0/ccm-ldn-aplaws/bundles/base/cfg/integration.properties 2012-05-18 01:23:09 UTC (rev 2323) @@ -133,9 +133,11 @@ # ccm-themedirector application +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-ldn-aplaws.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf -themedirector.default_theme_path=themes/static/aplaws # ccm-auth-http application ; auth.http.admin_email=web...@ap... Modified: releases/2.0.0/ccm-ldn-aplaws/bundles/complete/cfg/integration.properties =================================================================== --- releases/2.0.0/ccm-ldn-aplaws/bundles/complete/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) +++ releases/2.0.0/ccm-ldn-aplaws/bundles/complete/cfg/integration.properties 2012-05-18 01:23:09 UTC (rev 2323) @@ -133,8 +133,10 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-ldn-aplaws.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws # ccm-auth-http application Modified: releases/2.0.0/ccm-ldn-aplaws/bundles/demo/cfg/integration.properties =================================================================== --- releases/2.0.0/ccm-ldn-aplaws/bundles/demo/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) +++ releases/2.0.0/ccm-ldn-aplaws/bundles/demo/cfg/integration.properties 2012-05-18 01:23:09 UTC (rev 2323) @@ -132,8 +132,10 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-ldn-aplaws.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws # ccm-auth-http application Modified: releases/2.0.0/ccm-ldn-aplaws/bundles/devel/cfg/integration.properties =================================================================== --- releases/2.0.0/ccm-ldn-aplaws/bundles/devel/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) +++ releases/2.0.0/ccm-ldn-aplaws/bundles/devel/cfg/integration.properties 2012-05-18 01:23:09 UTC (rev 2323) @@ -126,8 +126,10 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-ldn-aplaws.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws # ccm-auth-http application Modified: releases/2.0.0/ccm-ldn-aplaws/bundles/standard/cfg/integration.properties =================================================================== --- releases/2.0.0/ccm-ldn-aplaws/bundles/standard/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) +++ releases/2.0.0/ccm-ldn-aplaws/bundles/standard/cfg/integration.properties 2012-05-18 01:23:09 UTC (rev 2323) @@ -131,8 +131,10 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-ldn-aplaws.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws # ccm-auth-http application Modified: releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java =================================================================== --- releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java 2012-05-18 01:12:17 UTC (rev 2322) +++ releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java 2012-05-18 01:23:09 UTC (rev 2323) @@ -64,13 +64,20 @@ } // set of configuration parameters + // ///////////////////////////////////////////////////////////////// + /** Directory that all of the default themes are copied from. */ private final Parameter m_defaultThemePath = new StringParameter ("themedirector.default_theme_path", Parameter.OPTIONAL, "/themes/master/"); - /** Servlet context path containing the theme. */ + /** Servlet context path containing the default theme. + Previously ccm-themedirector used to be installed in its own + web context. In this case the appropriate web context should + be specified. + Currently, it is installed as part of the main application, + therefore it is empty by default. */ private final Parameter m_defaultThemeContext = new StringParameter ("themedirector.default_theme_context", @@ -79,7 +86,7 @@ /** File containing the default themes directory. Used in conjuntion with com.arsdigita.themedirectory.default_directory_filter to dictate the - final default directoroy. */ + final default directory. */ private final Parameter m_defaultThemeManifest = new StringParameter ("themedirector.default_theme_manifest", @@ -193,7 +200,7 @@ } /** - * This returns the name of the servlet context containing + * This returns the name of the servlet context containing * the default theme */ public String getDefaultThemeContext() { Modified: releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/dispatcher/ThemeDownloadServlet.java =================================================================== --- releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/dispatcher/ThemeDownloadServlet.java 2012-05-18 01:12:17 UTC (rev 2322) +++ releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/dispatcher/ThemeDownloadServlet.java 2012-05-18 01:23:09 UTC (rev 2323) @@ -137,30 +137,30 @@ DispatcherHelper.maybeCacheDisable(sresp); sresp.setContentType("application/zip; charset=UTF-8"); - // The WebAppRoot should be something like this: - // /var/ccm-devel/web/<username>/<projectname>/webapps/ccm-ldn-theme; - // and we actually want the webapps directory - File currentRoot = new File(Web.getServletContext().getRealPath("/")); - File webapps = currentRoot.getParentFile(); + // Want the path in the filesystem to webcontext of this application + // (i.e. context root / document root) + File applicationRoot = new File(Web.getServletContext().getRealPath("/")); - // if we have a Theme, we send back either prod or dev, depending on - // the url. If we don't have a theme, then we return everything. if (theme != null) { - File downloadFiles = null; - String prefix = null; + // if we have a Theme, we send back either prod or dev, depending on + // the url. + File downloadFiles = null; // Path to the actual theme to download + String prefix = null; // Wether devel or prod // If "themes-prod" is ever moved to a different directory, // we could then get rid of the "type" argument (see below in // DirectoryFilter) String type = null; + // Determine the path, dependet of devel / prod if (sreq.getPathInfo().indexOf("/" + PUBLISHED_PREFIX) > -1) { prefix = PUBLISHED_PREFIX; - downloadFiles = new File(currentRoot, PROD_THEMES_BASE_DIR); + downloadFiles = new File(applicationRoot, PROD_THEMES_BASE_DIR); type = PROD_DIR_STUB; } else { - downloadFiles = new File(currentRoot, DEV_THEMES_BASE_DIR); + downloadFiles = new File(applicationRoot, DEV_THEMES_BASE_DIR); prefix = DEVELOPMENT_PREFIX; type = DEV_DIR_STUB; } + sresp.setHeader("Content-Disposition", "attachment; filename=\"" + prefix + theme.getURL() + ".zip\""); @@ -170,12 +170,19 @@ Files.listFilesInTree(downloadFiles, new DirectoryFilter(theme.getURL(), type)), downloadFiles); + } else if (theme == null) { - // we have to create our own config becuase no other + // If we don't have a theme, then we return everything (i.e. the + // web tree of each module installed). + + // Get a list of all installed packages by querying + // registry.properties from registry. + // We have to create our own config instance because no other // classes provide access to one RegistryConfig rc = new RegistryConfig(); rc.load(); String[] packages = rc.getPackages(); + ClassLoader loader = Thread.currentThread().getContextClassLoader(); sresp.setHeader("Content-Disposition", @@ -191,19 +198,17 @@ new ZipWriterManifestReader(is, out, current, packages[i]); reader.setFileName(packages[i]); - reader.processFile(); + reader.processFile(); // 2012-05 (PB): Doesn't work! } else { s_log.warn("Unable to open up resource " + current); } } - // Special case add the auto-generated XSL fiel for content types + // Special case add the auto-generated XSL file for content types Iterator paths = ContentType.getXSLFileURLs(); out.putNextEntry(new ZipEntry("waf-xsl/themes/servlet/content-type/index.xsl")); - IO.copy(multiplexXSLFiles(paths), - out); + IO.copy(multiplexXSLFiles(paths), out); - out.close(); } } Modified: releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeControlPanel.java =================================================================== --- releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeControlPanel.java 2012-05-18 01:12:17 UTC (rev 2322) +++ releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeControlPanel.java 2012-05-18 01:23:09 UTC (rev 2323) @@ -110,13 +110,20 @@ getBody().connect(addThemeLink, m_themeForm); addAction(addThemeLink, ActionGroup.ADD); - getBody().add(new Label(GlobalizationUtil.globalize("theme.download_default_base_styles"))); - + // add the "Download default base styxle" form + // PB 2012-05: Download in ThemeDownloadServlet doesn't work, commented + // out for now. Not useful anyway because it downloads web tree of every + // package installed, probably filtered by theme file extensions (xsl, + // css, etc). +/* + getBody().add(new Label(GlobalizationUtil + .globalize("theme.download_default_base_styles"))); Link downloadFilesLink = new Link(new Label(GlobalizationUtil.globalize ("theme.download_default_base_styles")), "download/" + ALL_STYLES_ZIP_NAME); addAction(downloadFilesLink, ActionGroup.ADD); - +*/ + // add the "Select Standard Theme" form Form defaultThemeForm = createDefaultThemeForm(); addAction( defaultThemeForm ); } Modified: releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeXSLParameterGenerator.java =================================================================== --- releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeXSLParameterGenerator.java 2012-05-18 01:12:17 UTC (rev 2322) +++ releases/2.0.0/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeXSLParameterGenerator.java 2012-05-18 01:23:09 UTC (rev 2323) @@ -74,10 +74,11 @@ } if (themeURL != null) { - // modified as ccm-ldn-theme is no longer installed in its own context + // modified as ccm-themedirector (previously ccm-ldn-theme) is + // no longer installed in its own context // return "/" + WEB_APP_NAME + "/" + THEMES_DIR + "/" + // If we want to install it as a separate web application again we - // should find a way to determin the name from a central configuration + // should find a way to determine the name from a central configuration return "/" + THEMES_DIR + "/" + Web.getContext().getRequestURL().getContextPath() + baseDir + themeURL; |
Author: pboy Date: 2012-05-18 01:12:17 +0000 (Fri, 18 May 2012) New Revision: 2322 Modified: trunk/ccm-bundle/bundles/demo/cfg/integration.properties trunk/ccm-bundle/bundles/devel/cfg/integration.properties trunk/ccm-ldn-aplaws/bundles/base/cfg/integration.properties trunk/ccm-ldn-aplaws/bundles/complete/cfg/integration.properties trunk/ccm-ldn-aplaws/bundles/demo/cfg/integration.properties trunk/ccm-ldn-aplaws/bundles/devel/cfg/integration.properties trunk/ccm-ldn-aplaws/bundles/standard/cfg/integration.properties trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java trunk/ccm-themedirector/src/com/arsdigita/themedirector/dispatcher/ThemeDownloadServlet.java trunk/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeControlPanel.java trunk/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeXSLParameterGenerator.java Log: Fixed minor configuration issue (create new theme files from default). Modified: trunk/ccm-bundle/bundles/demo/cfg/integration.properties =================================================================== --- trunk/ccm-bundle/bundles/demo/cfg/integration.properties 2012-05-17 15:13:33 UTC (rev 2321) +++ trunk/ccm-bundle/bundles/demo/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) @@ -117,10 +117,11 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-bundle.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws-generic -themedirector.file_extensions=bmp css gif jpeg jpg js png xml xsl # ccm-bundle (Loader only) Modified: trunk/ccm-bundle/bundles/devel/cfg/integration.properties =================================================================== --- trunk/ccm-bundle/bundles/devel/cfg/integration.properties 2012-05-17 15:13:33 UTC (rev 2321) +++ trunk/ccm-bundle/bundles/devel/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) @@ -118,10 +118,11 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-bundle.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws-generic -themedirector.file_extensions=bmp css gif jpeg jpg js png xml xsl # ccm-bundle (Loader only) Modified: trunk/ccm-ldn-aplaws/bundles/base/cfg/integration.properties =================================================================== --- trunk/ccm-ldn-aplaws/bundles/base/cfg/integration.properties 2012-05-17 15:13:33 UTC (rev 2321) +++ trunk/ccm-ldn-aplaws/bundles/base/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) @@ -133,9 +133,11 @@ # ccm-themedirector application +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-ldn-aplaws.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf -themedirector.default_theme_path=themes/static/aplaws # ccm-auth-http application ; auth.http.admin_email=web...@ap... Modified: trunk/ccm-ldn-aplaws/bundles/complete/cfg/integration.properties =================================================================== --- trunk/ccm-ldn-aplaws/bundles/complete/cfg/integration.properties 2012-05-17 15:13:33 UTC (rev 2321) +++ trunk/ccm-ldn-aplaws/bundles/complete/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) @@ -133,8 +133,10 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-ldn-aplaws.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws # ccm-auth-http application Modified: trunk/ccm-ldn-aplaws/bundles/demo/cfg/integration.properties =================================================================== --- trunk/ccm-ldn-aplaws/bundles/demo/cfg/integration.properties 2012-05-17 15:13:33 UTC (rev 2321) +++ trunk/ccm-ldn-aplaws/bundles/demo/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) @@ -132,8 +132,10 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-ldn-aplaws.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws # ccm-auth-http application Modified: trunk/ccm-ldn-aplaws/bundles/devel/cfg/integration.properties =================================================================== --- trunk/ccm-ldn-aplaws/bundles/devel/cfg/integration.properties 2012-05-17 15:13:33 UTC (rev 2321) +++ trunk/ccm-ldn-aplaws/bundles/devel/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) @@ -126,8 +126,10 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-ldn-aplaws.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws # ccm-auth-http application Modified: trunk/ccm-ldn-aplaws/bundles/standard/cfg/integration.properties =================================================================== --- trunk/ccm-ldn-aplaws/bundles/standard/cfg/integration.properties 2012-05-17 15:13:33 UTC (rev 2321) +++ trunk/ccm-ldn-aplaws/bundles/standard/cfg/integration.properties 2012-05-18 01:12:17 UTC (rev 2322) @@ -131,8 +131,10 @@ # ccm-themedirector application -themedirector.default_theme_context= -# themedirector.default_theme_manifest=ccm-zes-aplaws.web.mf +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-ldn-aplaws.web.mf +# Required to denote the dir containing the default theme! themedirector.default_theme_path=themes/static/aplaws # ccm-auth-http application Modified: trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java =================================================================== --- trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java 2012-05-17 15:13:33 UTC (rev 2321) +++ trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java 2012-05-18 01:12:17 UTC (rev 2322) @@ -64,13 +64,20 @@ } // set of configuration parameters + // ///////////////////////////////////////////////////////////////// + /** Directory that all of the default themes are copied from. */ private final Parameter m_defaultThemePath = new StringParameter ("themedirector.default_theme_path", Parameter.OPTIONAL, "/themes/master/"); - /** Servlet context path containing the theme. */ + /** Servlet context path containing the default theme. + Previously ccm-themedirector used to be installed in its own + web context. In this case the appropriate web context should + be specified. + Currently, it is installed as part of the main application, + therefore it is empty by default. */ private final Parameter m_defaultThemeContext = new StringParameter ("themedirector.default_theme_context", @@ -79,7 +86,7 @@ /** File containing the default themes directory. Used in conjuntion with com.arsdigita.themedirectory.default_directory_filter to dictate the - final default directoroy. */ + final default directory. */ private final Parameter m_defaultThemeManifest = new StringParameter ("themedirector.default_theme_manifest", @@ -193,7 +200,7 @@ } /** - * This returns the name of the servlet context containing + * This returns the name of the servlet context containing * the default theme */ public String getDefaultThemeContext() { Modified: trunk/ccm-themedirector/src/com/arsdigita/themedirector/dispatcher/ThemeDownloadServlet.java =================================================================== --- trunk/ccm-themedirector/src/com/arsdigita/themedirector/dispatcher/ThemeDownloadServlet.java 2012-05-17 15:13:33 UTC (rev 2321) +++ trunk/ccm-themedirector/src/com/arsdigita/themedirector/dispatcher/ThemeDownloadServlet.java 2012-05-18 01:12:17 UTC (rev 2322) @@ -137,30 +137,30 @@ DispatcherHelper.maybeCacheDisable(sresp); sresp.setContentType("application/zip; charset=UTF-8"); - // The WebAppRoot should be something like this: - // /var/ccm-devel/web/<username>/<projectname>/webapps/ccm-ldn-theme; - // and we actually want the webapps directory - File currentRoot = new File(Web.getServletContext().getRealPath("/")); - File webapps = currentRoot.getParentFile(); + // Want the path in the filesystem to webcontext of this application + // (i.e. context root / document root) + File applicationRoot = new File(Web.getServletContext().getRealPath("/")); - // if we have a Theme, we send back either prod or dev, depending on - // the url. If we don't have a theme, then we return everything. if (theme != null) { - File downloadFiles = null; - String prefix = null; + // if we have a Theme, we send back either prod or dev, depending on + // the url. + File downloadFiles = null; // Path to the actual theme to download + String prefix = null; // Wether devel or prod // If "themes-prod" is ever moved to a different directory, // we could then get rid of the "type" argument (see below in // DirectoryFilter) String type = null; + // Determine the path, dependet of devel / prod if (sreq.getPathInfo().indexOf("/" + PUBLISHED_PREFIX) > -1) { prefix = PUBLISHED_PREFIX; - downloadFiles = new File(currentRoot, PROD_THEMES_BASE_DIR); + downloadFiles = new File(applicationRoot, PROD_THEMES_BASE_DIR); type = PROD_DIR_STUB; } else { - downloadFiles = new File(currentRoot, DEV_THEMES_BASE_DIR); + downloadFiles = new File(applicationRoot, DEV_THEMES_BASE_DIR); prefix = DEVELOPMENT_PREFIX; type = DEV_DIR_STUB; } + sresp.setHeader("Content-Disposition", "attachment; filename=\"" + prefix + theme.getURL() + ".zip\""); @@ -170,12 +170,19 @@ Files.listFilesInTree(downloadFiles, new DirectoryFilter(theme.getURL(), type)), downloadFiles); + } else if (theme == null) { - // we have to create our own config becuase no other + // If we don't have a theme, then we return everything (i.e. the + // web tree of each module installed). + + // Get a list of all installed packages by querying + // registry.properties from registry. + // We have to create our own config instance because no other // classes provide access to one RegistryConfig rc = new RegistryConfig(); rc.load(); String[] packages = rc.getPackages(); + ClassLoader loader = Thread.currentThread().getContextClassLoader(); sresp.setHeader("Content-Disposition", @@ -191,19 +198,17 @@ new ZipWriterManifestReader(is, out, current, packages[i]); reader.setFileName(packages[i]); - reader.processFile(); + reader.processFile(); // 2012-05 (PB): Doesn't work! } else { s_log.warn("Unable to open up resource " + current); } } - // Special case add the auto-generated XSL fiel for content types + // Special case add the auto-generated XSL file for content types Iterator paths = ContentType.getXSLFileURLs(); out.putNextEntry(new ZipEntry("waf-xsl/themes/servlet/content-type/index.xsl")); - IO.copy(multiplexXSLFiles(paths), - out); + IO.copy(multiplexXSLFiles(paths), out); - out.close(); } } Modified: trunk/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeControlPanel.java =================================================================== --- trunk/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeControlPanel.java 2012-05-17 15:13:33 UTC (rev 2321) +++ trunk/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeControlPanel.java 2012-05-18 01:12:17 UTC (rev 2322) @@ -110,13 +110,20 @@ getBody().connect(addThemeLink, m_themeForm); addAction(addThemeLink, ActionGroup.ADD); - getBody().add(new Label(GlobalizationUtil.globalize("theme.download_default_base_styles"))); - + // add the "Download default base styxle" form + // PB 2012-05: Download in ThemeDownloadServlet doesn't work, commented + // out for now. Not useful anyway because it downloads web tree of every + // package installed, probably filtered by theme file extensions (xsl, + // css, etc). +/* + getBody().add(new Label(GlobalizationUtil + .globalize("theme.download_default_base_styles"))); Link downloadFilesLink = new Link(new Label(GlobalizationUtil.globalize ("theme.download_default_base_styles")), "download/" + ALL_STYLES_ZIP_NAME); addAction(downloadFilesLink, ActionGroup.ADD); - +*/ + // add the "Select Standard Theme" form Form defaultThemeForm = createDefaultThemeForm(); addAction( defaultThemeForm ); } Modified: trunk/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeXSLParameterGenerator.java =================================================================== --- trunk/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeXSLParameterGenerator.java 2012-05-17 15:13:33 UTC (rev 2321) +++ trunk/ccm-themedirector/src/com/arsdigita/themedirector/ui/ThemeXSLParameterGenerator.java 2012-05-18 01:12:17 UTC (rev 2322) @@ -74,10 +74,11 @@ } if (themeURL != null) { - // modified as ccm-ldn-theme is no longer installed in its own context + // modified as ccm-themedirector (previously ccm-ldn-theme) is + // no longer installed in its own context // return "/" + WEB_APP_NAME + "/" + THEMES_DIR + "/" + // If we want to install it as a separate web application again we - // should find a way to determin the name from a central configuration + // should find a way to determine the name from a central configuration return "/" + THEMES_DIR + "/" + Web.getContext().getRequestURL().getContextPath() + baseDir + themeURL; |
From: <pb...@fe...> - 2012-05-17 15:13:49
|
Author: pboy Date: 2012-05-17 15:13:33 +0000 (Thu, 17 May 2012) New Revision: 2321 Added: releases/2.0.0/ Log: Branch version 2.0.0 |
From: <pb...@fe...> - 2012-05-16 10:35:22
|
Author: pboy Date: 2012-05-16 10:35:05 +0000 (Wed, 16 May 2012) New Revision: 2320 Modified: trunk/ccm-cms/pdl/com/arsdigita/content-types/GenericPerson.pdl trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPerson.java Log: Removed unnecessary property. (sync hb r1661) Modified: trunk/ccm-cms/pdl/com/arsdigita/content-types/GenericPerson.pdl =================================================================== --- trunk/ccm-cms/pdl/com/arsdigita/content-types/GenericPerson.pdl 2012-05-16 08:41:18 UTC (rev 2319) +++ trunk/ccm-cms/pdl/com/arsdigita/content-types/GenericPerson.pdl 2012-05-16 10:35:05 UTC (rev 2320) @@ -34,8 +34,6 @@ GenericPerson[0..1] alias = join cms_persons.alias_id to cms_persons.person_id; - Integer[0..1] dabinId = cms_persons.dabin_id INTEGER; - reference key (cms_persons.person_id); } Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPerson.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPerson.java 2012-05-16 08:41:18 UTC (rev 2319) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPerson.java 2012-05-16 10:35:05 UTC (rev 2320) @@ -54,8 +54,7 @@ public static final String CONTACTS = "contacts"; public static final String CONTACTS_KEY = "linkKey"; public static final String CONTACTS_ORDER = "linkOrder"; - public static final String ALIAS = "alias"; - public static final String DABIN_ID = "dabinId"; + public static final String ALIAS = "alias"; private static final String RELATION_ATTRIBUTES = "contacts.link_key:GenericContactType"; /** @@ -166,15 +165,7 @@ public void unsetAlias() { set(ALIAS, null); } - - public Integer getDabinId() { - return (Integer) get(DABIN_ID); - } - - public void setDabinId(final Integer dabinId) { - set(DABIN_ID, dabinId); - } - + /** * A convenient method which combines {@code titlePre}, {@code givenName), * {@code surname} and {@code titlePost}. |
From: <pb...@fe...> - 2012-05-16 08:39:33
|
Author: pboy Date: 2012-05-16 08:39:23 +0000 (Wed, 16 May 2012) New Revision: 2318 Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractBundleUpgrade.java Log: Fixed abstract update class. Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractBundleUpgrade.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractBundleUpgrade.java 2012-05-16 08:38:08 UTC (rev 2317) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractBundleUpgrade.java 2012-05-16 08:39:23 UTC (rev 2318) @@ -95,10 +95,9 @@ "SELECT parent_id " + "FROM cms_items " + "JOIN %s " - + "ON cms_items.item_id = %s.%s", + + "ON cms_items.item_id = %s.bundle_id", getBundleTableName(), - getBundleTableName(), - getIdColName())); + getBundleTableName())); while (personsRs.next()) { stmt.addBatch(String.format("INSERT INTO %s (bundle_id) " |
Author: pboy Date: 2012-05-16 08:38:08 +0000 (Wed, 16 May 2012) New Revision: 2317 Added: trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/ren_esdservice_table.sql trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/oracle-se-6.6.0-6.6.1.sql trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/postgres-6.6.0-6.6.1.sql trunk/ccm-ldn-types-esdservice/src/ccm-ldn-types-esdservikce.upgrade Removed: trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/ Modified: trunk/ccm-ldn-types-esdservice/application.xml Log: Fixed update scripts. Modified: trunk/ccm-ldn-types-esdservice/application.xml =================================================================== --- trunk/ccm-ldn-types-esdservice/application.xml 2012-05-16 08:37:24 UTC (rev 2316) +++ trunk/ccm-ldn-types-esdservice/application.xml 2012-05-16 08:38:08 UTC (rev 2317) @@ -20,6 +20,6 @@ <ccm:contact uri="mailto:rh...@re..." type="support"/> </ccm:contacts> <ccm:description> - The EsdService Content Type for created for Tameside project. + The EsdService Content Type. </ccm:description> </ccm:application> Added: trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/ren_esdservice_table.sql =================================================================== --- trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/ren_esdservice_table.sql (rev 0) +++ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/ren_esdservice_table.sql 2012-05-16 08:38:08 UTC (rev 2317) @@ -0,0 +1,41 @@ +-- +-- 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 +-- +-- $Id: ren_esdservice_table.sql pboy $ + +-- rename ct_esdservice table to ct_ldn_esdservice table following +-- ccm naming conventions to make maintenance tasks easier + + +-- if we could figure out the old names we could rename constraints too +-- alter table ct_esdservice drop constraint ... ; +-- alter table ct_esdservice drop constraint ... ; +-- alter table ct_esdservice drop constraint ... ; + +alter table ct_esdservice RENAME TO ct_ldn_esdservice ; + +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_serv_id_p_5dac0 PRIMARY KEY(service_id); +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_cont_id_f_r4d1z FOREIGN KEY (contact_id) +-- references ct_ldn_contacts (contact_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_serv_id_f_tfkqn FOREIGN KEY (service_id) +-- references cms_articles (article_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + Added: trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql =================================================================== --- trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql (rev 0) +++ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql 2012-05-16 08:38:08 UTC (rev 2317) @@ -0,0 +1,90 @@ +-- +-- 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 +-- +-- $Id: upd_system_tables.sql pboy $ + +-- rename ccm-cms-types-contact to ccm-ldn-types-contact +-- adjust various system tables to the new name of content type + +alter table init_requirements drop constraint init_requirements_init_f_cmmdn ; +alter table init_requirements drop constraint init_require_requ_init_f_i6rgg ; + +update inits + set class_name='com.arsdigita.london.contenttypes.ESDServiceInitializer' + where class_name='com.arsdigita.cms.contenttypes.ESDServiceInitializer' ; + +update init_requirements + set init='com.arsdigita.london.contenttypes.ESDServiceInitializer' + where init='com.arsdigita.cms.contenttypes.ESDServiceInitializer' ; + +ALTER TABLE init_requirements + ADD CONSTRAINT init_requirements_init_f_cmmdn FOREIGN KEY (init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; +ALTER TABLE init_requirements + ADD CONSTRAINT init_require_requ_init_f_i6rgg FOREIGN KEY (required_init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; + + +update content_types + set object_type='com.arsdigita.london.contenttypes.ESDService', + label='ESD Service', + description='An ESDService', + classname='com.arsdigita.london.contenttypes.ESDService' + where classname='com.arsdigita.cms.contenttypes.ESDService' ; + +update authoring_steps + set label_key='ESD Service Properties', + label_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + description_key='Edit the basic ESDService properties', + description_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + component='com.arsdigita.london.contenttypes.ui.ESDServicePropertiesStep' + where component='com.arsdigita.cms.contenttypes.ui.ESDServicePropertiesStep' ; + +update authoring_steps + set label_key='ESD Service Contact', + label_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + description_key='Edit/Choose the associated Contact object', + description_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + component='com.arsdigita.london.contenttypes.ui.ESDServiceChooseContactStep' + where component='com.arsdigita.cms.contenttypes.ui.ESDServiceChooseContactStep' ; + + + +update acs_objects + set (object_type,default_domain_class) = + ('com.arsdigita.london.contenttypes.ESDService' , + 'com.arsdigita.london.contenttypes.ESDService' ) + where default_domain_class like 'com.arsdigita.cms.contenttypes.ESDService' ; + +update lucene_docs + set type='com.arsdigita.london.contenttypes.ESDService' + where type='com.arsdigita.cms.contenttypes.ESDService' ; + +update vcx_generic_operations + set value=replace(value,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where value like '%cms.contenttypes.ESDService%'; + +update vcx_obj_changes + set obj_id=replace(obj_id,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where obj_id like '%cms.contenttypes.ESDService%'; + +update vcx_tags + set tagged_oid=replace(tagged_oid,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where tagged_oid like '%cms.contenttypes.ESDService%'; + Added: trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/oracle-se-6.6.0-6.6.1.sql =================================================================== --- trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/oracle-se-6.6.0-6.6.1.sql (rev 0) +++ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/oracle-se-6.6.0-6.6.1.sql 2012-05-16 08:38:08 UTC (rev 2317) @@ -0,0 +1,21 @@ +-- +-- 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 +-- +-- $Id: oracle-se-6.6.0-6.6.1.sql pboy $ + +@@ default/6.6.0-6.6.1/ren_esdservice_table.sql +@@ default/6.6.0-6.6.1/upd_system_tables.sql Added: trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/postgres-6.6.0-6.6.1.sql =================================================================== --- trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/postgres-6.6.0-6.6.1.sql (rev 0) +++ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/postgres-6.6.0-6.6.1.sql 2012-05-16 08:38:08 UTC (rev 2317) @@ -0,0 +1,27 @@ +-- +-- 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 +-- +-- $Id: postgres-6.6.0-6.6.1.sql pboy $ + +\echo APLAWS ldn esdservice 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL) + +begin; + +\i default/6.6.0-6.6.1/ren_esdservice_table.sql +\i default/6.6.0-6.6.1/upd_system_tables.sql + +commit; Added: trunk/ccm-ldn-types-esdservice/src/ccm-ldn-types-esdservikce.upgrade =================================================================== --- trunk/ccm-ldn-types-esdservice/src/ccm-ldn-types-esdservikce.upgrade (rev 0) +++ trunk/ccm-ldn-types-esdservice/src/ccm-ldn-types-esdservikce.upgrade 2012-05-16 08:38:08 UTC (rev 2317) @@ -0,0 +1,5 @@ +<upgrade> + <version from="6.6.0" to="6.6.1"> + <script sql="ccm-ldn-types-esdservice/upgrade/::database::-6.6.0-6.6.1.sql"/> + </version> +</upgrade> \ No newline at end of file |
From: <pb...@fe...> - 2012-05-16 08:37:44
|
Author: pboy Date: 2012-05-16 08:37:24 +0000 (Wed, 16 May 2012) New Revision: 2316 Modified: trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_acs_objects.sql trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_application_tables.sql trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_nav_tree_portlet.sql trunk/ccm-navigation/src/ccm-navigation.upgrade Log: Modified navigation update 6.6.0-6.6.1 to be executed AFTER 6.6.2-6.6.3 (renaming) in order to make Java class and initialization work. Modified: trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_acs_objects.sql =================================================================== --- trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_acs_objects.sql 2012-05-16 08:34:51 UTC (rev 2315) +++ trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_acs_objects.sql 2012-05-16 08:37:24 UTC (rev 2316) @@ -24,8 +24,8 @@ update acs_objects set (object_type,display_name,default_domain_class) = - ('com.arsdigita.london.navigation.portlet.NavigationTreePortlet', + ('com.arsdigita.navigation.portlet.NavigationTreePortlet', 'Navigation Tree', - 'com.arsdigita.london.navigation.portlet.NavigationTreePortlet') + 'com.arsdigita.navigation.portlet.NavigationTreePortlet') where object_type - like 'com.arsdigita.london.portal.portlet.NavigationDirectoryPortlet' ; + like 'com.arsdigita.portalworkspace.portlet.NavigationDirectoryPortlet' ; Modified: trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_application_tables.sql =================================================================== --- trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_application_tables.sql 2012-05-16 08:34:51 UTC (rev 2315) +++ trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_application_tables.sql 2012-05-16 08:37:24 UTC (rev 2316) @@ -24,9 +24,9 @@ update application_types set (object_type,title,description) = - ('com.arsdigita.london.navigation.portlet.NavigationTreePortlet', + ('com.arsdigita.navigation.portlet.NavigationTreePortlet', 'Navigation Tree', 'Displays a tree of navigation categories' ) where object_type - like 'com.arsdigita.london.portal.portlet.NavigationDirectoryPortlet' ; + like 'com.arsdigita.portalworkspace.portlet.NavigationDirectoryPortlet' ; Modified: trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_nav_tree_portlet.sql =================================================================== --- trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_nav_tree_portlet.sql 2012-05-16 08:34:51 UTC (rev 2315) +++ trunk/ccm-navigation/sql/ccm-navigation/upgrade/oracle-se/6.6.0-6.6.1/upd_nav_tree_portlet.sql 2012-05-16 08:37:24 UTC (rev 2316) @@ -48,16 +48,16 @@ REFERENCES portlets(portlet_id); update application_types - set object_type = 'com.arsdigita.london.navigation.portlet.NavigationTreePortlet' + set object_type = 'com.arsdigita.navigation.portlet.NavigationTreePortlet' where object_type - like 'com.arsdigita.london.portal.portlet.NavigationDirectoryPortlet' ; + like 'com.arsdigita.portalworkspace.portlet.NavigationDirectoryPortlet' ; update application_types set title = 'Navigation Tree' where object_type - like 'com.arsdigita.london.navigation.portlet.NavigationTreePortlet' ; + like 'com.arsdigita.navigation.portlet.NavigationTreePortlet' ; update application_types set description = 'Displays a tree of navigation categories' where object_type - like 'com.arsdigita.london.navigation.portlet.NavigationTreePortlet' ; \ No newline at end of file + like 'com.arsdigita.navigation.portlet.NavigationTreePortlet' ; \ No newline at end of file Modified: trunk/ccm-navigation/src/ccm-navigation.upgrade =================================================================== --- trunk/ccm-navigation/src/ccm-navigation.upgrade 2012-05-16 08:34:51 UTC (rev 2315) +++ trunk/ccm-navigation/src/ccm-navigation.upgrade 2012-05-16 08:37:24 UTC (rev 2316) @@ -14,12 +14,18 @@ <script class="com.arsdigita.navigation.upgrades.Upgrade650to651"/> </version> <version from="6.6.0" to="6.6.1"> + <!-- Moved NavigationTreeePortlet to Navigation Package --> + <!-- MUST actually be processed AFTER 6.6.2-6.6.3! + and AFTER ccm-portalws 6.5.1-6.5.2 which in turn must be processed + AFTER ccm-portalws 6.6.0-6-6-1 (rnaming ccm-ldn-portal) --> <script sql="ccm-navigation/upgrade/::database::-6.6.0-6.6.1.sql"/> </version> <version from="6.6.1" to="6.6.2"> + <!-- Removed legacy entries, london.navigation now legacy free. --> <script sql="ccm-navigation/upgrade/::database::-6.6.1-6.6.2.sql"/> </version> <version from="6.6.2" to="6.6.3"> + <!-- Renamed ccm-ldn-navigation to ccm-navigation --> <script sql="ccm-navigation/upgrade/::database::-6.6.2-6.6.3.sql"/> </version> </upgrade> |
Author: pboy Date: 2012-05-16 08:34:51 +0000 (Wed, 16 May 2012) New Revision: 2315 Modified: trunk/ccm-bundle/src/ccm-bundle.upgrade trunk/ccm-cms-types-job/application.xml trunk/ccm-cms-types-legalnotice/application.xml trunk/ccm-cms-types-minutes/application.xml trunk/ccm-cms-types-organization/application.xml trunk/ccm-cms-types-service/application.xml trunk/ccm-cms-types-siteproxy/application.xml trunk/ccm-faq/src/ccm-faq.upgrade trunk/ccm-ldn-dublin/application.xml trunk/ccm-ldn-importer/application.xml trunk/ccm-ldn-util/application.xml Log: Added various documentation. Modified: trunk/ccm-bundle/src/ccm-bundle.upgrade =================================================================== --- trunk/ccm-bundle/src/ccm-bundle.upgrade 2012-05-16 08:28:42 UTC (rev 2314) +++ trunk/ccm-bundle/src/ccm-bundle.upgrade 2012-05-16 08:34:51 UTC (rev 2315) @@ -1,5 +1,3 @@ <upgrade> - <version from="0.0.0" to="6.6.0"> - <script sql="ccm-sci-bundle/upgrade/::database::-0.0.0-6.6.0.sql"/> - </version> + </upgrade> Modified: trunk/ccm-cms-types-job/application.xml =================================================================== --- trunk/ccm-cms-types-job/application.xml 2012-05-16 08:28:42 UTC (rev 2314) +++ trunk/ccm-cms-types-job/application.xml 2012-05-16 08:34:51 UTC (rev 2315) @@ -19,6 +19,6 @@ <ccm:contact uri="mailto:cc...@re..." type="support"/> </ccm:contacts> <ccm:description> - The Job Content Type for the Red Hat CCM CMS. + The Job Content Type for publishing job vacancy announcements. </ccm:description> </ccm:application> Modified: trunk/ccm-cms-types-legalnotice/application.xml =================================================================== --- trunk/ccm-cms-types-legalnotice/application.xml 2012-05-16 08:28:42 UTC (rev 2314) +++ trunk/ccm-cms-types-legalnotice/application.xml 2012-05-16 08:34:51 UTC (rev 2315) @@ -19,6 +19,6 @@ <ccm:contact uri="mailto:cc...@re..." type="support"/> </ccm:contacts> <ccm:description> - The Legal Notice Content Type for the Red Hat CCM CMS. + The Legal Notice Content Type for publishing legal notices. </ccm:description> </ccm:application> Modified: trunk/ccm-cms-types-minutes/application.xml =================================================================== --- trunk/ccm-cms-types-minutes/application.xml 2012-05-16 08:28:42 UTC (rev 2314) +++ trunk/ccm-cms-types-minutes/application.xml 2012-05-16 08:34:51 UTC (rev 2315) @@ -19,6 +19,6 @@ <ccm:contact uri="mailto:cc...@re..." type="support"/> </ccm:contacts> <ccm:description> - The Minutes Content Type for the Red Hat CCM CMS. + The Minutes Content Type for publishing meeting minutes. </ccm:description> </ccm:application> Modified: trunk/ccm-cms-types-organization/application.xml =================================================================== --- trunk/ccm-cms-types-organization/application.xml 2012-05-16 08:28:42 UTC (rev 2314) +++ trunk/ccm-cms-types-organization/application.xml 2012-05-16 08:34:51 UTC (rev 2315) @@ -19,6 +19,6 @@ <ccm:contact uri="mailto:rh...@re..." type="support"/> </ccm:contacts> <ccm:description> - The Organization Content Type for the Red Hat CCM CMS. + The Organization Content Type Stores organization information. </ccm:description> </ccm:application> Modified: trunk/ccm-cms-types-service/application.xml =================================================================== --- trunk/ccm-cms-types-service/application.xml 2012-05-16 08:28:42 UTC (rev 2314) +++ trunk/ccm-cms-types-service/application.xml 2012-05-16 08:34:51 UTC (rev 2315) @@ -19,6 +19,6 @@ <ccm:contact uri="mailto:cc...@re..." type="support"/> </ccm:contacts> <ccm:description> - The Service Content Type for the Red Hat CCM CMS. + The Service Content Type for publishing service information. </ccm:description> </ccm:application> Modified: trunk/ccm-cms-types-siteproxy/application.xml =================================================================== --- trunk/ccm-cms-types-siteproxy/application.xml 2012-05-16 08:28:42 UTC (rev 2314) +++ trunk/ccm-cms-types-siteproxy/application.xml 2012-05-16 08:34:51 UTC (rev 2315) @@ -19,6 +19,6 @@ <ccm:contact uri="mailto:rh...@re..." type="support"/> </ccm:contacts> <ccm:description> - The Glossary Item Content Type for the Red Hat CCM CMS. + A content type that lets you proxy remote sites and style the provided XML. </ccm:description> </ccm:application> Modified: trunk/ccm-faq/src/ccm-faq.upgrade =================================================================== --- trunk/ccm-faq/src/ccm-faq.upgrade 2012-05-16 08:28:42 UTC (rev 2314) +++ trunk/ccm-faq/src/ccm-faq.upgrade 2012-05-16 08:34:51 UTC (rev 2315) @@ -1,6 +1,8 @@ <upgrade> +<!-- nothing to upgrade yet <version from="6.x.0" to="6.x.1"> <script sql="ccm-faq/upgrade/::database::-6.x.0-6.x.1.sql"/> <script class="com.arsdigita.faq.upgrade.xyz"/> </version> +--> </upgrade> Modified: trunk/ccm-ldn-dublin/application.xml =================================================================== --- trunk/ccm-ldn-dublin/application.xml 2012-05-16 08:28:42 UTC (rev 2314) +++ trunk/ccm-ldn-dublin/application.xml 2012-05-16 08:34:51 UTC (rev 2315) @@ -16,6 +16,9 @@ <ccm:contact uri="mailto:rh...@re..." type="support"/> </ccm:contacts> <ccm:description> + The Dublin Core application for compliance with the Dublin Core Metadata + standard. + The Red Hat Web Application Framework is a platform for writing database-backed web applications in Java. </ccm:description> Modified: trunk/ccm-ldn-importer/application.xml =================================================================== --- trunk/ccm-ldn-importer/application.xml 2012-05-16 08:28:42 UTC (rev 2314) +++ trunk/ccm-ldn-importer/application.xml 2012-05-16 08:34:51 UTC (rev 2315) @@ -15,6 +15,8 @@ <ccm:contact uri="mailto:rh...@re..." type="support"/> </ccm:contacts> <ccm:description> + Application for importing content data from XML files. + Importer is the opposite of DomainObjectTraversal - it parses the XML produced by the latter and creates objects in database. </ccm:description> Modified: trunk/ccm-ldn-util/application.xml =================================================================== --- trunk/ccm-ldn-util/application.xml 2012-05-16 08:28:42 UTC (rev 2314) +++ trunk/ccm-ldn-util/application.xml 2012-05-16 08:34:51 UTC (rev 2315) @@ -19,6 +19,8 @@ <ccm:contact uri="mailto:rh...@re..." type="support"/> </ccm:contacts> <ccm:description> + Set of utilities for various tasks. + The Red Hat Web Application Framework is a platform for writing database-backed web applications in Java. </ccm:description> |
Author: pboy Date: 2012-05-16 08:28:42 +0000 (Wed, 16 May 2012) New Revision: 2314 Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/1.4.1-1.4.2/ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/1.4.1-1.4.2/add-workspace-pages.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.5.1-6.5.2/ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.5.1-6.5.2/add-navigation-directory-portlet.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.5.2-6.5.3/ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.5.2-6.5.3/add-flash-portlet.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/content-directory.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/fix-perm-context.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-1.4.1-1.4.2.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.0-6.3.1.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.1-6.3.2.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.5.1-6.5.2.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.5.2-6.5.3.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/1.4.1-1.4.2/ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/1.4.1-1.4.2/add-workspace-pages.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace-owner.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace-themes.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace_workspace_map.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.1-6.3.2/ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.1-6.3.2/freeform-use-clob.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-1.4.1-1.4.2.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.3.0-6.3.1.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.3.1-6.3.2.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.5.1-6.5.2.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.5.2-6.5.3.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace-owner.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace-themes.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace_workspace_map.sql trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.1-6.3.2/ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.1-6.3.2/freeform-use-clob.sql Removed: trunk/ccm-portalworkspace/sql/ccm-ldn-portal-2/ Modified: trunk/ccm-portalworkspace/src/ccm-portalworkspace.upgrade Log: Fixed update scripts. Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/1.4.1-1.4.2/add-workspace-pages.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/1.4.1-1.4.2/add-workspace-pages.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/1.4.1-1.4.2/add-workspace-pages.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,92 @@ + +create table workspace_page_layouts ( + layout_id INTEGER not null + constraint worksp_pag_layo_lay_id_p_paxph + primary key, + title VARCHAR(200) not null, + description VARCHAR(4000), + format VARCHAR(50) not null + constraint worksp_pag_layo_format_u_ff8p6 + unique +); + +insert into workspace_page_layouts (layout_id, title, description, format) + values (nextval('acs_object_id_seq'), '1 Column', 'One column', '100%'); + +insert into workspace_page_layouts (layout_id, title, description, format) + values (nextval('acs_object_id_seq'), '2 Column', 'Two columns, equal size', '50%,50%'); + +insert into workspace_page_layouts (layout_id, title, description, format) + values (nextval('acs_object_id_seq'), '3 Column', 'Three columns, equal size', '30%,40%,30%'); + +insert into workspace_page_layouts (layout_id, title, description, format) + values (nextval('acs_object_id_seq'), '4 Column', 'Four columns, equal size', '25%,25%,25%,25%'); + +insert into workspace_page_layouts (layout_id, title, description, format) + values (nextval('acs_object_id_seq'), '5 Column', 'Five columns, equal size', '20%,20%,20%,20%,20%'); + + +alter table workspaces add default_layout_id INTEGER; +alter table workspaces alter party_id set not null; +-- XXX '100%' is only relevant for APLAWS... +update workspaces set default_layout_id = (select layout_id from workspace_page_layouts where format = '100%'); +alter table workspaces alter default_layout_id set not null; +alter table workspaces add + constraint workspac_defau_layo_id_f_xvb7g foreign key (default_layout_id) + references workspace_page_layouts(layout_id); + +create table workspace_pages ( + page_id INTEGER not null + constraint workspac_pages_page_id_p_iugi0 + primary key, + workspace_id INTEGER, + layout_id INTEGER not null +); +alter table workspace_pages add + constraint workspa_pag_workspa_id_f_4xkkr foreign key (workspace_id) + references workspaces(workspace_id); +alter table workspace_pages add + constraint workspac_page_layou_id_f_9uq1r foreign key (layout_id) + references workspace_page_layouts(layout_id); +alter table workspace_pages add + constraint workspac_pages_page_id_f_jhka1 foreign key (page_id) + references portals(portal_id); + +insert into workspace_pages (page_id, workspace_id, layout_id) + select portal_id, workspace_id, + (select layout_id from workspace_page_layouts where format = '100%') + from workspace_portal_map; + +update acs_objects + set object_type = 'com.arsdigita.london.portal.WorkspacePage', + default_domain_class = 'com.arsdigita.london.portal.WorkspacePage' + where object_id in (select page_id from workspace_pages); + +insert into application_types ( + application_type_id, + object_type, + title, + description, + workspace_application_p, + has_full_page_view_p, + has_embedded_view_p, + singleton_p) + values ( + nextval('acs_object_id_seq'), + 'com.arsdigita.london.portal.WorkspacePage', + 'Portal Workspace Page', + 'Pages for the portal workspaces', + null, + null, + null, + null); + +update applications + set sort_key = (select tab_number from workspace_portal_map where application_id = portal_id) + where application_id in (select page_id from workspace_pages); + +update applications + set application_type_id = (select application_type_id from application_types where object_type = 'com.arsdigita.london.portal.WorkspacePage') + where application_id in (select page_id from workspace_pages); + +drop table workspace_portal_map; Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/1.4.1-1.4.2/add-workspace-pages.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.5.1-6.5.2/add-navigation-directory-portlet.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.5.1-6.5.2/add-navigation-directory-portlet.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.5.1-6.5.2/add-navigation-directory-portlet.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,31 @@ +-- Copyright (C) 2008 Permeance Technologies Pty Ltd. 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 + +create table portlet_navigation_directory ( + portlet_id INTEGER not null + constraint port_navig_dire_por_id_p_n4lfs + primary key, + navigation_id INTEGER not null, + depth INTEGER not null +); + +alter table portlet_navigation_directory add + constraint port_navi_dir_navig_id_f_rq14k foreign key (navigation_id) + references nav_app(application_id); + +alter table portlet_navigation_directory add + constraint port_navig_dire_por_id_f_vsyyc foreign key (portlet_id) + references portlets(portlet_id); \ No newline at end of file Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.5.2-6.5.3/add-flash-portlet.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.5.2-6.5.3/add-flash-portlet.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.5.2-6.5.3/add-flash-portlet.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,38 @@ +-- Copyright (C) 2008 Permeance Technologies Pty Ltd. 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 + +create table portlet_flash ( + portlet_id INTEGER not null + constraint portle_flas_portlet_id_p_d00yp + primary key, + -- referential constraint for portlet_id deferred due to circular dependencies + background_colour VARCHAR(7), + detect_key VARCHAR(32), + swf_file VARCHAR(2048) not null, + height VARCHAR(8) not null, + parameters VARCHAR(1024), + quality VARCHAR(8), + redirect_url VARCHAR(2048), + variables VARCHAR(1024), + version VARCHAR(8) not null, + width VARCHAR(8) not null, + xi_redirect_url VARCHAR(2048) +); + +alter table portlet_flash add + constraint portle_flas_portlet_id_f_bhmp4 foreign key (portlet_id) + references portlets(portlet_id); + \ No newline at end of file Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/content-directory.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/content-directory.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/content-directory.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,28 @@ + +create table portlet_content_directory ( + portlet_id INTEGER not null + constraint port_con_direc_port_id_p_f5k1_ + primary key, + -- referential constraint for portlet_id deferred due to circular dependencies + depth INTEGER not null, + layout VARCHAR(10) not null, + root_id INTEGER + -- referential constraint for root_id deferred due to circular dependencies +); + +alter table portlet_content_directory add + constraint port_con_direc_port_id_f_9kbkn foreign key (portlet_id) + references portlets(portlet_id) on delete cascade; +alter table portlet_content_directory add + constraint port_con_direct_roo_id_f_fvrr7 foreign key (root_id) + references cat_categories(category_id); + +insert into portlet_content_directory + (portlet_id, root_id, layout, depth) + select object_id, (select category_id + from cat_categories + where name = 'Navigation'), + 'grid', 2 + from acs_objects + where object_type = 'com.arsdigita.london.portal.portlet.ContentDirectoryPortlet'; + Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/content-directory.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/fix-perm-context.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/fix-perm-context.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/fix-perm-context.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,3 @@ +insert into object_context_map (object_id, context_id) + select portal_id, workspace_id + from workspace_portal_map; Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/fix-perm-context.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/1.4.1-1.4.2/add-workspace-pages.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/1.4.1-1.4.2/add-workspace-pages.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/1.4.1-1.4.2/add-workspace-pages.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,91 @@ + +create table workspace_page_layouts ( + layout_id INTEGER not null + constraint worksp_pag_layo_lay_id_p_paxph + primary key, + title VARCHAR(200) not null, + description VARCHAR(4000), + format VARCHAR(50) not null + constraint worksp_pag_layo_format_u_ff8p6 + unique +); + +insert into workspace_page_layouts (layout_id, title, description, format) + values (acs_object_id_seq.nextval, '1 Column', 'One column', '100%'); + +insert into workspace_page_layouts (layout_id, title, description, format) + values (acs_object_id_seq.nextval, '2 Column', 'Two columns, equal size', '50%,50%'); + +insert into workspace_page_layouts (layout_id, title, description, format) + values (acs_object_id_seq.nextval, '3 Column', 'Three columns, equal size', '30%,40%,30%'); + +insert into workspace_page_layouts (layout_id, title, description, format) + values (acs_object_id_seq.nextval, '4 Column', 'Four columns, equal size', '25%,25%,25%,25%'); + +insert into workspace_page_layouts (layout_id, title, description, format) + values (acs_object_id_seq.nextval, '5 Column', 'Five columns, equal size', '20%,20%,20%,20%,20%'); + +alter table workspaces add default_layout_id INTEGER; +alter table workspaces modify party_id not null; +-- XXX '100%' is only relevant for APLAWS... +update workspaces set default_layout_id = (select layout_id from workspace_page_layouts where format = '100%'); +alter table workspaces modify default_layout_id not null; +alter table workspaces add + constraint workspac_defau_layo_id_f_xvb7g foreign key (default_layout_id) + references workspace_page_layouts(layout_id); + +create table workspace_pages ( + page_id INTEGER not null + constraint workspac_pages_page_id_p_iugi0 + primary key, + workspace_id INTEGER, + layout_id INTEGER not null +); +alter table workspace_pages add + constraint workspa_pag_workspa_id_f_4xkkr foreign key (workspace_id) + references workspaces(workspace_id); +alter table workspace_pages add + constraint workspac_page_layou_id_f_9uq1r foreign key (layout_id) + references workspace_page_layouts(layout_id); +alter table workspace_pages add + constraint workspac_pages_page_id_f_jhka1 foreign key (page_id) + references portals(portal_id); + +insert into workspace_pages (page_id, workspace_id, layout_id) + select portal_id, workspace_id, + (select layout_id from workspace_page_layouts where format = '100%') + from workspace_portal_map; + +update acs_objects + set object_type = 'com.arsdigita.london.portal.WorkspacePage', + default_domain_class = 'com.arsdigita.london.portal.WorkspacePage' + where object_id in (select page_id from workspace_pages); + +insert into application_types ( + application_type_id, + object_type, + title, + description, + workspace_application_p, + has_full_page_view_p, + has_embedded_view_p, + singleton_p) + values ( + acs_object_id_seq.nextval, + 'com.arsdigita.london.portal.WorkspacePage', + 'Portal Workspace Page', + 'Pages for the portal workspaces', + null, + null, + null, + null); + +update applications + set sort_key = (select tab_number from workspace_portal_map where application_id = portal_id) + where application_id in (select page_id from workspace_pages); + +update applications + set application_type_id = (select application_type_id from application_types where object_type = 'com.arsdigita.london.portal.WorkspacePage') + where application_id in (select page_id from workspace_pages); + +drop table workspace_portal_map; Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/1.4.1-1.4.2/add-workspace-pages.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace-owner.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace-owner.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace-owner.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,7 @@ + +alter table workspaces add owner_id INTEGER; + +alter table workspaces add + constraint workspaces_owner_id_f_tpdju foreign key (owner_id) + references users(user_id); + Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace-owner.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace-themes.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace-themes.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace-themes.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,48 @@ +create table workspace_themes ( + theme_id INTEGER not null + constraint workspac_theme_them_id_p_6_22y + primary key, + -- referential constraint for theme_id deferred due to circular dependencies + theme_name VARCHAR(4000), + theme_desc VARCHAR(4000), + ctx_bar_color VARCHAR(100), + ctx_bar_text_color VARCHAR(100), + active_tab_color VARCHAR(100), + active_tab_text_color VARCHAR(100), + inactive_tab_color VARCHAR(100), + inactive_tab_text_color VARCHAR(100), + top_rule VARCHAR(100), + bottom_rule VARCHAR(100), + portlet_head VARCHAR(100), + portlet_icon VARCHAR(100), + portlet_border_color VARCHAR(100), + portlet_border_style VARCHAR(100), + portlet_header_text_color VARCHAR(100), + page_bg_color VARCHAR(100), + page_bg_image VARCHAR(100), + narrow_bg_color VARCHAR(100), + body_text_color VARCHAR(100) +); + +create table themeapplications ( + theme_app_id INTEGER not null + constraint themeapplic_the_app_id_p_ix9jr + primary key + -- referential constraint for theme_app_id deferred due to circular dependencies +); + +alter table workspaces add theme_id INTEGER; + +alter table workspaces add + constraint workspaces_theme_id_f_tpdju foreign key (theme_id) + references workspace_themes(theme_id); + +alter table workspace_themes add + constraint workspac_theme_them_id_f_ix7ez foreign key (theme_id) + references acs_objects(object_id); + +alter table themeapplications add + constraint themeapplic_the_app_id_f_ejek5 foreign key (theme_app_id) + references applications(application_id); + + Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace-themes.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace_workspace_map.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace_workspace_map.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace_workspace_map.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,18 @@ + +create table workspace_workspace_map ( + referenced_workspace_id INTEGER not null, + -- referential constraint for referenced_workspace_id deferred due to circular dependencies + referencing_workspace_id INTEGER not null, + -- referential constraint for referencing_workspace_id deferred due to circular dependencies + constraint work_wor_map_ref_wor_i_p_bidbq + primary key(referencing_workspace_id, referenced_workspace_id) +); + +alter table workspace_workspace_map add + constraint work_wor_map_ref_wor_i_f_md9_z foreign key (referenced_workspace_id) + references workspaces(workspace_id); +alter table workspace_workspace_map add + constraint work_wor_map_ref_wor_i_f_nyhzz foreign key (referencing_workspace_id) + references workspaces(workspace_id); + +create index wrkspc_wrkspc_mp_rfrn_wrks_idx on workspace_workspace_map(referenced_workspace_id); Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.0-6.3.1/add-workspace_workspace_map.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.1-6.3.2/freeform-use-clob.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.1-6.3.2/freeform-use-clob.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.1-6.3.2/freeform-use-clob.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,9 @@ +alter table portlet_freeform_html add ( + content_clob CLOB +); + +update portlet_freeform_html set content_clob = content; + +alter table portlet_freeform_html drop column content; + + Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se/6.3.1-6.3.2/freeform-use-clob.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-1.4.1-1.4.2.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-1.4.1-1.4.2.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-1.4.1-1.4.2.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1 @@ +@@ oracle-se/1.4.1-1.4.2/add-workspace-pages.sql Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-1.4.1-1.4.2.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.0-6.3.1.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.0-6.3.1.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.0-6.3.1.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,3 @@ +@@ oracle-se/6.3.0-6.3.1/add-workspace-themes.sql +@@ oracle-se/6.3.0-6.3.1/add-workspace-owner.sql +@@ oracle-se/6.3.0-6.3.1/add-workspace_workspace_map.sql Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.0-6.3.1.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.1-6.3.2.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.1-6.3.2.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.1-6.3.2.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1 @@ +@@ oracle-se/6.3.1-6.3.2/freeform-use-clob.sql Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.1-6.3.2.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.5.1-6.5.2.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.5.1-6.5.2.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.5.1-6.5.2.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,18 @@ +-- Copyright (C) 2008 Permeance Technologies Pty Ltd. 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 + +@@ default/6.5.1-6.5.2/add-navigation-directory-portlet.sql + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.5.2-6.5.3.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.5.2-6.5.3.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.5.2-6.5.3.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,18 @@ +-- Copyright (C) 2008 Permeance Technologies Pty Ltd. 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 + +@@ /default/6.5.2-6.5.3/add-flash-portlet.sql + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace-owner.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace-owner.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace-owner.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,7 @@ + +alter table workspaces add column owner_id INTEGER; + +alter table workspaces add + constraint workspaces_owner_id_f_mbbra foreign key (owner_id) + references users(user_id); + Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace-owner.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace-themes.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace-themes.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace-themes.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,46 @@ +create table workspace_themes ( + theme_id INTEGER not null + constraint workspac_theme_them_id_p_6_22y + primary key, + -- referential constraint for theme_id deferred due to circular dependencies + theme_name VARCHAR(4000), + theme_desc VARCHAR(4000), + ctx_bar_color VARCHAR(100), + ctx_bar_text_color VARCHAR(100), + active_tab_color VARCHAR(100), + active_tab_text_color VARCHAR(100), + inactive_tab_color VARCHAR(100), + inactive_tab_text_color VARCHAR(100), + top_rule VARCHAR(100), + bottom_rule VARCHAR(100), + portlet_head VARCHAR(100), + portlet_icon VARCHAR(100), + portlet_border_color VARCHAR(100), + portlet_border_style VARCHAR(100), + portlet_header_text_color VARCHAR(100), + page_bg_color VARCHAR(100), + page_bg_image VARCHAR(100), + narrow_bg_color VARCHAR(100), + body_text_color VARCHAR(100) +); + +create table themeapplications ( + theme_app_id INTEGER not null + constraint themeapplic_the_app_id_p_ix9jr + primary key + -- referential constraint for theme_app_id deferred due to circular dependencies +); + +alter table workspaces add column theme_id INTEGER; + +alter table workspaces add + constraint workspaces_theme_id_f_tpdju foreign key (theme_id) + references workspace_themes(theme_id); + +alter table workspace_themes add + constraint workspac_theme_them_id_f_ix7ez foreign key (theme_id) + references acs_objects(object_id); + +alter table themeapplications add + constraint themeapplic_the_app_id_f_ejek5 foreign key (theme_app_id) + references applications(application_id); Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace-themes.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace_workspace_map.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace_workspace_map.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace_workspace_map.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,18 @@ + +create table workspace_workspace_map ( + referenced_workspace_id INTEGER not null, + -- referential constraint for referenced_workspace_id deferred due to circular dependencies + referencing_workspace_id INTEGER not null, + -- referential constraint for referencing_workspace_id deferred due to circular dependencies + constraint work_wor_map_ref_wor_i_p_bidbq + primary key(referencing_workspace_id, referenced_workspace_id) +); + +alter table workspace_workspace_map add + constraint work_wor_map_ref_wor_i_f_md9_z foreign key (referenced_workspace_id) + references workspaces(workspace_id); +alter table workspace_workspace_map add + constraint work_wor_map_ref_wor_i_f_nyhzz foreign key (referencing_workspace_id) + references workspaces(workspace_id); + +create index wrkspc_wrkspc_mp_rfrn_wrks_idx on workspace_workspace_map(referenced_workspace_id); Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.0-6.3.1/add-workspace_workspace_map.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.1-6.3.2/freeform-use-clob.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.1-6.3.2/freeform-use-clob.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.1-6.3.2/freeform-use-clob.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,6 @@ +alter table portlet_freeform_html add content_clob text; + +update portlet_freeform_html set content_clob = content; + +alter table portlet_freeform_html drop content; + Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres/6.3.1-6.3.2/freeform-use-clob.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-1.4.1-1.4.2.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-1.4.1-1.4.2.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-1.4.1-1.4.2.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,3 @@ +begin; +\i default/1.4.1-1.4.2/add-workspace-pages.sql +commit; Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-1.4.1-1.4.2.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.3.0-6.3.1.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.3.0-6.3.1.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.3.0-6.3.1.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,5 @@ +begin; +\i postgres/6.3.0-6.3.1/add-workspace-themes.sql +\i postgres/6.3.0-6.3.1/add-workspace-owner.sql +\i postgres/6.3.0-6.3.1/add-workspace_workspace_map.sql +commit; Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.3.0-6.3.1.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.3.1-6.3.2.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.3.1-6.3.2.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.3.1-6.3.2.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,3 @@ +begin; +\i postgres/6.3.1-6.3.2/freeform-use-clob.sql +commit; Property changes on: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.3.1-6.3.2.sql ___________________________________________________________________ Added: svn:executable + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.5.1-6.5.2.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.5.1-6.5.2.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.5.1-6.5.2.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,20 @@ +-- Copyright (C) 2008 Permeance Technologies Pty Ltd. 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 + +begin; +\i default/6.5.1-6.5.2/add-navigation-directory-portlet.sql +commit; + Added: trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.5.2-6.5.3.sql =================================================================== --- trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.5.2-6.5.3.sql (rev 0) +++ trunk/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.5.2-6.5.3.sql 2012-05-16 08:28:42 UTC (rev 2314) @@ -0,0 +1,20 @@ +-- Copyright (C) 2008 Permeance Technologies Pty Ltd. 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 + +begin; +\i default/6.5.2-6.5.3/add-flash-portlet.sql +commit; + Modified: trunk/ccm-portalworkspace/src/ccm-portalworkspace.upgrade =================================================================== --- trunk/ccm-portalworkspace/src/ccm-portalworkspace.upgrade 2012-05-10 17:33:00 UTC (rev 2313) +++ trunk/ccm-portalworkspace/src/ccm-portalworkspace.upgrade 2012-05-16 08:28:42 UTC (rev 2314) @@ -1,28 +1,30 @@ <upgrade> <version from="1.4.1" to="1.4.2"> - <script sql="ccm-ldn-portal/upgrade/::database::-1.4.1-1.4.2.sql"/> + <script sql="ccm-portalworkspace/upgrade/::database::-1.4.1-1.4.2.sql"/> </version> <version from="6.3.0" to="6.3.1"> - <script sql="ccm-ldn-portal/upgrade/::database::-6.3.0-6.3.1.sql"/> + <script sql="ccm-portalworkspace/upgrade/::database::-6.3.0-6.3.1.sql"/> </version> <version from="6.3.1" to="6.3.2"> - <script sql="ccm-ldn-portal/upgrade/::database::-6.3.1-6.3.2.sql"/> + <script sql="ccm-portalworkspace/upgrade/::database::-6.3.1-6.3.2.sql"/> </version> <version from="6.5.0" to="6.5.1"> - <script class="com.arsdigita.london.portal.upgrade.CreateContainerGroups"/> + <script class="com.arsdigita.portalworkspace.upgrade.CreateContainerGroups"/> </version> <version from="6.5.1" to="6.5.2"> - <script sql="ccm-ldn-portal/upgrade/::database::-6.5.1-6.5.2.sql"/> - <script class="com.arsdigita.london.portal.upgrade.CreateNavigationDirectoryPortlet"/> + <script sql="ccm-portalworkspace/upgrade/::database::-6.5.1-6.5.2.sql"/> + <script class="com.arsdigita.portalworkspace.upgrade.CreateNavigationDirectoryPortlet"/> </version> <version from="6.5.2" to="6.5.3"> - <script sql="ccm-ldn-portal/upgrade/::database::-6.5.2-6.5.3.sql"/> - <script class="com.arsdigita.london.portal.upgrade.CreateFlashPortlet"/> + <script sql="ccm-portalworkspace/upgrade/::database::-6.5.2-6.5.3.sql"/> + <script class="com.arsdigita.portalworkspace.upgrade.CreateFlashPortlet"/> </version> <version from="6.6.0" to="6.6.1"> + <!-- Rename ccm-ldn-portal to ccm-portalworkspace --> <script sql="ccm-portalworkspace/upgrade/::database::-6.6.0-6.6.1.sql"/> </version> <version from="6.6.1" to="6.6.2"> + <!-- Refactored Legacy Free --> <script sql="ccm-portalworkspace/upgrade/::database::-6.6.1-6.6.2.sql"/> </version> </upgrade> |
Author: pboy Date: 2012-05-10 17:33:00 +0000 (Thu, 10 May 2012) New Revision: 2313 Added: trunk/ccm-bundle/bundles/demo/cfg/web-ccm.xml trunk/ccm-bundle/bundles/devel/cfg/web-ccm.xml trunk/ccm-cms/sql/ccm-cms/default/upgrade/6.6.6-6.6.7/add_default_workflow.sql Removed: trunk/ccm-bundle/bundles/demo/cfg/web-sci.xml trunk/ccm-bundle/bundles/devel/cfg/web-sci.xml Modified: trunk/ccm-cms/sql/ccm-cms/upgrade/oracle-se-6.6.6-6.6.7.sql trunk/ccm-cms/sql/ccm-cms/upgrade/postgres-6.6.6-6.6.7.sql trunk/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.3-6.6.4.sql trunk/ccm-core/sql/ccm-core/upgrade/postgres-6.6.3-6.6.4.sql trunk/ccm-core/src/com/arsdigita/domain/ReflectionInstantiator.java trunk/ccm-core/src/com/arsdigita/templating/SimpleURIResolver.java trunk/ccm-core/web/WEB-INF/web.ccm-core.xml trunk/ccm-ldn-aplaws/bundles/custom/cfg/web.xml trunk/ccm-ldn-aplaws/bundles/demo/cfg/web.xml trunk/ccm-ldn-aplaws/bundles/devel/cfg/web.xml trunk/ccm-ldn-aplaws/bundles/extended/cfg/web.xml trunk/ccm-ldn-aplaws/bundles/standard/cfg/web.xml trunk/ccm-ldn-search/doc/search-standalone/web.xml trunk/ccm-ldn-terms/sql/ccm-ldn-terms/upgrade/postgres-6.6.0-6.6.1.sql Log: Several minor adjustments. Added: trunk/ccm-bundle/bundles/demo/cfg/web-ccm.xml =================================================================== --- trunk/ccm-bundle/bundles/demo/cfg/web-ccm.xml (rev 0) +++ trunk/ccm-bundle/bundles/demo/cfg/web-ccm.xml 2012-05-10 17:33:00 UTC (rev 2313) @@ -0,0 +1,574 @@ +<?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>LibreCMS DEMO Site</display-name> + <description>Community and Content Management</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.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>ccm-dispatcher</servlet-name> + <servlet-class>com.arsdigita.web.DispatcherServlet</servlet-class> + <load-on-startup>2</load-on-startup> + </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>login</servlet-name> + <servlet-class>com.arsdigita.ui.login.LoginServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>webadmin</servlet-name> + <servlet-class>com.arsdigita.ui.admin.AdminServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>webadmin-permissions</servlet-name> + <servlet-class>com.arsdigita.ui.permissions.PermissionsServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>webdevsupport</servlet-name> + <servlet-class>com.arsdigita.webdevsupport.WebDevSupportServlet</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-center</servlet-name> + <servlet-class>com.arsdigita.cms.WorkspaceServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>content-section</servlet-name> + <servlet-class>com.arsdigita.cms.ContentSectionServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>cms-service</servlet-name> + <servlet-class>com.arsdigita.cms.ServiceServlet</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>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-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-shortcuts</param-value> + </init-param> + </servlet> + + <!-- module ccm-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-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-shortcuts - servlet mappings --> + <servlet-mapping> + <servlet-name>shortcuts-files</servlet-name> + <url-pattern>/ccm-shortcuts/files/*</url-pattern> + </servlet-mapping> + + <!-- module ccm-subsite - servlet mappings BEGIN --> + <servlet-mapping> + <servlet-name>subsite-files</servlet-name> + <url-pattern>/ccm-subsite/files/*</url-pattern> + </servlet-mapping> + <!-- module ccm-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>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>login</servlet-name> + <url-pattern>/login/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>webadmin</servlet-name> + <url-pattern>/admin/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>webadmin-permissions</servlet-name> + <url-pattern>/admin-permissions/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>webdevsupport</servlet-name> + <url-pattern>/webdevsupport/*</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-center</servlet-name> + <url-pattern>/templates/servlet/content-center/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>content-section</servlet-name> + <url-pattern>/templates/servlet/content-section/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>cms-service</servlet-name> + <url-pattern>/templates/servlet/cms-service/*</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> Deleted: trunk/ccm-bundle/bundles/demo/cfg/web-sci.xml =================================================================== --- trunk/ccm-bundle/bundles/demo/cfg/web-sci.xml 2012-05-05 10:45:46 UTC (rev 2312) +++ trunk/ccm-bundle/bundles/demo/cfg/web-sci.xml 2012-05-10 17:33:00 UTC (rev 2313) @@ -1,598 +0,0 @@ -<?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>LibreCMS DEMO Site</display-name> - <description>Community and Content Management</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.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>login</servlet-name> - <servlet-class>com.arsdigita.ui.login.LoginServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>webadmin</servlet-name> - <servlet-class>com.arsdigita.ui.admin.AdminServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>webadmin-permissions</servlet-name> - <servlet-class>com.arsdigita.ui.permissions.PermissionsServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>webdevsupport</servlet-name> - <servlet-class>com.arsdigita.webdevsupport.WebDevSupportServlet</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-center</servlet-name> - <servlet-class>com.arsdigita.cms.WorkspaceServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>content-section</servlet-name> - <servlet-class>com.arsdigita.cms.ContentSectionServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>cms-service</servlet-name> - <servlet-class>com.arsdigita.cms.ServiceServlet</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>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-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-shortcuts</param-value> - </init-param> - </servlet> - - <!-- module ccm-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-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-shortcuts - servlet mappings --> - <servlet-mapping> - <servlet-name>shortcuts-files</servlet-name> - <url-pattern>/ccm-shortcuts/files/*</url-pattern> - </servlet-mapping> - - <!-- module ccm-subsite - servlet mappings BEGIN --> - <servlet-mapping> - <servlet-name>subsite-files</servlet-name> - <url-pattern>/ccm-subsite/files/*</url-pattern> - </servlet-mapping> - <!-- module ccm-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>login</servlet-name> - <url-pattern>/login/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>webadmin</servlet-name> - <url-pattern>/admin/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>webadmin-permissions</servlet-name> - <url-pattern>/admin-permissions/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>webdevsupport</servlet-name> - <url-pattern>/webdevsupport/*</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-center</servlet-name> - <url-pattern>/templates/servlet/content-center/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>content-section</servlet-name> - <url-pattern>/templates/servlet/content-section/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>cms-service</servlet-name> - <url-pattern>/templates/servlet/cms-service/*</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> Added: trunk/ccm-bundle/bundles/devel/cfg/web-ccm.xml =================================================================== --- trunk/ccm-bundle/bundles/devel/cfg/web-ccm.xml (rev 0) +++ trunk/ccm-bundle/bundles/devel/cfg/web-ccm.xml 2012-05-10 17:33:00 UTC (rev 2313) @@ -0,0 +1,574 @@ +<?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>LibreCMS OpenCCM Site</display-name> + <description>Community and Content Management</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.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>ccm-dispatcher</servlet-name> + <servlet-class>com.arsdigita.web.DispatcherServlet</servlet-class> + <load-on-startup>2</load-on-startup> + </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>login</servlet-name> + <servlet-class>com.arsdigita.ui.login.LoginServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>webadmin</servlet-name> + <servlet-class>com.arsdigita.ui.admin.AdminServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>webadmin-permissions</servlet-name> + <servlet-class>com.arsdigita.ui.permissions.PermissionsServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>webdevsupport</servlet-name> + <servlet-class>com.arsdigita.webdevsupport.WebDevSupportServlet</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-center</servlet-name> + <servlet-class>com.arsdigita.cms.WorkspaceServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>content-section</servlet-name> + <servlet-class>com.arsdigita.cms.ContentSectionServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>cms-service</servlet-name> + <servlet-class>com.arsdigita.cms.ServiceServlet</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>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-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-shortcuts</param-value> + </init-param> + </servlet> + + <!-- module ccm-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-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-shortcuts - servlet mappings --> + <servlet-mapping> + <servlet-name>shortcuts-files</servlet-name> + <url-pattern>/ccm-shortcuts/files/*</url-pattern> + </servlet-mapping> + + <!-- module ccm-subsite - servlet mappings BEGIN --> + <servlet-mapping> + <servlet-name>subsite-files</servlet-name> + <url-pattern>/ccm-subsite/files/*</url-pattern> + </servlet-mapping> + <!-- module ccm-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>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>login</servlet-name> + <url-pattern>/login/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>webadmin</servlet-name> + <url-pattern>/admin/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>webadmin-permissions</servlet-name> + <url-pattern>/admin-permissions/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>webdevsupport</servlet-name> + <url-pattern>/webdevsupport/*</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-center</servlet-name> + <url-pattern>/templates/servlet/content-center/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>content-section</servlet-name> + <url-pattern>/templates/servlet/content-section/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>cms-service</servlet-name> + <url-pattern>/templates/servlet/cms-service/*</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> Deleted: trunk/ccm-bundle/bundles/devel/cfg/web-sci.xml =================================================================== --- trunk/ccm-bu... [truncated message content] |
From: <pb...@fe...> - 2012-05-05 07:15:55
|
Author: pboy Date: 2012-05-05 07:15:40 +0000 (Sat, 05 May 2012) New Revision: 2311 Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractAssocUpgrade.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractBundleUpgrade.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreateContactBundles.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreateOrgaUnitBundles.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreatePersonBundles.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericContactGenericPersonAssocUpgrade.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericContactAssocUpgrade.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericOrgaUnitAssocUpgrade.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericPersonAssocUpgrade.java Removed: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactPersonAssocUpgrade.java Modified: trunk/ccm-cms/pdl/com/arsdigita/content-types/GenericOrganizationalUnit.pdl trunk/ccm-cms/src/ccm-cms.upgrade trunk/ccm-core/src/com/arsdigita/domain/ReflectionInstantiator.java trunk/ccm-core/src/com/arsdigita/util/cmd/CommandLine.java trunk/ccm-core/src/com/arsdigita/util/cmd/StringSwitch.java trunk/ccm-core/src/com/arsdigita/util/cmd/Switch.java trunk/ccm-portalworkspace/src/com/arsdigita/portalworkspace/ui/PortletTypeForm.java Log: Some more enhancements of associoations and multilanguage support. Modified: trunk/ccm-cms/pdl/com/arsdigita/content-types/GenericOrganizationalUnit.pdl =================================================================== --- trunk/ccm-cms/pdl/com/arsdigita/content-types/GenericOrganizationalUnit.pdl 2012-05-05 07:13:29 UTC (rev 2310) +++ trunk/ccm-cms/pdl/com/arsdigita/content-types/GenericOrganizationalUnit.pdl 2012-05-05 07:15:40 UTC (rev 2311) @@ -56,15 +56,15 @@ // Links a organization with persons. association { - GenericOrganizationalUnitBundle[0..n] organizationalunits = join cms_bundles.bundle_id + GenericOrganizationalUnitBundle[0..n] organizationalunits = join cms_person_bundles.bundle_id to cms_organizationalunits_person_map.person_id, join cms_organizationalunits_person_map.organizationalunit_id - to cms_bundles.bundle_id; + to cms_orgaunit_bundles.bundle_id; - GenericPersonBundle[0..n] persons = join cms_bundles.bundle_id + GenericPersonBundle[0..n] persons = join cms_orgaunit_bundles.bundle_id to cms_organizationalunits_person_map.organizationalunit_id, join cms_organizationalunits_person_map.person_id - to cms_bundles.bundle_id; + to cms_person_bundles.bundle_id; // Additional attributes for the association String[0..1] role_name = cms_organizationalunits_person_map.role_name VARCHAR(100); Modified: trunk/ccm-cms/src/ccm-cms.upgrade =================================================================== --- trunk/ccm-cms/src/ccm-cms.upgrade 2012-05-05 07:13:29 UTC (rev 2310) +++ trunk/ccm-cms/src/ccm-cms.upgrade 2012-05-05 07:15:40 UTC (rev 2311) @@ -52,7 +52,9 @@ <script sql="ccm-cms/upgrade/::database::-6.6.3-6.6.4.sql"/> </version> <version from="6.6.4" to="6.6.5"> - <script class="com.arsdigita.cms.contenttypes.GenericContactPersonAssocUpgrade"/> + <script class="com.arsdigita.cms.contenttypes.upgrades.CreateContactBundles"/> + <script class="com.arsdigita.cms.contenttypes.upgrades.CreatePersonBundles"/> + <script class="com.arsdigita.cms.contenttypes.upgrades.GenericContactGenericPersonAssocUpgrade"/> <script sql="ccm-cms/upgrade::database::-6.6.4-6.6.5.sql"/> </version> <version from="6.6.5" to="6.6.6"> @@ -61,6 +63,6 @@ </version> <version from="6.6.6" to="6.6.7"> <!-- CMS Workspace&Service now loaded as legacy free application --> - <script sql="ccm-cms/upgrade/::database::-6.6.6-6.6.7.sql"/> + <script sql="ccm-cms/upgrade/::database::-6.6.6-6.6.7.sql"/> </version> </upgrade> Deleted: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactPersonAssocUpgrade.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactPersonAssocUpgrade.java 2012-05-05 07:13:29 UTC (rev 2310) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactPersonAssocUpgrade.java 2012-05-05 07:15:40 UTC (rev 2311) @@ -1,452 +0,0 @@ -package com.arsdigita.cms.contenttypes; - -import com.arsdigita.util.cmd.Program; -import com.arsdigita.runtime.RuntimeConfig; -import com.arsdigita.util.jdbc.Connections; -import java.math.BigDecimal; -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.List; -import org.apache.commons.cli.CommandLine; - -/** - * Upgrade for association between GenericContact and GenericPerson (6.6.4 to - * 6.6.5) - * - * @author Jens Pelzetter - * @version $Id: GenericContactPersonAssocUpgrade.java 1501 2012-02-10 16:49:14Z - * jensp $ - */ -public class GenericContactPersonAssocUpgrade extends Program { - - public GenericContactPersonAssocUpgrade() { - super("GenericContactPersonAssocUpgrade", "1.0.0", ""); - } - - public static void main(final String[] args) { - new GenericContactPersonAssocUpgrade().run(args); - } - - public void doRun(final CommandLine cmdLine) { - System.out.println("Starting upgrade..."); - List<AssocEntry> oldData = new ArrayList<AssocEntry>(); - - System.out.println("Trying to get JDBC connection..."); - - final Connection conn = Connections.acquire(RuntimeConfig.getConfig(). - getJDBCURL()); - try { - conn.setAutoCommit(false); - } catch (SQLException ex) { - System.err.println("Failed to configure JDBC connection."); - printStackTrace(ex); - close(conn); - return; - } - - System.out.println("Retrieving old data..."); - try { - final Statement stmt = conn.createStatement(); - final ResultSet oldAssocResult = stmt.executeQuery( - "SELECT person_id, contact_id, link_order, link_key " - + "FROM cms_person_contact_map " - + "JOIN cms_items on person_id = item_id " - + "WHERE version = 'draft' "); - - while (oldAssocResult.next()) { - AssocEntry entry = new AssocEntry(); - - entry.setPersonDraftId(oldAssocResult.getBigDecimal(1)); - entry.setPersonDraftBundleId(getParentIdFor( - entry.getPersonDraftId(), conn)); - entry.setContactDraftId(oldAssocResult.getBigDecimal(2)); - entry.setContactDraftBundleId(getParentIdFor( - entry.getContactDraftId(), conn)); - - entry.setPersonPublicId(getPublicIdFor( - entry.getPersonDraftId(), conn)); - entry.setPersonPublicBundleId(getPublicIdFor( - entry.getPersonDraftBundleId(), conn)); - entry.setContactPublicId(getPublicIdFor( - entry.getContactDraftId(), conn)); - entry.setContactPublicBundleId(getPublicIdFor( - entry.getContactDraftBundleId(), conn)); - - entry.setLinkOrder(oldAssocResult.getInt(3)); - entry.setLinkKey(oldAssocResult.getString(4)); - - oldData.add(entry); - } - } catch (SQLException ex) { - System.err.println("Failed to retrieve old data."); - printStackTrace(ex); - return; - } - - try { - System.out.println("Droping old table..."); - final Statement stmt = conn.createStatement(); - stmt.execute("DROP TABLE cms_person_contact_map"); - } catch (SQLException ex) { - System.err.println("Failed to drop old table."); - printStackTrace(ex); - rollback(conn); - close(conn); - return; - } - - try { - System.out.println("Creating new tables..."); - final Statement stmt = conn.createStatement(); - - stmt.addBatch("CREATE TABLE cms_person_bundles ( " - + "bundle_id integer NOT NULL)"); - - stmt.addBatch("CREATE TABLE cms_contact_bundles ( " - + "bundle_id integer NOT NULL)"); - - stmt.addBatch("CREATE TABLE cms_person_contact_map (" - + "person_id integer NOT NULL," - + "contact_id integer NOT NULL," - + "link_order integer," - + "link_key character varying(100)" - + ")"); - - stmt.addBatch("ALTER TABLE ONLY cms_person_bundles " - + "ADD CONSTRAINT cms_pers_bundl_bund_id_p_7xuzi " - + "PRIMARY KEY (bundle_id);"); - - stmt.addBatch("ALTER TABLE ONLY cms_person_bundles " - + "ADD CONSTRAINT cms_pers_bundl_bund_id_f__rzge " - + "FOREIGN KEY (bundle_id) " - + "REFERENCES cms_bundles(bundle_id);"); - - stmt.addBatch("ALTER TABLE ONLY cms_contact_bundles " - + "ADD CONSTRAINT cms_cont_bundl_bund_id_p_2p6vp " - + "PRIMARY KEY (bundle_id);"); - - stmt.addBatch("ALTER TABLE ONLY cms_contact_bundles " - + "ADD CONSTRAINT cms_cont_bundl_bund_id_f_m8aga " - + "FOREIGN KEY (bundle_id) " - + "REFERENCES cms_bundles(bundle_id);"); - - stmt.addBatch("ALTER TABLE ONLY cms_person_contact_map " - + "ADD CONSTRAINT cms_per_con_map_con_id_p_g1cii " - + "PRIMARY KEY (contact_id, person_id)"); - - stmt.addBatch("ALTER TABLE ONLY cms_person_contact_map " - + "ADD CONSTRAINT cms_per_con_map_con_id_f_peoc2 " - + "FOREIGN KEY (contact_id) " - + "REFERENCES cms_contact_bundles(bundle_id);"); - - stmt.addBatch("ALTER TABLE ONLY cms_person_contact_map " - + "ADD CONSTRAINT cms_per_con_map_per_id_f_g82jn " - + "FOREIGN KEY (person_id) " - + "REFERENCES cms_person_bundles(bundle_id);"); - stmt.executeBatch(); - - } catch (SQLException ex) { - System.err.println("Failed to create new table."); - printStackTrace(ex); - rollback(conn); - close(conn); - return; - } - - try { - System.out.println("Filling new tables with data..."); - final Statement queryPersonsStmt = conn.createStatement(); - final Statement queryContactsStmt = conn.createStatement(); - final Statement stmt = conn.createStatement(); - - final ResultSet personsRs = - queryPersonsStmt.executeQuery( - "SELECT parent_id " - + "FROM cms_items " - + "JOIN cms_persons " - + "ON cms_items.item_id = cms_persons.person_id"); - - while (personsRs.next()) { - stmt.addBatch(String.format("INSERT INTO cms_person_bundles (bundle_id) " - + "VALUES (%d)", - personsRs.getInt(1))); - stmt.addBatch(String.format( - "UPDATE acs_objects " - + "SET default_domain_class = 'com.arsdigita.cms.contenttypes.GenericPersonBundle'," - + "object_type = 'com.arsdigita.cms.contenttypes.GenericPersonBundle' " - + "WHERE object_id = %d", - personsRs.getInt(1))); - } - - final ResultSet contactsRs = queryContactsStmt.executeQuery( - "SELECT DISTINCT parent_id " - + "FROM cms_items " - + "JOIN cms_contacts " - + "ON cms_items.item_id = cms_contacts.contact_id"); - - while (contactsRs.next()) { - stmt.addBatch(String.format("INSERT INTO cms_contact_bundles (bundle_id) " - + "VALUES (%s)", - contactsRs.getInt(1))); - stmt.addBatch(String.format( - "UPDATE acs_objects " - + "SET default_domain_class = 'com.arsdigita.cms.contenttypes.GenericContactBundle', " - + "object_type = 'com.arsdigita.cms.contenttypes.GenericContactBundle' " - + "WHERE object_id = %d", - contactsRs.getInt(1))); - } - - final List<String> processedEntries = - new ArrayList<String>(); - for (AssocEntry entry : oldData) { - if (processedEntries.contains( - String.format("%s-%s", - entry.getPersonDraftBundleId().toString(), - entry.getContactDraftBundleId().toString()))) { - continue; - } - - stmt.addBatch(String.format( - "INSERT INTO cms_person_contact_map (" - + "person_id, " - + "contact_id, " - + "link_order, " - + "link_key) " - + "VALUES (%s, %s, %d, '%s')", - entry.getPersonDraftBundleId().toString(), - entry.getContactDraftBundleId().toString(), - entry.getLinkOrder(), - entry.getLinkKey())); - - if ((entry.getPersonPublicBundleId() != null) - && (entry.getContactPublicBundleId() != null)) { - stmt.addBatch(String.format( - "INSERT INTO cms_person_contact_map (" - + "person_id, " - + "contact_id, " - + "link_order, " - + "link_key) " - + "VALUES (%s, %s, %d, '%s')", - entry.getPersonPublicBundleId().toString(), - entry.getContactPublicBundleId().toString(), - entry.getLinkOrder(), - entry.getLinkKey())); - } - - if (entry.getPersonPublicBundleId() != null) { - stmt.addBatch(String.format( - "UPDATE cms_published_links " - + "SET pending = %s, " - + "pending_source = %s, " - + "draft_target = %s " - + "WHERE pending = %s " - + "AND draft_target = %s", - entry.getPersonPublicBundleId().toString(), - entry.getPersonPublicBundleId().toString(), - entry.getContactDraftBundleId(), - entry.getPersonPublicId(), - entry.getContactDraftId())); - } - - if (entry.getContactPublicBundleId() != null) { - stmt.addBatch(String.format( - "UPDATE cms_published_links " - + "SET pending = %s, " - + "pending_source = %s, " - + "draft_target = %s " - + "WHERE pending = %s " - + "AND draft_target = %s", - entry.getContactPublicBundleId().toString(), - entry.getContactPublicBundleId().toString(), - entry.getPersonDraftBundleId(), - entry.getContactPublicId(), - entry.getPersonDraftId())); - } - - processedEntries.add(String.format( - "%s-%s", - entry.getPersonDraftBundleId(). - toString(), - entry.getContactDraftBundleId().toString())); - } - - stmt.executeBatch(); - - - } catch (SQLException ex) { - System.err.println("Failed to fill tables."); - printStackTrace(ex); - rollback(conn); - close(conn); - return; - } - - try { - conn.commit(); - } catch (SQLException ex) { - System.err.println("Failed to commiting changes."); - printStackTrace(ex); - rollback(conn); - return; - } - - close(conn); - } - - private class AssocEntry { - - private BigDecimal personDraftId; - private BigDecimal contactDraftId; - private BigDecimal personPublicId; - private BigDecimal contactPublicId; - private BigDecimal personDraftBundleId; - private BigDecimal contactDraftBundleId; - private BigDecimal personPublicBundleId; - private BigDecimal contactPublicBundleId; - private Integer linkOrder; - private String linkKey; - - public AssocEntry() { - } - - public BigDecimal getContactDraftBundleId() { - return contactDraftBundleId; - } - - public void setContactDraftBundleId(BigDecimal contactDraftBundleId) { - this.contactDraftBundleId = contactDraftBundleId; - } - - public BigDecimal getContactDraftId() { - return contactDraftId; - } - - public void setContactDraftId(BigDecimal contactDraftId) { - this.contactDraftId = contactDraftId; - } - - public BigDecimal getContactPublicBundleId() { - return contactPublicBundleId; - } - - public void setContactPublicBundleId(BigDecimal contactPublicBundleId) { - this.contactPublicBundleId = contactPublicBundleId; - } - - public BigDecimal getContactPublicId() { - return contactPublicId; - } - - public void setContactPublicId(BigDecimal contactPublicId) { - this.contactPublicId = contactPublicId; - } - - public String getLinkKey() { - return linkKey; - } - - public void setLinkKey(String linkKey) { - this.linkKey = linkKey; - } - - public Integer getLinkOrder() { - return linkOrder; - } - - public void setLinkOrder(Integer linkOrder) { - this.linkOrder = linkOrder; - } - - public BigDecimal getPersonDraftBundleId() { - return personDraftBundleId; - } - - public void setPersonDraftBundleId(BigDecimal personDraftBundleId) { - this.personDraftBundleId = personDraftBundleId; - } - - public BigDecimal getPersonDraftId() { - return personDraftId; - } - - public void setPersonDraftId(BigDecimal personDraftId) { - this.personDraftId = personDraftId; - } - - public BigDecimal getPersonPublicBundleId() { - return personPublicBundleId; - } - - public void setPersonPublicBundleId(BigDecimal personPublicBundleId) { - this.personPublicBundleId = personPublicBundleId; - } - - public BigDecimal getPersonPublicId() { - return personPublicId; - } - - public void setPersonPublicId(BigDecimal personPublicId) { - this.personPublicId = personPublicId; - } - } - - private BigDecimal getPublicIdFor(final BigDecimal id, - final Connection conn) - throws SQLException { - final Statement stmt = conn.createStatement(); - - final ResultSet rs = stmt.executeQuery(String.format( - "SELECT item_id FROM cms_items WHERE master_id = %s", - id.toString())); - - while (rs.next()) { - return rs.getBigDecimal(1); - } - - return null; - } - - private BigDecimal getParentIdFor(final BigDecimal id, - final Connection conn) - throws SQLException { - final Statement stmt = conn.createStatement(); - - final ResultSet rs = stmt.executeQuery(String.format( - "SELECT parent_id FROM cms_items WHERE item_id = %s", - id.toString())); - - while (rs.next()) { - return rs.getBigDecimal(1); - } - - return null; - } - - private void rollback(final Connection conn) { - try { - conn.rollback(); - } catch (SQLException ex1) { - System.err.println("Rollback failed."); - ex1.printStackTrace(System.err); - } - } - - private void close(final Connection conn) { - try { - conn.close(); - } catch (SQLException ex) { - System.err.println("Failed to close JDBC connection."); - printStackTrace(ex); - } - } - - private void printStackTrace(final SQLException ex) { - ex.printStackTrace(System.err); - if (ex.getNextException() != null) { - printStackTrace(ex.getNextException()); - } - } -} Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractAssocUpgrade.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractAssocUpgrade.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractAssocUpgrade.java 2012-05-05 07:15:40 UTC (rev 2311) @@ -0,0 +1,420 @@ +package com.arsdigita.cms.contenttypes.upgrades; + +import com.arsdigita.runtime.RuntimeConfig; +import com.arsdigita.util.cmd.Program; +import com.arsdigita.util.jdbc.Connections; +import java.math.BigDecimal; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.apache.commons.cli.CommandLine; + +/** + * + * @author Jens Pelzetter + * @version $Id$ + */ +public abstract class AbstractAssocUpgrade extends Program { + + public AbstractAssocUpgrade(final String name, final String version, final String usage) { + super(name, version, usage); + } + + protected abstract String getTableName(); + + protected abstract String getOwnerIdCol(); + + protected abstract String getMemberIdCol(); + + protected abstract Map<String, String> getAttributes(); + + protected abstract String getPrimaryKeyConstraintName(); + + protected abstract String getOwnerConstraintName(); + + protected abstract String getMemberConstraintName(); + + protected abstract String getOwnerTableName(); + + protected abstract String getMemberTableName(); + + @Override + protected void doRun(final CommandLine cmdLine) { + System.out.println("Starting upgrade..."); + final List<AssocEntry> oldData = new ArrayList<AssocEntry>(); + + final Connection conn = Connections.acquire(RuntimeConfig.getConfig(). + getJDBCURL()); + try { + conn.setAutoCommit(false); + } catch (SQLException ex) { + System.err.println("Failed to configure JDBC connection."); + printStackTrace(ex); + close(conn); + return; + } + + System.out.println("Retrieving old data..."); + try { + final Statement stmt = conn.createStatement(); + final ResultSet oldAssocResult = stmt.executeQuery(String.format( + "SELECT * " + + "FROM %s " + + "JOIN cms_items on %s = item_id " + + "WHERE version = 'draft' ", + getTableName(), + getOwnerIdCol())); + + while (oldAssocResult.next()) { + AssocEntry entry = new AssocEntry(); + + entry.setOwnerDraftId(oldAssocResult.getBigDecimal(getOwnerIdCol())); + entry.setOwnerDraftBundleId(getParentIdFor(entry.getOwnerDraftId(), conn)); + + entry.setMemberDraftId(oldAssocResult.getBigDecimal(getMemberIdCol())); + entry.setMemberDraftBundleId(getParentIdFor(entry.getMemberDraftId(), conn)); + + entry.setOwnerPublicId(getPublicIdFor(entry.getOwnerDraftId(), conn)); + entry.setOwnerPublicBundleId(getPublicIdFor(entry.getOwnerDraftBundleId(), conn)); + + entry.setMemberPublicId(getPublicIdFor(entry.getMemberDraftId(), conn)); + entry.setMemberPublicBundleId(getPublicIdFor(entry.getMemberDraftBundleId(), conn)); + + for (Map.Entry<String, String> attribute : getAttributes().entrySet()) { + entry.addAttribute(attribute.getKey(), oldAssocResult.getString(attribute.getKey())); + } + + oldData.add(entry); + } + } catch (SQLException ex) { + System.err.println("Failed to retrieve old data."); + printStackTrace(ex); + return; + } + + try { + System.out.println("Droping old table..."); + final Statement stmt = conn.createStatement(); + stmt.execute(String.format("DROP TABLE %s", getTableName())); + } catch (SQLException ex) { + System.err.println("Failed to drop old table."); + printStackTrace(ex); + rollback(conn); + close(conn); + return; + } + + try { + System.out.printf("Creating new table %s...\n", getTableName()); + final Statement stmt = conn.createStatement(); + + final StringBuilder attributesBuilder = new StringBuilder(); + for (Map.Entry<String, String> attribute : getAttributes().entrySet()) { + if (attributesBuilder.length() > 0) { + attributesBuilder.append(",\n"); + } + attributesBuilder.append(attribute.getKey()).append(' ').append(attribute.getValue()); + } + stmt.addBatch(String.format("CREATE TABLE %s (" + + "%s integer NOT NULL," + + "%s integer NOT NULL," + + "%s" + + ")", + getTableName(), + getOwnerIdCol(), + getMemberIdCol(), + attributesBuilder.toString())); + + stmt.addBatch(String.format("ALTER TABLE ONLY %s " + + "ADD CONSTRAINT %s " + + "PRIMARY KEY (%s, %s)", + getTableName(), + getPrimaryKeyConstraintName(), + getOwnerIdCol(), + getMemberIdCol())); + + stmt.addBatch(String.format("ALTER TABLE ONLY %s " + + "ADD CONSTRAINT %s " + + "FOREIGN KEY (%s)" + + "REFERENCES %s(bundle_id)", + getTableName(), + getOwnerConstraintName(), + getOwnerIdCol(), + getOwnerTableName())); + + stmt.addBatch(String.format("ALTER TABLE ONLY %s " + + "ADD CONSTRAINT %s " + + "FOREIGN KEY (%s)" + + "REFERENCES %s(bundle_id)", + getTableName(), + getMemberConstraintName(), + getMemberIdCol(), + getMemberTableName())); + + stmt.executeBatch(); + + } catch (SQLException ex) { + System.err.printf("Failed to create new table '%s'.\n", getTableName()); + printStackTrace(ex); + rollback(conn); + close(conn); + return; + } + + try { + System.out.println("Filling new table with data..."); + + final List<String> processedEntries = + new ArrayList<String>(); + final Statement stmt = conn.createStatement(); + + for (AssocEntry entry : oldData) { + if (processedEntries.contains( + String.format("%s-%s", + entry.getOwnerDraftBundleId().toString(), + entry.getMemberDraftBundleId().toString()))) { + continue; + } + + final StringBuilder attributeCols = new StringBuilder(); + for (Map.Entry<String, String> attribute : getAttributes().entrySet()) { + attributeCols.append(","); + attributeCols.append(attribute.getKey()); + } + final StringBuilder attributeValues = new StringBuilder(); + for (Map.Entry<String, String> attribute : getAttributes().entrySet()) { + attributeValues.append(","); + if (attribute.getValue().startsWith("character")) { + attributeValues.append('\"'); + } + attributeValues.append(entry.getAttributes().get(attribute.getKey())); + if (attribute.getValue().startsWith("character")) { + attributeValues.append('\"'); + } + } + stmt.addBatch(String.format("INSERT INTO %s (" + + "%s," + + "%s" + + "%s) " + + "VALUES (%s, %s %s)", + getTableName(), + getOwnerIdCol(), + getMemberIdCol(), + attributeCols.toString(), + entry.getOwnerDraftBundleId().toString(), + entry.getMemberDraftBundleId().toString(), + attributeValues.toString())); + if ((entry.getOwnerPublicBundleId() != null) + && (entry.getMemberPublicBundleId() != null)) { + stmt.addBatch(String.format("INSERT INTO %s (" + + "%s," + + "%s" + + "%s) " + + "VALUES (%s, %s %s)", + getTableName(), + getOwnerIdCol(), + getMemberIdCol(), + attributeCols.toString(), + entry.getOwnerPublicBundleId().toString(), + entry.getMemberPublicBundleId().toString(), + attributeValues.toString())); + } + + if (entry.getOwnerPublicId() != null) { + stmt.addBatch(String.format("DELETE FROM cms_published_links " + + "WHERE pending = %s " + + "AND draft_target = %s", + entry.getOwnerPublicId().toString(), + entry.getMemberDraftId().toString())); + } + + if (entry.getMemberPublicId() != null) { + stmt.addBatch(String.format("DELETE FROM cms_published_links " + + "WHERE pending = %s" + + "AND draft_target = %s", + entry.getMemberPublicId().toString(), + entry.getOwnerDraftId().toString())); + } + + processedEntries.add(String.format("%s-%s", + entry.getOwnerDraftBundleId().toString(), + entry.getMemberDraftBundleId().toString())); + + stmt.executeBatch(); + } + } catch (SQLException ex) { + System.err.println("Failed to fill table."); + printStackTrace(ex); + rollback(conn); + close(conn); + return; + } + + try { + conn.commit(); + } catch (SQLException ex) { + System.err.println("Failed to commiting changes."); + printStackTrace(ex); + rollback(conn); + return; + } + + close(conn); + } + + private BigDecimal getPublicIdFor(final BigDecimal id, + final Connection conn) + throws SQLException { + final Statement stmt = conn.createStatement(); + + final ResultSet rs = stmt.executeQuery(String.format( + "SELECT item_id FROM cms_items WHERE master_id = %s", + id.toString())); + + while (rs.next()) { + return rs.getBigDecimal(1); + } + + return null; + } + + private BigDecimal getParentIdFor(final BigDecimal id, + final Connection conn) + throws SQLException { + final Statement stmt = conn.createStatement(); + + final ResultSet rs = stmt.executeQuery(String.format( + "SELECT parent_id FROM cms_items WHERE item_id = %s", + id.toString())); + + while (rs.next()) { + return rs.getBigDecimal(1); + } + + return null; + } + + private void rollback(final Connection conn) { + try { + conn.rollback(); + } catch (SQLException ex1) { + System.err.println("Rollback failed."); + ex1.printStackTrace(System.err); + } + } + + private void close(final Connection conn) { + try { + conn.close(); + } catch (SQLException ex) { + System.err.println("Failed to close JDBC connection."); + printStackTrace(ex); + } + } + + private void printStackTrace(final SQLException ex) { + ex.printStackTrace(System.err); + if (ex.getNextException() != null) { + printStackTrace(ex.getNextException()); + } + } + + private class AssocEntry { + + private BigDecimal ownerDraftId; + private BigDecimal memberDraftId; + private BigDecimal ownerPublicId; + private BigDecimal memberPublicId; + private BigDecimal ownerDraftBundleId; + private BigDecimal memberDraftBundleId; + private BigDecimal ownerPublicBundleId; + private BigDecimal memberPublicBundleId; + private Map<String, String> attributes = new HashMap<String, String>(); + + public AssocEntry() { + } + + public BigDecimal getOwnerDraftId() { + return ownerDraftId; + } + + public void setOwnerDraftId(final BigDecimal ownerDraftId) { + this.ownerDraftId = ownerDraftId; + } + + public BigDecimal getMemberDraftId() { + return memberDraftId; + } + + public void setMemberDraftId(final BigDecimal memberDraftId) { + this.memberDraftId = memberDraftId; + } + + public BigDecimal getOwnerPublicId() { + return ownerPublicId; + } + + public void setOwnerPublicId(final BigDecimal ownerPublicId) { + this.ownerPublicId = ownerPublicId; + } + + public BigDecimal getMemberPublicId() { + return memberPublicId; + } + + public void setMemberPublicId(final BigDecimal memberPublicId) { + this.memberPublicId = memberPublicId; + } + + public BigDecimal getOwnerDraftBundleId() { + return ownerDraftBundleId; + } + + public void setOwnerDraftBundleId(final BigDecimal ownerDraftBundleId) { + this.ownerDraftBundleId = ownerDraftBundleId; + } + + public BigDecimal getMemberDraftBundleId() { + return memberDraftBundleId; + } + + public void setMemberDraftBundleId(final BigDecimal memberDraftBundleId) { + this.memberDraftBundleId = memberDraftBundleId; + } + + public BigDecimal getMemberPublicBundleId() { + return memberPublicBundleId; + } + + public void setMemberPublicBundleId(BigDecimal memberPublicBundleId) { + this.memberPublicBundleId = memberPublicBundleId; + } + + public BigDecimal getOwnerPublicBundleId() { + return ownerPublicBundleId; + } + + public void setOwnerPublicBundleId(BigDecimal ownerPublicBundleId) { + this.ownerPublicBundleId = ownerPublicBundleId; + } + + public Map<String, String> getAttributes() { + return Collections.unmodifiableMap(attributes); + } + + public void addAttribute(final String name, final String value) { + attributes.put(name, value); + } + + public void setAttributes(final Map<String, String> attributes) { + this.attributes = attributes; + } + + } +} Property changes on: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractAssocUpgrade.java ___________________________________________________________________ Added: svn:keywords + URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id Header Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractBundleUpgrade.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractBundleUpgrade.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractBundleUpgrade.java 2012-05-05 07:15:40 UTC (rev 2311) @@ -0,0 +1,164 @@ +package com.arsdigita.cms.contenttypes.upgrades; + +import com.arsdigita.runtime.RuntimeConfig; +import com.arsdigita.util.cmd.Program; +import com.arsdigita.util.jdbc.Connections; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import org.apache.commons.cli.CommandLine; + +/** + * + * @author Jens Pelzetter + * @version $Id$ + */ +public abstract class AbstractBundleUpgrade extends Program { + + public AbstractBundleUpgrade(final String name, final String version, final String usage) { + super(name, version, usage); + } + + protected abstract String getBundleTableName(); + + protected abstract String getContentItemTableName(); + + protected abstract String getIdColName(); + + protected abstract String getBundleClassName(); + + protected abstract String getPrimaryKeyConstraintName(); + + protected abstract String getBundleContraintName(); + + protected String getSuperBundleTable() { + return "cms_bundles"; + } + + @Override + public void doRun(final CommandLine cmdLine) { + System.out.println("Starting upgrade..."); + + System.out.println("Trying to get JDBC connection..."); + + final Connection conn = Connections.acquire(RuntimeConfig.getConfig(). + getJDBCURL()); + try { + conn.setAutoCommit(false); + } catch (SQLException ex) { + System.err.println("Failed to configure JDBC connection."); + printStackTrace(ex); + close(conn); + return; + } + + try { + System.out.printf("Creating new table %s...\n", getBundleTableName()); + final Statement stmt = conn.createStatement(); + + stmt.addBatch(String.format("CREATE TABLE %s ( " + + "bundle_id integer NOT NULL)", + getBundleTableName())); + + stmt.addBatch(String.format("ALTER TABLE ONLY %s " + + "ADD CONSTRAINT %s " + + "PRIMARY KEY (bundle_id);", + getBundleTableName(), + getPrimaryKeyConstraintName())); + + stmt.addBatch(String.format("ALTER TABLE ONLY %s " + + "ADD CONSTRAINT %s " + + "FOREIGN KEY (bundle_id) " + + "REFERENCES %s(bundle_id);", + getBundleTableName(), + getBundleContraintName(), + getSuperBundleTable())); + + stmt.executeBatch(); + + } catch (SQLException ex) { + System.err.printf("Failed to create table %s.\n", + getBundleTableName()); + printStackTrace(ex); + rollback(conn); + close(conn); + return; + } + + try { + System.out.println("Filling new tables with data..."); + final Statement queryPersonsStmt = conn.createStatement(); + final Statement stmt = conn.createStatement(); + + final ResultSet personsRs = queryPersonsStmt.executeQuery(String.format( + "SELECT parent_id " + + "FROM cms_items " + + "JOIN %s " + + "ON cms_items.item_id = %s.%s", + getBundleTableName(), + getBundleTableName(), + getIdColName())); + + while (personsRs.next()) { + stmt.addBatch(String.format("INSERT INTO %s (bundle_id) " + + "VALUES (%d)", + getBundleClassName(), + personsRs.getInt(1))); + stmt.addBatch(String.format( + "UPDATE acs_objects " + + "SET default_domain_class = '%s'," + + "object_type = '%s' " + + "WHERE object_id = %d", + getBundleClassName(), + getBundleClassName(), + personsRs.getInt(1))); + } + + stmt.executeBatch(); + } catch (SQLException ex) { + System.err.println("Failed to fill tables."); + printStackTrace(ex); + rollback(conn); + close(conn); + return; + } + + try { + conn.commit(); + } catch (SQLException ex) { + System.err.println("Failed to commiting modifications."); + printStackTrace(ex); + rollback(conn); + return; + } + + close(conn); + } + + private void rollback(final Connection conn) { + try { + conn.rollback(); + } catch (SQLException ex1) { + System.err.println("Rollback failed."); + ex1.printStackTrace(System.err); + } + } + + private void close(final Connection conn) { + try { + conn.close(); + } catch (SQLException ex) { + System.err.println("Failed to close JDBC connection."); + printStackTrace(ex); + } + } + + private void printStackTrace(final SQLException ex) { + ex.printStackTrace(System.err); + if (ex.getNextException() != null) { + printStackTrace(ex.getNextException()); + } + } + +} Property changes on: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/AbstractBundleUpgrade.java ___________________________________________________________________ Added: svn:keywords + URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id Header Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreateContactBundles.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreateContactBundles.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreateContactBundles.java 2012-05-05 07:15:40 UTC (rev 2311) @@ -0,0 +1,50 @@ +package com.arsdigita.cms.contenttypes.upgrades; + +import com.arsdigita.cms.contenttypes.GenericContactBundle; + +/** + * + * @author Jens Pelzetter + * @version $Id$ + */ +public class CreateContactBundles extends AbstractBundleUpgrade { + + public CreateContactBundles() { + super("CreateContactBundles", "1.0.0", ""); + } + + public static void main(final String args[]) { + new CreateContactBundles().run(args); + } + + @Override + protected String getBundleTableName() { + return "cms_contact_bundles"; + } + + @Override + protected String getContentItemTableName() { + return "cms_contacts"; + } + + @Override + protected String getIdColName() { + return "contact_id"; + } + + @Override + protected String getBundleClassName() { + return GenericContactBundle.class.getName(); + } + + @Override + protected String getPrimaryKeyConstraintName() { + return "cms_cont_bundl_bund_id_p_2p6vp"; + } + + @Override + protected String getBundleContraintName() { + return "cms_cont_bundl_bund_id_f_m8aga"; + } + +} Property changes on: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreateContactBundles.java ___________________________________________________________________ Added: svn:keywords + URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id Header Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreateOrgaUnitBundles.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreateOrgaUnitBundles.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreateOrgaUnitBundles.java 2012-05-05 07:15:40 UTC (rev 2311) @@ -0,0 +1,50 @@ +package com.arsdigita.cms.contenttypes.upgrades; + +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitBundle; + +/** + * + * @author Jens Pelzetter + * @version $Id$ + */ +public class CreateOrgaUnitBundles extends AbstractBundleUpgrade { + + public CreateOrgaUnitBundles() { + super("CreateOrgaUnitBundles", "1.0.0", ""); + } + + public static void main(final String args[]) { + new CreateOrgaUnitBundles().run(args); + } + + @Override + protected String getBundleTableName() { + return "cms_orgaunit_bundles"; + } + + @Override + protected String getContentItemTableName() { + return "cms_organizationalunits"; + } + + @Override + protected String getIdColName() { + return "organizationalunit_id"; + } + + @Override + protected String getBundleClassName() { + return GenericOrganizationalUnitBundle.class.getName(); + } + + @Override + protected String getPrimaryKeyConstraintName() { + return "cms_orgau_bund_bund_id_p_cfjhf"; + } + + @Override + protected String getBundleContraintName() { + return "cms_org_con_map_org_id_f_vdrnx"; + } + +} Property changes on: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreateOrgaUnitBundles.java ___________________________________________________________________ Added: svn:keywords + URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id Header Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreatePersonBundles.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreatePersonBundles.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreatePersonBundles.java 2012-05-05 07:15:40 UTC (rev 2311) @@ -0,0 +1,51 @@ +package com.arsdigita.cms.contenttypes.upgrades; + +import com.arsdigita.cms.contenttypes.GenericPersonBundle; + +/** + * Creates new table {@code cms_person_bundles}. Part of upgrade from 6.6.4 to 6.6.5 + * + * @author Jens Pelzetter + * @version $Id$ + */ +public class CreatePersonBundles extends AbstractBundleUpgrade { + + public CreatePersonBundles() { + super("CreatePersonBundles", "1.0.0", ""); + } + + public static void main(final String args[]) { + new CreatePersonBundles().run(args); + } + + @Override + protected String getBundleTableName() { + return "cms_person_bundles"; + } + + @Override + protected String getContentItemTableName() { + return "cms_persons"; + } + + @Override + protected String getIdColName() { + return "person_id"; + } + + @Override + protected String getBundleClassName() { + return GenericPersonBundle.class.getName(); + } + + @Override + protected String getPrimaryKeyConstraintName() { + return "cms_pers_bundl_bund_id_p_7xuzi"; + } + + @Override + protected String getBundleContraintName() { + return "cms_pers_bundl_bund_id_f__rzge"; + } + +} Property changes on: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/CreatePersonBundles.java ___________________________________________________________________ Added: svn:keywords + URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id Header Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericContactGenericPersonAssocUpgrade.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericContactGenericPersonAssocUpgrade.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericContactGenericPersonAssocUpgrade.java 2012-05-05 07:15:40 UTC (rev 2311) @@ -0,0 +1,71 @@ +package com.arsdigita.cms.contenttypes.upgrades; + +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author Jens Pelzetter + * @version $Id$ + */ +public class GenericContactGenericPersonAssocUpgrade extends AbstractAssocUpgrade { + + public GenericContactGenericPersonAssocUpgrade() { + super("GenericContactGenericPersonAssocUpgrade", "1.0.0", ""); + } + + public static void main(final String[] args) { + new GenericContactGenericPersonAssocUpgrade().run(args); + } + + @Override + protected String getTableName() { + return "cms_person_contact_map"; + } + + @Override + protected String getOwnerIdCol() { + return "person_id"; + } + + @Override + protected String getMemberIdCol() { + return "contact_id"; + } + + @Override + protected Map<String, String> getAttributes() { + final Map<String, String> attributes = new HashMap<String, String>(); + attributes.put("link_order", "integer"); + attributes.put("link_key", "character varying(100)"); + return attributes; + } + + @Override + protected String getPrimaryKeyConstraintName() { + return "cms_per_con_map_con_id_p_g1cii"; + } + + @Override + protected String getOwnerConstraintName() { + return "cms_per_con_map_per_id_f_g82jn"; + } + + @Override + protected String getMemberConstraintName() { + return "cms_per_con_map_con_id_f_peoc2"; + } + + @Override + protected String getOwnerTableName() { + return "cms_person_bundles"; + } + + @Override + protected String getMemberTableName() { + return "cms_contact_bundles"; + } + + + +} Property changes on: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericContactGenericPersonAssocUpgrade.java ___________________________________________________________________ Added: svn:keywords + URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id Header Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericContactAssocUpgrade.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericContactAssocUpgrade.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericContactAssocUpgrade.java 2012-05-05 07:15:40 UTC (rev 2311) @@ -0,0 +1,71 @@ +package com.arsdigita.cms.contenttypes.upgrades; + +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author Jens Pelzetter + * @version $Id$ + */ +public class GenericOrgaUnitGenericContactAssocUpgrade extends AbstractAssocUpgrade { + + public GenericOrgaUnitGenericContactAssocUpgrade() { + super("GenericOrgaUnitGenericContactAssocUpgrade", "1.0.0", ""); + } + + public static void main(final String args[]) { + new GenericOrgaUnitGenericContactAssocUpgrade().run(args); + } + + @Override + protected String getTableName() { + return "cms_organizationalunits_contact_map"; + } + + @Override + protected String getOwnerIdCol() { + return "organizationalunit_id"; + } + + @Override + protected String getMemberIdCol() { + return "contact_id"; + } + + @Override + protected Map<String, String> getAttributes() { + final Map<String, String> attributes = new HashMap<String, String>(); + attributes.put("contact_type", "character varying(100)"); + attributes.put("map_order", "integer"); + return attributes; + } + + @Override + protected String getPrimaryKeyConstraintName() { + return "cms_org_con_map_con_id_p_1rc4y"; + } + + @Override + protected String getOwnerConstraintName() { + return "cms_org_con_map_org_id_f_vdrnx"; + } + + @Override + protected String getMemberConstraintName() { + return "cms_org_con_map_con_id_f_9tm3c"; + } + + @Override + protected String getOwnerTableName() { + return "cms_orgaunit_bundles"; + } + + @Override + protected String getMemberTableName() { + return "cms_contact_bundles"; + } + + + +} Property changes on: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericContactAssocUpgrade.java ___________________________________________________________________ Added: svn:keywords + URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id Header Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericOrgaUnitAssocUpgrade.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericOrgaUnitAssocUpgrade.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericOrgaUnitAssocUpgrade.java 2012-05-05 07:15:40 UTC (rev 2311) @@ -0,0 +1,70 @@ +package com.arsdigita.cms.contenttypes.upgrades; + +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author Jens Pelzetter + * @version $Id$ + */ +public class GenericOrgaUnitGenericOrgaUnitAssocUpgrade extends AbstractAssocUpgrade { + + public GenericOrgaUnitGenericOrgaUnitAssocUpgrade() { + super("GenericOrgaUnitGenericOrgaUnitAssocUpgrade", "1.0.0", ""); + } + + public static void main(final String args[]) { + new GenericOrgaUnitGenericOrgaUnitAssocUpgrade().run(args); + } + + @Override + protected String getTableName() { + return "cms_organizationalunits_hierarchy_map"; + } + + @Override + protected String getOwnerIdCol() { + return "superior_orgaunit_id"; + } + + @Override + protected String getMemberIdCol() { + return "subordinate_orgaunit_id"; + } + + @Override + protected Map<String, String> getAttributes() { + final Map<String, String> attributes = new HashMap<String, String>(); + attributes.put("assoc_type", "character varying(128)"); + attributes.put("superior_orgaunit_order", "integer"); + attributes.put("subordinate_orgaunit_order", "integer"); + return attributes; + } + + @Override + protected String getPrimaryKeyConstraintName() { + return "cms_org_hie_map_sub_or_p_nykpq"; + } + + @Override + protected String getOwnerConstraintName() { + return "cms_org_hie_map_sup_or_f_qchkn"; + } + + @Override + protected String getMemberConstraintName() { + return "cms_org_hie_map_sub_or_f_xq5is"; + } + + @Override + protected String getOwnerTableName() { + return "cms_orgaunit_bundles"; + } + + @Override + protected String getMemberTableName() { + return "cms_orgaunit_bundles"; + } + +} Property changes on: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericOrgaUnitAssocUpgrade.java ___________________________________________________________________ Added: svn:keywords + URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id Header Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericPersonAssocUpgrade.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericPersonAssocUpgrade.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/upgrades/GenericOrgaUnitGenericPersonAssocUpgrade.java 2012-05-05 07:15:40 UTC (rev 2311) @@ -0,0 +1,69 @@ +package com.arsdigita.cms.contenttypes.upgrades; + +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author Jens Pelzetter + * @version $Id$ + */ +public class GenericOrgaUnitGenericPersonAssocUpgrade extends AbstractAssocUpgrade { + + public GenericOrgaUnitGenericPersonAssocUpgrade() { + super("GenericOrgaUnitGenericPersonAssocUpgrade", "1.0.0", ""); + } + + public static void main(final String args[]) { + new GenericContactGenericPersonAssocUpgrade().run(args); + } + + @Override + protected String getTableName() { + return "cms_organizationalunits_person_map"; + } + + @O... [truncated message content] |
From: <pb...@fe...> - 2012-05-05 07:13:43
|
Author: pboy Date: 2012-05-05 07:13:29 +0000 (Sat, 05 May 2012) New Revision: 2310 Added: trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/default/ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/default/6.6.0-6.6.1/ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/default/6.6.0-6.6.1/ren_esdservice_table.sql trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/default/6.6.0-6.6.1/upd_system_tables.sql trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/oracle-se-6.6.0-6.6.1.sql trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/postgres-6.6.0-6.6.1.sql Modified: trunk/ccm-ldn-types-esdservice/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/ESDService.xml Log: Added missing upgrade script ccm-ldn-types-esdservice. Added: trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/default/6.6.0-6.6.1/ren_esdservice_table.sql =================================================================== --- trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/default/6.6.0-6.6.1/ren_esdservice_table.sql (rev 0) +++ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/default/6.6.0-6.6.1/ren_esdservice_table.sql 2012-05-05 07:13:29 UTC (rev 2310) @@ -0,0 +1,41 @@ +-- +-- 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 +-- +-- $Id: ren_esdservice_table.sql pboy $ + +-- rename ct_esdservice table to ct_ldn_esdservice table following +-- ccm naming conventions to make maintenance tasks easier + + +-- if we could figure out the old names we could rename constraints too +-- alter table ct_esdservice drop constraint ... ; +-- alter table ct_esdservice drop constraint ... ; +-- alter table ct_esdservice drop constraint ... ; + +alter table ct_esdservice RENAME TO ct_ldn_esdservice ; + +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_serv_id_p_5dac0 PRIMARY KEY(service_id); +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_cont_id_f_r4d1z FOREIGN KEY (contact_id) +-- references ct_ldn_contacts (contact_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_serv_id_f_tfkqn FOREIGN KEY (service_id) +-- references cms_articles (article_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + Added: trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/default/6.6.0-6.6.1/upd_system_tables.sql =================================================================== --- trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/default/6.6.0-6.6.1/upd_system_tables.sql (rev 0) +++ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/default/6.6.0-6.6.1/upd_system_tables.sql 2012-05-05 07:13:29 UTC (rev 2310) @@ -0,0 +1,90 @@ +-- +-- 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 +-- +-- $Id: upd_system_tables.sql pboy $ + +-- rename ccm-cms-types-contact to ccm-ldn-types-contact +-- adjust various system tables to the new name of content type + +alter table init_requirements drop constraint init_requirements_init_f_cmmdn ; +alter table init_requirements drop constraint init_require_requ_init_f_i6rgg ; + +update inits + set class_name='com.arsdigita.london.contenttypes.ESDServiceInitializer' + where class_name='com.arsdigita.cms.contenttypes.ESDServiceInitializer' ; + +update init_requirements + set init='com.arsdigita.london.contenttypes.ESDServiceInitializer' + where init='com.arsdigita.cms.contenttypes.ESDServiceInitializer' ; + +ALTER TABLE init_requirements + ADD CONSTRAINT init_requirements_init_f_cmmdn FOREIGN KEY (init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; +ALTER TABLE init_requirements + ADD CONSTRAINT init_require_requ_init_f_i6rgg FOREIGN KEY (required_init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; + + +update content_types + set object_type='com.arsdigita.london.contenttypes.ESDService', + label='ESD Service', + description='An ESDService', + classname='com.arsdigita.london.contenttypes.ESDService' + where classname='com.arsdigita.cms.contenttypes.ESDService' ; + +update authoring_steps + set label_key='ESD Service Properties', + label_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + description_key='Edit the basic ESDService properties', + description_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + component='com.arsdigita.london.contenttypes.ui.ESDServicePropertiesStep' + where component='com.arsdigita.cms.contenttypes.ui.ESDServicePropertiesStep' ; + +update authoring_steps + set label_key='ESD Service Contact', + label_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + description_key='Edit/Choose the associated Contact object', + description_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + component='com.arsdigita.london.contenttypes.ui.ESDServiceChooseContactStep' + where component='com.arsdigita.cms.contenttypes.ui.ESDServiceChooseContactStep' ; + + + +update acs_objects + set (object_type,default_domain_class) = + ('com.arsdigita.london.contenttypes.ESDService' , + 'com.arsdigita.london.contenttypes.ESDService' ) + where default_domain_class like 'com.arsdigita.cms.contenttypes.ESDService' ; + +update lucene_docs + set type='com.arsdigita.london.contenttypes.ESDService' + where type='com.arsdigita.cms.contenttypes.ESDService' ; + +update vcx_generic_operations + set value=replace(value,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where value like '%cms.contenttypes.ESDService%'; + +update vcx_obj_changes + set obj_id=replace(obj_id,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where obj_id like '%cms.contenttypes.ESDService%'; + +update vcx_tags + set tagged_oid=replace(tagged_oid,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where tagged_oid like '%cms.contenttypes.ESDService%'; + Added: trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/oracle-se-6.6.0-6.6.1.sql =================================================================== --- trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/oracle-se-6.6.0-6.6.1.sql (rev 0) +++ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/oracle-se-6.6.0-6.6.1.sql 2012-05-05 07:13:29 UTC (rev 2310) @@ -0,0 +1,21 @@ +-- +-- 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 +-- +-- $Id: oracle-se-6.6.0-6.6.1.sql pboy $ + +@@ default/6.6.0-6.6.1/ren_esdservice_table.sql +@@ default/6.6.0-6.6.1/upd_system_tables.sql Added: trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/postgres-6.6.0-6.6.1.sql =================================================================== --- trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/postgres-6.6.0-6.6.1.sql (rev 0) +++ trunk/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/update/postgres-6.6.0-6.6.1.sql 2012-05-05 07:13:29 UTC (rev 2310) @@ -0,0 +1,27 @@ +-- +-- 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 +-- +-- $Id: postgres-6.6.0-6.6.1.sql pboy $ + +\echo APLAWS ldn esdservice 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL) + +begin; + +\i default/6.6.0-6.6.1/ren_esdservice_table.sql +\i default/6.6.0-6.6.1/upd_system_tables.sql + +commit; Modified: trunk/ccm-ldn-types-esdservice/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/ESDService.xml =================================================================== --- trunk/ccm-ldn-types-esdservice/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/ESDService.xml 2012-05-05 07:13:05 UTC (rev 2309) +++ trunk/ccm-ldn-types-esdservice/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/ESDService.xml 2012-05-05 07:13:29 UTC (rev 2310) @@ -4,21 +4,21 @@ xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> <ctd:content-type - label="ESDService" + label="ESD Service" description="An ESDService for Tamaside" objectType="com.arsdigita.london.contenttypes.ESDService" classname="com.arsdigita.london.contenttypes.ESDService"> <ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate"> <ctd:authoring-step - label="ESDService Properties" + label="ESD Service Properties" description="Edit the basic ESDService properties" component="com.arsdigita.london.contenttypes.ui.ESDServicePropertiesStep"/> <ctd:include href="/WEB-INF/content-types/edit-body-text-step.xml"/> <ctd:authoring-step - label="Service Contact" + label="ESD Service Contact" description="Edit/Choose the associated Contact object" component="com.arsdigita.london.contenttypes.ui.ESDServiceChooseContactStep"/> |
Author: pboy Date: 2012-05-05 07:13:05 +0000 (Sat, 05 May 2012) New Revision: 2309 Added: trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/ren_contact_tables.sql trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql Modified: trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/oracle-se-6.6.0-6.6.1.sql trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/postgres-6.6.0-6.6.1.sql trunk/ccm-ldn-types-contact/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Contact.xml trunk/ccm-ldn-types-contact/src/ccm-ldn-types-contact.upgrade Log: Added missing upgrade script ccm-ldn-types-contact. Added: trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/ren_contact_tables.sql =================================================================== --- trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/ren_contact_tables.sql (rev 0) +++ trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/ren_contact_tables.sql 2012-05-05 07:13:05 UTC (rev 2309) @@ -0,0 +1,94 @@ +-- +-- 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 +-- +-- $Id: ren_domainprovider_table.sql pboy $ + +-- rename ct_contact_* tables to ct_ldn_contact_* tables following +-- ccm naming conventions to make maintenance tasks easier + + +-- if we could figure out the old names we could rename constraints too +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contacts RENAME TO ct_ldn_contacts ; + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contact_address RENAME TO ct_ldn_contact_address ; + +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_p_y5yhy PRIMARY KEY (address_id) ; +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_f_bfcho FOREIGN KEY (address_id) +-- REFERENCES cms_items (item_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contact_phones RENAME TO ct_ldn_contact_phones ; + +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_p_y5yhy PRIMARY KEY (address_id) ; +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_f_bfcho FOREIGN KEY (address_id) +-- REFERENCES cms_items (item_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contact_types RENAME TO ct_ldn_contact_types ; + +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_p_y5yhy PRIMARY KEY (address_id) ; +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_f_bfcho FOREIGN KEY (address_id) +-- REFERENCES cms_items (item_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + + +alter table contact_content_item_map drop constraint cont_con_ite_map_ite_i_p_scqe9 ; +alter table contact_content_item_map drop constraint cont_con_ite_map_con_i_f_lanid ; +alter table contact_content_item_map drop constraint cont_con_ite_map_ite_i_f_fr0po ; + +alter table contact_content_item_map RENAME TO ct_ldn_contact_content_item_map ; + +alter table ct_ldn_contact_content_item_map + add constraint ct_ldn_con_con_ite_map_p_nannu PRIMARY KEY(item_id) ; +alter table ct_ldn_contact_content_item_map + add constraint ct_ldn_con_con_ite_map_f_g9mgi foreign key (contact_id) + references ct_ldn_contacts (contact_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; +alter table ct_ldn_contact_content_item_map + add constraint ct_ldn_con_con_ite_map_f_a0qiy foreign key (item_id) + references cms_items(item_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; + Added: trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql =================================================================== --- trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql (rev 0) +++ trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql 2012-05-05 07:13:05 UTC (rev 2309) @@ -0,0 +1,97 @@ +-- +-- 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 +-- +-- $Id: upd_system_tables.sql pboy $ + +-- rename ccm-cms-types-contact to ccm-ldn-types-contact +-- adjust various system tables to the new name of content type + +alter table init_requirements drop constraint init_requirements_init_f_cmmdn ; +alter table init_requirements drop constraint init_require_requ_init_f_i6rgg ; + +update inits + set class_name='com.arsdigita.london.contenttypes.ContactInitializer' + where class_name='com.arsdigita.cms.contenttypes.ContactInitializer' ; + +update init_requirements + set init='com.arsdigita.london.contenttypes.ContactInitializer' + where init='com.arsdigita.cms.contenttypes.ContactInitializer' ; + +ALTER TABLE init_requirements + ADD CONSTRAINT init_requirements_init_f_cmmdn FOREIGN KEY (init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; +ALTER TABLE init_requirements + ADD CONSTRAINT init_require_requ_init_f_i6rgg FOREIGN KEY (required_init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; + + +update content_types + set object_type='com.arsdigita.london.contenttypes.Contact', + label='LDN Contact', + description='A London Contact person in CMS', + classname='com.arsdigita.london.contenttypes.Contact' + where classname='com.arsdigita.cms.contenttypes.Contact' ; + +update authoring_steps + set label_key='Contact Properties', + label_bundle='com.arsdigita.london.contenttypes.ContactResources', + description_key='Edit the basic contact properties', + description_bundle='com.arsdigita.london.contenttypes.ContactResources', + component='com.arsdigita.london.contenttypes.ui.ContactPropertiesStep' + where component='com.arsdigita.cms.contenttypes.ui.ContactPropertiesStep' ; + +update authoring_steps + set label_key='Contact Address Properties', + label_bundle='com.arsdigita.london.contenttypes.ContactResources', + description_key='Edit the Address associated with contact', + description_bundle='com.arsdigita.london.contenttypes.ContactResources', + component='com.arsdigita.london.contenttypes.ui.ContactAddressProperties' + where component='com.arsdigita.cms.contenttypes.ui.ContactAddressProperties' ; + +update authoring_steps + set label_key='Contact Phones Properties', + label_bundle='com.arsdigita.london.contenttypes.ContactResources', + description_key='Edit the Phones associated with contact', + description_bundle='com.arsdigita.london.contenttypes.ContactResources', + component='com.arsdigita.london.contenttypes.ui.ContactPhonesPanel' + where component='com.arsdigita.cms.contenttypes.ui.ContactPhonesPanel' ; + + +update acs_objects + set (object_type,default_domain_class) = + ('com.arsdigita.london.contenttypes.Contact' , + 'com.arsdigita.london.contenttypes.Contact' ) + where default_domain_class like 'com.arsdigita.cms.contenttypes.Contact' ; + +update lucene_docs + set type='com.arsdigita.london.contenttypes.Contact' + where type='com.arsdigita.cms.contenttypes.Contact' ; + +update vcx_generic_operations + set value=replace(value,'cms.contenttypes.Contact', 'london.contenttypes.Contact') + where value like '%cms.contenttypes.Contact%'; + +update vcx_obj_changes + set obj_id=replace(obj_id,'cms.contenttypes.Contact', 'london.contenttypes.Contact') + where obj_id like '%cms.contenttypes.Contact%'; + +update vcx_tags + set tagged_oid=replace(tagged_oid,'cms.contenttypes.Contact', 'london.contenttypes.Contact') + where tagged_oid like '%cms.contenttypes.Contact%'; + Modified: trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/oracle-se-6.6.0-6.6.1.sql =================================================================== --- trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/oracle-se-6.6.0-6.6.1.sql 2012-05-05 07:12:16 UTC (rev 2308) +++ trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/oracle-se-6.6.0-6.6.1.sql 2012-05-05 07:13:05 UTC (rev 2309) @@ -1,5 +1,5 @@ -- --- Copyright (C) 2007 Magpie. All Rights Reserved. +-- 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 @@ -15,5 +15,7 @@ -- 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 pboy $ -@@ default/6.5.0-6.5.1/contact_content_item_map_table.sql \ No newline at end of file +@@ default/6.6.0-6.6.1/ren_contact_tables.sql +@@ default/6.6.0-6.6.1/upd_system_tables.sql Modified: trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/postgres-6.6.0-6.6.1.sql =================================================================== --- trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/postgres-6.6.0-6.6.1.sql 2012-05-05 07:12:16 UTC (rev 2308) +++ trunk/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/postgres-6.6.0-6.6.1.sql 2012-05-05 07:13:05 UTC (rev 2309) @@ -1,21 +1,27 @@ -- --- Copyright (C) 2007 Magpie. All Rights Reserved. +-- Copyright (C) 2012 Peter Boy All Rights Reserved. -- --- The contents of this file are subject to the CCM Public --- License (the "License"); you may not use this file except in --- compliance with the License. You may obtain a copy of the --- License at http://www.redhat.com/licenses/ccmpl.html. +-- 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. -- --- Software distributed under the License is distributed on an --- "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express --- or implied. See the License for the specific language governing --- rights and limitations under the License. +-- 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: postgres-6.6.0-6.6.1.sql pboy $ -\echo Red Hat Enterprise CMS 6.5.0 -> 6.5.1 Upgrade Script (PostgreSQL) +\echo APLAWS ldn contact 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL) begin; -\i default/6.5.0-6.5.1/contact_content_item_map_table.sql +\i default/6.6.0-6.6.1/ren_contact_tables.sql +\i default/6.6.0-6.6.1/upd_system_tables.sql commit; Modified: trunk/ccm-ldn-types-contact/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Contact.xml =================================================================== --- trunk/ccm-ldn-types-contact/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Contact.xml 2012-05-05 07:12:16 UTC (rev 2308) +++ trunk/ccm-ldn-types-contact/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Contact.xml 2012-05-05 07:13:05 UTC (rev 2309) @@ -4,30 +4,30 @@ xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> <ctd:content-type - label="LDN Contact" + label="LDN Contact" description="A London Contact person in CMS" - objectType="com.arsdigita.london.contenttypes.Contact" - classname="com.arsdigita.london.contenttypes.Contact"> + objectType="com.arsdigita.london.contenttypes.Contact" + classname="com.arsdigita.london.contenttypes.Contact"> <ctd:authoring-kit createComponent="com.arsdigita.london.contenttypes.ui.ContactCreate"> <ctd:authoring-step - label="Contact Properties" - description="Edit the basic contact properties" - descriptionBundle="com.arsdigita.cms.contenttypes.ContactResources" - component="com.arsdigita.london.contenttypes.ui.ContactPropertiesStep"/> + label="Contact Properties" + description="Edit the basic contact properties" + descriptionBundle="com.arsdigita.london.contenttypes.ContactResources" + component="com.arsdigita.london.contenttypes.ui.ContactPropertiesStep"/> <ctd:authoring-step - label="Contact Address Properties" - description="Edit the basic contact properties" + label="Contact Address Properties" + description="Edit the basic contact properties" descriptionBundle="com.arsdigita.london.contenttypes.ContactResources" - component="com.arsdigita.london.contenttypes.ui.ContactAddressProperties"/> + component="com.arsdigita.london.contenttypes.ui.ContactAddressProperties"/> <ctd:authoring-step - label="Contact Phones" - description="Edit the Phones associated with contact" + label="Contact Phones" + description="Edit the Phones associated with contact" descriptionBundle="com.arsdigita.london.contenttypes.ContactResources" - component="com.arsdigita.london.contenttypes.ui.ContactPhonesPanel"/> + component="com.arsdigita.london.contenttypes.ui.ContactPhonesPanel"/> </ctd:authoring-kit> </ctd:content-type> Modified: trunk/ccm-ldn-types-contact/src/ccm-ldn-types-contact.upgrade =================================================================== --- trunk/ccm-ldn-types-contact/src/ccm-ldn-types-contact.upgrade 2012-05-05 07:12:16 UTC (rev 2308) +++ trunk/ccm-ldn-types-contact/src/ccm-ldn-types-contact.upgrade 2012-05-05 07:13:05 UTC (rev 2309) @@ -2,4 +2,7 @@ <version from="6.5.0" to="6.5.1"> <script sql="ccm-ldn-types-contact/upgrade/::database::-6.5.0-6.5.1.sql"/> </version> + <version from="6.6.0" to="6.6.1"> + <script sql="ccm-ldn-types-contact/upgrade/::database::-6.6.0-6.6.1.sql"/> + </version> </upgrade> \ No newline at end of file |
From: <pb...@fe...> - 2012-05-05 07:12:27
|
Author: pboy Date: 2012-05-05 07:12:16 +0000 (Sat, 05 May 2012) New Revision: 2308 Modified: trunk/ccm-atoz/application.xml trunk/ccm-atoz/pdl/com/arsdigita/atoz/AtoZ.pdl trunk/ccm-atoz/sql/ccm-atoz/upgrade/default/6.6.1-6.6.2/drop_app_table.sql trunk/ccm-atoz/sql/ccm-atoz/upgrade/oracle-se-6.6.1-6.6.2.sql trunk/ccm-atoz/sql/ccm-atoz/upgrade/postgres-6.6.1-6.6.2.sql Log: Fixed upgrade script atoz. Modified: trunk/ccm-atoz/application.xml =================================================================== --- trunk/ccm-atoz/application.xml 2012-05-01 14:21:42 UTC (rev 2307) +++ trunk/ccm-atoz/application.xml 2012-05-05 07:12:16 UTC (rev 2308) @@ -11,7 +11,6 @@ <ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/> <ccm:requires name="ccm-navigation" version="6.6.0" relation="ge"/> <ccm:requires name="ccm-subsite" version="6.6.0" relation="ge"/> - <!-- <ccm:requires name="ccm-ldn-aplaws" version="6.6.0" relation="ge"/> --> <ccm:requires name="ccm-ldn-terms" version="6.6.0" relation="ge"/> <ccm:requires name="ccm-ldn-util" version="6.6.0" relation="ge"/> <!-- Modified: trunk/ccm-atoz/pdl/com/arsdigita/atoz/AtoZ.pdl =================================================================== --- trunk/ccm-atoz/pdl/com/arsdigita/atoz/AtoZ.pdl 2012-05-01 14:21:42 UTC (rev 2307) +++ trunk/ccm-atoz/pdl/com/arsdigita/atoz/AtoZ.pdl 2012-05-05 07:12:16 UTC (rev 2308) @@ -19,9 +19,8 @@ import com.arsdigita.web.Application; +// In contrast to other applications atoz_app is needed here and used in +// associations, e.g. AtoZProvider. object type AtoZ extends Application { - // Nothing to persist yet - // there is only one instance of AtoZ and - // no instance specific settings about to be persisted. - // reference key (atoz_app.application_id); + reference key (atoz_app.application_id); } Modified: trunk/ccm-atoz/sql/ccm-atoz/upgrade/default/6.6.1-6.6.2/drop_app_table.sql =================================================================== --- trunk/ccm-atoz/sql/ccm-atoz/upgrade/default/6.6.1-6.6.2/drop_app_table.sql 2012-05-01 14:21:42 UTC (rev 2307) +++ trunk/ccm-atoz/sql/ccm-atoz/upgrade/default/6.6.1-6.6.2/drop_app_table.sql 2012-05-05 07:12:16 UTC (rev 2308) @@ -17,7 +17,6 @@ -- -- $Id: drop_app_table.sql pboy $ --- drops table atoz_app which just contained application type id and is --- never used for any action. +-- Don't do it! Application table is required with this package. -drop table atoz_app ; +-- drop table atoz_app ; Modified: trunk/ccm-atoz/sql/ccm-atoz/upgrade/oracle-se-6.6.1-6.6.2.sql =================================================================== --- trunk/ccm-atoz/sql/ccm-atoz/upgrade/oracle-se-6.6.1-6.6.2.sql 2012-05-01 14:21:42 UTC (rev 2307) +++ trunk/ccm-atoz/sql/ccm-atoz/upgrade/oracle-se-6.6.1-6.6.2.sql 2012-05-05 07:12:16 UTC (rev 2308) @@ -23,6 +23,5 @@ -- NOTE: Order is significant @@ default/6.6.1-6.6.2/upd_system_tables.sql -@@ default/6.6.1-6.6.2/drop_app_table.sql @@ default/6.6.1-6.6.2/ren_domainprovider_table.sql Modified: trunk/ccm-atoz/sql/ccm-atoz/upgrade/postgres-6.6.1-6.6.2.sql =================================================================== --- trunk/ccm-atoz/sql/ccm-atoz/upgrade/postgres-6.6.1-6.6.2.sql 2012-05-01 14:21:42 UTC (rev 2307) +++ trunk/ccm-atoz/sql/ccm-atoz/upgrade/postgres-6.6.1-6.6.2.sql 2012-05-05 07:12:16 UTC (rev 2308) @@ -26,7 +26,6 @@ -- NOTE: Order is significant \i default/6.6.1-6.6.2/upd_system_tables.sql -\i default/6.6.1-6.6.2/drop_app_table.sql \i default/6.6.1-6.6.2/ren_domainprovider_table.sql commit; |