Ergaenzung zu r81 (uebersehen)
git-svn-id: https://svn.libreccm.org/ccm/trunk@79 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
d53b382494
commit
0ac3d69922
|
|
@ -76,20 +76,21 @@ public final class BebopConfig extends AbstractConfig {
|
||||||
Parameter.REQUIRED,
|
Parameter.REQUIRED,
|
||||||
Boolean.FALSE);
|
Boolean.FALSE);
|
||||||
|
|
||||||
m_dhtmlEditor = new EnumerationParameter("waf.bebop.dhtml_editor", Parameter.REQUIRED,
|
m_dhtmlEditor = new EnumerationParameter("waf.bebop.dhtml_editor",
|
||||||
BebopConstants.BEBOP_DHTMLEDITOR);
|
Parameter.REQUIRED,BebopConstants.BEBOP_DHTMLEDITOR);
|
||||||
m_dhtmlEditor.put("HTMLArea", BebopConstants.BEBOP_DHTMLEDITOR); // for compatibility with old XSL
|
// HTMLArea for compatibility with old XSL
|
||||||
|
m_dhtmlEditor.put("HTMLArea", BebopConstants.BEBOP_DHTMLEDITOR);
|
||||||
m_dhtmlEditor.put("FCKeditor", BebopConstants.BEBOP_FCKEDITOR);
|
m_dhtmlEditor.put("FCKeditor", BebopConstants.BEBOP_FCKEDITOR);
|
||||||
m_dhtmlEditor.put("Xinha", BebopConstants.BEBOP_XINHAEDITOR);
|
m_dhtmlEditor.put("Xinha", BebopConstants.BEBOP_XINHAEDITOR);
|
||||||
|
|
||||||
m_dhtmlEditorSrcFile = new StringParameter
|
m_dhtmlEditorSrcFile = new StringParameter
|
||||||
("waf.bebop.dhtml_editor_src", Parameter.REQUIRED,
|
("waf.bebop.dhtml_editor_src", Parameter.REQUIRED,
|
||||||
"/assets/xinha/XinhaLoader.js");
|
"/assets/xinha/XinhaLoader.js");
|
||||||
|
|
||||||
m_dcpOnButtons = new BooleanParameter
|
m_dcpOnButtons = new BooleanParameter
|
||||||
("waf.bebop.dcp_on_buttons", Parameter.REQUIRED, Boolean.TRUE);
|
("waf.bebop.dcp_on_buttons", Parameter.REQUIRED, Boolean.TRUE);
|
||||||
m_dcpOnLinks = new BooleanParameter
|
m_dcpOnLinks = new BooleanParameter
|
||||||
("waf.bebop.dcp_on_links", Parameter.REQUIRED, Boolean.FALSE);
|
("waf.bebop.dcp_on_links", Parameter.REQUIRED, Boolean.FALSE);
|
||||||
|
|
||||||
m_showClassName = new BooleanParameter
|
m_showClassName = new BooleanParameter
|
||||||
("waf.bebop.show_class_name", Parameter.OPTIONAL, Boolean.FALSE);
|
("waf.bebop.show_class_name", Parameter.OPTIONAL, Boolean.FALSE);
|
||||||
|
|
@ -103,7 +104,7 @@ public final class BebopConfig extends AbstractConfig {
|
||||||
register(m_dcpOnButtons);
|
register(m_dcpOnButtons);
|
||||||
register(m_dcpOnLinks);
|
register(m_dcpOnLinks);
|
||||||
register(m_enableTreeSelect);
|
register(m_enableTreeSelect);
|
||||||
register(m_showClassName);
|
register(m_showClassName);
|
||||||
|
|
||||||
loadInfo();
|
loadInfo();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,27 +47,32 @@ import com.arsdigita.xml.Element;
|
||||||
*/
|
*/
|
||||||
public class DHTMLEditor extends TextArea {
|
public class DHTMLEditor extends TextArea {
|
||||||
|
|
||||||
public static final String versionId = "$Id: DHTMLEditor.java 1543 2007-03-27 09:11:02Z chrisgilbert23 $";
|
public static final String versionId =
|
||||||
/**
|
"$Id: DHTMLEditor.java 1543 2007-03-27 09:11:02Z chrisgilbert23 $";
|
||||||
* Constant for specifying <tt>OFF</tt> value for the
|
|
||||||
* <tt>WRAP</tt> attribute of this image input. See <a
|
|
||||||
* href="http://developer.netscape.com/docs/manuals/htmlguid/tags10.htm#1340340">here</a>
|
|
||||||
* for a description of what this attribute does. */
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constant for specifying <tt>OFF</tt> value for the <tt>WRAP</tt> attribute
|
||||||
|
* of this image input.
|
||||||
|
*
|
||||||
|
* See <a href="http:
|
||||||
|
* //developer.netscape.com/docs/manuals/htmlguid/tags10.htm#1340340">here</a>
|
||||||
|
* for a description of what this attribute does. */
|
||||||
public static final int OFF = 0;
|
public static final int OFF = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constant for specifying <tt>HARD</tt> value for the
|
* Constant for specifying <tt>HARD</tt> value for the <tt>WRAP</tt> attribute
|
||||||
* <tt>WRAP</tt> attribute of this image input. * See <a
|
* of this image input.
|
||||||
* //href="http://developer.netscape.com/docs/manuals/htmlguid/tags10.htm#1340340">here</a>
|
*
|
||||||
|
* See <a href="http://
|
||||||
|
* developer.netscape.com/docs/manuals/htmlguid/tags10.htm#1340340">here</a>
|
||||||
* for a description of what this attribute does.
|
* for a description of what this attribute does.
|
||||||
*/
|
*/
|
||||||
public static final int HARD = 1;
|
public static final int HARD = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constant for specifying <tt>SOFT</tt> value for the
|
* Constant for specifying <tt>SOFT</tt> value for the <tt>WRAP</tt> attribute
|
||||||
* <tt>WRAP</tt> attribute of this image input. See <a
|
* of this image input. See <a href="http://
|
||||||
* href="http://developer.netscape.com/docs/manuals/htmlguid/tags10.htm#1340340">here</a>
|
* developer.netscape.com/docs/manuals/htmlguid/tags10.htm#1340340">here</a>
|
||||||
* for a description of what this attribute does.
|
* for a description of what this attribute does.
|
||||||
*/
|
*/
|
||||||
public static final int SOFT = 2;
|
public static final int SOFT = 2;
|
||||||
|
|
@ -76,11 +81,13 @@ public class DHTMLEditor extends TextArea {
|
||||||
public static final Config STANDARD = new Config("HTMLArea.Config", null);
|
public static final Config STANDARD = new Config("HTMLArea.Config", null);
|
||||||
|
|
||||||
/** Example FCKEditor configuration. */
|
/** Example FCKEditor configuration. */
|
||||||
public static final Config FCK_STANDARD = new Config("FCKEditor.Config.StyleDefault",
|
public static final Config FCK_STANDARD =
|
||||||
"/assets/fckeditor/config/fckconfigstyledefault.js");
|
new Config("FCKEditor.Config.StyleDefault",
|
||||||
|
"/assets/fckeditor/config/fckconfigstyledefault.js");
|
||||||
|
|
||||||
public static final Config FCK_CMSADMIN = new Config("FCKEditor.Config.StyleCMSAdmin",
|
public static final Config FCK_CMSADMIN =
|
||||||
"/assets/fckeditor/config/fckconfigstylecmsadmin.js");
|
new Config("FCKEditor.Config.StyleCMSAdmin",
|
||||||
|
"/assets/fckeditor/config/fckconfigstylecmsadmin.js");
|
||||||
|
|
||||||
private String m_name;
|
private String m_name;
|
||||||
private String m_path;
|
private String m_path;
|
||||||
|
|
@ -149,7 +156,8 @@ public class DHTMLEditor extends TextArea {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEditorURL() {
|
public String getEditorURL() {
|
||||||
return Bebop.getConfig().getDHTMLEditorSrcFile().substring(0, Bebop.getConfig().getDHTMLEditorSrcFile().lastIndexOf("/") + 1);
|
return Bebop.getConfig().getDHTMLEditorSrcFile().substring(
|
||||||
|
0, Bebop.getConfig().getDHTMLEditorSrcFile().lastIndexOf("/") + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEditorSrc() {
|
public String getEditorSrc() {
|
||||||
|
|
@ -172,7 +180,7 @@ public class DHTMLEditor extends TextArea {
|
||||||
m_plugins.add(name);
|
m_plugins.add(name);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Prevent the specified button from being displayed in the editor toolbar
|
* Prevent the specified button from being displayed in the editor toolbar.
|
||||||
* @param name name of the button, as specified in the btnList of the htmlarea.js file
|
* @param name name of the button, as specified in the btnList of the htmlarea.js file
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,10 @@ package com.arsdigita.bebop.util;
|
||||||
* @version $Id: BebopConstants.java 1224 2006-06-18 22:28:30Z apevec $
|
* @version $Id: BebopConstants.java 1224 2006-06-18 22:28:30Z apevec $
|
||||||
*/
|
*/
|
||||||
public interface BebopConstants {
|
public interface BebopConstants {
|
||||||
public static final String versionId = "$Id: BebopConstants.java 1224 2006-06-18 22:28:30Z apevec $ by $Author: apevec $, $DateTime: 2004/08/16 18:10:38 $";
|
public static final String versionId =
|
||||||
|
"$Id: BebopConstants.java 1224 2006-06-18 22:28:30Z apevec $" +
|
||||||
|
" by $Author: apevec $, " +
|
||||||
|
"$DateTime: 2004/08/16 18:10:38 $";
|
||||||
|
|
||||||
String BEBOP_CHECKBOXGROUP = "bebop:checkboxGroup";
|
String BEBOP_CHECKBOXGROUP = "bebop:checkboxGroup";
|
||||||
String BEBOP_CHECKBOX = "bebop:checkbox";
|
String BEBOP_CHECKBOX = "bebop:checkbox";
|
||||||
|
|
@ -41,6 +44,7 @@ public interface BebopConstants {
|
||||||
String BEBOP_TEXTAREA = "bebop:textarea";
|
String BEBOP_TEXTAREA = "bebop:textarea";
|
||||||
String BEBOP_DHTMLEDITOR = "bebop:dhtmleditor";
|
String BEBOP_DHTMLEDITOR = "bebop:dhtmleditor";
|
||||||
String BEBOP_FCKEDITOR = "bebop:fckeditor";
|
String BEBOP_FCKEDITOR = "bebop:fckeditor";
|
||||||
|
String BEBOP_XINHAEDITOR = "bebop:xinha";
|
||||||
String BEBOP_FORMWIDGET = "bebop:formWidget";
|
String BEBOP_FORMWIDGET = "bebop:formWidget";
|
||||||
String BEBOP_FORMERRORS = "bebop:formErrors";
|
String BEBOP_FORMERRORS = "bebop:formErrors";
|
||||||
String BEBOP_PORTAL = "bebop:portal";
|
String BEBOP_PORTAL = "bebop:portal";
|
||||||
|
|
@ -61,6 +65,5 @@ public interface BebopConstants {
|
||||||
String BEBOP_SEGMENT = "bebop:segment";
|
String BEBOP_SEGMENT = "bebop:segment";
|
||||||
String BEBOP_SEG_BODY = "bebop:segmentBody";
|
String BEBOP_SEG_BODY = "bebop:segmentBody";
|
||||||
String BEBOP_SEG_HEADER = "bebop:segmentHeader";
|
String BEBOP_SEG_HEADER = "bebop:segmentHeader";
|
||||||
String BEBOP_XINHAEDITOR = "bebop:xinha";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,173 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
* the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.arsdigita.core;
|
||||||
|
|
||||||
|
import com.arsdigita.auditing.BasicAuditTrail;
|
||||||
|
import com.arsdigita.db.DbHelper;
|
||||||
|
import com.arsdigita.domain.DomainObject;
|
||||||
|
import com.arsdigita.domain.DomainObjectInstantiator;
|
||||||
|
import com.arsdigita.kernel.ACSObjectInstantiator;
|
||||||
|
import com.arsdigita.loader.CoreLoader;
|
||||||
|
import com.arsdigita.persistence.DataObject;
|
||||||
|
import com.arsdigita.persistence.Session;
|
||||||
|
import com.arsdigita.persistence.SessionManager;
|
||||||
|
import com.arsdigita.persistence.TransactionContext;
|
||||||
|
import com.arsdigita.persistence.pdl.ManifestSource;
|
||||||
|
import com.arsdigita.persistence.pdl.NameFilter;
|
||||||
|
import com.arsdigita.runtime.CompoundInitializer;
|
||||||
|
import com.arsdigita.runtime.DomainInitEvent;
|
||||||
|
import com.arsdigita.runtime.LegacyInitEvent;
|
||||||
|
import com.arsdigita.runtime.LegacyInitializer;
|
||||||
|
import com.arsdigita.runtime.OptionalLegacyInitializer;
|
||||||
|
import com.arsdigita.runtime.PDLInitializer;
|
||||||
|
import com.arsdigita.runtime.RuntimeConfig;
|
||||||
|
import com.arsdigita.ui.admin.Admin;
|
||||||
|
import com.arsdigita.ui.sitemap.SiteMap;
|
||||||
|
import com.arsdigita.util.xml.XML;
|
||||||
|
import com.arsdigita.web.Host;
|
||||||
|
import com.arsdigita.web.WebApp;
|
||||||
|
import com.arsdigita.web.ApplicationType;
|
||||||
|
import com.arsdigita.workflow.simple.TaskComment;
|
||||||
|
import com.arsdigita.search.converter.Converter;
|
||||||
|
import com.arsdigita.search.converter.ConverterRegistry;
|
||||||
|
import com.arsdigita.search.converter.PDFConverter;
|
||||||
|
import com.arsdigita.search.converter.ExcelConverter;
|
||||||
|
import com.arsdigita.search.converter.OOConverter;
|
||||||
|
import com.arsdigita.search.converter.WordConverter;
|
||||||
|
import com.arsdigita.search.converter.TextConverter;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CoreInitializer
|
||||||
|
*
|
||||||
|
* @author Rafael H. Schloming <rhs@mit.edu>
|
||||||
|
* @version $Revision: #15 $ $Date: 2004/08/16 $
|
||||||
|
**/
|
||||||
|
|
||||||
|
public class Initializer extends CompoundInitializer {
|
||||||
|
|
||||||
|
public final static String versionId = "$Id: Initializer.java 1547 2007-03-29 14:24:57Z chrisgilbert23 $ by $Author: chrisgilbert23 $, $DateTime: 2004/08/16 18:10:38 $";
|
||||||
|
|
||||||
|
public Initializer() {
|
||||||
|
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
||||||
|
final int database = DbHelper.getDatabaseFromURL(url);
|
||||||
|
|
||||||
|
add(new com.arsdigita.persistence.Initializer());
|
||||||
|
|
||||||
|
add(new PDLInitializer
|
||||||
|
(new ManifestSource
|
||||||
|
("ccm-core.pdl.mf",
|
||||||
|
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
|
||||||
|
|
||||||
|
add(new LegacyInitializer("com/arsdigita/core/enterprise.init"));
|
||||||
|
add(new OptionalLegacyInitializer("enterprise.init"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public final void init(final DomainInitEvent e) {
|
||||||
|
super.init(e);
|
||||||
|
|
||||||
|
e.getFactory().registerInstantiator
|
||||||
|
(Host.BASE_DATA_OBJECT_TYPE,
|
||||||
|
new DomainObjectInstantiator() {
|
||||||
|
public DomainObject doNewInstance(DataObject dobj) {
|
||||||
|
return new Host(dobj);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
e.getFactory().registerInstantiator
|
||||||
|
(ApplicationType.BASE_DATA_OBJECT_TYPE,
|
||||||
|
new DomainObjectInstantiator() {
|
||||||
|
public DomainObject doNewInstance(DataObject dobj) {
|
||||||
|
return new ApplicationType(dobj);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
e.getFactory().registerInstantiator
|
||||||
|
(WebApp.BASE_DATA_OBJECT_TYPE,
|
||||||
|
new DomainObjectInstantiator() {
|
||||||
|
public DomainObject doNewInstance(final DataObject data) {
|
||||||
|
return new WebApp(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
e.getFactory().registerInstantiator
|
||||||
|
(TaskComment.BASE_DATA_OBJECT_TYPE,
|
||||||
|
new DomainObjectInstantiator() {
|
||||||
|
public DomainObject doNewInstance(final DataObject data) {
|
||||||
|
return new TaskComment(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
e.getFactory().registerInstantiator
|
||||||
|
(Admin.BASE_DATA_OBJECT_TYPE,
|
||||||
|
new ACSObjectInstantiator() {
|
||||||
|
public DomainObject doNewInstance(final DataObject data) {
|
||||||
|
return new Admin(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
e.getFactory().registerInstantiator
|
||||||
|
(SiteMap.BASE_DATA_OBJECT_TYPE,
|
||||||
|
new ACSObjectInstantiator() {
|
||||||
|
public DomainObject doNewInstance(final DataObject data) {
|
||||||
|
return new SiteMap(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
e.getFactory().registerInstantiator
|
||||||
|
(BasicAuditTrail.BASE_DATA_OBJECT_TYPE,
|
||||||
|
new DomainObjectInstantiator() {
|
||||||
|
public DomainObject doNewInstance(final DataObject data) {
|
||||||
|
return new BasicAuditTrail(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// register the document converters
|
||||||
|
Converter converter = new PDFConverter();
|
||||||
|
ConverterRegistry.registerConverter(converter,
|
||||||
|
converter.getMimeTypes());
|
||||||
|
|
||||||
|
converter = new ExcelConverter();
|
||||||
|
ConverterRegistry.registerConverter(converter,
|
||||||
|
converter.getMimeTypes());
|
||||||
|
|
||||||
|
converter = new WordConverter();
|
||||||
|
ConverterRegistry.registerConverter(converter,
|
||||||
|
converter.getMimeTypes());
|
||||||
|
|
||||||
|
converter = new OOConverter();
|
||||||
|
ConverterRegistry.registerConverter(converter,
|
||||||
|
converter.getMimeTypes());
|
||||||
|
|
||||||
|
converter = new TextConverter();
|
||||||
|
ConverterRegistry.registerConverter(converter,
|
||||||
|
converter.getMimeTypes());
|
||||||
|
}
|
||||||
|
|
||||||
|
public final void init(final LegacyInitEvent e) {
|
||||||
|
super.init(e);
|
||||||
|
|
||||||
|
Session session = SessionManager.getSession();
|
||||||
|
TransactionContext txn = session.getTransactionContext();
|
||||||
|
txn.beginTxn();
|
||||||
|
CoreLoader.loadHost();
|
||||||
|
txn.commitTxn();
|
||||||
|
|
||||||
|
XML.setupFactories();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
* the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.arsdigita.core;
|
||||||
|
|
||||||
|
import com.arsdigita.loader.CoreLoader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loader used during the initial setup to load the database, used by
|
||||||
|
* c.ad.packaging.Load (invoked via "ccm load ..." command)
|
||||||
|
*
|
||||||
|
* The loader is specified in the file "/ccm-core.load" (which follows the
|
||||||
|
* general naming scheme <package-key>.load).
|
||||||
|
*
|
||||||
|
* Currently just a wrapper for Class CoreLoader which does the actual work.
|
||||||
|
*
|
||||||
|
* ToDo: Should we move CoreLoader into Loader here for systematic reasons? All
|
||||||
|
* modules use a class Loader (or sometimes <package>Loader) located in the
|
||||||
|
* base package of the module. Alternatively: put all Loader classes into a
|
||||||
|
* package "loader".
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public final class Loader extends CoreLoader {
|
||||||
|
// Empty
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue