Index: modules/org.opencms.workplace.administration/resources/manifest.xml =================================================================== RCS file: /usr/local/cvs/opencms/modules/org.opencms.workplace.administration/resources/manifest.xml,v retrieving revision 1.43 diff -u -r1.43 manifest.xml --- modules/org.opencms.workplace.administration/resources/manifest.xml 18 Jan 2010 10:04:29 -0000 1.43 +++ modules/org.opencms.workplace.administration/resources/manifest.xml 28 Jan 2010 11:50:55 -0000 @@ -16,7 +16,7 @@ This module contains the base components for the administration view.

Its allows you to install and/or develop administration tools for OpenCms 7.

(c) 2010 by Alkacon Software GmbH (http://www.alkacon.com).

]]>
- 7.5.1 + 7.5.2 Mon, 27 Jun 2005 08:00:00 GMT Index: modules/org.opencms.editors/resources/manifest.xml =================================================================== RCS file: /usr/local/cvs/opencms/modules/org.opencms.editors/resources/manifest.xml,v retrieving revision 1.44 diff -u -r1.44 manifest.xml --- modules/org.opencms.editors/resources/manifest.xml 3 Jul 2009 10:36:01 -0000 1.44 +++ modules/org.opencms.editors/resources/manifest.xml 28 Jan 2010 11:50:55 -0000 @@ -16,7 +16,7 @@ This module contains the OpenCms Common Editing tools.

This module is needed to be able to edit files in the OpenCms Workplace.

(c) 2007 by Alkacon Software GmbH (http://www.alkacon.com).

]]>
- 7.5.1 + 7.5.2.1 Mon, 27 Jun 2005 08:00:00 GMT Index: src/org/opencms/workplace/CmsWorkplace.java =================================================================== RCS file: /usr/local/cvs/opencms/src/org/opencms/workplace/CmsWorkplace.java,v retrieving revision 1.180 diff -u -r1.180 CmsWorkplace.java --- src/org/opencms/workplace/CmsWorkplace.java 18 Jan 2010 10:03:36 -0000 1.180 +++ src/org/opencms/workplace/CmsWorkplace.java 28 Jan 2010 11:50:55 -0000 @@ -748,7 +748,7 @@ String anchorStart = " don't jump to the Top of the page. } result.append(""); Index: src/org/opencms/workplace/CmsWidgetDialog.java =================================================================== RCS file: /usr/local/cvs/opencms/src/org/opencms/workplace/CmsWidgetDialog.java,v retrieving revision 1.73 diff -u -r1.73 CmsWidgetDialog.java --- src/org/opencms/workplace/CmsWidgetDialog.java 18 Jan 2010 10:03:37 -0000 1.73 +++ src/org/opencms/workplace/CmsWidgetDialog.java 28 Jan 2010 11:50:55 -0000 @@ -238,7 +238,7 @@ href.append(elementName); href.append("', "); href.append(insertAfter); - href.append(");"); + href.append(",[]);"); return button(href.toString(), null, "new.png", Messages.GUI_DIALOG_BUTTON_ADDNEW_0, 0); } else { return ""; Index: build.xml =================================================================== RCS file: /usr/local/cvs/opencms/build.xml,v retrieving revision 1.225 diff -u -r1.225 build.xml --- build.xml 19 Jan 2010 10:39:16 -0000 1.225 +++ build.xml 28 Jan 2010 11:50:55 -0000 @@ -1,8 +1,8 @@ - + - + @@ -54,6 +54,8 @@ + + @@ -64,6 +66,13 @@ + + + + + + + @@ -212,6 +221,13 @@ includes="org/opencms/**" > + + + + + + + @@ -342,7 +358,17 @@ - + + + + + + @@ -436,7 +462,7 @@ - + @@ -523,7 +549,6 @@ - @@ -561,7 +586,14 @@ jarfile="${opencms.output.jars}/opencms-setup.jar" basedir="${opencms.output}/build/setup" includes="org/opencms/**" /> - + + + + + + + + @@ -658,6 +690,184 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: src/org/opencms/workplace/list/CmsListResourceTypeIconAction.java =================================================================== RCS file: /usr/local/cvs/opencms/src/org/opencms/workplace/list/CmsListResourceTypeIconAction.java,v retrieving revision 1.8 diff -u -r1.8 CmsListResourceTypeIconAction.java --- src/org/opencms/workplace/list/CmsListResourceTypeIconAction.java 18 Jan 2010 10:02:15 -0000 1.8 +++ src/org/opencms/workplace/list/CmsListResourceTypeIconAction.java 28 Jan 2010 11:50:55 -0000 @@ -31,7 +31,9 @@ package org.opencms.workplace.list; +import org.apache.commons.logging.Log; import org.opencms.i18n.CmsMessageContainer; +import org.opencms.main.CmsLog; import org.opencms.main.OpenCms; import org.opencms.util.CmsStringUtil; import org.opencms.workplace.CmsWorkplace; @@ -49,6 +51,9 @@ */ public class CmsListResourceTypeIconAction extends CmsListExplorerDirectAction { + /** The log object for this class. */ + private static final Log LOG = CmsLog.getLog(CmsListResourceTypeIconAction.class); + /** * Default Constructor.

