Relativ grosser Patch, ersetzt URL resource: Protokollerweiterung durch Klasse ResourceParameter. Deployment von ccm-core-x.a.z-system.jar ist entfernt, der Handler code aber noch vorhanden.

git-svn-id: https://svn.libreccm.org/ccm/trunk@175 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2009-05-24 10:03:53 +00:00
parent 65cfd085e2
commit 7a2aa8dd32
53 changed files with 958 additions and 659 deletions

View File

@ -21,12 +21,13 @@ package com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.ContentType; import com.arsdigita.cms.ContentType;
import com.arsdigita.cms.lifecycle.LifecycleDefinition; import com.arsdigita.cms.lifecycle.LifecycleDefinition;
import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.URLParameter; import com.arsdigita.util.parameter.ResourceParameter;
import com.arsdigita.workflow.simple.WorkflowTemplate; import com.arsdigita.workflow.simple.WorkflowTemplate;
import java.net.MalformedURLException;
import java.net.URL; import java.io.InputStream;
import org.apache.log4j.Logger;
/** /**
* Loader. * Loader.
@ -35,11 +36,14 @@ import java.net.URL;
* @version $Id: MultiPartArticleLoader.java 1561 2007-04-16 15:37:21Z apevec $ * @version $Id: MultiPartArticleLoader.java 1561 2007-04-16 15:37:21Z apevec $
*/ */
public class MultiPartArticleLoader extends AbstractContentTypeLoader { public class MultiPartArticleLoader extends AbstractContentTypeLoader {
public final static String versionId = public final static String versionId =
"$Id: MultiPartArticleLoader.java 1561 2007-04-16 15:37:21Z apevec $" + "$Id: MultiPartArticleLoader.java 1561 2007-04-16 15:37:21Z apevec $" +
"$Author: apevec $" + "$Author: apevec $" +
"$DateTime: 2004/08/17 23:15:09 $"; "$DateTime: 2004/08/17 23:15:09 $";
private static final Logger s_log = Logger.getLogger(MultiPartArticleLoader.class);
private static final String[] TYPES = { private static final String[] TYPES = {
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/MultiPartArticle.xml" "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/MultiPartArticle.xml"
}; };
@ -48,23 +52,20 @@ public class MultiPartArticleLoader extends AbstractContentTypeLoader {
return TYPES; return TYPES;
} }
private URLParameter m_template; private ResourceParameter m_template;
public MultiPartArticleLoader() { public MultiPartArticleLoader() {
try {
m_template = new URLParameter m_template = new ResourceParameter
("com.arsdigita.cms.contenttypes.mparticle.template", ("com.arsdigita.cms.contenttypes.mparticle.template",
Parameter.REQUIRED, Parameter.REQUIRED,
new URL(null, "/WEB-INF/content-types/com/arsdigita/cms/contenttypes" +
"resource:WEB-INF/content-types/com/arsdigita/cms/contenttypes" + "/mparticle-item.jsp");
"/mparticle-item.jsp"));
} catch (MalformedURLException ex) {
throw new UncheckedWrapperException("cannot parse url", ex);
}
register(m_template); register(m_template);
} }
@Override
protected void prepareSection(final ContentSection section, protected void prepareSection(final ContentSection section,
final ContentType type, final ContentType type,
final LifecycleDefinition ld, final LifecycleDefinition ld,
@ -73,7 +74,7 @@ public class MultiPartArticleLoader extends AbstractContentTypeLoader {
setDefaultTemplate("MultiPartArticle-mparticle-item", setDefaultTemplate("MultiPartArticle-mparticle-item",
"mparticle-item", "mparticle-item",
(URL)get(m_template), (InputStream)get(m_template),
section, type,ld, wf); section, type,ld, wf);
} }

View File

@ -60,8 +60,12 @@ public class MultiPartArticleTroikaRickshawUpgrade {
final ContentType type = ContentType.findByAssociatedObjectType final ContentType type = ContentType.findByAssociatedObjectType
(MultiPartArticle.BASE_DATA_OBJECT_TYPE); (MultiPartArticle.BASE_DATA_OBJECT_TYPE);
// URL resource: protocol extension no longer supported!
// Replace by ResourceParameter (if applicable) or ordinary string
// and open as this.getclass().getResourceAsStream()
final URL templateURL = new URL final URL templateURL = new URL
(null, "resource:WEB-INF/content-types/com/arsdigita/cms" + (null, "resource:WEB-INF/content-types/com/arsdigita/cms" +
// ^^^^^^^^^ no longer supperted !!
"/contenttypes/mparticle-item.jsp"); "/contenttypes/mparticle-item.jsp");
final ContentSectionCollection coll = ContentSection.getAllSections(); final ContentSectionCollection coll = ContentSection.getAllSections();

View File

@ -18,16 +18,16 @@
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader; // import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
import com.arsdigita.cms.ContentType; import com.arsdigita.cms.ContentType;
import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.lifecycle.LifecycleDefinition; import com.arsdigita.cms.lifecycle.LifecycleDefinition;
import com.arsdigita.workflow.simple.WorkflowTemplate;
import com.arsdigita.util.UncheckedWrapperException;
import java.net.URL;
import java.net.MalformedURLException;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.URLParameter; import com.arsdigita.util.parameter.ResourceParameter;
// import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.workflow.simple.WorkflowTemplate;
import java.io.InputStream;
// import java.net.MalformedURLException;
/** /**
@ -46,19 +46,14 @@ public class SiteProxyLoader extends AbstractContentTypeLoader {
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SiteProxy.xml" "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SiteProxy.xml"
}; };
private URLParameter m_template; private ResourceParameter m_template;
public SiteProxyLoader() { public SiteProxyLoader() {
try { m_template = new ResourceParameter
m_template = new URLParameter
("com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate", ("com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate",
Parameter.REQUIRED, Parameter.REQUIRED,
new URL(null, "/WEB-INF/content-types/com/arsdigita/cms/contenttypes" +
"resource:WEB-INF/content-types/com/arsdigita/cms/contenttypes" + "/siteproxy-item.jsp");
"/siteproxy-item.jsp"));
} catch (MalformedURLException ex) {
throw new UncheckedWrapperException("cannot parse url", ex);
}
register(m_template); register(m_template);
} }
@ -67,6 +62,7 @@ public class SiteProxyLoader extends AbstractContentTypeLoader {
return TYPES; return TYPES;
} }
@Override
protected void prepareSection(final ContentSection section, protected void prepareSection(final ContentSection section,
final ContentType type, final ContentType type,
final LifecycleDefinition ld, final LifecycleDefinition ld,
@ -75,7 +71,7 @@ public class SiteProxyLoader extends AbstractContentTypeLoader {
setDefaultTemplate("SiteProxyDefaultTemplate", setDefaultTemplate("SiteProxyDefaultTemplate",
"siteproxy-item", "siteproxy-item",
(URL)get(m_template), (InputStream)get(m_template),
section, type,ld, wf); section, type,ld, wf);
} }

View File

@ -18,19 +18,16 @@
*/ */
package com.arsdigita.cms; package com.arsdigita.cms;
import java.io.IOException; /* May 2009:
import java.io.InputStream; * This file serves as an information for developers how to replace
import java.net.MalformedURLException; * the URL resource: protocol extension (which is a application specific,
import java.net.URL; * non-standard extension of the Java URL protocol) by supported,
import java.util.Collection; * standard compliant API.
import java.util.HashMap; *
import java.util.HashSet; * Look for:
import java.util.Iterator; * // URL resource: protocol handler removal: START
import java.util.LinkedList; * Will be removed as soon as a stable release 6.6 is created.
import java.util.List; */
import java.util.Map;
import org.apache.log4j.Logger;
import com.arsdigita.bebop.SimpleComponent; import com.arsdigita.bebop.SimpleComponent;
import com.arsdigita.bebop.form.DHTMLEditor; import com.arsdigita.bebop.form.DHTMLEditor;
@ -45,7 +42,10 @@ import com.arsdigita.cms.publishToFile.PublishToFileListener;
import com.arsdigita.cms.ui.authoring.ItemCategoryExtension; import com.arsdigita.cms.ui.authoring.ItemCategoryExtension;
import com.arsdigita.cms.ui.authoring.ItemCategoryForm; import com.arsdigita.cms.ui.authoring.ItemCategoryForm;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.UncheckedWrapperException; // URL resource: protocol handler removal: START
// remove
// import com.arsdigita.util.UncheckedWrapperException;
// URL resource: protocol handler removal: END
import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.BooleanParameter;
import com.arsdigita.util.parameter.ClassParameter; import com.arsdigita.util.parameter.ClassParameter;
import com.arsdigita.util.parameter.EnumerationParameter; import com.arsdigita.util.parameter.EnumerationParameter;
@ -53,10 +53,35 @@ import com.arsdigita.util.parameter.ErrorList;
import com.arsdigita.util.parameter.IntegerParameter; import com.arsdigita.util.parameter.IntegerParameter;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.ParameterError; import com.arsdigita.util.parameter.ParameterError;
// URL resource: protocol handler removal: START
// new: import:
import com.arsdigita.util.parameter.ResourceParameter;
// URL resource: protocol handler removal: END
import com.arsdigita.util.parameter.StringArrayParameter; import com.arsdigita.util.parameter.StringArrayParameter;
import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.StringParameter;
import com.arsdigita.util.parameter.URLParameter; // URL resource: protocol handler removal: START
// remove:
// import com.arsdigita.util.parameter.URLParameter;
// new: import:
import com.arsdigita.util.StringUtils; import com.arsdigita.util.StringUtils;
// URL resource: protocol handler removal: END
// URL resource: protocol handler removal: START
// remove:
// import java.io.IOException;
// import java.net.MalformedURLException;
// import java.net.URL;
// URL resource: protocol handler removal: END
import java.io.InputStream;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
/** /**
* A record containing server-session scoped configuration properties. * A record containing server-session scoped configuration properties.
@ -198,14 +223,22 @@ public final class ContentSectionConfig extends AbstractConfig {
("com.arsdigita.cms.use_section_categories", ("com.arsdigita.cms.use_section_categories",
Parameter.REQUIRED, new Boolean(true)); Parameter.REQUIRED, new Boolean(true));
try { // URL resource: protocol handler removal: START
m_itemAdapters = new URLParameter // remove:
// try {
// m_itemAdapters = new URLParameter
// ("com.arsdigita.cms.item_adapters",
// Parameter.REQUIRED,
// new URL("resource:WEB-INF/resources/cms-item-adapters.xml"));
// } catch (MalformedURLException ex) {
// throw new UncheckedWrapperException("Cannot parse URL", ex);
// }
// ADD:
m_itemAdapters = new ResourceParameter
("com.arsdigita.cms.item_adapters", ("com.arsdigita.cms.item_adapters",
Parameter.REQUIRED, Parameter.REQUIRED,
new URL("resource:WEB-INF/resources/cms-item-adapters.xml")); "/WEB-INF/resources/cms-item-adapters.xml");
} catch (MalformedURLException ex) { // URL resource: protocol handler removal: END
throw new UncheckedWrapperException("Cannot parse URL", ex);
}
m_defaultSection = new StringParameter m_defaultSection = new StringParameter
("com.arsdigita.cms.default_content_section", ("com.arsdigita.cms.default_content_section",
@ -456,11 +489,15 @@ public final class ContentSectionConfig extends AbstractConfig {
} }
public final InputStream getItemAdapters() { public final InputStream getItemAdapters() {
try { // URL resource: protocol handler removal: START
return ((URL)get(m_itemAdapters)).openStream(); // remove:
} catch (IOException ex) { // try {
throw new UncheckedWrapperException("Cannot read stream", ex); // return ((URL)get(m_itemAdapters)).openStream();
} // } catch (IOException ex) {
// throw new UncheckedWrapperException("Cannot read stream", ex);
// }
// ADD:
return (InputStream)get(m_itemAdapters);
} }
public final String getDefaultContentSection() { public final String getDefaultContentSection() {
@ -576,6 +613,7 @@ public final class ContentSectionConfig extends AbstractConfig {
} }
// value != null // value != null
@Override
protected Object unmarshal(String value, ErrorList errors) { protected Object unmarshal(String value, ErrorList errors) {
Class theClass = (Class) super.unmarshal(value,errors); Class theClass = (Class) super.unmarshal(value,errors);
if (theClass != null) { if (theClass != null) {
@ -597,6 +635,7 @@ public final class ContentSectionConfig extends AbstractConfig {
super(name, multiplicity, defaultObj); super(name, multiplicity, defaultObj);
} }
@Override
protected Object unmarshal(String value, ErrorList errors) { protected Object unmarshal(String value, ErrorList errors) {
return DHTMLEditor.Config.valueOf(value); return DHTMLEditor.Config.valueOf(value);
} }

View File

@ -49,9 +49,9 @@ com.arsdigita.cms.use_section_categories.example=true
com.arsdigita.cms.use_section_categories.format=[boolean] com.arsdigita.cms.use_section_categories.format=[boolean]
com.arsdigita.cms.item_adapters.title=Item Adapters File com.arsdigita.cms.item_adapters.title=Item Adapters File
com.arsdigita.cms.item_adapters.purpose=The URL to an XML resource containing adapter specifications. com.arsdigita.cms.item_adapters.purpose=Path to an XML resource containing adapter specifications. Path is relative to webapp root.
com.arsdigita.cms.item_adapters.example=resource:WEB-INF/resources/cms-item-adapters.xml com.arsdigita.cms.item_adapters.example=/WEB-INF/resources/cms-item-adapters.xml
com.arsdigita.cms.item_adapters.format=[url] com.arsdigita.cms.item_adapters.format=[string]
com.arsdigita.cms.default_content_section.title = Default Content Section com.arsdigita.cms.default_content_section.title = Default Content Section
com.arsdigita.cms.default_content_section.purpose = The name of the default content section com.arsdigita.cms.default_content_section.purpose = The name of the default content section

View File

@ -45,7 +45,6 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.util.Date; import java.util.Date;
import java.net.URL;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@ -61,7 +60,10 @@ import java.util.List;
public abstract class AbstractContentTypeLoader extends PackageLoader { public abstract class AbstractContentTypeLoader extends PackageLoader {
public final static String versionId = "$Id: AbstractContentTypeLoader.java 754 2005-09-02 13:26:17Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/17 23:15:09 $"; public final static String versionId =
"$Id: AbstractContentTypeLoader.java 754 2005-09-02 13:26:17Z sskracic $" +
" by $Author: sskracic $, " +
"$DateTime: 2004/08/17 23:15:09 $";
public void run(final ScriptContext ctx) { public void run(final ScriptContext ctx) {
new KernelExcursion() { new KernelExcursion() {
@ -161,7 +163,7 @@ public abstract class AbstractContentTypeLoader extends PackageLoader {
*/ */
protected Template setDefaultTemplate(final String name, protected Template setDefaultTemplate(final String name,
final String label, final String label,
final URL templateURL, final InputStream templateIs,
final ContentSection section, final ContentSection section,
final ContentType type, final ContentType type,
final LifecycleDefinition ld, final LifecycleDefinition ld,
@ -172,17 +174,10 @@ public abstract class AbstractContentTypeLoader extends PackageLoader {
template.setContentSection(section); template.setContentSection(section);
template.setParent(section.getTemplatesFolder()); template.setParent(section.getTemplatesFolder());
InputStream stream; Assert.isTrue(templateIs != null, "Template not found");
try {
stream = templateURL.openStream();
} catch (IOException ex) {
throw new UncheckedWrapperException("Cannot read stream", ex);
}
Assert.truth(stream != null, "Template not found");
final BufferedReader input = new BufferedReader final BufferedReader input = new BufferedReader
(new InputStreamReader(stream)); (new InputStreamReader(templateIs));
final StringBuffer body = new StringBuffer(); final StringBuffer body = new StringBuffer();

View File

@ -16,14 +16,19 @@
<ccm:buildRequires name="postgresql-jdbc"/> <ccm:buildRequires name="postgresql-jdbc"/>
<ccm:runRequires name="ccm-servlet-2.3"/> <ccm:runRequires name="ccm-servlet-2.3"/>
</ccm:dependencies> </ccm:dependencies>
<!-- As of Tomcat 6 obviously no longer needed to avoid the malformed URL exception
thrown by the resource URL method <!-- DEPRECATED
Correction: Still needed. URL resource protocoll must be replaced by another Up to version APLAWS+ 1.0.5 / CCM 6.5 the system used an application
Solution, e.g. reuse of ResourceParameter specific URL resource: protocol extension which required a system jar
--> file to be distributed to a special directory in Tomcat and a special
Tomcat configuration (ext.lib.dir).
Now replaced by standard compliant code. Mechanism preserved here as an
template just in case needed for another purpose.
<ccm:systemPackages> <ccm:systemPackages>
<ccm:package path="com/arsdigita/util/protocol/"/> <ccm:package path="com/arsdigita/util/protocol/"/>
</ccm:systemPackages> </ccm:systemPackages>
-->
<ccm:contacts> <ccm:contacts>
<ccm:contact uri="http://www.redhat.com/software/rhea" type="website"/> <ccm:contact uri="http://www.redhat.com/software/rhea" type="website"/>
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/> <ccm:contact uri="mailto:rhea@redhat.com" type="support"/>

View File

@ -45,19 +45,14 @@
<target name="clean-build-hook"/> <target name="clean-build-hook"/>
<target name="clean-tests-hook"/> <target name="clean-tests-hook"/>
<!-- Old way with proprietary locations, separate contexts per module, and ccm perl scripts
<target name="deploy-hook">
<fail message="Property deploy.dir.ccm-core not defined."
unless="deploy.dir.ccm-core" />
<mkdir dir="${deploy.dir.ccm-core}/WEB-INF/conf"/>
<copy todir="${deploy.dir.ccm-core}/WEB-INF/conf" file="${src.dir}/log4j.properties"/>
</target>
-->
<target name="deploy-hook"> <target name="deploy-hook">
<fail message="Property this.deploy.dir not defined." <fail message="Property this.deploy.dir not defined."
unless="this.deploy.dir" /> unless="this.deploy.dir" />
<!-- deploy the log4j configuration file into the web applications
document root tree -->
<mkdir dir="${this.deploy.dir}/WEB-INF/conf"/> <mkdir dir="${this.deploy.dir}/WEB-INF/conf"/>
<copy todir="${this.deploy.dir}/WEB-INF/conf" file="${src.dir}/log4j.properties"/> <copy todir="${this.deploy.dir}/WEB-INF/conf"
file="${src.dir}/log4j.properties"/>
</target> </target>
</project> </project>

View File

@ -18,15 +18,6 @@
*/ */
package com.arsdigita.loader; package com.arsdigita.loader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Locale;
import javax.mail.internet.InternetAddress;
import org.apache.log4j.Logger;
import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.kernel.EmailAddress; import com.arsdigita.kernel.EmailAddress;
import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Kernel;
@ -53,7 +44,7 @@ import com.arsdigita.ui.sitemap.SiteMap;
import com.arsdigita.util.Assert; import com.arsdigita.util.Assert;
import com.arsdigita.util.StringUtils; import com.arsdigita.util.StringUtils;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.util.parameter.CSVParameterLoader; import com.arsdigita.util.parameter.CSVParameterReader;
import com.arsdigita.util.parameter.EmailParameter; import com.arsdigita.util.parameter.EmailParameter;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.StringParameter;
@ -63,6 +54,15 @@ import com.arsdigita.web.ApplicationType;
import com.arsdigita.web.Host; import com.arsdigita.web.Host;
import com.arsdigita.web.Web; import com.arsdigita.web.Web;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Locale;
import javax.mail.internet.InternetAddress;
import org.apache.log4j.Logger;
/** /**
* CoreLoader * CoreLoader
* *
@ -441,7 +441,7 @@ public class CoreLoader extends PackageLoader {
try { try {
MimeTypeRow row = new MimeTypeRow(); MimeTypeRow row = new MimeTypeRow();
CSVParameterLoader loader = new CSVParameterLoader CSVParameterReader loader = new CSVParameterReader
(new InputStreamReader(is), row.getParameters()); (new InputStreamReader(is), row.getParameters());
while (loader.next()) { while (loader.next()) {

View File

@ -27,6 +27,7 @@ import com.arsdigita.util.parameter.StringParameter;
import com.arsdigita.util.parameter.URLParameter; import com.arsdigita.util.parameter.URLParameter;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.web.Web; import com.arsdigita.web.Web;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.util.Properties; import java.util.Properties;
@ -40,7 +41,10 @@ import java.util.Properties;
public final class MailConfig extends AbstractConfig { public final class MailConfig extends AbstractConfig {
public final static String versionId = "$Id: MailConfig.java 1513 2007-03-22 09:09:03Z chrisgilbert23 $ by $Author: chrisgilbert23 $, $DateTime: 2004/08/16 18:10:38 $"; public final static String versionId =
"$Id: MailConfig.java 1513 2007-03-22 09:09:03Z chrisgilbert23 $" +
" by $Author: chrisgilbert23 $, "+
"$DateTime: 2004/08/16 18:10:38 $";
private Properties m_props; private Properties m_props;

View File

@ -2,10 +2,12 @@ waf.mail.debug.title=Mail debug flag
waf.mail.debug.purpose=Enables or disables debugging for the mail component waf.mail.debug.purpose=Enables or disables debugging for the mail component
waf.mail.debug.example=true waf.mail.debug.example=true
waf.mail.debug.format=true|false waf.mail.debug.format=true|false
waf.mail.javamail.configuration.title=JavaMail properties URL waf.mail.javamail.configuration.title=JavaMail properties URL
waf.mail.javamail.configuration.purpose=URL of properties file used to create JavaMail session for outgoing mail waf.mail.javamail.configuration.purpose=URL of properties file used to create JavaMail session for outgoing mail
waf.mail.javamail.configuration.example=file:///etc/javamail.properties waf.mail.javamail.configuration.example=file:///etc/javamail.properties
waf.mail.javamail.configuration.format=[url] waf.mail.javamail.configuration.format=[url]
waf.mail.send_html_mail.title=Send html messages as html emails waf.mail.send_html_mail.title=Send html messages as html emails
waf.mail.send_html_mail.purpose=Determine whether to send html messages as html, or convert to plain mail waf.mail.send_html_mail.purpose=Determine whether to send html messages as html, or convert to plain mail
waf.mail.send_html_mail.example=true|false waf.mail.send_html_mail.example=true|false

View File

@ -19,7 +19,7 @@
package com.arsdigita.runtime; package com.arsdigita.runtime;
// import com.arsdigita.runtime.RegistryConfig; // import com.arsdigita.runtime.RegistryConfig;
import com.arsdigita.runtime.CCMResourceManager; // import com.arsdigita.runtime.CCMResourceManager;
import com.arsdigita.util.Classes; import com.arsdigita.util.Classes;
import com.arsdigita.util.JavaPropertyReader; import com.arsdigita.util.JavaPropertyReader;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.UncheckedWrapperException;

View File

@ -22,15 +22,16 @@ import com.arsdigita.util.Assert;
import org.apache.commons.beanutils.ConversionException; import org.apache.commons.beanutils.ConversionException;
/** /**
* Subject to change. * A base implementation of the <code>Parameter</code> interface.
* *
* A base implementation of the <code>Parameter</code> interface. It * It offers subclasses use of the Apache BeanUtils framework, should
* offers subclasses use of the Apache BeanUtils framework, should
* they opt to use it. * they opt to use it.
* *
* Methods of the form <code>doXXX</code> are extension points for * Methods of the form <code>doXXX</code> are extension points for subclasses.
* subclasses. The <code>isRequired()</code> and * The <code>isRequired()</code> and <code>getDefaultValue()</code>
* <code>getDefaultValue()</code> methods may also be overriden. * methods may also be overriden.
*
* Subject to change.
* *
* @see Parameter * @see Parameter
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;
@ -105,9 +106,8 @@ public abstract class AbstractParameter implements Parameter {
} }
/** /**
* Parameter users may override this method to make the * Parameter users may override this method to make the multiplicity of
* multiplicity of the parameter dependent on the multiplicity of * the parameter dependent on the multiplicity of related parameters.
* related parameters.
* *
* @see Parameter#isRequired() * @see Parameter#isRequired()
*/ */
@ -151,13 +151,10 @@ public abstract class AbstractParameter implements Parameter {
// //
/** /**
* Calls {@link #doRead(ParameterReader,ErrorList)}. * Gets the parameter value as a Java object.
* *
* @see Parameter#read(ParameterReader,ErrorList) * The value will have a specific runtime type and so may be
* * appropriately cast.
* From Parameter#read(ParameterReader,ErrorList):
* Gets the parameter value as a Java object. The value will have
* a specific runtime type and so may be appropriately cast.
* *
* Reading typically follows the following procedure: * Reading typically follows the following procedure:
* *
@ -173,6 +170,8 @@ public abstract class AbstractParameter implements Parameter {
* added to <code>errors</code>. Callers of this method will * added to <code>errors</code>. Callers of this method will
* typically construct an <code>ErrorList</code> in which to * typically construct an <code>ErrorList</code> in which to
* collect errors. * collect errors.
* Actually calls {@link #doRead(ParameterReader,ErrorList)} (as an
* extension point for subclasses).
* *
* @param reader The <code>ParameterReader</code> from which to * @param reader The <code>ParameterReader</code> from which to
* recover a string literal value; it cannot be null * recover a string literal value; it cannot be null
@ -192,13 +191,13 @@ public abstract class AbstractParameter implements Parameter {
} }
/** /**
* Reads the value of the parameter from <code>reader</code>, * Extension point to read the value of the parameter from <code>reader</code>.
* unmarshals it, and returns it. If any errors are encountered, *
* It unmarshals the value, and returns it. If any errors are encountered,
* they are added to <code>errors</code>. * they are added to <code>errors</code>.
* *
* If the literal string value from <code>reader</code> is not * If the literal string value from <code>reader</code> is not null,
* null, this method delegates to {@link * this method delegates to {@link #unmarshal(String,ErrorList)}.
* #unmarshal(String,ErrorList)}.
* *
* This implementation is suited to a parameter with a singular * This implementation is suited to a parameter with a singular
* scalar value. Subclasses that are compound parameters should * scalar value. Subclasses that are compound parameters should

View File

@ -32,11 +32,11 @@ import java.util.Properties;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* Subject to change.
*
* A base implementation of the <code>ParameterContext</code> * A base implementation of the <code>ParameterContext</code>
* interface. * interface.
* *
* Subject to change.
*
* @see com.arsdigita.util.parameter.ParameterContext * @see com.arsdigita.util.parameter.ParameterContext
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;
* @version $Id: AbstractParameterContext.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: AbstractParameterContext.java 287 2005-02-22 00:29:02Z sskracic $
@ -98,10 +98,10 @@ public abstract class AbstractParameterContext implements ParameterContext {
} }
/** /**
* From ParameterContext#get(Parameter): * Gets the unmarshaled value of <code>param</code>.
* Gets the unmarshaled value of <code>param</code>. If the *
* loaded value is null, <code>param.getDefaultValue()</code> is * If the loaded value is null, <code>param.getDefaultValue()</code>
* returned. * is returned.
* *
* @param param The named <code>Parameter</code> whose value to * @param param The named <code>Parameter</code> whose value to
* retrieve; it cannot be null * retrieve; it cannot be null
@ -112,7 +112,6 @@ public abstract class AbstractParameterContext implements ParameterContext {
} }
/** /**
* From ParameterContext#get(Parameter,Object)
* Gets the unmarshaled value of <code>param</code>, returning * Gets the unmarshaled value of <code>param</code>, returning
* <code>dephalt</code> if <code>param</code>'s value is null. * <code>dephalt</code> if <code>param</code>'s value is null.
* *
@ -154,8 +153,6 @@ public abstract class AbstractParameterContext implements ParameterContext {
} }
/** /**
*
*
* Reads and unmarshals all values associated with the registered * Reads and unmarshals all values associated with the registered
* parameters from <code>reader</code>. Any errors are returned. * parameters from <code>reader</code>. Any errors are returned.
* *
@ -173,7 +170,6 @@ public abstract class AbstractParameterContext implements ParameterContext {
} }
/** /**
* From ParameterContext#load(ParameterReader,ErrorList):
* Reads and unmarshals all values associated with the registered * Reads and unmarshals all values associated with the registered
* parameters from <code>reader</code>. If any errors are * parameters from <code>reader</code>. If any errors are
* encountered, they are added to <code>errors</code>. * encountered, they are added to <code>errors</code>.

View File

@ -31,6 +31,9 @@ import javax.mail.internet.InternetAddress;
/** /**
* Demonstrates how to use the CSVParameterLoader class. * Demonstrates how to use the CSVParameterLoader class.
* *
* OUTDATED! CSVParameterLoader has become CSVParameterReader
* see CoreLoader as an example how to use CSVParamegterReader
*
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;
* @version $Id: CSV.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: CSV.java 287 2005-02-22 00:29:02Z sskracic $
*/ */

View File

@ -35,9 +35,9 @@ import java.util.List;
* list of parameter values) and .... * list of parameter values) and ....
* *
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;
* @version $Id: CSVParameterLoader.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: CSVParameterReader.java 287 2005-02-22 00:29:02Z sskracic $
*/ */
public final class CSVParameterLoader implements ParameterReader { public final class CSVParameterReader implements ParameterReader {
public final static String versionId = public final static String versionId =
"$Id: CSVParameterLoader.java 287 2005-02-22 00:29:02Z sskracic $" + "$Id: CSVParameterLoader.java 287 2005-02-22 00:29:02Z sskracic $" +
"$Author: sskracic $" + "$Author: sskracic $" +
@ -53,7 +53,7 @@ public final class CSVParameterLoader implements ParameterReader {
* @param reader: input stream to read values * @param reader: input stream to read values
* @param params: array of parameter objects to store procecced values * @param params: array of parameter objects to store procecced values
*/ */
public CSVParameterLoader(final Reader reader, final Parameter[] params) { public CSVParameterReader(final Reader reader, final Parameter[] params) {
m_reader = new LineNumberReader(reader); // input stream m_reader = new LineNumberReader(reader); // input stream
m_params = params; // array of parameters m_params = params; // array of parameters
m_line = new HashMap(params.length); // m_line = new HashMap(params.length); //
@ -72,6 +72,12 @@ public final class CSVParameterLoader implements ParameterReader {
return (String) m_line.get(param); return (String) m_line.get(param);
} }
/* /*
* May 2009: Obviously a reminiscence from previous versions of code. This class
* is currently used by coreloader only and it does not use the load method
* and it works with load commented out.
*
* Code should be removed after extensive testing.
*
public final ParameterValue load(final Parameter param) { public final ParameterValue load(final Parameter param) {
final ParameterValue value = new ParameterValue(); final ParameterValue value = new ParameterValue();

View File

@ -21,10 +21,10 @@ package com.arsdigita.util.parameter;
import org.apache.commons.beanutils.converters.ClassConverter; import org.apache.commons.beanutils.converters.ClassConverter;
/** /**
* Subject to change.
*
* A parameter representing a Java <code>Class</code>. * A parameter representing a Java <code>Class</code>.
* *
* Subject to change.
*
* @see java.lang.Class * @see java.lang.Class
* @see Parameter * @see Parameter
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;

View File

@ -21,10 +21,10 @@ package com.arsdigita.util.parameter;
import org.apache.commons.beanutils.converters.IntegerConverter; import org.apache.commons.beanutils.converters.IntegerConverter;
/** /**
* Subject to change.
*
* A parameter representing a Java <code>Integer</code>. * A parameter representing a Java <code>Integer</code>.
* *
* Subject to change.
*
* @see java.lang.Integer * @see java.lang.Integer
* @see Parameter * @see Parameter
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;

View File

@ -19,11 +19,13 @@
package com.arsdigita.util.parameter; package com.arsdigita.util.parameter;
/** /**
* Describes a named property that can read, write, and validate its
* own value.
*
* Subject to change. * Subject to change.
* *
* Describes a named property that can read, write, and validate its * See the documentation on {@link #read}, {@link #write}, and {@link #validate}
* own value. See the documentation on {@link #read}, {@link #write}, * for details.
* and {@link #validate} for details.
* They have the following features as well: * They have the following features as well:
* *
@ -49,9 +51,9 @@ package com.arsdigita.util.parameter;
* successfully or fail outright. * successfully or fail outright.
* *
* Parameters are stateless "messages". They do not store their own * Parameters are stateless "messages". They do not store their own
* values. Instead, a {@link * values. Instead, a {@link com.arsdigita.util.parameter.ParameterContext}
* com.arsdigita.util.parameter.ParameterContext} manages a set of * manages a set of parameters and keeps their values.
* parameters and keeps their values. *
* *
* Here's what it typically looks like to use a parameter: * Here's what it typically looks like to use a parameter:
* *
@ -174,7 +176,7 @@ public interface Parameter {
/** /**
* Writes the parameter value as a string literal. The parameter * Writes the parameter value as a string literal. The parameter
* marshals he object <code>value</code> to a string and sends it * marshals the object <code>value</code> to a string and sends it
* to <code>writer</code>. * to <code>writer</code>.
* *
* @param writer The <code>ParameterWriter</code> that will take * @param writer The <code>ParameterWriter</code> that will take

View File

@ -19,10 +19,12 @@
package com.arsdigita.util.parameter; package com.arsdigita.util.parameter;
/** /**
* Subject to change. * A container of parameters.
* *
* A container of parameters. A parameter context binds together a * A parameter context binds together a set of parameters and keeps their values.
* set of parameters and keeps their values. *
*
* Subject to change.
* *
* @see com.arsdigita.util.parameter.Parameter * @see com.arsdigita.util.parameter.Parameter
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;

View File

@ -23,22 +23,32 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URL;
import java.util.Iterator;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import com.arsdigita.util.UncheckedWrapperException;
/** /**
* A parameter representing a JEE <code>Resource</code> (input stream).
*
* This takes in a path and makes sure that the resource exists either * This takes in a path and makes sure that the resource exists either
* as a File or an actual resource. If it does, it returns the * as a File or an actual resource. If it does, it returns the
* InputStream for the given Resource. If it does not, and if it is * InputStream for the given Resource. If it does not, and if it is
* required, it logs an error. Otherwise, it returns null. * required, it logs an error. Otherwise, it returns null.
* *
* Development note / CHANGELOG
* Had been deprecated for a while in favour of an URLParameter and a * Had been deprecated for a while in favour of an URLParameter and a
* application specific resource: protocol extension (c.ad.util.protocol.resource). * application specific resource: protocol extension (c.ad.util.protocol.resource).
* As of version 6.5 reverted to ResourceParameter to avoid non-standard extensions. * As of version 6.5 reverted to ResourceParameter to avoid non-standard extensions.
* *
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;
* @author Brett &lt;bprucha@users.sourceforge net&gt;
* @author PBoy &lt;pboy@users.sourceforge net&gt;
* @version $Id: ResourceParameter.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: ResourceParameter.java 287 2005-02-22 00:29:02Z sskracic $
*/ */
public class ResourceParameter extends StringParameter { public class ResourceParameter extends AbstractParameter {
public final static String versionId = public final static String versionId =
"$Id: ResourceParameter.java 287 2005-02-22 00:29:02Z sskracic $" + "$Id: ResourceParameter.java 287 2005-02-22 00:29:02Z sskracic $" +
"$Author: sskracic $" + "$Author: sskracic $" +
@ -46,17 +56,71 @@ public class ResourceParameter extends StringParameter {
private static final Logger s_log = Logger.getLogger(ResourceParameter.class); private static final Logger s_log = Logger.getLogger(ResourceParameter.class);
private Object m_default = null;
public ResourceParameter(final String name) { public ResourceParameter(final String name) {
super(name); super(name, InputStream.class);
} }
public ResourceParameter(final String name, public ResourceParameter(final String name,
final int multiplicity, final int multiplicity,
final Object defaalt) { final Object defaultValue) {
super(name, multiplicity, defaalt);
super(name, multiplicity, defaultValue, InputStream.class);
m_default = defaultValue;
} }
/**
* Get default value and return it as InputStream.
*
* Developers note:
* This makes the trick to use Parameter.java interface rsp AbstractParameter
* for other types of parameter as Strint. If you don't overwrite this
* method, you will always get a casting error, because the parameter
* returns a string instead of the intended object!
*
* @return default value as InputStream
*/
public Object getDefaultValue() {
if(m_default instanceof String) {
ErrorList errors = new ErrorList();
InputStream stream = (InputStream)unmarshal((String)m_default, errors);
if(!errors.isEmpty()) {
String strErrors = "";
for(Iterator i = errors.iterator(); i.hasNext(); ) {
ParameterError pe = (ParameterError)i.next();
strErrors += pe.getMessage() + "\r\n";
}
throw new UncheckedWrapperException(strErrors);
}
return stream;
} else
return m_default;
}
/**
* Unmarshals the encoded string value of the parameter to get the intended
* object type. It tries first to find a file of the specified name in the
* file system. If not successful it uses the classloader to find the file
* in the class path / jar files.
*
* @param value
* @param errors
* @return parameter value as an InputStream
*/
@Override
protected Object unmarshal(String value, final ErrorList errors) { protected Object unmarshal(String value, final ErrorList errors) {
// NOTE:
// This implementation will never find the file in the file system.
// The name has to be specified relativ to document root. So we must
// precede value with the context path, e.g. using
// c.ad.runtime.CCMResourceManager as soon as it's implementation is
// fixed / stable (when all modifications of the runtime environment
// are done).
File file = new File(value); File file = new File(value);
if (!file.exists()) { if (!file.exists()) {

View File

@ -21,10 +21,10 @@ package com.arsdigita.util.parameter;
import org.apache.commons.beanutils.converters.StringConverter; import org.apache.commons.beanutils.converters.StringConverter;
/** /**
* Subject to change.
*
* A parameter representing a Java <code>String</code>. * A parameter representing a Java <code>String</code>.
* *
* Subject to change.
*
* @see java.lang.String * @see java.lang.String
* @see Parameter * @see Parameter
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;

View File

@ -0,0 +1,158 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<!--
Copyright (C)
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
Author: Peter Boy (pboy@users.source forge .net)
Since: 2009-05-23
Version: $Revision: #1 $ $Date: 2009/05/23 $
-->
<title>com.arsdigita.util.parameter</title>
</head>
<body bgcolor="white">
<!-- Summary (one sentence!) -->
<p>
Provides a framework to handle different types of <em>configuration parameters</em>,
held in a <em>registry</em> (configuration database), in a transparent
and easy to use way - not to be confused with other kind of parameters as
command line parameters.
</p>
<h4>Interface ParameterContext</h4>
<p>
<!-- Description (one or more paragraphs), describe what the package contains
and state its purpose -->
Key element is <strong>ParameterContext</strong> (Interface) which describes a
<em>container of parameters</em>. A parameter context binds together a set of
parameters and keeps their values.
Among it's most important methods are</p>
<ul>
<li>get(param) to get the <em>unmarshaled</em> parameter value as an object,
converted from the encoded (marshaled) representation used for storing the
value</li>
<li>getParameters() to list all included parameters</li>
</ul>
<h4>Interface Parameter</h4>
<p>
Each <strong>parameter</strong> is described by the <code>Parameter.java</code>
interface. It is designed as a <strong>named property</strong> that can read,
write, and validate its own value. Parameters are
<strong>stateless "messages"</strong>. They do not store their own values.
Instead, a {@link com.arsdigita.util.parameter.ParameterContext}
manages a set of parameters and keeps their values.
</p>
Among it's most important methods are</p>
<ul>
<li><code>read</code> to read the literal (encoded / marshaled) value (usually
a String type) from the storage and convert (unmarshal) it to the
appropriate Java object.</li>
</ul>
<h4>Interface Implementations</h4>
<p>
The classes <code>AbstractParameterContext</code> and
<code>AbstractParameter</code> provide a basic implementation of both
interfaces. It's most important feature is the marshal / unmarshal mechanism.
</p>
<p>
Any specific parameter which inherits from these implementation must override
at least:</p>
<ul>
<li>unmarshal()</li>
<li>getDefaultValue()</li>
</ul>
<h3>How To Use</h3>
<p>
See package <code>com.arsdigita.cms</code> as an example. The class
<code>ContextSectionConfig</code> provides a configuration registry for the
package.</p>
<ul>
<li><code>ContextSectionConfig</code> provides the actual registry</li>
<li>extends <code>AbstractConfig</code></li>
<li>extends <code>AbstractParameterContext</code></li>
<li>implements <code>ParameterContext</code></li>
</ul>
<p>
[More details comming soon :-) ]
</p>
<!-- Package Specification if applicable -->
<!--
<h3>Package Specification</h3>
<p>
</p>
-->
<!-- Related Documentation if applicable -->
<!--
<h3>Related Documentation</h3>
<p>
</p>
-->
<!-- Class & Interface Summary if applicable
describes logical groupings of classes & interfaces -->
<!--
<h3>Class & Interface Summary</h3>
<p>
</p>
-->
<!-- Developers Comment if applicable
lists possible problems & pitfalls, future plannings -->
<div style="background-color: #FFFFCC;">
<h3>Developers Comment</h3>
<p>
There is some weakness in the current design and implementation of the package.
</p>
<ul>
<li>The <code>Parameter</code> Interface collects errors during processing in an
<code>ErrorList</code> object, "in lieu of throwing exceptions that are not
useful in creating error-recovery UIs".
<ul>
<li>This is just another time where APLAWS uses a non standard, application
specific extension</li>
<li>There is no systematik application code which makes use of this feature to
avoid exceptions. Practically it is just a devious route to an exception.</li>
<li>It makes usage of the package unnecessary complicated, cumbersome and
results in bloated code.</li>
</ul>
</li>
<li>The class hierarchy is unneccessary compless and fine granulated. At least
the classes <code>AbstractConfig</code> and <code>AbstractParameterContext</code>
could be combined.</li>
<li>The <code>AbstractParameterContext</code> implementation is weak. Several
parameters are not able to convert to the intended object type, but need
external support, e.g BoleanParameter, where the get() method must be assisted
by the asBoolean() method of the Boolean class.</li>
</ul>
<p>
Therefore the project should consider to redesign the package and reimplement it
in the long run.
</p>
</div>
</body>
</html>

View File

@ -29,7 +29,7 @@ import java.net.URLStreamHandler;
* Handler * Handler
* pboy: * pboy:
* *
* Handler for the URL resource:// protocoll. * Handler for the URL resource:// protocol.
* *
* To make it work it must be loaded by the system classloader. (Part of the * To make it work it must be loaded by the system classloader. (Part of the
* "java.ext.dirs" system property). * "java.ext.dirs" system property).
@ -41,11 +41,13 @@ import java.net.URLStreamHandler;
* If it is not properly done, you will get a MalformedURLException: unknown * If it is not properly done, you will get a MalformedURLException: unknown
* protocol: resource * protocol: resource
* *
* ToDo: replace the resource: protokoll by use of the Class or ClassLoader
* getResource() and/or getResourceAsStream() methods (system wide).
*
* @author Rafael H. Schloming &lt;rhs@mit.edu&gt; * @author Rafael H. Schloming &lt;rhs@mit.edu&gt;
* @version $Revision: #2 $ $Date: 2004/08/16 $ * @version $Revision: #2 $ $Date: 2004/08/16 $
*
* ToDo: replace the resource: protokoll by use of the Class or ClassLoader
* getResource() and/or getResourceAsStream() methods (system wide).
* @deprecated Use ResourceParameter instead.
* See c.ad.cms.ContentSectionConfig.java as an example how to modify code.
**/ **/
public class Handler extends URLStreamHandler { public class Handler extends URLStreamHandler {

View File

@ -173,20 +173,20 @@ public class HttpResourceLocator {
final String servletPath, final String servletPath,
final String pathInfo, final String pathInfo,
final HttpParameterMap params) { final HttpParameterMap params) {
if (Assert.isAssertEnabled()) { if (Assert.isEnabled()) {
Assert.exists(host, HttpHost.class); Assert.exists(host, HttpHost.class);
Assert.exists(contextPath, String.class); Assert.exists(contextPath, String.class);
Assert.exists(servletPath, String.class); Assert.exists(servletPath, String.class);
if (contextPath.startsWith("/")) { if (contextPath.startsWith("/")) {
Assert.truth Assert.isTrue
(!contextPath.endsWith("/"), (!contextPath.endsWith("/"),
"A contextPath starting with '/' must not end in '/'; " + "A contextPath starting with '/' must not end in '/'; " +
"I got '" + contextPath + "'"); "I got '" + contextPath + "'");
} }
if (pathInfo != null) { if (pathInfo != null) {
Assert.truth(pathInfo.startsWith("/"), Assert.isTrue(pathInfo.startsWith("/"),
"I expected a pathInfo starting with '/' " + "I expected a pathInfo starting with '/' " +
"and got '" + pathInfo + "' instead"); "and got '" + pathInfo + "' instead");
} }

View File

@ -22,14 +22,19 @@ import com.arsdigita.persistence.Session;
import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.SessionManager;
import com.arsdigita.persistence.TransactionContext; import com.arsdigita.persistence.TransactionContext;
import com.arsdigita.runtime.AbstractScript; import com.arsdigita.runtime.AbstractScript;
import com.arsdigita.runtime.InteractiveParameterLoader; // InteractiveParameterLoader extents ParameterLoader, which is deprecated.
// InteractiveParameterReader should be used instead.
// import com.arsdigita.runtime.InteractiveParameterLoader;
import com.arsdigita.runtime.InteractiveParameterReader;
import com.arsdigita.runtime.Script; import com.arsdigita.runtime.Script;
import com.arsdigita.runtime.ScriptContext; import com.arsdigita.runtime.ScriptContext;
import com.arsdigita.runtime.Startup; import com.arsdigita.runtime.Startup;
import com.arsdigita.util.parameter.ErrorList; import com.arsdigita.util.parameter.ErrorList;
import com.arsdigita.util.parameter.IntegerParameter; import com.arsdigita.util.parameter.IntegerParameter;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.ParameterLoader; // ParameterLoader is deprecated, use ParameterReader instead.
// import com.arsdigita.util.parameter.ParameterLoader;
import com.arsdigita.util.parameter.ParameterReader;
import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.StringParameter;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -72,15 +77,19 @@ public final class HostLoader extends AbstractScript {
new Startup().run(); new Startup().run();
final Session session = SessionManager.getSession(); final Session session = SessionManager.getSession();
final ParameterLoader loader = new InteractiveParameterLoader // final ParameterLoader loader = new InteractiveParameterLoader
// (System.in, System.out);
final ParameterReader reader = new InteractiveParameterReader
(System.in, System.out); (System.in, System.out);
final TransactionContext transaction = session.getTransactionContext(); final TransactionContext transaction = session.getTransactionContext();
transaction.beginTxn(); transaction.beginTxn();
Script script = new HostLoader(); Script script = new HostLoader();
script.load(loader, new ErrorList()); // script.load(loader, new ErrorList());
script.run(new ScriptContext(session, loader)); // script.run(new ScriptContext(session, loader));
script.load(reader, new ErrorList());
script.run(new ScriptContext(session, reader));
transaction.commitTxn(); transaction.commitTxn();
} }

View File

@ -18,24 +18,24 @@
*/ */
package com.arsdigita.forum; package com.arsdigita.forum;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import org.apache.log4j.Logger;
import com.arsdigita.kernel.User; import com.arsdigita.kernel.User;
import com.arsdigita.kernel.UserCollection; import com.arsdigita.kernel.UserCollection;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.UncheckedWrapperException; // import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.BooleanParameter;
import com.arsdigita.util.parameter.IntegerParameter; import com.arsdigita.util.parameter.IntegerParameter;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.StringParameter;
import com.arsdigita.util.parameter.URLParameter; import com.arsdigita.util.parameter.ResourceParameter;
import com.arsdigita.web.Web; import com.arsdigita.web.Web;
import java.io.IOException;
import java.io.InputStream;
// import java.net.MalformedURLException;
// import java.net.URL;
import org.apache.log4j.Logger;
/** /**
* A set of configuration parameters for forums. * A set of configuration parameters for forums.
* *
@ -68,6 +68,7 @@ public class ForumConfig extends AbstractConfig {
private Parameter m_deleteSentSubscriptionNotifications; private Parameter m_deleteSentSubscriptionNotifications;
public ForumConfig() { public ForumConfig() {
m_adminEditPosts = new BooleanParameter( m_adminEditPosts = new BooleanParameter(
"com.arsdigita.forum.admin_can_edit_posts", "com.arsdigita.forum.admin_can_edit_posts",
Parameter.REQUIRED, Parameter.REQUIRED,
@ -128,15 +129,10 @@ public class ForumConfig extends AbstractConfig {
Parameter.OPTIONAL, Parameter.OPTIONAL,
Boolean.FALSE); Boolean.FALSE);
try { m_adapters = new ResourceParameter
m_adapters = new URLParameter
("com.arsdigita.forum.traversal_adapters", ("com.arsdigita.forum.traversal_adapters",
Parameter.REQUIRED, Parameter.REQUIRED,
new URL(null, "/WEB-INF/resources/forum-adapters.xml");
"resource:WEB-INF/resources/forum-adapters.xml"));
} catch (MalformedURLException ex) {
throw new UncheckedWrapperException("Cannot parse URL", ex);
}
register(m_digestUserEmail); register(m_digestUserEmail);
register(m_adminEditPosts); register(m_adminEditPosts);
@ -158,11 +154,7 @@ public class ForumConfig extends AbstractConfig {
} }
InputStream getTraversalAdapters() { InputStream getTraversalAdapters() {
try { return (InputStream)get(m_adapters);
return ((URL)get(m_adapters)).openStream();
} catch (IOException ex) {
throw new UncheckedWrapperException("Cannot read stream", ex);
}
} }
public boolean canAdminEditPosts() { public boolean canAdminEditPosts() {

View File

@ -1,7 +1,7 @@
com.arsdigita.forum.traversal_adapters.title=XML renderer rules com.arsdigita.forum.traversal_adapters.title=XML renderer rules
com.arsdigita.forum.traversal_adapters.purpose=Rules for configuring information in generated XML com.arsdigita.forum.traversal_adapters.purpose=Rules for configuring information in generated XML
com.arsdigita.forum.traversal_adapters.format=[url] com.arsdigita.forum.traversal_adapters.format=[string]
com.arsdigita.forum.traversal_adapters.example=resource:WEB-INF/resources/forum-adapters.xml com.arsdigita.forum.traversal_adapters.example=/WEB-INF/resources/forum-adapters.xml
com.arsdigita.forum.digest_user_email.title=Digest user email address com.arsdigita.forum.digest_user_email.title=Digest user email address
com.arsdigita.forum.digest_user_email.purpose=Email address of the user sending digest emails com.arsdigita.forum.digest_user_email.purpose=Email address of the user sending digest emails

View File

@ -21,8 +21,8 @@ com.arsdigita.cms.dhtml_editor_config=HTMLArea.Config.CMSStyled,/assets/htmlarea
com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS
com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker
com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true
com.arsdigita.cms.contenttypes.mparticle.template=resource:WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp com.arsdigita.cms.contenttypes.mparticle.template=/WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp
com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate=resource:WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-siteproxy-item.jsp com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate=/WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-siteproxy-item.jsp
com.arsdigita.cms.hide_udct_ui=true com.arsdigita.cms.hide_udct_ui=true
com.arsdigita.cms.hide_folder_index_checkbox=true com.arsdigita.cms.hide_folder_index_checkbox=true

View File

@ -21,7 +21,7 @@ com.arsdigita.cms.dhtml_editor_config=HTMLArea.Config.CMSStyled,/assets/htmlarea
com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS
com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker
com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true
com.arsdigita.cms.contenttypes.mparticle.template=resource:WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp com.arsdigita.cms.contenttypes.mparticle.template=/WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp
com.arsdigita.cms.hide_udct_ui=true com.arsdigita.cms.hide_udct_ui=true
com.arsdigita.cms.hide_folder_index_checkbox=true com.arsdigita.cms.hide_folder_index_checkbox=true

View File

@ -21,7 +21,7 @@ com.arsdigita.cms.dhtml_editor_config=HTMLArea.Config.CMSStyled,/assets/htmlarea
com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS
com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker
com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true
com.arsdigita.cms.contenttypes.mparticle.template=resource:WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp com.arsdigita.cms.contenttypes.mparticle.template=/WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp
com.arsdigita.cms.hide_udct_ui=true com.arsdigita.cms.hide_udct_ui=true
com.arsdigita.cms.hide_folder_index_checkbox=true com.arsdigita.cms.hide_folder_index_checkbox=true

View File

@ -21,7 +21,7 @@ com.arsdigita.cms.dhtml_editor_config=HTMLArea.Config.CMSStyled,/assets/htmlarea
com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS
com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker
com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true
com.arsdigita.cms.contenttypes.mparticle.template=resource:WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp com.arsdigita.cms.contenttypes.mparticle.template=/WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp
com.arsdigita.cms.hide_udct_ui=true com.arsdigita.cms.hide_udct_ui=true
com.arsdigita.cms.hide_folder_index_checkbox=true com.arsdigita.cms.hide_folder_index_checkbox=true

View File

@ -18,14 +18,6 @@
package com.arsdigita.aplaws; package com.arsdigita.aplaws;
import com.arsdigita.london.navigation.Navigation;
import com.arsdigita.london.navigation.Template;
import com.arsdigita.london.navigation.TemplateMapping;
import com.arsdigita.london.terms.Domain;
import com.arsdigita.london.terms.importer.Parser;
import com.arsdigita.london.portal.PageLayout;
import com.arsdigita.london.portal.Workspace;
import com.arsdigita.categorization.Category; import com.arsdigita.categorization.Category;
import com.arsdigita.categorization.RootCategoryCollection; import com.arsdigita.categorization.RootCategoryCollection;
import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ContentSection;
@ -45,7 +37,13 @@ import com.arsdigita.util.parameter.StringParameter;
import com.arsdigita.util.parameter.URLParameter; import com.arsdigita.util.parameter.URLParameter;
import com.arsdigita.web.Application; import com.arsdigita.web.Application;
import org.apache.log4j.Logger; import com.arsdigita.london.navigation.Navigation;
import com.arsdigita.london.navigation.Template;
import com.arsdigita.london.navigation.TemplateMapping;
import com.arsdigita.london.terms.Domain;
import com.arsdigita.london.terms.importer.Parser;
import com.arsdigita.london.portal.PageLayout;
import com.arsdigita.london.portal.Workspace;
import java.net.URL; import java.net.URL;
import java.net.MalformedURLException; import java.net.MalformedURLException;
@ -54,6 +52,8 @@ import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.Set; import java.util.Set;
import org.apache.log4j.Logger;
/** /**
* Loader. * Loader.
* *

View File

@ -19,19 +19,16 @@
package com.arsdigita.london.atoz; package com.arsdigita.london.atoz;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.london.util.ui.ApplicationCategoryPicker;
import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.BooleanParameter;
import com.arsdigita.util.parameter.ClassParameter; import com.arsdigita.util.parameter.ClassParameter;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.URLParameter; import com.arsdigita.util.parameter.ResourceParameter;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.london.util.ui.ApplicationCategoryPicker;
import java.io.InputStream; import java.io.InputStream;
import java.io.IOException; import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Set; import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
@ -49,15 +46,11 @@ public class AtoZConfig extends AbstractConfig {
public AtoZConfig() { public AtoZConfig() {
m_types = new HashSet(); m_types = new HashSet();
try {
m_adapters = new URLParameter m_adapters = new ResourceParameter
("com.arsdigita.london.atoz.traversal_adapters", ("com.arsdigita.london.atoz.traversal_adapters",
Parameter.REQUIRED, Parameter.REQUIRED,
new URL(null, "/WEB-INF/resources/atoz-adapters.xml");
"resource:WEB-INF/resources/atoz-adapters.xml"));
} catch (MalformedURLException ex) {
throw new UncheckedWrapperException("Cannot parse URL", ex);
}
m_rootCategoryPicker = new ClassParameter( m_rootCategoryPicker = new ClassParameter(
"com.arsdigita.london.atoz.root_category_picker", "com.arsdigita.london.atoz.root_category_picker",
@ -84,11 +77,7 @@ public class AtoZConfig extends AbstractConfig {
InputStream getTraversalAdapters() { InputStream getTraversalAdapters() {
try { return (InputStream)get(m_adapters);
return ((URL)get(m_adapters)).openStream();
} catch (IOException ex) {
throw new UncheckedWrapperException("Cannot read stream", ex);
}
} }
public Class getRootCategoryPicker() { public Class getRootCategoryPicker() {

View File

@ -1,15 +1,18 @@
com.arsdigita.london.atoz.traversal_adapters.title=XML renderer rules com.arsdigita.london.atoz.traversal_adapters.title=XML renderer rules
com.arsdigita.london.atoz.traversal_adapters.purpose=Rules for configuring information in generated XML com.arsdigita.london.atoz.traversal_adapters.purpose=Rules for configuring information in generated XML
com.arsdigita.london.atoz.traversal_adapters.format=[url] com.arsdigita.london.atoz.traversal_adapters.format=[string]
com.arsdigita.london.atoz.traversal_adapters.example=resource:WEB-INF/resources/atoz-adapters.xml com.arsdigita.london.atoz.traversal_adapters.example=/WEB-INF/resources/atoz-adapters.xml
com.arsdigita.london.atoz.root_category_picker.title=Root Category Picker com.arsdigita.london.atoz.root_category_picker.title=Root Category Picker
com.arsdigita.london.atoz.root_category_picker.purpose=The UI widget for the Root Category Picker com.arsdigita.london.atoz.root_category_picker.purpose=The UI widget for the Root Category Picker
com.arsdigita.london.atoz.root_category_picker.format=[class] com.arsdigita.london.atoz.root_category_picker.format=[class]
com.arsdigita.london.atoz.root_category_picker.example=com.arsdigita.london.util.ui.ApplicationCategoryPicker com.arsdigita.london.atoz.root_category_picker.example=com.arsdigita.london.util.ui.ApplicationCategoryPicker
com.arsdigita.london.atoz.use_subsite_specific_navigation_category.title=Make AtoZ use subsite-specific navigation categories com.arsdigita.london.atoz.use_subsite_specific_navigation_category.title=Make AtoZ use subsite-specific navigation categories
com.arsdigita.london.atoz.use_subsite_specific_navigation_category.purpose=Set this to yes, and the AtoZ will use the subsite-specific navigation categories if you define *any* CategoryProvider com.arsdigita.london.atoz.use_subsite_specific_navigation_category.purpose=Set this to yes, and the AtoZ will use the subsite-specific navigation categories if you define *any* CategoryProvider
com.arsdigita.london.atoz.use_subsite_specific_navigation_category.format=[boolean] com.arsdigita.london.atoz.use_subsite_specific_navigation_category.format=[boolean]
com.arsdigita.london.atoz.use_subsite_specific_navigation_category.example=true com.arsdigita.london.atoz.use_subsite_specific_navigation_category.example=true
com.arsdigita.london.atoz.filterCategoryProviders.title=To filter out category without published items com.arsdigita.london.atoz.filterCategoryProviders.title=To filter out category without published items
com.arsdigita.london.atoz.filterCategoryProviders.purpose=if TRUE, the AtoZ category providers will only return Categories with published items com.arsdigita.london.atoz.filterCategoryProviders.purpose=if TRUE, the AtoZ category providers will only return Categories with published items
com.arsdigita.london.atoz.filterCategoryProviders.format=[boolean] com.arsdigita.london.atoz.filterCategoryProviders.format=[boolean]

View File

@ -18,30 +18,21 @@
package com.arsdigita.london.exporter; package com.arsdigita.london.exporter;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.URLParameter; import com.arsdigita.util.parameter.ResourceParameter;
import java.io.InputStream;
public class ExporterConfig extends AbstractConfig { public class ExporterConfig extends AbstractConfig {
private Parameter m_adapters; private Parameter m_adapters;
public ExporterConfig() { public ExporterConfig() {
try { m_adapters = new ResourceParameter
m_adapters = new URLParameter
("com.arsdigita.london.exporter.traversal_adapters", ("com.arsdigita.london.exporter.traversal_adapters",
Parameter.REQUIRED, Parameter.REQUIRED,
new URL(null, "/WEB-INF/resources/exporter-adapters.xml");
"resource:WEB-INF/resources/exporter-adapters.xml"));
} catch (MalformedURLException ex) {
throw new UncheckedWrapperException("Cannot parse URL", ex);
}
register(m_adapters); register(m_adapters);
@ -49,11 +40,11 @@ public class ExporterConfig extends AbstractConfig {
} }
/**
*
* @return InputStream
*/
InputStream getTraversalAdapters() { InputStream getTraversalAdapters() {
try { return (InputStream)get(m_adapters);
return ((URL)get(m_adapters)).openStream();
} catch (IOException ex) {
throw new UncheckedWrapperException("Cannot read stream", ex);
}
} }
} }

View File

@ -35,22 +35,20 @@ import com.arsdigita.util.parameter.IntegerParameter;
import com.arsdigita.util.parameter.StringArrayParameter; import com.arsdigita.util.parameter.StringArrayParameter;
import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.StringParameter;
import com.arsdigita.util.parameter.ClassParameter; import com.arsdigita.util.parameter.ClassParameter;
import com.arsdigita.util.parameter.URLParameter; import com.arsdigita.util.parameter.ResourceParameter;
import com.arsdigita.web.Application; import com.arsdigita.web.Application;
import org.apache.log4j.Logger;
import java.io.InputStream; import java.io.InputStream;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import org.apache.log4j.Logger;
/** /**
* Configuration record for the navigation app * Configuration record for the navigation app
* @author Daniel Berrange * @author Daniel Berrange
@ -123,15 +121,10 @@ public final class NavigationConfig extends AbstractConfig {
m_relatedItemsFactory = new ClassParameter m_relatedItemsFactory = new ClassParameter
("com.arsdigita.london.navigation.related_items_factory", ("com.arsdigita.london.navigation.related_items_factory",
Parameter.REQUIRED, RelatedItemsQueryFactoryImpl.class); Parameter.REQUIRED, RelatedItemsQueryFactoryImpl.class);
try { m_traversalAdapters = new ResourceParameter
m_traversalAdapters = new URLParameter
("com.arsdigita.london.navigation.traversal_adapters", ("com.arsdigita.london.navigation.traversal_adapters",
Parameter.REQUIRED, Parameter.REQUIRED,
new URL(null, "/WEB-INF/resources/navigation-adapters.xml");
"resource:WEB-INF/resources/navigation-adapters.xml"));
} catch (MalformedURLException ex) {
throw new UncheckedWrapperException("Cannot parse URL", ex);
}
m_categoryMenuShowNephews = new BooleanParameter m_categoryMenuShowNephews = new BooleanParameter
("com.arsdigita.london.navigation.category_menu_show_nephews", ("com.arsdigita.london.navigation.category_menu_show_nephews",
Parameter.OPTIONAL, new Boolean(false)); Parameter.OPTIONAL, new Boolean(false));
@ -263,11 +256,7 @@ public final class NavigationConfig extends AbstractConfig {
} }
InputStream getTraversalAdapters() { InputStream getTraversalAdapters() {
try { return (InputStream)get(m_traversalAdapters);
return ((URL)get(m_traversalAdapters)).openStream();
} catch (IOException ex) {
throw new UncheckedWrapperException("Cannot read stream", ex);
}
} }
public final boolean getCategoryMenuShowNephews() { public final boolean getCategoryMenuShowNephews() {

View File

@ -44,9 +44,9 @@ com.arsdigita.london.navigation.default_nav_model.example=com.arsdigita.london.n
com.arsdigita.london.navigation.default_nav_model.format=[class] com.arsdigita.london.navigation.default_nav_model.format=[class]
com.arsdigita.london.navigation.traversal_adapters.title=XML renderer rules com.arsdigita.london.navigation.traversal_adapters.title=XML renderer rules
com.arsdigita.london.navigation.traversal_adapters.purpose=Rules for configuring information in generated XML com.arsdigita.london.navigation.traversal_adapters.purpose=Name of file with rules for configuring information in generated XML
com.arsdigita.london.navigation.traversal_adapters.format=[url] com.arsdigita.london.navigation.traversal_adapters.format=[string]
com.arsdigita.london.navigation.traversal_adapters.example=resource:WEB-INF/resources/navigation-adapters.xml com.arsdigita.london.navigation.traversal_adapters.example=/WEB-INF/resources/navigation-adapters.xml
com.arsdigita.london.navigation.category_menu_show_nephews.title=Show nephew categories in CategoryMenu com.arsdigita.london.navigation.category_menu_show_nephews.title=Show nephew categories in CategoryMenu
com.arsdigita.london.navigation.category_menu_show_nephews.purpose=Whether CategoryMenu should display the categories who are nephews to the current category com.arsdigita.london.navigation.category_menu_show_nephews.purpose=Whether CategoryMenu should display the categories who are nephews to the current category

View File

@ -20,17 +20,13 @@ package com.arsdigita.london.portal;
import com.arsdigita.kernel.permissions.PrivilegeDescriptor; import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.BooleanParameter;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.StringArrayParameter; import com.arsdigita.util.parameter.StringArrayParameter;
import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.StringParameter;
import com.arsdigita.util.parameter.URLParameter; import com.arsdigita.util.parameter.ResourceParameter;
import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -40,7 +36,7 @@ public class WorkspaceConfig extends AbstractConfig {
private static final Logger s_log = Logger.getLogger(WorkspaceConfig.class); private static final Logger s_log = Logger.getLogger(WorkspaceConfig.class);
private URLParameter m_adapters; private ResourceParameter m_adapters;
private StringParameter m_defaultLayout; private StringParameter m_defaultLayout;
@ -57,15 +53,11 @@ public class WorkspaceConfig extends AbstractConfig {
private BooleanParameter m_checkWorkspaceReadPermissions; private BooleanParameter m_checkWorkspaceReadPermissions;
public WorkspaceConfig() { public WorkspaceConfig() {
try {
m_adapters = new URLParameter( m_adapters = new ResourceParameter(
"com.arsdigita.london.portal.traversal_adapters", "com.arsdigita.london.portal.traversal_adapters",
Parameter.REQUIRED, Parameter.REQUIRED,
new URL(null, "/WEB-INF/resources/portal-adapters.xml");
"resource:WEB-INF/resources/portal-adapters.xml"));
} catch (MalformedURLException ex) {
throw new UncheckedWrapperException("Cannot parse URL", ex);
}
m_defaultLayout = new StringParameter( m_defaultLayout = new StringParameter(
"com.arsdigita.london.portal.default_layout", "com.arsdigita.london.portal.default_layout",
@ -108,11 +100,7 @@ public class WorkspaceConfig extends AbstractConfig {
} }
InputStream getTraversalAdapters() { InputStream getTraversalAdapters() {
try { return (InputStream) get(m_adapters);
return ((URL) get(m_adapters)).openStream();
} catch (IOException ex) {
throw new UncheckedWrapperException("Cannot read stream", ex);
}
} }
public String getDefaultLayout() { public String getDefaultLayout() {

View File

@ -1,7 +1,7 @@
com.arsdigita.london.portal.traversal_adapters.title=XML renderer rules com.arsdigita.london.portal.traversal_adapters.title=XML renderer rules
com.arsdigita.london.portal.traversal_adapters.purpose=Rules for configuring information in generated XML com.arsdigita.london.portal.traversal_adapters.purpose=Name of File with rules for configuring information in generated XML
com.arsdigita.london.portal.traversal_adapters.format=[url] com.arsdigita.london.portal.traversal_adapters.format=[string]
com.arsdigita.london.portal.traversal_adapters.example=resource:WEB-INF/resources/portal-adapters.xml com.arsdigita.london.portal.traversal_adapters.example=/WEB-INF/resources/portal-adapters.xml
com.arsdigita.london.portal.default_layout.title=Default workspace layout com.arsdigita.london.portal.default_layout.title=Default workspace layout
com.arsdigita.london.portal.default_layout.purpose=Default column layout for workspace portals com.arsdigita.london.portal.default_layout.purpose=Default column layout for workspace portals

View File

@ -20,21 +20,21 @@ package com.arsdigita.london.subsite;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.URLParameter;
import com.arsdigita.util.parameter.StringParameter;
import com.arsdigita.util.parameter.ClassParameter; import com.arsdigita.util.parameter.ClassParameter;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.ResourceParameter;
import com.arsdigita.util.parameter.StringParameter;
// import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.london.util.ui.ApplicationCategoryPicker; import com.arsdigita.london.util.ui.ApplicationCategoryPicker;
import java.io.InputStream; import java.io.InputStream;
import java.io.IOException; import java.io.IOException;
import java.net.URL; // import java.net.URL;
import java.net.MalformedURLException; // import java.net.MalformedURLException;
import org.apache.log4j.Logger;
import java.util.Map; import java.util.Map;
import java.util.HashMap; import java.util.HashMap;
import org.apache.log4j.Logger;
public class SubsiteConfig extends AbstractConfig { public class SubsiteConfig extends AbstractConfig {
@ -42,21 +42,17 @@ public class SubsiteConfig extends AbstractConfig {
private Map m_themes = new HashMap(); private Map m_themes = new HashMap();
private URLParameter m_adapters; private ResourceParameter m_adapters;
private StringParameter m_frontPageApplicationTypeParameter; private StringParameter m_frontPageApplicationTypeParameter;
private StringParameter m_frontPageParentURLParameter; private StringParameter m_frontPageParentURLParameter;
private Parameter m_rootCategoryPicker; private Parameter m_rootCategoryPicker;
public SubsiteConfig() { public SubsiteConfig() {
try {
m_adapters = new URLParameter m_adapters = new ResourceParameter
("com.arsdigita.london.subsite.traversal_adapters", ("com.arsdigita.london.subsite.traversal_adapters",
Parameter.REQUIRED, Parameter.REQUIRED,
new URL(null, "/WEB-INF/resources/subsite-adapters.xml");
"resource:WEB-INF/resources/subsite-adapters.xml"));
} catch (MalformedURLException ex) {
throw new UncheckedWrapperException("Cannot parse URL", ex);
}
m_frontPageApplicationTypeParameter = new StringParameter m_frontPageApplicationTypeParameter = new StringParameter
("com.arsdigita.london.subsite.front_page_application", ("com.arsdigita.london.subsite.front_page_application",
@ -81,11 +77,7 @@ public class SubsiteConfig extends AbstractConfig {
} }
InputStream getTraversalAdapters() { InputStream getTraversalAdapters() {
try { return (InputStream) get(m_adapters);
return ((URL)get(m_adapters)).openStream();
} catch (IOException ex) {
throw new UncheckedWrapperException("Cannot read stream", ex);
}
} }
public String getFrontPageApplicationType() { public String getFrontPageApplicationType() {

View File

@ -1,7 +1,7 @@
com.arsdigita.london.subsite.traversal_adapters.title=XML renderer rules com.arsdigita.london.subsite.traversal_adapters.title=XML renderer rules
com.arsdigita.london.subsite.traversal_adapters.purpose=Rules for configuring information in generated XML com.arsdigita.london.subsite.traversal_adapters.purpose=Name of file with rules for configuring information in generated XML
com.arsdigita.london.subsite.traversal_adapters.format=[url] com.arsdigita.london.subsite.traversal_adapters.format=[string]
com.arsdigita.london.subsite.traversal_adapters.example=resource:WEB-INF/resources/subsite-adapters.xml com.arsdigita.london.subsite.traversal_adapters.example=/WEB-INF/resources/subsite-adapters.xml
com.arsdigita.london.subsite.front_page_application.title=Front Page Application (Subsite) com.arsdigita.london.subsite.front_page_application.title=Front Page Application (Subsite)
com.arsdigita.london.subsite.front_page_application.purpose=The Application to use as the front (home) page for a subsite com.arsdigita.london.subsite.front_page_application.purpose=The Application to use as the front (home) page for a subsite

View File

@ -19,16 +19,12 @@
package com.arsdigita.london.terms; package com.arsdigita.london.terms;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.ResourceParameter;
import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.StringParameter;
import com.arsdigita.util.parameter.URLParameter;
import com.arsdigita.util.UncheckedWrapperException;
import java.io.InputStream; import java.io.InputStream;
import java.io.IOException; import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -41,15 +37,10 @@ public class TermsConfig extends AbstractConfig {
private Parameter m_defaultDomain; private Parameter m_defaultDomain;
public TermsConfig() { public TermsConfig() {
try { m_adapters = new ResourceParameter
m_adapters = new URLParameter
("com.arsdigita.london.terms.traversal_adapters", ("com.arsdigita.london.terms.traversal_adapters",
Parameter.REQUIRED, Parameter.REQUIRED,
new URL(null, "/WEB-INF/resources/terms-adapters.xml");
"resource:WEB-INF/resources/terms-adapters.xml"));
} catch (MalformedURLException ex) {
throw new UncheckedWrapperException("Cannot parse URL", ex);
}
m_defaultDomain = new StringParameter( m_defaultDomain = new StringParameter(
"com.arsdigita.london.terms.default_domain", "com.arsdigita.london.terms.default_domain",
@ -62,11 +53,7 @@ public class TermsConfig extends AbstractConfig {
} }
InputStream getTraversalAdapters() { InputStream getTraversalAdapters() {
try { return (InputStream) get(m_adapters);
return ((URL)get(m_adapters)).openStream();
} catch (IOException ex) {
throw new UncheckedWrapperException("Cannot read stream", ex);
}
} }
public String getDefaultDomainKey() { public String getDefaultDomainKey() {

View File

@ -1,7 +1,7 @@
com.arsdigita.london.terms.traversal_adapters.title=XML renderer rules com.arsdigita.london.terms.traversal_adapters.title=XML renderer rules
com.arsdigita.london.terms.traversal_adapters.purpose=Rules for configuring information in generated XML com.arsdigita.london.terms.traversal_adapters.purpose=Name of file containing rules for configuring information in generated XML
com.arsdigita.london.terms.traversal_adapters.format=[url] com.arsdigita.london.terms.traversal_adapters.format=[string]
com.arsdigita.london.terms.traversal_adapters.example=resource:WEB-INF/resources/terms-adapters.xml com.arsdigita.london.terms.traversal_adapters.example=/WEB-INF/resources/terms-adapters.xml
com.arsdigita.london.terms.default_domain.title=Default domain com.arsdigita.london.terms.default_domain.title=Default domain
com.arsdigita.london.terms.default_domain.purpose=The default navigation domain com.arsdigita.london.terms.default_domain.purpose=The default navigation domain

View File

@ -30,19 +30,15 @@ import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.event.FormValidationListener; import com.arsdigita.bebop.event.FormValidationListener;
import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.FormProcessException; import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.GridPanel;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.parameters.NotEmptyValidationListener; import com.arsdigita.bebop.parameters.NotEmptyValidationListener;
import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.bebop.Label; import com.arsdigita.bebop.Label;
import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataCollection;
import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.SessionManager;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.GridPanel;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.util.IO; import com.arsdigita.util.IO;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import com.arsdigita.london.theme.ThemeConstants; import com.arsdigita.london.theme.ThemeConstants;
import com.arsdigita.london.theme.ThemeApplication; import com.arsdigita.london.theme.ThemeApplication;
import com.arsdigita.london.theme.util.GlobalizationUtil; import com.arsdigita.london.theme.util.GlobalizationUtil;
@ -51,6 +47,12 @@ import com.arsdigita.london.subsite.Subsite;
import com.arsdigita.london.subsite.Site; import com.arsdigita.london.subsite.Site;
import com.arsdigita.toolbox.ui.Cancellable; import com.arsdigita.toolbox.ui.Cancellable;
import com.arsdigita.web.Web; import com.arsdigita.web.Web;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;

View File

@ -45,9 +45,9 @@ com.arsdigita.cms.use_streamlined_creation=true
com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker
com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true
com.arsdigita.cms.contenttypes.mparticle.template=resource:WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp com.arsdigita.cms.contenttypes.mparticle.template=/WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp
; shp nutzt kein siteproxy ; shp nutzt kein siteproxy
; com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate=resource:///WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-siteproxy-item.jsp ; com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate=/WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-siteproxy-item.jsp
com.arsdigita.cms.contenttypes.event.hide_main_contributor=true com.arsdigita.cms.contenttypes.event.hide_main_contributor=true
com.arsdigita.cms.contenttypes.event.use_html_date_description=false com.arsdigita.cms.contenttypes.event.use_html_date_description=false

View File

@ -58,9 +58,9 @@ com.arsdigita.cms.contenttypes.event.use_html_date_description=false
com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true
com.arsdigita.cms.contenttypes.mparticle.template=resource:///WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp com.arsdigita.cms.contenttypes.mparticle.template=/WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp
com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate=resource:///WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-siteproxy-item.jsp com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate=/WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-siteproxy-item.jsp
; atoz currently not in use ; atoz currently not in use

View File

@ -6,10 +6,12 @@
xmlns:ccm="http://ccm.redhat.com/ccm-project" xmlns:ccm="http://ccm.redhat.com/ccm-project"
ccmVersion="6.1" ccmVersion="6.1"
name="aplaws" name="aplaws"
version="2.9.2" prettyName="APLAWS plus"
release="1" version="1-0-5"
release="alpha-1"
webxml="web.xml-aplaws" webxml="web.xml-aplaws"
xsi:schemaLocation="http://ccm.redhat.com/ccm-project file:///usr/share/ccm-devel/xsd/project.xsd"> webapp="ROOT"
xsi:schemaLocation="http://ccm.redhat.com/ccm-project file:tools-ng/common/xsd/project.xsd">
<ccm:databases> <ccm:databases>
<ccm:database name="postgres"/> <ccm:database name="postgres"/>

View File

@ -12,13 +12,16 @@
indent="yes" indent="yes"
xalan:indent-amount="4"/> xalan:indent-amount="4"/>
<!-- Evaluate project.xml, ccm:project tag -->
<xsl:template match="ccm:project"> <xsl:template match="ccm:project">
<xsl:call-template name="CheckDependencies"/> <xsl:call-template name="CheckDependencies"/>
<project name="CCM" default="usage" basedir="."> <project name="CCM" default="usage" basedir=".">
<xsl:choose> <xsl:choose>
<xsl:when test="/ccm:project/ccm:databases/ccm:database"> <xsl:when test="/ccm:project/ccm:databases/ccm:database">
<xsl:call-template name="Main"> <xsl:call-template name="Main">
<xsl:with-param name="databases" select="/ccm:project/ccm:databases/ccm:database"/> <xsl:with-param name="databases"
select="/ccm:project/ccm:databases/ccm:database"/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
@ -27,12 +30,14 @@
<ccm:database name="oracle-se"/> <ccm:database name="oracle-se"/>
</xsl:variable> </xsl:variable>
<xsl:call-template name="Main"> <xsl:call-template name="Main">
<xsl:with-param name="databases" select="common:nodeSet($defaultdatabases)//*"/> <xsl:with-param name="databases"
select="common:nodeSet($defaultdatabases)//*"/>
</xsl:call-template> </xsl:call-template>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</project> </project>
</xsl:template> </xsl:template> <!-- template ccm:project -->
<xsl:template name="Main"> <xsl:template name="Main">
<xsl:param name="databases"/> <xsl:param name="databases"/>
@ -54,11 +59,13 @@
</xsl:template> </xsl:template>
<xsl:template name="SharedProperties"> <xsl:template name="SharedProperties">
<!-- Invoked by template Main at the beginning, setup the basic conf -->
<!-- set basic build variables base on project.xml tags name, prettyName, webapp -->
<xsl:variable select="@name" name="name"/> <xsl:variable select="@name" name="name"/>
<xsl:variable select="@prettyName" name="prettyName" /> <xsl:variable select="@prettyName" name="prettyName" />
<xsl:variable select="@webapp" name="context" /> <xsl:variable select="@webapp" name="context" />
<!-- Setting the layout of the basic build environment --> <!-- Setting the layout of the basic build environment -->
<!-- just in case: <!-- just in case:
check environment to set properties not already set by parent scripts --> check environment to set properties not already set by parent scripts -->
@ -85,7 +92,6 @@
<fail message="app.server.home.dir or APP_SERVER_HOME not set. <fail message="app.server.home.dir or APP_SERVER_HOME not set.
Please check the invoking build.xml script." Please check the invoking build.xml script."
unless="app.server.home.dir" /> unless="app.server.home.dir" />
<!-- Shared Lib directory for use by several web applications of the application server --> <!-- Shared Lib directory for use by several web applications of the application server -->
<property value="${{env.APP_SERVER_LIB}}" name="app.server.lib.dir"/> <property value="${{env.APP_SERVER_LIB}}" name="app.server.lib.dir"/>
<fail message="app.server.lib.dir or APP_SERVER_LIB not set. <fail message="app.server.lib.dir or APP_SERVER_LIB not set.
@ -103,10 +109,6 @@
<!-- Base directory for the package step to create a binary repo --> <!-- Base directory for the package step to create a binary repo -->
<property value="packages" name="package.dir"/> <property value="packages" name="package.dir"/>
<!-- currently no longer used
<property value="ant.properties" name="property.file"/>
<property file="${{property.file}}"/>
-->
<!-- here: taken from project.xml--> <!-- here: taken from project.xml-->
<property name="this.appName" value="{$name}"/> <property name="this.appName" value="{$name}"/>
<property name="this.appPrettyname" value="{$prettyName}"/> <property name="this.appPrettyname" value="{$prettyName}"/>
@ -155,17 +157,22 @@
<property value="${{build.dir}}/api" name="javadoc.dir"/> <property value="${{build.dir}}/api" name="javadoc.dir"/>
<property value="${{build.dir}}/api-apps" name="app.javadoc.dir"/> <property value="${{build.dir}}/api-apps" name="app.javadoc.dir"/>
<property value="" name="pdl.args"/> <property value="" name="pdl.args"/>
<!-- Configure the compiler, may be preset by invoking script.
Previously: ant.properties, now local.ccm.properties -->
<property value="on" name="compile.debug"/> <property value="on" name="compile.debug"/>
<property value="on" name="compile.optimize"/> <property value="on" name="compile.optimize"/>
<property value="off" name="compile.deprecation"/> <property value="off" name="compile.deprecation"/>
<property value="off" name="compile.verbose"/> <property value="off" name="compile.verbose"/>
<property value="off" name="compile.nowarn"/> <property value="off" name="compile.nowarn"/>
<property value="rulesets/design.xml,rulesets/imports.xml" name="pmd.rulesets"/>
<property value="rulesets/design.xml,rulesets/imports.xml"
name="pmd.rulesets"/>
<property value="xml" name="pmd.format"/> <property value="xml" name="pmd.format"/>
<property value="${{build.dir}}/pmd" name="pmd.report.dir"/> <property value="${{build.dir}}/pmd" name="pmd.report.dir"/>
<property value="pmd.${{pmd.format}}" name="pmd.report.file"/> <property value="pmd.${{pmd.format}}" name="pmd.report.file"/>
<!-- Presumably no longer used does not exist in devel environment, Red Hat made their own <!-- Presumably no longer used does not exist in devel environment, Red Hat made their own
<property value="${{shared.lib.dist.dir}}/jdo" name="jdo.lib.dir"/> --> <property value="${{shared.lib.dist.dir}}/jdo" name="jdo.lib.dir"/> -->
<property value="com.arsdigita.persistence.pdl.PDL" name="ddl.generator.classname"/> <property value="com.arsdigita.persistence.pdl.PDL" name="ddl.generator.classname"/>
<property value="com.arsdigita.persistence.pdl.TestPDLGenerator" name="test.ddl.generator.classname"/> <property value="com.arsdigita.persistence.pdl.TestPDLGenerator" name="test.ddl.generator.classname"/>
@ -188,12 +195,13 @@
<include name="conf"/> <include name="conf"/>
</dirset> </dirset>
<pathelement path="${{java.class.path}}"/> <pathelement path="${{java.class.path}}"/>
<!-- does no longer exist i APLAWS 1.0.4 <!-- does no longer exist in APLAWS 1.0.4 and beyond
<fileset dir="${{ccm.tools.dir}}"> <fileset dir="${{ccm.tools.dir}}">
<include name="lib/security/*.jar"/> <include name="lib/security/*.jar"/>
</fileset> </fileset>
--> -->
</path> </path>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"> <taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath> <classpath>
<pathelement location="${{ccm.tools.lib.dir}}/ant-contrib.jar"/> <pathelement location="${{ccm.tools.lib.dir}}/ant-contrib.jar"/>
@ -204,9 +212,12 @@
<pathelement location="${{ccm.tools.rh-jdo.dir}}"/> <pathelement location="${{ccm.tools.rh-jdo.dir}}"/>
</classpath> </classpath>
</taskdef> </taskdef>
</xsl:template> </xsl:template> <!-- template SharedProperties-->
<xsl:template name="CheckDependencies"> <xsl:template name="CheckDependencies">
<!-- Invoked by template Main at the beginning, check prerequisites -->
<xsl:for-each select="/ccm:project/ccm:build/ccm:application"> <xsl:for-each select="/ccm:project/ccm:build/ccm:application">
<xsl:variable name="appname" select="@name"/> <xsl:variable name="appname" select="@name"/>
<xsl:variable <xsl:variable
@ -231,7 +242,8 @@
</xsl:if> </xsl:if>
</xsl:for-each> </xsl:for-each>
</xsl:for-each> </xsl:for-each>
</xsl:template> </xsl:template> <!-- template CheckDependencies -->
<xsl:template name="AppProperties"> <xsl:template name="AppProperties">
<xsl:for-each select="/ccm:project/ccm:prebuilt/ccm:application"> <xsl:for-each select="/ccm:project/ccm:prebuilt/ccm:application">
@ -265,6 +277,7 @@
</fileset> </fileset>
</path> </path>
</xsl:for-each> </xsl:for-each>
<xsl:for-each select="/ccm:project/ccm:build/ccm:application"> <xsl:for-each select="/ccm:project/ccm:build/ccm:application">
<xsl:variable name="name" select="@name"/> <xsl:variable name="name" select="@name"/>
<xsl:variable name="app" <xsl:variable name="app"
@ -272,7 +285,11 @@
<xsl:variable name="appname" select="$app/@name"/> <xsl:variable name="appname" select="$app/@name"/>
<xsl:variable name="appprettyname" select="$app/@prettyName"/> <xsl:variable name="appprettyname" select="$app/@prettyName"/>
<xsl:variable name="appversion" select="$app/@version"/> <xsl:variable name="appversion" select="$app/@version"/>
<!-- webapp dir specification in application.xml nolonger supported
TODO: remove from build template
-->
<xsl:variable name="appwebapp" select="$app/@webapp"/> <xsl:variable name="appwebapp" select="$app/@webapp"/>
<xsl:variable name="requires" <xsl:variable name="requires"
select="/ccm:project/ccm:application[@name=$appname]/ccm:dependencies/ccm:requires"/> select="/ccm:project/ccm:application[@name=$appname]/ccm:dependencies/ccm:requires"/>
<path id="apps.{$name}.pdl.path"> <path id="apps.{$name}.pdl.path">
@ -334,7 +351,7 @@
<xsl:with-param name="target">server</xsl:with-param> <xsl:with-param name="target">server</xsl:with-param>
<xsl:with-param name="type">tests</xsl:with-param> <xsl:with-param name="type">tests</xsl:with-param>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template> <!-- template AppProperties -->
<xsl:template name="AppPropertyClassPath_Requires"> <xsl:template name="AppPropertyClassPath_Requires">
<xsl:param name="requires"/> <xsl:param name="requires"/>
@ -355,7 +372,7 @@
</xsl:if> </xsl:if>
</xsl:for-each> </xsl:for-each>
</xsl:for-each> </xsl:for-each>
</xsl:template> </xsl:template> <!-- template AppPropertiesClassPath_Requires -->
<xsl:template name="AppPropertyClassPath"> <xsl:template name="AppPropertyClassPath">
<xsl:param name="target" select="'default-value'"/> <xsl:param name="target" select="'default-value'"/>
@ -380,10 +397,12 @@
<xsl:with-param name="type" select="$type"/> <xsl:with-param name="type" select="$type"/>
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
<xsl:variable name="classPathRequiresNodeSet" select="common:nodeSet($classPathRequires)" /> <xsl:variable name="classPathRequiresNodeSet"
select="common:nodeSet($classPathRequires)" />
<xsl:copy-of select="$classPathRequiresNodeSet/path[not(@refid=following::path/@refid)]"/> <xsl:copy-of select="$classPathRequiresNodeSet/path[not(@refid=following::path/@refid)]"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<xsl:for-each select="/ccm:project/ccm:prebuilt/ccm:application"> <xsl:for-each select="/ccm:project/ccm:prebuilt/ccm:application">
<xsl:variable name="name" select="@name"/> <xsl:variable name="name" select="@name"/>
<path refid="{$name}.{$type}.classpath"/> <path refid="{$name}.{$type}.classpath"/>
@ -474,23 +493,26 @@
</delete> </delete>
</target> </target>
</xsl:for-each> </xsl:for-each>
<!-- The app clean deploy tasks --> <!-- The app clean deploy tasks -->
<target name="clean-deploy" depends="init" description="Cleans out the deployment directory"> <target name="clean-deploy" depends="init"
description="Cleans out the deployment directory">
<!-- XXX OOPS must be replaced by the individual files which have been copied ! <!-- XXX OOPS must be replaced by the individual files which have been copied !
<delete dir="${{deploy.shared.lib.dir}}"/> <delete dir="${{deploy.shared.lib.dir}}"/>
--> -->
<!-- is now part of the this.deploy.dir <!-- is now part of the this.deploy.dir
<delete dir="${{deploy.external.lib.dir}}"/> <delete dir="${{deploy.external.lib.dir}}"/>
--> -->
<!-- XXX OOPS, works for now, but must be replaced by individual files! --> <!-- XXX OOPS, works for now, but should be replaced by individual files! -->
<delete dir="${{this.deploy.dir}}"/> <delete dir="${{this.deploy.dir}}"/>
</target> </target>
<xsl:call-template name="LocalGroupingTarget"> <xsl:call-template name="LocalGroupingTarget">
<xsl:with-param name="targetname" select="'clean'"/> <xsl:with-param name="targetname" select="'clean'"/>
<xsl:with-param name="description" <xsl:with-param name="description"
select="'Cleans out the build environment and deployment directory'"/> select="'Cleans out the build environment and deployment directory'"/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template> <!-- template TargetClean -->
<xsl:template name="TargetBuild"> <xsl:template name="TargetBuild">
<xsl:param name="databases"/> <xsl:param name="databases"/>
@ -504,6 +526,7 @@
<xsl:variable name="hassqldir" <xsl:variable name="hassqldir"
select="$application/ccm:directories/ccm:directory[@name='sql'] or select="$application/ccm:directories/ccm:directory[@name='sql'] or
not($application/ccm:directories)"/> not($application/ccm:directories)"/>
<!-- Source dir specified? If not by default standard source dir assumed. -->
<xsl:variable name="hassrcdir" <xsl:variable name="hassrcdir"
select="$application/ccm:directories/ccm:directory[@name='src'] or select="$application/ccm:directories/ccm:directory[@name='src'] or
not($application/ccm:directories)"/> not($application/ccm:directories)"/>
@ -515,14 +538,19 @@
select="/ccm:project/ccm:application[@name=$fullname]/ccm:dependencies/ccm:requires"/> select="/ccm:project/ccm:application[@name=$fullname]/ccm:dependencies/ccm:requires"/>
<target name="compile-{$name}" <target name="compile-{$name}"
description="Compiles the Java code for the '{$name}' application" depends="init"> description="Compiles the Java code for the '{$name}' application"
depends="init">
<!-- Special compile tasks specified in application? Handle first -->
<xsl:if test="$buildhooks"> <xsl:if test="$buildhooks">
<ant target="compile-hook" dir="{$name}" inheritRefs="true"> <ant target="compile-hook" dir="{$name}" inheritRefs="true">
<xsl:attribute name="antfile"> <xsl:attribute name="antfile">
<xsl:value-of select="$buildhooks"/> <xsl:value-of select="$buildhooks"/>
</xsl:attribute> </xsl:attribute>
</ant> </ant>
</xsl:if> </xsl:if> <!-- test buildhooks -->
<!-- Usually true by default setting, main work is done here! -->
<xsl:if test="$hassrcdir"> <xsl:if test="$hassrcdir">
<mkdir dir="{$name}/${{build.src.dir}}"/> <mkdir dir="{$name}/${{build.src.dir}}"/>
<xsl:if test="$jdodirs"> <xsl:if test="$jdodirs">
@ -540,7 +568,7 @@
<delete file="{$name}/${{build.dir}}/.jdo-timestamp"/> <delete file="{$name}/${{build.dir}}/.jdo-timestamp"/>
</then> </then>
</if> </if>
</xsl:if> </xsl:if> <!-- test jdodirs -->
<path id="{$name}.compile.srcpath"> <path id="{$name}.compile.srcpath">
<pathelement location="{$name}/${{src.dir}}"/> <pathelement location="{$name}/${{src.dir}}"/>
<pathelement location="{$name}/${{build.src.dir}}"/> <pathelement location="{$name}/${{build.src.dir}}"/>
@ -555,8 +583,9 @@
<xsl:with-param name="classpathref" <xsl:with-param name="classpathref"
select="concat($name,'.build.classpath')"/> select="concat($name,'.build.classpath')"/>
</xsl:call-template> </xsl:call-template>
</xsl:if> </xsl:if> <!-- test hassrcdir -->
</target> </target> <!-- compile name -->
<xsl:if test="$jdodirs"> <xsl:if test="$jdodirs">
<target name="jdo-{$name}" <target name="jdo-{$name}"
description="JOD enhances the Java classes for the '{$name}' application" description="JOD enhances the Java classes for the '{$name}' application"
@ -591,7 +620,7 @@
<echo message="jdo-timestamp" <echo message="jdo-timestamp"
file="{$name}/${{build.dir}}/.jdo-timestamp"/> file="{$name}/${{build.dir}}/.jdo-timestamp"/>
</target> </target>
</xsl:if> </xsl:if> <!-- test jdodirs -->
<xsl:call-template name="TargetManifest"> <xsl:call-template name="TargetManifest">
<xsl:with-param name="target" select="$name"/> <xsl:with-param name="target" select="$name"/>
@ -645,6 +674,7 @@
</target> </target>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<xsl:if test="$hassqldir"> <xsl:if test="$hassqldir">
<target name="copy-sql-{$name}"> <target name="copy-sql-{$name}">
<mkdir dir="{$name}/${{build.sql.dir}}"/> <mkdir dir="{$name}/${{build.sql.dir}}"/>
@ -655,6 +685,10 @@
</copy> </copy>
</target> </target>
</xsl:if> </xsl:if>
<!-- copy each file in the source dir needed for operation, e.g.
poperty files, into compile target dir. Will later be included in
the generated jar file. -->
<xsl:if test="$hassrcdir"> <xsl:if test="$hassrcdir">
<target depends="init" name="copy-src-{$name}"> <target depends="init" name="copy-src-{$name}">
<copy todir="{$name}/${{build.classes.dir}}"> <copy todir="{$name}/${{build.classes.dir}}">
@ -665,7 +699,9 @@
</copy> </copy>
</target> </target>
</xsl:if> </xsl:if>
<target name="jar-classes-{$name}" depends="init,build-{$name}"> <target name="jar-classes-{$name}" depends="init,build-{$name}">
<jar destfile="{$name}/${{build.dir}}/${{apps.{$name}.name}}-${{apps.{$name}.version}}.jar" <jar destfile="{$name}/${{build.dir}}/${{apps.{$name}.name}}-${{apps.{$name}.version}}.jar"
update="true"> update="true">
<fileset dir="{$name}/${{build.classes.dir}}"/> <fileset dir="{$name}/${{build.classes.dir}}"/>
@ -676,16 +712,18 @@
value="${{apps.{$name}.name}}-${{apps.{$name}.version}}-pdl.jar value="${{apps.{$name}.name}}-${{apps.{$name}.version}}-pdl.jar
${{apps.{$name}.name}}-${{apps.{$name}.version}}-sql.jar"/> ${{apps.{$name}.name}}-${{apps.{$name}.version}}-sql.jar"/>
</manifest> </manifest>
</xsl:when> </xsl:when> <!-- hasPdlDir -->
<xsl:when test="$hassqldir"> <xsl:when test="$hassqldir">
<manifest> <manifest>
<attribute name="Class-Path" <attribute name="Class-Path"
value="${{apps.{$name}.name}}-${{apps.{$name}.version}}-sql.jar"/> value="${{apps.{$name}.name}}-${{apps.{$name}.version}}-sql.jar"/>
</manifest> </manifest>
</xsl:when> </xsl:when> <!-- hasSqlDir -->
</xsl:choose> </xsl:choose>
</jar> </jar>
</target> </target>
<xsl:if test="$haspdldir"> <xsl:if test="$haspdldir">
<target name="jar-pdl-{$name}" depends="init,build-{$name}"> <target name="jar-pdl-{$name}" depends="init,build-{$name}">
<mkdir dir="{$name}/${{pdl.dir}}"/> <mkdir dir="{$name}/${{pdl.dir}}"/>
@ -695,6 +733,7 @@
</jar> </jar>
</target> </target>
</xsl:if> </xsl:if>
<xsl:if test="$haspdldir or $hassqldir"> <xsl:if test="$haspdldir or $hassqldir">
<target name="jar-sql-{$name}" depends="init,build-{$name}"> <target name="jar-sql-{$name}" depends="init,build-{$name}">
<jar destfile="{$name}/${{build.dir}}/${{apps.{$name}.name}}-${{apps.{$name}.version}}-sql.jar" <jar destfile="{$name}/${{build.dir}}/${{apps.{$name}.name}}-${{apps.{$name}.version}}-sql.jar"
@ -705,6 +744,7 @@
</jar> </jar>
</target> </target>
</xsl:if> </xsl:if>
<!-- Build tasks --> <!-- Build tasks -->
<xsl:call-template name="TargetBuildApp"> <xsl:call-template name="TargetBuildApp">
<xsl:with-param name="target" select="@name"/> <xsl:with-param name="target" select="@name"/>
@ -734,6 +774,7 @@
select="$application/ccm:directories/ccm:directory[@name='pdl'] or select="$application/ccm:directories/ccm:directory[@name='pdl'] or
not($application/ccm:directories)"/> not($application/ccm:directories)"/>
<xsl:variable name="jdodirs" select="$application/ccm:jdo/ccm:directory"/> <xsl:variable name="jdodirs" select="$application/ccm:jdo/ccm:directory"/>
<target name="build-{$target}" <target name="build-{$target}"
description="Builds the '{$target}' application (compile, generate DDL, jar, etc)"> description="Builds the '{$target}' application (compile, generate DDL, jar, etc)">
<xsl:attribute name="depends"> <xsl:attribute name="depends">
@ -824,7 +865,9 @@
</classpath> </classpath>
</xsl:template> </xsl:template>
<xsl:template name="TargetVerify"> <xsl:template name="TargetVerify">
<target name="verify-pdl" depends="init" unless="pdl.no.verify" <target name="verify-pdl" depends="init" unless="pdl.no.verify"
description="Verifies that the PDL files compile"> description="Verifies that the PDL files compile">
<java classname="${{ddl.generator.classname}}" failonerror="yes" fork="yes"> <java classname="${{ddl.generator.classname}}" failonerror="yes" fork="yes">
@ -837,6 +880,7 @@
</java> </java>
<echo message="PDL files compiled successfully."/> <echo message="PDL files compiled successfully."/>
</target> </target>
<target name="jsp-compiler-check"> <target name="jsp-compiler-check">
<condition property="jsp.compiler.available"> <condition property="jsp.compiler.available">
<and> <and>
@ -847,6 +891,7 @@
</and> </and>
</condition> </condition>
</target> </target>
<target name="compile-jsp" depends="init,deploy,jsp-compiler-check" if="jsp.compiler.available"> <target name="compile-jsp" depends="init,deploy,jsp-compiler-check" if="jsp.compiler.available">
<taskdef classname="org.apache.jasper.JspC" name="jasper2"> <taskdef classname="org.apache.jasper.JspC" name="jasper2">
<xsl:call-template name="TargetJSPCompilerClasspath"/> <xsl:call-template name="TargetJSPCompilerClasspath"/>
@ -857,6 +902,7 @@
webXmlFragment="${{build.dir}}/generated_web.xml" webXmlFragment="${{build.dir}}/generated_web.xml"
outputDir="${{build.dir}}/jsp-java" /> outputDir="${{build.dir}}/jsp-java" />
</target> </target>
<target name="build-jsp" depends="init,compile-jsp" if="jsp.compiler.available"> <target name="build-jsp" depends="init,compile-jsp" if="jsp.compiler.available">
<javac <javac
debug="${{compile.debug}}" debug="${{compile.debug}}"
@ -869,15 +915,25 @@
<xsl:call-template name="TargetJSPCompilerClasspath"/> <xsl:call-template name="TargetJSPCompilerClasspath"/>
</javac> </javac>
</target> </target>
<target name="no-build-jsp" unless="jsp.compiler.available"> <target name="no-build-jsp" unless="jsp.compiler.available">
<echo message="JSP verification skipped. <echo message="JSP verification skipped.
The CATALINA_HOME environment variable must point to a Tomcat 4.1 installation."/> The CATALINA_HOME environment variable must point to a Tomcat 4.1 installation."/>
</target> </target>
<target name="verify-jsp" depends="init,build-jsp,no-build-jsp" <target name="verify-jsp" depends="init,build-jsp,no-build-jsp"
description="Verifies that JSP files compile (requires Tomcat 4.1)"/> description="Verifies that JSP files compile (requires Tomcat 4.1)"/>
</xsl:template>
</xsl:template> <!-- TargetVerify -->
<!-- DEPRECATED and no longer used nor supported!
Up to APLAWS+ 1.0.5 / CCM 6.5 the system used a application specific
URL protocol extension which had to be compiled and deployed into a
"system" jar which had to be added to a Tomcat system configuration.
No longer used, but mechansim preserved here just in case it is needed
for another purpose.
Configured in application.xml, system tag (see ccm-core as an example)
<xsl:template name="TargetDeploySystemJar"> <xsl:template name="TargetDeploySystemJar">
<xsl:param name="name"/> <xsl:param name="name"/>
<xsl:param name="package"/> <xsl:param name="package"/>
@ -895,6 +951,7 @@
</then> </then>
</if> </if>
</xsl:template> </xsl:template>
-->
<!-- D E P L O Y <!-- D E P L O Y
construct ant script for the deploy target --> construct ant script for the deploy target -->
@ -935,12 +992,16 @@
<mkdir dir="${{this.deploy.lib.dir}}"/> <mkdir dir="${{this.deploy.lib.dir}}"/>
<copy todir="${{this.deploy.lib.dir}}" <copy todir="${{this.deploy.lib.dir}}"
file="{$name}/${{build.dir}}/${{apps.{$name}.name}}-${{apps.{$name}.version}}.jar"/> file="{$name}/${{build.dir}}/${{apps.{$name}.name}}-${{apps.{$name}.version}}.jar"/>
<!-- system.jar no longer needed nor supported. See related comment above.
Preserved here just in case the mechanism will be needed for another
purpose
<xsl:for-each select="$application/ccm:systemPackages/ccm:package"> <xsl:for-each select="$application/ccm:systemPackages/ccm:package">
<xsl:call-template name="TargetDeploySystemJar"> <xsl:call-template name="TargetDeploySystemJar">
<xsl:with-param name="name" select="$name"/> <xsl:with-param name="name" select="$name"/>
<xsl:with-param name="package" select="@path"/> <xsl:with-param name="package" select="@path"/>
</xsl:call-template> </xsl:call-template>
</xsl:for-each> </xsl:for-each>
-->
</target> </target>
<!-- Deploy classes --> <!-- Deploy classes -->
@ -950,12 +1011,16 @@
<copy todir="${{this.deploy.classes.dir}}"> <copy todir="${{this.deploy.classes.dir}}">
<fileset dir="{$name}/${{build.classes.dir}}"/> <fileset dir="{$name}/${{build.classes.dir}}"/>
</copy> </copy>
<!-- system.jar no longer needed nor supported. See related comment above.
Preserved here just in case the mechanism will be needed for another
purpose
<xsl:for-each select="$application/ccm:systemPackages/ccm:package"> <xsl:for-each select="$application/ccm:systemPackages/ccm:package">
<xsl:call-template name="TargetDeploySystemJar"> <xsl:call-template name="TargetDeploySystemJar">
<xsl:with-param name="name" select="$name"/> <xsl:with-param name="name" select="$name"/>
<xsl:with-param name="package" select="@path"/> <xsl:with-param name="package" select="@path"/>
</xsl:call-template> </xsl:call-template>
</xsl:for-each> </xsl:for-each>
-->
</target> </target>
</xsl:if> </xsl:if>
@ -1067,14 +1132,22 @@
<fileset dir="${{apps.{$name}.location}}"> <fileset dir="${{apps.{$name}.location}}">
<include name="{$name}-{$version}.jar"/> <include name="{$name}-{$version}.jar"/>
<include name="{$name}-{$version}-*.jar"/> <include name="{$name}-{$version}-*.jar"/>
<!-- system.jar no longer needed nor supported. See related comment above.
Preserved here just in case the mechanism will be needed for another
purpose
<exclude name="{$name}-{$version}-system.jar"/> <exclude name="{$name}-{$version}-system.jar"/>
-->
</fileset> </fileset>
</copy> </copy>
<!-- system.jar no longer needed nor supported. See related comment above.
Preserved here just in case the mechanism will be needed for another
purpose
<copy todir="${{deploy.system.jars.dir}}" preservelastmodified="true"> <copy todir="${{deploy.system.jars.dir}}" preservelastmodified="true">
<fileset dir="${{apps.{$name}.location}}"> <fileset dir="${{apps.{$name}.location}}">
<include name="{$name}-{$version}-system.jar"/> <include name="{$name}-{$version}-system.jar"/>
</fileset> </fileset>
</copy> </copy>
-->
<copy todir="${{deploy.external.lib.dir.{$name}}}" preservelastmodified="true"> <copy todir="${{deploy.external.lib.dir.{$name}}}" preservelastmodified="true">
<fileset dir="${{apps.{$name}.location}}"> <fileset dir="${{apps.{$name}.location}}">
<include name="{$name}-{$version}/**"/> <include name="{$name}-{$version}/**"/>
@ -1138,7 +1211,8 @@
</target> </target>
<!-- Master deploy --> <!-- Master deploy -->
<target name="deploy" depends="init,deploy-global,deploy-local,copy-webxml"> <target name="deploy"
depends="init,deploy-global,deploy-local,copy-webxml">
<xsl:attribute name="description"> <xsl:attribute name="description">
Builds and deploys all applications, also deploys prebuilt applications and config files Builds and deploys all applications, also deploys prebuilt applications and config files
</xsl:attribute> </xsl:attribute>
@ -1186,7 +1260,9 @@
<mkdir dir="${{package.dir}}/binaries/"/> <mkdir dir="${{package.dir}}/binaries/"/>
<copy todir="${{package.dir}}/binaries/" <copy todir="${{package.dir}}/binaries/"
file="{$name}/${{build.dir}}/${{apps.{$name}.name}}-${{apps.{$name}.version}}.jar"/> file="{$name}/${{build.dir}}/${{apps.{$name}.name}}-${{apps.{$name}.version}}.jar"/>
<!-- <!-- system.jar no longer needed nor supported. See related comments above.
Preserved here just in case the mechanism will be needed for another
purpose
<xsl:for-each select="$application/ccm:systemPackages/ccm:package"> <xsl:for-each select="$application/ccm:systemPackages/ccm:package">
<xsl:call-template name="TargetDeploySystemJar"> <xsl:call-template name="TargetDeploySystemJar">
<xsl:with-param name="name" select="$name"/> <xsl:with-param name="name" select="$name"/>
@ -1300,8 +1376,7 @@
<!-- Master step create-war --> <!-- Master step create-war -->
<!-- depends="init,deploy-global,deploy-local,copy-webxml" <!-- depends="init,deploy-global,deploy-local,copy-webxml" -->
-->
<target name="create-war"> <target name="create-war">
<xsl:attribute name="description"> <xsl:attribute name="description">
Creates a WAR file of the deployed application. Creates a WAR file of the deployed application.
@ -1314,7 +1389,7 @@
</xsl:attribute> </xsl:attribute>
<echo> <echo>
Creating a WAR file from directory ${{deploy.dir}}/webapps/ROOT Creating a WAR file from directory ${{this.deploy.dir}}/webapps/ROOT
REMEMBER: REMEMBER:
You have to perform the load-bundle step first if you would like You have to perform the load-bundle step first if you would like
to have a valid web.xml file and a basic configuration! to have a valid web.xml file and a basic configuration!
@ -1901,13 +1976,18 @@
<!-- Deployment directory structure --> <!-- Deployment directory structure -->
<property value="${{app.server.webapp.dir}}/${{this.appContext}}" name="this.deploy.dir"/> <property value="${{app.server.webapp.dir}}/${{this.appContext}}" name="this.deploy.dir"/>
<!-- DEPRECATED
system jar should be no longer requirred. Will be removed asap. --> <!-- system.jar no longer needed nor supported. See related comments above.
<condition property="deploy.system.jars.dir" value="${{app.server.shared.dir}}/system"> Preserved here just in case the mechanism will be needed for another
purpose
<condition property="deploy.system.jars.dir"
value="${{app.server.shared.dir}}/system">
<not><isset property="deploy.system.jars.dir"/></not> <not><isset property="deploy.system.jars.dir"/></not>
</condition> </condition>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Should the jars and/or libs get installed into a shared directory? <!-- Should the jars and/or libs get installed into a shared directory? -->
<!-- Selection currently DEACTIVATED, always copied into WEB-INF private
<xsl:choose> <xsl:choose>
<xsl:when test="$shared = 'false'"> <xsl:when test="$shared = 'false'">
--> -->
@ -1921,9 +2001,11 @@
--> -->
<!-- will copy modules classes/libs into shared directory. 6.1 - 6.4: webapps/WEB-INF non-standard <!-- will copy modules classes/libs into shared directory. 6.1 - 6.4: webapps/WEB-INF non-standard
up to 6.4 the only metheod that works. up to 6.4 the only metheod that works.
Option currently NOT ACTIVE!
<property value="${{app.server.shared.dir}}" name="this.deploy.classes.dir"/> <property value="${{app.server.shared.dir}}" name="this.deploy.classes.dir"/>
<property value="${{app.server.shared.dir}}" name="this.deploy.lib.dir"/> <property value="${{app.server.shared.dir}}" name="this.deploy.lib.dir"/>
<property value="${{app.server.shared.dir}}" name="this.deploy.externallib.dir"/> --> <property value="${{app.server.shared.dir}}" name="this.deploy.externallib.dir"/>
-->
<!-- <!--
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>