* @@ -148,7 +153,7 @@ html.append(name); html.append("'"); html.append(" style='display: block; width: 20px; height: 20px;'>"); - if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(iconPath)) { + if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(iconPath) && hasFileExtension(iconPath)) { html.append(" + * This Parameter can also be seperated by "/" if a ChoiceContentDefinition has Elements who are also ChoiceContentDefinitions. + * + * @return the name of the Choice element to add + */ + public String getParamChoiceElementName() { + + return m_paramChoiceElementName; + } + + /** * Returns the parameter that specifies the model file name.

* * @return the parameter that specifies the model file name @@ -1024,6 +1058,17 @@ } /** + * Sets the name of the Choice-Element to add.

+ * This Parameter can also be seperated by "/" if a ChoiceContentDefinition has Elements who are also ChoiceContentDefinitions. + * + * @param elementName the name of the Choice-Element to add + */ + public void setParamChoiceElementName(String elementName) { + + m_paramChoiceElementName = elementName; + } + + /** * Sets the parameter that specifies the model file name.

* * @param paramMasterFile the parameter that specifies the model file name @@ -1321,9 +1366,12 @@ * @param index the index of the element * @param addElement if true, the button to add an element is shown * @param removeElement if true, the button to remove an element is shown + * @param choiceListJson List of Choices if a ChoiceContentDefinition should be added.
+ * This must be a valid Javascript-JSON-String
+ * Example value for choiceListJson: [{Label:"first test", Name:"test1", Help:"The ElementType can be a Simple or Complex Type"},{Label:"second test", Name:"test2"}] * @return the html for the element operation buttons */ - private String buildElementButtons(String elementName, int index, boolean addElement, boolean removeElement) { + private String buildElementButtons(String elementName, int index, boolean addElement, boolean removeElement, String choiceListJson) { StringBuffer jsCall = new StringBuffer(512); @@ -1369,9 +1417,13 @@ // build the add element button if required if (addElement) { jsCall.append(Boolean.TRUE); + // This param must be Javascript & HTML escaped. + // It is the Parameter of the showElementButtons()-function who create a HTML-link with href="javascript:addElement(... choiceListJson ...)" + jsCall.append(", \"" + CmsStringUtil.escapeJavaScript(CmsStringUtil.escapeHtml(choiceListJson)) + "\""); buttonPresent = true; } else { jsCall.append(Boolean.FALSE); + jsCall.append(", \"[]\""); } jsCall.append(");"); @@ -1391,6 +1443,7 @@ action.append(elementName); action.append("', "); action.append(index); + action.append(", " + choiceListJson + ""); action.append(");"); btAction = action.toString(); } else if (removeElement) { @@ -1406,9 +1459,9 @@ } StringBuffer href = new StringBuffer(512); href.append("javascript:"); - href.append(btAction); + href.append(CmsStringUtil.escapeHtml(btAction)); //escape quotes in HTML-Attribute href.append("\" onmouseover=\""); - href.append(jsCall); + href.append(CmsStringUtil.escapeHtml(jsCall.toString())); //escape quotes in HTML-Attribute href.append("checkElementButtons(true);\" onmouseout=\"checkElementButtons(false);\" id=\"btimg."); href.append(elementName).append(".").append(index); result = button(href.toString(), null, btIcon, Messages.GUI_EDITOR_XMLCONTENT_ELEMENT_BUTTONS_0, 0); @@ -1635,7 +1688,7 @@ for (Iterator i = contentDefinition.getTypeSequence().iterator(); i.hasNext();) { // get the type I_CmsXmlSchemaType type = (I_CmsXmlSchemaType)i.next(); - + boolean tabCurrentlyOpened = false; if (useTabs) { @@ -1686,11 +1739,28 @@ firstElement = false; } + + // get nestedContent Infos (also Choice-Content) CmsXmlContentDefinition nestedContentDefinition = contentDefinition; + List choiceList = new ArrayList(); //needed for Javascript-ADD-Button + if (!type.isSimpleType()) { // get nested content definition for nested types CmsXmlNestedContentDefinition nestedSchema = (CmsXmlNestedContentDefinition)type; - nestedContentDefinition = nestedSchema.getNestedContentDefinition(); + nestedContentDefinition = getNestedContentDefinition(nestedSchema); + + // get Choice-Elements to Choice-List (needed for Javascript-ADD-Button) + if (nestedContentDefinition.isChoiceType()) { + + Iterator choiceSubElementTypeIterator = nestedContentDefinition.getTypeSequence().iterator(); + while (choiceSubElementTypeIterator.hasNext()) { + // get the type of possible SubElements + I_CmsXmlSchemaType choiceSubElementType = (I_CmsXmlSchemaType)choiceSubElementTypeIterator.next(); + + // add Choice-Element to Choice-List recursively + addChoiceElementToChoiceList(choiceList, nestedContentDefinition, choiceSubElementType); + } + } } // create xpath to the current element String name = pathPrefix + type.getName(); @@ -1724,10 +1794,49 @@ // get value and corresponding widget I_CmsXmlContentValue value = elementSequence.getValue(j); I_CmsWidget widget = null; - if (type.isSimpleType()) { - widget = contentDefinition.getContentHandler().getWidget(value); + + // the value will be replaced by the SubElement if it is a ChoiceElement. + // so get the Index now bevor it is to late. + int valueIndex = value.getIndex(); + + // Get ChoiceSubElementsVariables + String choiceSubElementPathPrefix = null; // only necessary if the Choice-SubElement is a NestedContent (recursive-Call of this function) + CmsXmlContentDefinition choiceSubElementNestedContentDefinition = null; //only used if widget==null + + String label; + + // if this elments has a Value and it is a Choice-Element, than get the chosen ChoiceSubElement + if (!disabledElement && !type.isSimpleType() && nestedContentDefinition.isChoiceType()) { + ChoiceSubElementValueHolder valueHolder = new ChoiceSubElementValueHolder(nestedContentDefinition, pathPrefix, value, widget); + + // get Lable + label = keyDefault(A_CmsWidget.getLabelKey((I_CmsWidgetParameter)value), value.getName()); + valueHolder.setLabel(label); + + valueHolder = getChoiceSubElement(valueHolder); + + // The new ChoiceSubElementPathPrefix + choiceSubElementPathPrefix = valueHolder.getPathPrefix(); + // The new ChoiceSubElement Value + value = valueHolder.getValue(); + // The Label for this ChoiceSubElement Value (Wihtout Counter. Maybe separate by "/" if it is a recusrsive Choice SubSubElement ) + label = valueHolder.getLabel(); + // The new ChoiceSubElement Widget Or NestedContentDefinition (who is certainly no choice nestedContentDefinition.) + widget = valueHolder.getWidget(); + choiceSubElementNestedContentDefinition = valueHolder.getNestedContentDefinition(); + + } else { + label = keyDefault(A_CmsWidget.getLabelKey((I_CmsWidgetParameter)value), value.getName()); + if (type.isSimpleType()) { + widget = contentDefinition.getContentHandler().getWidget(value); + } } + // Befor an empty Lable exists show the element-Name + if (CmsStringUtil.isEmpty(label)) { + label = value.getName(); + } + // show errors and/or warnings String key = value.getPath(); if (showErrors @@ -1786,6 +1895,7 @@ m_warningTabs.add(m_currentTab); } } + // create label and help bubble cells result.append(""); if (!collapseLabel) { @@ -1795,13 +1905,13 @@ result.append("Disabled"); } result.append("\">"); - result.append(keyDefault(A_CmsWidget.getLabelKey((I_CmsWidgetParameter)value), value.getName())); + result.append(label); if (elementCount > 1) { - result.append(" [").append(value.getIndex() + 1).append("]"); + result.append(" [").append(valueIndex + 1).append("]"); } result.append(": "); if (showHelpBubble && (widget != null) && (value.getIndex() == 0)) { - // show help bubble only on first element of each content definition + // show help bubble only on first element of each content definition (if it is a Choice-Value than value.getIndex() is always 0) result.append(widget.getHelpBubble(getCms(), this, (I_CmsWidgetParameter)value)); } else { // create empty cell for all following elements @@ -1812,17 +1922,31 @@ // append individual widget html cell if element is enabled if (!disabledElement) { if (widget == null) { - // recurse into nested type sequence - String newPath = CmsXmlUtils.createXpathElement(value.getName(), value.getIndex() + 1); - result.append(""); - boolean showHelp = (j == 0); superTabOpened = !nested && tabOpened && collapseLabel; - result.append(getXmlEditorForm( - nestedContentDefinition, - pathPrefix + newPath + "/", - showHelp, - superTabOpened)); - result.append(""); + + if (nestedContentDefinition.isChoiceType()) { + //include subelement + String newPath = CmsXmlUtils.createXpathElement(value.getName(), value.getIndex() + 1); // if it is a Choice-Value than value.getIndex() is always 0 + result.append(""); + boolean showHelp = (j == 0); + result.append(getXmlEditorForm( + choiceSubElementNestedContentDefinition, + choiceSubElementPathPrefix + newPath + "/", + showHelp, + superTabOpened)); + result.append(""); + } else { + String newPath = CmsXmlUtils.createXpathElement(value.getName(), value.getIndex() + 1); + result.append(""); + boolean showHelp = (j == 0); + result.append(getXmlEditorForm( + nestedContentDefinition, + pathPrefix + newPath + "/", + showHelp, + superTabOpened)); + result.append(""); + } + } else { // this is a simple type, display widget result.append(widget.getDialogWidget(getCms(), this, (I_CmsWidgetParameter)value)); @@ -1835,7 +1959,7 @@ } // append element operation (add, remove, move) buttons if required - result.append(buildElementButtons(name, value.getIndex(), addValue, removeValue)); + result.append(buildElementButtons(name, valueIndex, addValue, removeValue, new JSONArray(choiceList).toString())); // close row result.append("\n"); @@ -1874,6 +1998,211 @@ } /** + * Get some infos of The SubElement of this ChoiceElements:
+ * (a Choice-Element can only have one Subelement.)
+ * - pathPrefix: only necessary if the Choice-SubElement is a NestedContent (for recursive-Call of this function)
+ * - I_CmsXmlContentValue value:
+ * - Widget or NestedContentDefinition)
+ *
+ * return the ValueHolder With the nestedContentDefinition, pathprefix and value of the single SubElement
+ * Or recursively the SubSubElement who is not a Choice NestedContentDefinition.
+ * + * @param valueHolder Contains the nestedContentDefinition, pathprefix and value of the parentElement. + * @return the ValueHolder With the (nestedContentDefinition or widget), pathprefix and value of the single SubElement (or recursively the SubSubElement who is not a Choice NestedContentDefinition.). + * @throws CmsXmlException + */ + private ChoiceSubElementValueHolder getChoiceSubElement(ChoiceSubElementValueHolder valueHolder) throws CmsXmlException { + + String newPath = CmsXmlUtils.createXpathElement(valueHolder.getValue().getName(), valueHolder.getValue().getIndex() + 1); + + // GET new PathPrefix + valueHolder.setPathPrefix(valueHolder.getPathPrefix() + newPath + "/"); + + // iterate the type sequence and search a value with this type + Iterator choiceSubElementTypeIterator = valueHolder.getNestedContentDefinition().getTypeSequence().iterator(); + while (choiceSubElementTypeIterator.hasNext()) { + + // get the type of possible SubElements + I_CmsXmlSchemaType choiceSubElementType = (I_CmsXmlSchemaType)choiceSubElementTypeIterator.next(); + + + // create xpath to the Sub element of this Choice-Element + String choiceSubElementName = valueHolder.getPathPrefix() + choiceSubElementType.getName(); + + if (LOG.isDebugEnabled()) { + LOG.debug("choiceSubElementName: " + choiceSubElementName); + } + + // get the element sequence of the current type + CmsXmlContentValueSequence choiceSubElementSequence = m_content.getValueSequence(choiceSubElementName, getElementLocale()); + if (choiceSubElementSequence == null) { + // No choiceSubElementType found, goto next choiceSubElementType + LOG.error("should not occured"); + continue; + } + + int choiceSubElementCount = choiceSubElementSequence.getElementCount(); + if (choiceSubElementCount < 1) { + // No element found for this choiceSubElementType, goto next choiceSubElementType + continue; + } + + if (choiceSubElementCount > 1) { // Choice-Sub-Elements can only occurede one time. + LOG.warn("choiceSubElementCount > 1: '" + m_content.getFile().getRootPath() + "'; '" + valueHolder.getPathPrefix() + "'"); + } + + // get the first choiceSubElementValue + valueHolder.setValue(choiceSubElementSequence.getValue(0)); + + // get Lable + String label = keyDefault(A_CmsWidget.getLabelKey((I_CmsWidgetParameter)valueHolder.getValue()), valueHolder.getValue().getName()); + if (!CmsStringUtil.isEmpty(valueHolder.getLabel())) { + if (!CmsStringUtil.isEmpty(label)) { + label = valueHolder.getLabel().concat("/").concat(label); + } + } + valueHolder.setLabel(label); + + // get Widget or NestedContentDefinition or recursivly the result of the Choice-NestedContentDefinition + if (choiceSubElementType.isSimpleType()) { + valueHolder.setWidget(valueHolder.getNestedContentDefinition().getContentHandler().getWidget(valueHolder.getValue())); + } else { + // get nested content definition for nested types + CmsXmlNestedContentDefinition choiceSubElementNestedSchema = (CmsXmlNestedContentDefinition)choiceSubElementType; + valueHolder.setNestedContentDefinition(choiceSubElementNestedSchema.getNestedContentDefinition()); + if (valueHolder.getNestedContentDefinition().isChoiceType()) { + LOG.info("Nested ChoiceContentDefinition found: " + valueHolder.getPathPrefix()); + valueHolder = getChoiceSubElement(valueHolder); + } + } + + // found one Sub-Element found in Choice-Element + return valueHolder; // exit loop + } + + LOG.warn("NO nestedContent- Choice-Value found: " + valueHolder.getPathPrefix()); + return valueHolder; + } + + /** + * add Choice-Element to Choice-List (needed for Javascript-ADD-Button). + * + * @param choiceList The ChoiceList where The Choice-Element should be added + * @param contentDefinition The contentDefinition who contents this choiceSubElementType + * @param choiceSubElementType The element type of the Choice-Element who should be added + * @throws JSONException + */ + private void addChoiceElementToChoiceList(List choiceList, CmsXmlContentDefinition contentDefinition, I_CmsXmlSchemaType choiceSubElementType) throws JSONException { + addChoiceElementToChoiceList(choiceList, contentDefinition, choiceSubElementType, "", ""); + } + + /** + * add Choice-Element to Choice-List recursively (needed for Javascript-ADD-Button). + * + * @param choiceList The ChoiceList where The Choice-Element should be added + * @param contentDefinition The contentDefinition who contents this choiceSubElementType + * @param choiceSubElementType The element type of the Choice-Element who should be added + * @param labelPrefix the Labelprefix of the previously called {@link #addChoiceElementToChoiceList(List, CmsXmlContentDefinition, I_CmsXmlSchemaType, String, String)} + * @param namePrefix the Nameprefix of the previously called {@link #addChoiceElementToChoiceList(List, CmsXmlContentDefinition, I_CmsXmlSchemaType, String, String)} + * @throws JSONException + */ + private void addChoiceElementToChoiceList(List choiceList, CmsXmlContentDefinition contentDefinition, I_CmsXmlSchemaType choiceElementType, String labelPrefix, String namePrefix) throws JSONException { + StringBuffer labelKey = new StringBuffer(128); + String helpKey; + // The following code is not used in XmlContentEditor (Only used in Administration-View etc....) +// if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(pathPrefix)) { +// labelKey.append(pathPrefix); +// labelKey.append('.'); +// } + labelKey.append(A_CmsWidget.LABEL_PREFIX); + labelKey.append(contentDefinition.getInnerName()); + labelKey.append('.'); + labelKey.append(choiceElementType.getName()); + + helpKey = labelKey.toString().concat(A_CmsWidget.HELP_POSTFIX); + + + if (LOG.isDebugEnabled()) { + LOG.debug("labelKey: " + labelKey.toString()); + LOG.debug("helpKey: " + helpKey); + } + + String label = keyDefault(labelKey.toString(), choiceElementType.getName()); + String help = keyDefault(helpKey, ""); + String name = choiceElementType.getName(); + + // append Prefixes to Name & Label + if (!CmsStringUtil.isEmpty(namePrefix)) { + name = namePrefix.concat("/").concat(name); + } + if (!CmsStringUtil.isEmpty(labelPrefix)) { + if (!CmsStringUtil.isEmpty(label)) { + label = labelPrefix.concat("/").concat(label); + } + } + + + // add Choice-Element to Choice-List + if (isChoiceType(choiceElementType)) { + CmsXmlContentDefinition nestedContentDefinition = getNestedContentDefinition(choiceElementType); + + // recursive call if this is a Choice-NestedContentDefinition + Iterator choiceSubElementTypeIterator = nestedContentDefinition.getTypeSequence().iterator(); + while (choiceSubElementTypeIterator.hasNext()) { + // get the type of possible SubElements + I_CmsXmlSchemaType choiceSubElementType = (I_CmsXmlSchemaType)choiceSubElementTypeIterator.next(); + + // add Choice-Element to Choice-List + addChoiceElementToChoiceList(choiceList, nestedContentDefinition, choiceSubElementType, label, name); + } + } else { + JSONObject jsonObj = new JSONObject(); + jsonObj.put("Label", label); + jsonObj.put("Name", name); + if (!CmsStringUtil.isEmpty(help)) { + jsonObj.put("Help", help); + } + choiceList.add(jsonObj); + } + } + + /** + * check if this choiceElementType is a Choice-NestedContentDefinition. + * + * @param choiceElementType true if this element is a choice-element + * + * @return + */ + private boolean isChoiceType(I_CmsXmlSchemaType choiceElementType) { + + boolean isChoiceType; + CmsXmlContentDefinition nestedContentDefinition = null; + if (choiceElementType.isSimpleType()) { + isChoiceType = false; + } else { + nestedContentDefinition = getNestedContentDefinition(choiceElementType); + + // get Choice-Elements to Choice-List (needed for Javascript-ADD-Button) + if (nestedContentDefinition.isChoiceType()) { + isChoiceType = true; + } else { + isChoiceType = false; + } + } + return isChoiceType; + } + + private CmsXmlContentDefinition getNestedContentDefinition(I_CmsXmlSchemaType nestedSchema) { + + if (nestedSchema instanceof CmsXmlNestedContentDefinition) { + CmsXmlContentDefinition nestedContentDefinition = ((CmsXmlNestedContentDefinition)nestedSchema).getNestedContentDefinition(); + return nestedContentDefinition; + } else { + throw new IllegalArgumentException("The nestedSchema must be an Inxtance of CmsXmlNestedContentDefinition."); + } + } + + /** * Resets the error handler member variable to reinitialize the error messages.

*/ private void resetErrorHandler() { @@ -1908,4 +2237,57 @@ m_file = getCloneCms().writeFile(m_file); m_content = CmsXmlContentFactory.unmarshal(getCloneCms(), m_file); } + + /** + * The recursive function {@link CmsXmlContentEditor#getChoiceSubElement(ChoiceSubElementValueHolder)}
+ * Returns more then one Value: A ValueHolder is needed.
+ * + * @author harald brabenetz + */ + private class ChoiceSubElementValueHolder { + private String m_pathPrefix; // only necessary if the Choice-SubElement is a NestedContent (recursive-Calls) + private CmsXmlContentDefinition m_nestedContentDefinition; //only used if widget==null + private I_CmsXmlContentValue m_value; + private I_CmsWidget m_widget; + private String m_label; + + public ChoiceSubElementValueHolder(CmsXmlContentDefinition nestedContentDefinition, String pathPrefix, I_CmsXmlContentValue value, I_CmsWidget widget) { + super(); + this.m_nestedContentDefinition = nestedContentDefinition; + this.m_pathPrefix = pathPrefix; + this.m_value = value; + this.m_widget = widget; + } + + public CmsXmlContentDefinition getNestedContentDefinition() { + return m_nestedContentDefinition; + } + public void setNestedContentDefinition(CmsXmlContentDefinition nestedContentDefinition) { + this.m_nestedContentDefinition = nestedContentDefinition; + } + public String getPathPrefix() { + return m_pathPrefix; + } + public void setPathPrefix(String pathPrefix) { + this.m_pathPrefix = pathPrefix; + } + public I_CmsXmlContentValue getValue() { + return m_value; + } + public void setValue(I_CmsXmlContentValue value) { + this.m_value = value; + } + public I_CmsWidget getWidget() { + return m_widget; + } + public void setWidget(I_CmsWidget widget) { + this.m_widget = widget; + } + public String getLabel() { + return m_label; + } + public void setLabel(String label) { + this.m_label = label; + } + } } \ No newline at end of file Index: modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/editor_form.jsp =================================================================== RCS file: /usr/local/cvs/opencms/modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/editor_form.jsp,v retrieving revision 1.15 diff -u -r1.15 editor_form.jsp --- modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/editor_form.jsp 9 Jun 2009 12:21:36 -0000 1.15 +++ modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/editor_form.jsp 28 Jan 2010 11:50:55 -0000 @@ -298,9 +298,42 @@ //--> + + +

+
+
close
+ +
+
"> @@ -314,6 +347,7 @@ + <%= wp.getXmlEditorForm() %> Index: modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/edit.js =================================================================== RCS file: /usr/local/cvs/opencms/modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/edit.js,v retrieving revision 1.16 diff -u -r1.16 edit.js --- modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/edit.js 18 Jan 2010 10:04:29 -0000 1.16 +++ modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/edit.js 28 Jan 2010 11:50:55 -0000 @@ -190,14 +190,88 @@ } // add an optional element to the currently edited content -function addElement(elemName, insertAfter) { +function addElement(elemName, insertAfter, choiceList) { setLastPosition(); var _form = document.EDITOR; _form.elementname.value = elemName; _form.elementindex.value = insertAfter; + if (choiceList.length == 0){ + buttonAction(5); + } else if (choiceList.length == 1){ + addChoiceElement(choiceList[0].Name); + } else { + // more than one element + showChoiceSelection(choiceList); + } +} + +function addChoiceElement(elemName) { + var _form = document.EDITOR; + _form.choiceelementname.value = elemName; buttonAction(5); } +// shows the possible SubElements for a Choice-NestedContentType +function showChoiceSelection(choiceList) { + + // get Choice element + var choiceOverlay = document.getElementById("CHOICE_OVERLAY"); + var choiceSelectElem = document.getElementById("CHOICE_SELECT"); + var choiceSelectLinksElem = document.getElementById("CHOICE_SELECT_LINKS"); + + // create the button row HTML + var i = 0; + var linkList =""; + for (i=0; i < choiceList.length; i++){ + if (i > 0){ + linkList += "
"; + } + linkList += ""; + linkList += choiceList[i].Label; + linkList += ""; + if (choiceList[i].Help){ + linkList += " ("; + linkList += choiceList[i].Help; + linkList += ")"; + } + } + + + // set the created HTML into the ModalBox + choiceSelectLinksElem.innerHTML = linkList; + + // arrange the Modal-Box + var height = document.body.clientHeight/2; + var width = document.body.clientWidth/2; + choiceSelectElem.style.height = height + 'px'; + choiceSelectElem.style.width = width + 'px'; + choiceSelectLinksElem.style.height = height + 'px'; + choiceSelectLinksElem.style.width = width + 'px'; + choiceSelectElem.style.top = document.body.scrollTop+(document.body.clientHeight - height)/2; + choiceSelectElem.style.left = document.body.scrollLeft+(document.body.clientWidth - width)/2; + + // show the Modal-Box + choiceSelectElem.style.display = "block"; + + // show the Gay Background + choiceOverlay.style.height = document.body.scrollHeight + 'px'; + choiceOverlay.style.width = document.body.scrollWidth + 'px'; + choiceOverlay.style.display = "block"; + +} + + +function closeChoiceSelection() { + var _form = document.EDITOR; + // reset the Data + _form.elementname.value = ""; + _form.elementindex.value = ""; + _form.choiceelementname.value = ""; + // close the Modal-Box + document.getElementById('CHOICE_SELECT').style.display ='none'; + document.getElementById('CHOICE_OVERLAY').style.display = 'none'; +} + // move an element in currently edited content function moveElement(elemName, index, direction) { setLastPosition(); @@ -307,7 +381,7 @@ } // shows the element operation buttons -function showElementButtons(elementName, elementIndex, showRemove, showUp, showDown, showAdd) { +function showElementButtons(elementName, elementIndex, showRemove, showUp, showDown, showAdd, choiceList) { var elemId = elementName + "." + elementIndex; if (oldEditorButtons != null && oldEditorButtons != elemId) { // close eventually open element buttons @@ -342,7 +416,7 @@ // add element button if (showAdd) { - buttons += button("javascript:addElement('" + elementName + "', " + elementIndex + ")", null, "new", LANG_BT_ADD, buttonStyle); + buttons += button("javascript:addElement('" + elementName + "', " + elementIndex + ", " + choiceList + ")", null, "new", LANG_BT_ADD, buttonStyle); } else { buttons += button(null, null, "new_in", LANG_BT_ADD, buttonStyle); } Index: test/test.properties =================================================================== RCS file: /usr/local/cvs/opencms/test/test.properties,v retrieving revision 1.35 diff -u -r1.35 test.properties --- test/test.properties 26 Feb 2009 11:59:18 -0000 1.35 +++ test/test.properties 28 Jan 2010 11:50:55 -0000 @@ -27,5 +27,5 @@ db.product=hsqldb # Set the path to the test resources files -test.data.path=C:\dev\workspace\OpenCmsHead\test\data -test.webapp.path=C:\dev\workspace\OpenCmsHead\webapp +test.data.path=test\data +test.webapp.path=webapp Index: src-setup/org/opencms/setup/CmsSetupBean.java =================================================================== RCS file: /usr/local/cvs/opencms/src-setup/org/opencms/setup/CmsSetupBean.java,v retrieving revision 1.13 diff -u -r1.13 CmsSetupBean.java --- src-setup/org/opencms/setup/CmsSetupBean.java 18 Jan 2010 10:02:59 -0000 1.13 +++ src-setup/org/opencms/setup/CmsSetupBean.java 28 Jan 2010 11:50:55 -0000 @@ -1909,6 +1909,11 @@ // initialize the database name with the app name if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(request.getContextPath())) { dbName = request.getContextPath().substring(1); + // transform Maven default finalName "${artifactId}-${version}.war" + // e.g.: "opencms-demo-7.5.2" -> "opencms_demo_7_5_2" + // reason: e.g.: MySql cannot have '-', '.' in Database-Name. + dbName = dbName.replace('-', '_'); + dbName = dbName.replace('.', '_'); } if (provider.equals(ORACLE_PROVIDER) || provider.equals(POSTGRESQL_PROVIDER) Index: src/org/opencms/xml/CmsXmlContentDefinition.java =================================================================== RCS file: /usr/local/cvs/opencms/src/org/opencms/xml/CmsXmlContentDefinition.java,v retrieving revision 1.47 diff -u -r1.47 CmsXmlContentDefinition.java --- src/org/opencms/xml/CmsXmlContentDefinition.java 18 Jan 2010 10:04:12 -0000 1.47 +++ src/org/opencms/xml/CmsXmlContentDefinition.java 28 Jan 2010 11:50:55 -0000 @@ -146,6 +146,9 @@ /** Constant for the "sequence" node in the XML schema namespace. */ public static final QName XSD_NODE_SEQUENCE = QName.get("sequence", XSD_NAMESPACE); + /** Constant for the "choice" node in the XML schema namespace. */ + public static final QName XSD_NODE_CHOICE = QName.get("choice", XSD_NAMESPACE); + /** The XML content handler. */ private I_CmsXmlContentHandler m_contentHandler; @@ -158,6 +161,9 @@ /** The outer element name of the content definition (language sequence). */ private String m_outerName; + /** Returns true if this sequence is created from a {@link #XSD_NODE_CHOICE}-Element. */ + private boolean m_isChoiceSequence; + /** The location from which the XML schema was read (XML system id). */ private String m_schemaLocation; @@ -523,15 +529,21 @@ // no error: then the language attribute is valid hasLanguageAttribute = true; } - + + boolean isChoice = false; + // check the main element type sequence Element typeSequence = mainElements.get(0); if (!XSD_NODE_SEQUENCE.equals(typeSequence.getQName())) { + if (!XSD_NODE_CHOICE.equals(typeSequence.getQName())) { throw new CmsXmlException(Messages.get().container( Messages.ERR_CD_ELEMENT_NAME_3, typeSequence.getUniquePath(), XSD_NODE_SEQUENCE.getQualifiedName(), typeSequence.getQName().getQualifiedName())); + } else { + isChoice = true; + } } // check the type definition sequence @@ -553,7 +565,7 @@ CmsXmlContentTypeManager typeManager = OpenCms.getXmlContentTypeManager(); Iterator i = typeSequenceElements.iterator(); while (i.hasNext()) { - sequence.add(typeManager.getContentType(i.next(), includes)); + sequence.add(typeManager.getContentType((Element)i.next(), includes, isChoice)); } } else { // generate a nested content definition for the main type sequence @@ -569,7 +581,7 @@ } // return a data structure with the collected values - return new CmsXmlComplexTypeSequence(name, sequence, hasLanguageAttribute); + return new CmsXmlComplexTypeSequence(name, sequence, hasLanguageAttribute, isChoice); } /** @@ -704,8 +716,8 @@ result.setInnerName(outer.getName()); // get the inner element sequence, this must be the second element - CmsXmlComplexTypeSequence innerSequence = complexTypeData.get(1); - + CmsXmlComplexTypeSequence innerSequence = (CmsXmlComplexTypeSequence)complexTypeData.get(1); + result.m_isChoiceSequence =innerSequence.m_isChoiceSequence; // add the types from the main sequence node Iterator it = innerSequence.getSequence().iterator(); while (it.hasNext()) { @@ -852,6 +864,7 @@ result.m_contentHandler = m_contentHandler; result.m_typeName = m_typeName; result.m_includes = m_includes; + result.m_isChoiceSequence = m_isChoiceSequence; return result; } @@ -1174,4 +1187,16 @@ m_outerName = outerName; } + + + /** + * Returns true if this sequence is created from a {@link #XSD_NODE_CHOICE}-Element. + * + * @return true if this sequence is created from a {@link #XSD_NODE_CHOICE}-Element. + * + * @see CmsXmlNestedContentDefinition + */ + public boolean isChoiceType() { + return m_isChoiceSequence; + } } \ No newline at end of file Index: src/org/opencms/xml/CmsXmlContentTypeManager.java =================================================================== RCS file: /usr/local/cvs/opencms/src/org/opencms/xml/CmsXmlContentTypeManager.java,v retrieving revision 1.39 diff -u -r1.39 CmsXmlContentTypeManager.java --- src/org/opencms/xml/CmsXmlContentTypeManager.java 18 Jan 2010 10:04:11 -0000 1.39 +++ src/org/opencms/xml/CmsXmlContentTypeManager.java 28 Jan 2010 11:50:55 -0000 @@ -324,15 +324,19 @@ * Generates an initialized instance of a XML content type definition * from the given XML schema element.

* - * @param typeElement the element to generate the XML content type definition from - * @param nestedDefinitions the nested (included) XML content sub-definitions + * @param typeElement + * The element to generate the XML content type definition from + * @param nestedDefinitions + * The nested (included) XML content sub-definitions + * @param isChoice + * true if this node is an element of a Choice XSD element. + * In this case the maxOccurs is always handled as "1" and minOccurs is always handled as "0". * * @return an initialized instance of a XML content type definition * @throws CmsXmlException in case the element does not describe a valid XML content type definition */ - public I_CmsXmlSchemaType getContentType(Element typeElement, Set nestedDefinitions) + public I_CmsXmlSchemaType getContentType(Element typeElement, Set nestedDefinitions, boolean isChoice) throws CmsXmlException { - if (!CmsXmlContentDefinition.XSD_NODE_ELEMENT.equals(typeElement.getQName())) { throw new CmsXmlException(Messages.get().container(Messages.ERR_INVALID_CD_SCHEMA_STRUCTURE_0)); } @@ -345,7 +349,12 @@ String defaultValue = typeElement.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_DEFAULT); String maxOccrs = typeElement.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_MAX_OCCURS); String minOccrs = typeElement.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_MIN_OCCURS); - + // a schemyType inside a Choice-ContentDefinition can only occurred one time. + if (isChoice) { + minOccrs = CmsXmlContentDefinition.XSD_ATTRIBUTE_VALUE_ZERO; + maxOccrs = "1"; + } + if (CmsStringUtil.isEmpty(elementName) || CmsStringUtil.isEmpty(typeName)) { throw new CmsXmlException(Messages.get().container(Messages.ERR_INVALID_CD_SCHEMA_STRUCTURE_0)); } @@ -362,7 +371,14 @@ if (typeName.equals(cd.getTypeName())) { simpleType = false; - return new CmsXmlNestedContentDefinition(cd, elementName, minOccrs, maxOccrs); + if (cd.isChoiceType()) { + // A Choice Element itself is always optional. + // the initial XML content (create new resource) can not be automatically generated if minOccurs > 0 + // the editor must choose the sub element! + return new CmsXmlNestedContentDefinition(cd, elementName, CmsXmlContentDefinition.XSD_ATTRIBUTE_VALUE_ZERO, maxOccrs); + } else { + return new CmsXmlNestedContentDefinition(cd, elementName, minOccrs, maxOccrs); + } } } Index: src/org/opencms/xml/CmsXmlComplexTypeSequence.java =================================================================== RCS file: /usr/local/cvs/opencms/src/org/opencms/xml/CmsXmlComplexTypeSequence.java,v retrieving revision 1.8 diff -u -r1.8 CmsXmlComplexTypeSequence.java --- src/org/opencms/xml/CmsXmlComplexTypeSequence.java 18 Jan 2010 10:04:10 -0000 1.8 +++ src/org/opencms/xml/CmsXmlComplexTypeSequence.java 28 Jan 2010 11:50:55 -0000 @@ -55,18 +55,23 @@ /** The type sequence elements. */ private List m_sequence; + /** Returns true if this sequence is created from a {@link CmsXmlContentDefinition#XSD_NODE_CHOICE}-Element. */ + protected boolean m_isChoiceSequence; + /** * Creates a new complex type sequence data structure.

* * @param name the name of the sequence * @param sequence the type sequence element list * @param hasLanguageAttribute indicates if a "language" attribute is present + * @param isChoiceSequence the type choice element list */ - protected CmsXmlComplexTypeSequence(String name, List sequence, boolean hasLanguageAttribute) { + protected CmsXmlComplexTypeSequence(String name, List sequence, boolean hasLanguageAttribute, boolean isChoiceSequence) { m_name = name; m_sequence = sequence; m_hasLanguageAttribute = hasLanguageAttribute; + m_isChoiceSequence = isChoiceSequence; } /** Index: modules/org.opencms.frontend.templatetwo/resources/manifest.xml =================================================================== RCS file: /usr/local/cvs/opencms/modules/org.opencms.frontend.templatetwo/resources/manifest.xml,v retrieving revision 1.21 diff -u -r1.21 manifest.xml --- modules/org.opencms.frontend.templatetwo/resources/manifest.xml 29 Sep 2009 06:58:56 -0000 1.21 +++ modules/org.opencms.frontend.templatetwo/resources/manifest.xml 28 Jan 2010 11:50:55 -0000 @@ -653,6 +653,22 @@ + system/modules/org.opencms.frontend.templatetwo/lib + folder + 0 + + + + + + system/modules/org.opencms.frontend.templatetwo/lib/org.opencms.frontend.templatetwo.jar + system/modules/org.opencms.frontend.templatetwo/lib/org.opencms.frontend.templatetwo.jar + binary + 0 + + + + system/modules/org.opencms.frontend.templatetwo/java_src folder da02f2ff-e45d-11dc-9e4a-3bdd2ea0b1ac Index: modules/build.xml =================================================================== RCS file: /usr/local/cvs/opencms/modules/build.xml,v retrieving revision 1.20 diff -u -r1.20 build.xml --- modules/build.xml 8 Jun 2009 10:01:17 -0000 1.20 +++ modules/build.xml 28 Jan 2010 11:50:55 -0000 @@ -274,5 +274,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: modules/build-single.xml =================================================================== RCS file: /usr/local/cvs/opencms/modules/build-single.xml,v retrieving revision 1.37 diff -u -r1.37 build-single.xml --- modules/build-single.xml 28 Sep 2009 15:34:29 -0000 1.37 +++ modules/build-single.xml 28 Jan 2010 11:50:55 -0000 @@ -1,6 +1,6 @@ - + @@ -30,6 +30,13 @@ + + + + + + + @@ -306,14 +313,29 @@ + + + + + + + + + + + + + + + @@ -350,6 +372,15 @@ + + + + + + + + + @@ -383,6 +414,13 @@ + + + + + + + @@ -400,7 +438,7 @@ - + @@ -469,4 +507,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: .settings/org.eclipse.jdt.ui.prefs =================================================================== RCS file: .settings/org.eclipse.jdt.ui.prefs diff -N .settings/org.eclipse.jdt.ui.prefs --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ .settings/org.eclipse.jdt.ui.prefs 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,9 @@ +#Thu Jan 07 19:56:06 CET 2010 +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_settings_version=11 +internal.default.compliance=default +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=com.alkacon;de.alkacon;org.opencms;com.opencms;java;javax;org.apache;org;com; +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 Index: pom-opencms-core.xml =================================================================== RCS file: pom-opencms-core.xml diff -N pom-opencms-core.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pom-opencms-core.xml 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,405 @@ + + 4.0.0 + org.opencms + opencms-core + jar + 7.5.2.2 + opencms-core + http://opencms.org + + + Opencms-core is the JAR-Library for OpenCms. + + OpenCms is a Content Management System that is based on Open + Source Software. Complex Intranet and Internet websites can be + quickly and cost-effectively created, maintained and managed. + + + 2008 + + + + + + + + + + + + + + + + + GNU LESSER GENERAL PUBLIC LICENSE 2.1 + http://www.gnu.org/licenses/lgpl-2.1.txt + repo + + + + + install + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + + test-jar + + + + + + + org.apache.maven.plugins + maven-war-plugin + 2.0.2 + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.6 + 1.6 + + + + + + + + + + + + + + + + + + javax.servlet + jsp-api + 2.0 + provided + + + javax.servlet + servlet-api + 2.4 + provided + + + + + + + javax.activation + activation + 1.1.1 + + + com.alkacon + alkacon-diff + 0.9.2 + + + com.alkacon + alkacon-simapi + 0.9.8 + + + commons-beanutils + commons-beanutils + 1.8.0 + + + commons-codec + commons-codec + 1.3 + + + commons-collections + commons-collections + 3.2.1 + + + commons-dbcp + commons-dbcp + 1.2.2 + + + commons-digester + commons-digester + 1.8 + + + org.apache.commons + commons-email + 1.1 + + + commons-fileupload + commons-fileupload + 1.2.1 + + + commons-httpclient + commons-httpclient + 3.1 + + + commons-io + commons-io + 1.4 + + + commons-logging + commons-logging + 1.1.1 + + + + commons-pool + commons-pool + 1.5.4 + + + dom4j + dom4j + 1.6.1 + + + xml-apis + xml-apis + + + + + org.htmlparser + htmlparser + 1.6 + + + oro + oro + 2.0.8 + + + jaxen + jaxen + 1.1.1 + + + xom + xom + + + jdom + jdom + + + xml-apis + xml-apis + + + + + javax.servlet + jstl + 1.1.2 + + + + + org.hibernate + jtidy + r8-20060801 + + + org.safehaus.jug + jug + 2.0.0 + lgpl + + + log4j + log4j + 1.2.15 + + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + + + + + org.apache.lucene + lucene-analyzers + 2.4.1 + + + org.apache.lucene + lucene-core + 2.4.1 + + + org.apache.lucene + lucene-highlighter + 2.4.1 + + + org.apache.lucene + lucene-queries + 2.4.1 + + + org.apache.lucene + lucene-snowball + 2.4.1 + + + javax.mail + mail + 1.4.1 + + + + + pdfbox + pdfbox + 0.7.3 + + + org.fontbox + fontbox + + + org.jempbox + jempbox + + + bouncycastle + bcmail-jdk14 + + + bouncycastle + bcprov-jdk14 + + + + + poi + poi + 2.5.1-final-20040804 + + + quartz + quartz + 1.5.2 + + + taglibs + standard + 1.1.2 + + + org.textmining + tm-extractors + 0.4 + + + xml-apis + xml-apis + 2.9.1 + + + xerces + xercesImpl + 2.9.1 + + + xml-apis + xml-apis + + + + + + + + + junit + junit + 3.8.1 + test + + + + + + + + + + + + opencms + http://bp-cms-commons.sourceforge.net/m2repo + + + + + + + + + scp-be-opencms-repository + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2repo + + + scp-be-opencms-snapshot-repository + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2snapshot + + + scp-be-opencms-site + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2site/opencms/${project.artifactId}/${project.version}/ + + + + Index: modules/maven-install.bat =================================================================== RCS file: modules/maven-install.bat diff -N modules/maven-install.bat --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ modules/maven-install.bat 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,5 @@ +echo off +call set ANT_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m +call echo ANT_OPTS: %ANT_OPTS% +call ant maven-install +pause Index: maven-install-with-new-modules.bat =================================================================== RCS file: maven-install-with-new-modules.bat diff -N maven-install-with-new-modules.bat --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ maven-install-with-new-modules.bat 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,7 @@ +echo off +call set ANT_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m +call echo ANT_OPTS: %ANT_OPTS% +call set MAVEN_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m +call echo MAVEN_OPTS: %MAVEN_OPTS% +call ant maven-install-with-new-modules +pause Index: .checkstyle =================================================================== RCS file: .checkstyle diff -N .checkstyle --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ .checkstyle 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,7 @@ + + + + + + + Index: pom-opencms-setup.xml =================================================================== RCS file: pom-opencms-setup.xml diff -N pom-opencms-setup.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pom-opencms-setup.xml 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,125 @@ + + 4.0.0 + org.opencms + opencms-setup + jar + 7.5.2.2 + opencms-setup + http://opencms.org + + + opencms-setup is the JAR-Library for OpenCms to make a initial setup or an update. + + OpenCms is a Content Management System that is based on Open + Source Software. Complex Intranet and Internet websites can be + quickly and cost-effectively created, maintained and managed. + + + 2008 + + + + + + + + + + + + + + + GNU LESSER GENERAL PUBLIC LICENSE 2.1 + http://www.gnu.org/licenses/lgpl-2.1.txt + repo + + + + + install + + + org.apache.maven.plugins + maven-war-plugin + 2.0.2 + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.6 + 1.6 + + + + + + + + + + + + opencms + http://bp-cms-commons.sourceforge.net/m2repo + + + + + + + + + scp-be-opencms-repository + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2repo + + + scp-be-opencms-snapshot-repository + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2snapshot + + + scp-be-opencms-site + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2site/opencms/${project.artifactId}/${project.version}/ + + + Index: .classpath =================================================================== RCS file: .classpath diff -N .classpath --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ .classpath 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: .project =================================================================== RCS file: .project diff -N .project --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ .project 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,29 @@ + + + opencms-7.5.2 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + com.atlassw.tools.eclipse.checkstyle.CheckstyleNature + net.sf.eclipsecs.core.CheckstyleNature + + Index: maven-install-init-all.bat =================================================================== RCS file: maven-install-init-all.bat diff -N maven-install-init-all.bat --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ maven-install-init-all.bat 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,7 @@ +echo off +call set ANT_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m +call echo ANT_OPTS: %ANT_OPTS% +call set MAVEN_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m +call echo MAVEN_OPTS: %MAVEN_OPTS% +call ant maven-install-init-all +pause Index: maven-deploy-with-new-modules.bat =================================================================== RCS file: maven-deploy-with-new-modules.bat diff -N maven-deploy-with-new-modules.bat --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ maven-deploy-with-new-modules.bat 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,7 @@ +echo off +call set ANT_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m +call echo ANT_OPTS: %ANT_OPTS% +call set MAVEN_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m +call echo MAVEN_OPTS: %MAVEN_OPTS% +call ant clean maven-deploy-with-new-modules +pause Index: pom-opencms-webapp.xml =================================================================== RCS file: pom-opencms-webapp.xml diff -N pom-opencms-webapp.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pom-opencms-webapp.xml 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,155 @@ + + 4.0.0 + org.opencms + opencms-webapp + war + 7.5.2.2 + opencms-webapp + http://opencms.org + + + Opencms-webapp is the Skeleton WAR-File for OpenCms without Modules. + It only contains the JSPs, Configs, opencms-core and so on. + + OpenCms is a Content Management System that is based on Open + Source Software. Complex Intranet and Internet websites can be + quickly and cost-effectively created, maintained and managed. + + + 2008 + + + + + + + + + + + + + + + GNU LESSER GENERAL PUBLIC LICENSE 2.1 + http://www.gnu.org/licenses/lgpl-2.1.txt + repo + + + + + install + + + org.apache.maven.plugins + maven-war-plugin + 2.0.2 + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.6 + 1.6 + + + + + + + + + + + + + + + + + javax.servlet + jsp-api + 2.0 + provided + + + javax.servlet + servlet-api + 2.4 + provided + + + + + + + org.opencms + opencms-core + 7.5.2.1 + + + org.opencms + opencms-setup + 7.5.2.1 + + + + + + + opencms + http://bp-cms-commons.sourceforge.net/m2repo + + + + + + + + + scp-be-opencms-repository + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2repo + + + scp-be-opencms-snapshot-repository + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2snapshot + + + scp-be-opencms-site + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2site/opencms/${project.artifactId}/${project.version}/ + + + Index: .settings/org.eclipse.jdt.core.prefs =================================================================== RCS file: .settings/org.eclipse.jdt.core.prefs diff -N .settings/org.eclipse.jdt.core.prefs --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ .settings/org.eclipse.jdt.core.prefs 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,70 @@ +#Thu Jan 07 19:55:34 CET 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 Index: maven-deploy-init-all.bat =================================================================== RCS file: maven-deploy-init-all.bat diff -N maven-deploy-init-all.bat --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ maven-deploy-init-all.bat 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,7 @@ +echo off +call set ANT_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m +call echo ANT_OPTS: %ANT_OPTS% +call set MAVEN_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m +call echo MAVEN_OPTS: %MAVEN_OPTS% +call ant maven-deploy-init-all +pause Index: install-nonpublic-libs.bat =================================================================== RCS file: install-nonpublic-libs.bat diff -N install-nonpublic-libs.bat --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ install-nonpublic-libs.bat 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,19 @@ +echo off +echo Installing Non-Puplic Libraries to the local Maven-Repository.... +call mvn install:install-file -DgroupId=com.alkacon -DartifactId=alkacon-diff -Dversion=0.9.2 -Dpackaging=jar -Dfile=lib/runtime/alkacon-diff-0.9.2.jar +call mvn install:install-file -DgroupId=com.alkacon -DartifactId=alkacon-simapi -Dversion=0.9.8 -Dpackaging=jar -Dfile=lib/runtime/alkacon-simapi-0.9.8.jar +call mvn install:install-file -DgroupId=xerces -DartifactId=xercesImpl -Dversion=2.9.1 -Dpackaging=jar -Dfile=lib/runtime/xercesImpl-2.9.1.jar +call mvn install:install-file -DgroupId=xml-apis -DartifactId=xml-apis -Dversion=2.9.1 -Dpackaging=jar -Dfile=lib/runtime/xml-apis-2.9.1.jar + + +echo Installing ibm.as400-Driver to the local Maven-Repository.... +call mvn install:install-file -DgroupId=com.ibm.as400 -DartifactId=jt400 -Dversion=6.0 -Dpackaging=jar -Dfile=webapp/setup/database/as400/jt400.jar + +echo Installing ibm.db2-Driver to the local Maven-Repository.... +call mvn install:install-file -DgroupId=com.ibm.db2.jcc -DartifactId=db2jcc -Dversion=V9 -Dpackaging=jar -Dfile=webapp/setup/database/db2/db2jcc_v9.jar +call mvn install:install-file -DgroupId=com.ibm.db2.jcc -DartifactId=db2jcc_license_cu -Dversion=V9 -Dpackaging=jar -Dfile=webapp/setup/database/db2/db2jcc_license_cu.jar + +echo Installing oracle-Driver to the local Maven-Repository.... +call mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.3 -Dpackaging=jar -Dfile=webapp/setup/database/oracle/ojdbc14-10.2.0.3.jar + +pause Index: modules/pom-template.xml =================================================================== RCS file: modules/pom-template.xml diff -N modules/pom-template.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ modules/pom-template.xml 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,139 @@ + + 4.0.0 + org.opencms.modules + @OPENCMS_MODULE_NAME@ + jar + @OPENCMS_MODULE_VERSION@ + @OPENCMS_MODULE_NAME@ + http://opencms.org + + + + 2008 + + + + + + + + + + + + + + + GNU LESSER GENERAL PUBLIC LICENSE 2.1 + http://www.gnu.org/licenses/lgpl-2.1.txt + repo + + + + + install + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.6 + 1.6 + + + + + + + + + + + + + + + + + + + org.opencms + opencms-core + 7.5.2 + provided + + + + + @OPENCMS_MODULE_DEPENDENCIES@ + + + + + + + opencms + http://bp-cms-commons.sourceforge.net/m2repo + + + + + + + + + scp-be-opencms-repository + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2repo + + + scp-be-opencms-snapshot-repository + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2snapshot + + + scp-be-opencms-site + scp://shell.sourceforge.net/home/groups/b/bp/bp-cms-commons/htdocs/m2site/opencms/${project.artifactId}/${project.version}/ + + +