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-94f89814c4dfmaster
parent
65cfd085e2
commit
7a2aa8dd32
|
|
@ -21,12 +21,13 @@ package com.arsdigita.cms.contenttypes;
|
|||
import com.arsdigita.cms.ContentSection;
|
||||
import com.arsdigita.cms.ContentType;
|
||||
import com.arsdigita.cms.lifecycle.LifecycleDefinition;
|
||||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
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 java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Loader.
|
||||
|
|
@ -35,11 +36,14 @@ import java.net.URL;
|
|||
* @version $Id: MultiPartArticleLoader.java 1561 2007-04-16 15:37:21Z apevec $
|
||||
*/
|
||||
public class MultiPartArticleLoader extends AbstractContentTypeLoader {
|
||||
|
||||
public final static String versionId =
|
||||
"$Id: MultiPartArticleLoader.java 1561 2007-04-16 15:37:21Z apevec $" +
|
||||
"$Author: apevec $" +
|
||||
"$DateTime: 2004/08/17 23:15:09 $";
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(MultiPartArticleLoader.class);
|
||||
|
||||
private static final String[] TYPES = {
|
||||
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/MultiPartArticle.xml"
|
||||
};
|
||||
|
|
@ -48,23 +52,20 @@ public class MultiPartArticleLoader extends AbstractContentTypeLoader {
|
|||
return TYPES;
|
||||
}
|
||||
|
||||
private URLParameter m_template;
|
||||
private ResourceParameter m_template;
|
||||
|
||||
public MultiPartArticleLoader() {
|
||||
try {
|
||||
m_template = new URLParameter
|
||||
("com.arsdigita.cms.contenttypes.mparticle.template",
|
||||
Parameter.REQUIRED,
|
||||
new URL(null,
|
||||
"resource:WEB-INF/content-types/com/arsdigita/cms/contenttypes" +
|
||||
"/mparticle-item.jsp"));
|
||||
} catch (MalformedURLException ex) {
|
||||
throw new UncheckedWrapperException("cannot parse url", ex);
|
||||
}
|
||||
|
||||
m_template = new ResourceParameter
|
||||
("com.arsdigita.cms.contenttypes.mparticle.template",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes" +
|
||||
"/mparticle-item.jsp");
|
||||
|
||||
register(m_template);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void prepareSection(final ContentSection section,
|
||||
final ContentType type,
|
||||
final LifecycleDefinition ld,
|
||||
|
|
@ -73,7 +74,7 @@ public class MultiPartArticleLoader extends AbstractContentTypeLoader {
|
|||
|
||||
setDefaultTemplate("MultiPartArticle-mparticle-item",
|
||||
"mparticle-item",
|
||||
(URL)get(m_template),
|
||||
(InputStream)get(m_template),
|
||||
section, type,ld, wf);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,8 +60,12 @@ public class MultiPartArticleTroikaRickshawUpgrade {
|
|||
|
||||
final ContentType type = ContentType.findByAssociatedObjectType
|
||||
(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
|
||||
(null, "resource:WEB-INF/content-types/com/arsdigita/cms" +
|
||||
// ^^^^^^^^^ no longer supperted !!
|
||||
"/contenttypes/mparticle-item.jsp");
|
||||
|
||||
final ContentSectionCollection coll = ContentSection.getAllSections();
|
||||
|
|
@ -18,16 +18,16 @@
|
|||
*/
|
||||
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.ContentSection;
|
||||
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.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"
|
||||
};
|
||||
|
||||
private URLParameter m_template;
|
||||
private ResourceParameter m_template;
|
||||
|
||||
public SiteProxyLoader() {
|
||||
try {
|
||||
m_template = new URLParameter
|
||||
("com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate",
|
||||
Parameter.REQUIRED,
|
||||
new URL(null,
|
||||
"resource:WEB-INF/content-types/com/arsdigita/cms/contenttypes" +
|
||||
"/siteproxy-item.jsp"));
|
||||
} catch (MalformedURLException ex) {
|
||||
throw new UncheckedWrapperException("cannot parse url", ex);
|
||||
}
|
||||
m_template = new ResourceParameter
|
||||
("com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes" +
|
||||
"/siteproxy-item.jsp");
|
||||
|
||||
register(m_template);
|
||||
}
|
||||
|
|
@ -67,6 +62,7 @@ public class SiteProxyLoader extends AbstractContentTypeLoader {
|
|||
return TYPES;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void prepareSection(final ContentSection section,
|
||||
final ContentType type,
|
||||
final LifecycleDefinition ld,
|
||||
|
|
@ -75,7 +71,7 @@ public class SiteProxyLoader extends AbstractContentTypeLoader {
|
|||
|
||||
setDefaultTemplate("SiteProxyDefaultTemplate",
|
||||
"siteproxy-item",
|
||||
(URL)get(m_template),
|
||||
(InputStream)get(m_template),
|
||||
section, type,ld, wf);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,19 +18,16 @@
|
|||
*/
|
||||
package com.arsdigita.cms;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
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;
|
||||
/* May 2009:
|
||||
* This file serves as an information for developers how to replace
|
||||
* the URL resource: protocol extension (which is a application specific,
|
||||
* non-standard extension of the Java URL protocol) by supported,
|
||||
* standard compliant API.
|
||||
*
|
||||
* Look for:
|
||||
* // URL resource: protocol handler removal: START
|
||||
* Will be removed as soon as a stable release 6.6 is created.
|
||||
*/
|
||||
|
||||
import com.arsdigita.bebop.SimpleComponent;
|
||||
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.ItemCategoryForm;
|
||||
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.ClassParameter;
|
||||
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.Parameter;
|
||||
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.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;
|
||||
// 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.
|
||||
|
|
@ -197,16 +222,24 @@ public final class ContentSectionConfig extends AbstractConfig {
|
|||
m_useSectionCategories = new BooleanParameter
|
||||
("com.arsdigita.cms.use_section_categories",
|
||||
Parameter.REQUIRED, new Boolean(true));
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
// URL resource: protocol handler removal: START
|
||||
// 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",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/resources/cms-item-adapters.xml");
|
||||
// URL resource: protocol handler removal: END
|
||||
|
||||
m_defaultSection = new StringParameter
|
||||
("com.arsdigita.cms.default_content_section",
|
||||
Parameter.REQUIRED, "content");
|
||||
|
|
@ -456,11 +489,15 @@ public final class ContentSectionConfig extends AbstractConfig {
|
|||
}
|
||||
|
||||
public final InputStream getItemAdapters() {
|
||||
try {
|
||||
return ((URL)get(m_itemAdapters)).openStream();
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedWrapperException("Cannot read stream", ex);
|
||||
}
|
||||
// URL resource: protocol handler removal: START
|
||||
// remove:
|
||||
// try {
|
||||
// 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() {
|
||||
|
|
@ -576,6 +613,7 @@ public final class ContentSectionConfig extends AbstractConfig {
|
|||
}
|
||||
|
||||
// value != null
|
||||
@Override
|
||||
protected Object unmarshal(String value, ErrorList errors) {
|
||||
Class theClass = (Class) super.unmarshal(value,errors);
|
||||
if (theClass != null) {
|
||||
|
|
@ -597,6 +635,7 @@ public final class ContentSectionConfig extends AbstractConfig {
|
|||
super(name, multiplicity, defaultObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object unmarshal(String value, ErrorList errors) {
|
||||
return DHTMLEditor.Config.valueOf(value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ com.arsdigita.cms.use_section_categories.example=true
|
|||
com.arsdigita.cms.use_section_categories.format=[boolean]
|
||||
|
||||
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.example=resource:WEB-INF/resources/cms-item-adapters.xml
|
||||
com.arsdigita.cms.item_adapters.format=[url]
|
||||
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=/WEB-INF/resources/cms-item-adapters.xml
|
||||
com.arsdigita.cms.item_adapters.format=[string]
|
||||
|
||||
com.arsdigita.cms.default_content_section.title = Default Content Section
|
||||
com.arsdigita.cms.default_content_section.purpose = The name of the default content section
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.Date;
|
||||
import java.net.URL;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
|
@ -61,7 +60,10 @@ import java.util.List;
|
|||
|
||||
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) {
|
||||
new KernelExcursion() {
|
||||
|
|
@ -161,7 +163,7 @@ public abstract class AbstractContentTypeLoader extends PackageLoader {
|
|||
*/
|
||||
protected Template setDefaultTemplate(final String name,
|
||||
final String label,
|
||||
final URL templateURL,
|
||||
final InputStream templateIs,
|
||||
final ContentSection section,
|
||||
final ContentType type,
|
||||
final LifecycleDefinition ld,
|
||||
|
|
@ -172,17 +174,10 @@ public abstract class AbstractContentTypeLoader extends PackageLoader {
|
|||
template.setContentSection(section);
|
||||
template.setParent(section.getTemplatesFolder());
|
||||
|
||||
InputStream stream;
|
||||
try {
|
||||
stream = templateURL.openStream();
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedWrapperException("Cannot read stream", ex);
|
||||
}
|
||||
|
||||
Assert.truth(stream != null, "Template not found");
|
||||
Assert.isTrue(templateIs != null, "Template not found");
|
||||
|
||||
final BufferedReader input = new BufferedReader
|
||||
(new InputStreamReader(stream));
|
||||
(new InputStreamReader(templateIs));
|
||||
|
||||
final StringBuffer body = new StringBuffer();
|
||||
|
||||
|
|
|
|||
|
|
@ -16,14 +16,19 @@
|
|||
<ccm:buildRequires name="postgresql-jdbc"/>
|
||||
<ccm:runRequires name="ccm-servlet-2.3"/>
|
||||
</ccm:dependencies>
|
||||
<!-- As of Tomcat 6 obviously no longer needed to avoid the malformed URL exception
|
||||
thrown by the resource URL method
|
||||
Correction: Still needed. URL resource protocoll must be replaced by another
|
||||
Solution, e.g. reuse of ResourceParameter
|
||||
-->
|
||||
|
||||
<!-- DEPRECATED
|
||||
Up to version APLAWS+ 1.0.5 / CCM 6.5 the system used an application
|
||||
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:package path="com/arsdigita/util/protocol/"/>
|
||||
</ccm:systemPackages>
|
||||
-->
|
||||
|
||||
<ccm:contacts>
|
||||
<ccm:contact uri="http://www.redhat.com/software/rhea" type="website"/>
|
||||
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/>
|
||||
|
|
|
|||
|
|
@ -45,19 +45,14 @@
|
|||
<target name="clean-build-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">
|
||||
<fail message="Property this.deploy.dir not defined."
|
||||
unless="this.deploy.dir" />
|
||||
<!-- deploy the log4j configuration file into the web applications
|
||||
document root tree -->
|
||||
<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>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -18,15 +18,6 @@
|
|||
*/
|
||||
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.kernel.EmailAddress;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
|
|
@ -53,7 +44,7 @@ import com.arsdigita.ui.sitemap.SiteMap;
|
|||
import com.arsdigita.util.Assert;
|
||||
import com.arsdigita.util.StringUtils;
|
||||
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.Parameter;
|
||||
import com.arsdigita.util.parameter.StringParameter;
|
||||
|
|
@ -63,6 +54,15 @@ import com.arsdigita.web.ApplicationType;
|
|||
import com.arsdigita.web.Host;
|
||||
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
|
||||
*
|
||||
|
|
@ -441,7 +441,7 @@ public class CoreLoader extends PackageLoader {
|
|||
|
||||
try {
|
||||
MimeTypeRow row = new MimeTypeRow();
|
||||
CSVParameterLoader loader = new CSVParameterLoader
|
||||
CSVParameterReader loader = new CSVParameterReader
|
||||
(new InputStreamReader(is), row.getParameters());
|
||||
|
||||
while (loader.next()) {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import com.arsdigita.util.parameter.StringParameter;
|
|||
import com.arsdigita.util.parameter.URLParameter;
|
||||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
import com.arsdigita.web.Web;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Properties;
|
||||
|
|
@ -40,7 +41,10 @@ import java.util.Properties;
|
|||
|
||||
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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.example=true
|
||||
waf.mail.debug.format=true|false
|
||||
|
||||
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.example=file:///etc/javamail.properties
|
||||
waf.mail.javamail.configuration.format=[url]
|
||||
|
||||
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.example=true|false
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
package com.arsdigita.runtime;
|
||||
|
||||
// import com.arsdigita.runtime.RegistryConfig;
|
||||
import com.arsdigita.runtime.CCMResourceManager;
|
||||
// import com.arsdigita.runtime.CCMResourceManager;
|
||||
import com.arsdigita.util.Classes;
|
||||
import com.arsdigita.util.JavaPropertyReader;
|
||||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
|
|
|
|||
|
|
@ -22,15 +22,16 @@ import com.arsdigita.util.Assert;
|
|||
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
|
||||
* offers subclasses use of the Apache BeanUtils framework, should
|
||||
* It offers subclasses use of the Apache BeanUtils framework, should
|
||||
* they opt to use it.
|
||||
*
|
||||
* Methods of the form <code>doXXX</code> are extension points for
|
||||
* subclasses. The <code>isRequired()</code> and
|
||||
* <code>getDefaultValue()</code> methods may also be overriden.
|
||||
* Methods of the form <code>doXXX</code> are extension points for subclasses.
|
||||
* The <code>isRequired()</code> and <code>getDefaultValue()</code>
|
||||
* methods may also be overriden.
|
||||
*
|
||||
* Subject to change.
|
||||
*
|
||||
* @see Parameter
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
|
|
@ -105,10 +106,9 @@ public abstract class AbstractParameter implements Parameter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Parameter users may override this method to make the
|
||||
* multiplicity of the parameter dependent on the multiplicity of
|
||||
* related parameters.
|
||||
*
|
||||
* Parameter users may override this method to make the multiplicity of
|
||||
* the parameter dependent on the multiplicity of related parameters.
|
||||
*
|
||||
* @see Parameter#isRequired()
|
||||
*/
|
||||
public boolean isRequired() {
|
||||
|
|
@ -151,13 +151,10 @@ public abstract class AbstractParameter implements Parameter {
|
|||
//
|
||||
|
||||
/**
|
||||
* Calls {@link #doRead(ParameterReader,ErrorList)}.
|
||||
*
|
||||
* @see Parameter#read(ParameterReader,ErrorList)
|
||||
*
|
||||
* 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.
|
||||
* 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:
|
||||
*
|
||||
|
|
@ -173,6 +170,8 @@ public abstract class AbstractParameter implements Parameter {
|
|||
* added to <code>errors</code>. Callers of this method will
|
||||
* typically construct an <code>ErrorList</code> in which to
|
||||
* collect errors.
|
||||
* Actually calls {@link #doRead(ParameterReader,ErrorList)} (as an
|
||||
* extension point for subclasses).
|
||||
*
|
||||
* @param reader The <code>ParameterReader</code> from which to
|
||||
* recover a string literal value; it cannot be null
|
||||
|
|
@ -192,14 +191,14 @@ public abstract class AbstractParameter implements Parameter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Reads the value of the parameter from <code>reader</code>,
|
||||
* unmarshals it, and returns it. If any errors are encountered,
|
||||
* Extension point to read the value of the parameter from <code>reader</code>.
|
||||
*
|
||||
* It unmarshals the value, and returns it. If any errors are encountered,
|
||||
* they are added to <code>errors</code>.
|
||||
*
|
||||
* If the literal string value from <code>reader</code> is not
|
||||
* null, this method delegates to {@link
|
||||
* #unmarshal(String,ErrorList)}.
|
||||
*
|
||||
* If the literal string value from <code>reader</code> is not null,
|
||||
* this method delegates to {@link #unmarshal(String,ErrorList)}.
|
||||
*
|
||||
* This implementation is suited to a parameter with a singular
|
||||
* scalar value. Subclasses that are compound parameters should
|
||||
* override this method to delegate to child parameters.
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ import java.util.Properties;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Subject to change.
|
||||
*
|
||||
* A base implementation of the <code>ParameterContext</code>
|
||||
* interface.
|
||||
*
|
||||
* Subject to change.
|
||||
*
|
||||
* @see com.arsdigita.util.parameter.ParameterContext
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
* @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>. If the
|
||||
* loaded value is null, <code>param.getDefaultValue()</code> is
|
||||
* returned.
|
||||
* Gets the unmarshaled value of <code>param</code>.
|
||||
*
|
||||
* If the loaded value is null, <code>param.getDefaultValue()</code>
|
||||
* is returned.
|
||||
*
|
||||
* @param param The named <code>Parameter</code> whose value to
|
||||
* 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
|
||||
* <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
|
||||
* 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
|
||||
* parameters from <code>reader</code>. If any errors are
|
||||
* encountered, they are added to <code>errors</code>.
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ import javax.mail.internet.InternetAddress;
|
|||
/**
|
||||
* Demonstrates how to use the CSVParameterLoader class.
|
||||
*
|
||||
* OUTDATED! CSVParameterLoader has become CSVParameterReader
|
||||
* see CoreLoader as an example how to use CSVParamegterReader
|
||||
*
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
* @version $Id: CSV.java 287 2005-02-22 00:29:02Z sskracic $
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ import java.util.List;
|
|||
* list of parameter values) and ....
|
||||
*
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
* @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 =
|
||||
"$Id: CSVParameterLoader.java 287 2005-02-22 00:29:02Z sskracic $" +
|
||||
"$Author: sskracic $" +
|
||||
|
|
@ -53,7 +53,7 @@ public final class CSVParameterLoader implements ParameterReader {
|
|||
* @param reader: input stream to read 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_params = params; // array of parameters
|
||||
m_line = new HashMap(params.length); //
|
||||
|
|
@ -72,6 +72,12 @@ public final class CSVParameterLoader implements ParameterReader {
|
|||
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) {
|
||||
final ParameterValue value = new ParameterValue();
|
||||
|
||||
|
|
@ -21,10 +21,10 @@ package com.arsdigita.util.parameter;
|
|||
import org.apache.commons.beanutils.converters.ClassConverter;
|
||||
|
||||
/**
|
||||
* Subject to change.
|
||||
*
|
||||
* A parameter representing a Java <code>Class</code>.
|
||||
*
|
||||
* Subject to change.
|
||||
*
|
||||
* @see java.lang.Class
|
||||
* @see Parameter
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ package com.arsdigita.util.parameter;
|
|||
import org.apache.commons.beanutils.converters.IntegerConverter;
|
||||
|
||||
/**
|
||||
* Subject to change.
|
||||
*
|
||||
* A parameter representing a Java <code>Integer</code>.
|
||||
*
|
||||
* Subject to change.
|
||||
*
|
||||
* @see java.lang.Integer
|
||||
* @see Parameter
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
|
|
|
|||
|
|
@ -19,11 +19,13 @@
|
|||
package com.arsdigita.util.parameter;
|
||||
|
||||
/**
|
||||
* Describes a named property that can read, write, and validate its
|
||||
* own value.
|
||||
*
|
||||
* Subject to change.
|
||||
*
|
||||
* Describes a named property that can read, write, and validate its
|
||||
* own value. See the documentation on {@link #read}, {@link #write},
|
||||
* and {@link #validate} for details.
|
||||
* See the documentation on {@link #read}, {@link #write}, and {@link #validate}
|
||||
* for details.
|
||||
|
||||
* They have the following features as well:
|
||||
*
|
||||
|
|
@ -49,9 +51,9 @@ package com.arsdigita.util.parameter;
|
|||
* successfully or fail outright.
|
||||
*
|
||||
* Parameters are stateless "messages". They do not store their own
|
||||
* values. Instead, a {@link
|
||||
* com.arsdigita.util.parameter.ParameterContext} manages a set of
|
||||
* parameters and keeps their values.
|
||||
* values. Instead, a {@link com.arsdigita.util.parameter.ParameterContext}
|
||||
* manages a set of parameters and keeps their values.
|
||||
*
|
||||
*
|
||||
* 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
|
||||
* 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>.
|
||||
*
|
||||
* @param writer The <code>ParameterWriter</code> that will take
|
||||
|
|
|
|||
|
|
@ -19,10 +19,12 @@
|
|||
package com.arsdigita.util.parameter;
|
||||
|
||||
/**
|
||||
* Subject to change.
|
||||
* A container of parameters.
|
||||
*
|
||||
* A parameter context binds together a set of parameters and keeps their values.
|
||||
*
|
||||
*
|
||||
* A container of parameters. A parameter context binds together a
|
||||
* set of parameters and keeps their values.
|
||||
* Subject to change.
|
||||
*
|
||||
* @see com.arsdigita.util.parameter.Parameter
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
|
|
|
|||
|
|
@ -23,22 +23,32 @@ import java.io.FileInputStream;
|
|||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.Iterator;
|
||||
|
||||
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
|
||||
* 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
|
||||
* 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
|
||||
* application specific resource: protocol extension (c.ad.util.protocol.resource).
|
||||
* As of version 6.5 reverted to ResourceParameter to avoid non-standard extensions.
|
||||
*
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
* @author Brett <bprucha@users.sourceforge net>
|
||||
* @author PBoy <pboy@users.sourceforge net>
|
||||
* @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 =
|
||||
"$Id: ResourceParameter.java 287 2005-02-22 00:29:02Z sskracic $" +
|
||||
"$Author: sskracic $" +
|
||||
|
|
@ -46,17 +56,71 @@ public class ResourceParameter extends StringParameter {
|
|||
|
||||
private static final Logger s_log = Logger.getLogger(ResourceParameter.class);
|
||||
|
||||
private Object m_default = null;
|
||||
|
||||
public ResourceParameter(final String name) {
|
||||
super(name);
|
||||
super(name, InputStream.class);
|
||||
}
|
||||
|
||||
public ResourceParameter(final String name,
|
||||
final int multiplicity,
|
||||
final Object defaalt) {
|
||||
super(name, multiplicity, defaalt);
|
||||
final int multiplicity,
|
||||
final Object defaultValue) {
|
||||
|
||||
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) {
|
||||
|
||||
// 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);
|
||||
|
||||
if (!file.exists()) {
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ package com.arsdigita.util.parameter;
|
|||
import org.apache.commons.beanutils.converters.StringConverter;
|
||||
|
||||
/**
|
||||
* Subject to change.
|
||||
*
|
||||
* A parameter representing a Java <code>String</code>.
|
||||
*
|
||||
* Subject to change.
|
||||
*
|
||||
* @see java.lang.String
|
||||
* @see Parameter
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ import java.net.URLStreamHandler;
|
|||
* Handler
|
||||
* 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
|
||||
* "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
|
||||
* 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 <rhs@mit.edu>
|
||||
* @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 {
|
||||
|
|
|
|||
|
|
@ -173,20 +173,20 @@ public class HttpResourceLocator {
|
|||
final String servletPath,
|
||||
final String pathInfo,
|
||||
final HttpParameterMap params) {
|
||||
if (Assert.isAssertEnabled()) {
|
||||
if (Assert.isEnabled()) {
|
||||
Assert.exists(host, HttpHost.class);
|
||||
Assert.exists(contextPath, String.class);
|
||||
Assert.exists(servletPath, String.class);
|
||||
|
||||
if (contextPath.startsWith("/")) {
|
||||
Assert.truth
|
||||
Assert.isTrue
|
||||
(!contextPath.endsWith("/"),
|
||||
"A contextPath starting with '/' must not end in '/'; " +
|
||||
"I got '" + contextPath + "'");
|
||||
}
|
||||
|
||||
if (pathInfo != null) {
|
||||
Assert.truth(pathInfo.startsWith("/"),
|
||||
Assert.isTrue(pathInfo.startsWith("/"),
|
||||
"I expected a pathInfo starting with '/' " +
|
||||
"and got '" + pathInfo + "' instead");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,14 +22,19 @@ import com.arsdigita.persistence.Session;
|
|||
import com.arsdigita.persistence.SessionManager;
|
||||
import com.arsdigita.persistence.TransactionContext;
|
||||
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.ScriptContext;
|
||||
import com.arsdigita.runtime.Startup;
|
||||
import com.arsdigita.util.parameter.ErrorList;
|
||||
import com.arsdigita.util.parameter.IntegerParameter;
|
||||
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 org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -72,15 +77,19 @@ public final class HostLoader extends AbstractScript {
|
|||
new Startup().run();
|
||||
|
||||
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);
|
||||
|
||||
final TransactionContext transaction = session.getTransactionContext();
|
||||
transaction.beginTxn();
|
||||
|
||||
Script script = new HostLoader();
|
||||
script.load(loader, new ErrorList());
|
||||
script.run(new ScriptContext(session, loader));
|
||||
// script.load(loader, new ErrorList());
|
||||
// script.run(new ScriptContext(session, loader));
|
||||
script.load(reader, new ErrorList());
|
||||
script.run(new ScriptContext(session, reader));
|
||||
|
||||
transaction.commitTxn();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,34 +18,34 @@
|
|||
*/
|
||||
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.UserCollection;
|
||||
import com.arsdigita.kernel.User;
|
||||
import com.arsdigita.kernel.UserCollection;
|
||||
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.IntegerParameter;
|
||||
import com.arsdigita.util.parameter.IntegerParameter;
|
||||
import com.arsdigita.util.parameter.Parameter;
|
||||
import com.arsdigita.util.parameter.StringParameter;
|
||||
import com.arsdigita.util.parameter.URLParameter;
|
||||
import com.arsdigita.util.parameter.ResourceParameter;
|
||||
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.
|
||||
*
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
* @version $Id: ForumConfig.java 1628 2007-09-17 08:10:40Z chrisg23 $
|
||||
* @version $Id: ForumConfig.java 1628 2007-09-17 08:10:40Z chrisg23 $
|
||||
*/
|
||||
public class ForumConfig extends AbstractConfig {
|
||||
public final static String versionId =
|
||||
"$Id: ForumConfig.java 1628 2007-09-17 08:10:40Z chrisg23 $" +
|
||||
"$Author: chrisg23 $" +
|
||||
"$Id: ForumConfig.java 1628 2007-09-17 08:10:40Z chrisg23 $" +
|
||||
"$Author: chrisg23 $" +
|
||||
"$DateTime: 2004/08/17 23:26:27 $";
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(ForumConfig.class);
|
||||
|
|
@ -54,20 +54,21 @@ public class ForumConfig extends AbstractConfig {
|
|||
private Parameter m_authorEditPosts;
|
||||
private Parameter m_digestUserEmail;
|
||||
private Parameter m_replyHostName;
|
||||
private Parameter m_disablePageCaching;
|
||||
private Parameter m_adminOnlyCreateTopics;
|
||||
private Parameter m_maxImageSize;
|
||||
private Parameter m_maxFileSize;
|
||||
private Parameter m_disablePageCaching;
|
||||
private Parameter m_adminOnlyCreateTopics;
|
||||
private Parameter m_maxImageSize;
|
||||
private Parameter m_maxFileSize;
|
||||
private final Parameter m_adapters;
|
||||
private Parameter m_showAllThreadAlerts;
|
||||
private Parameter m_showNewTabs;
|
||||
private Parameter m_useWysiwygEditor;
|
||||
private Parameter m_rejectionMessage;
|
||||
private Parameter m_threadPageSize;
|
||||
private Parameter m_quickFinish;
|
||||
private Parameter m_deleteSentSubscriptionNotifications;
|
||||
private Parameter m_showAllThreadAlerts;
|
||||
private Parameter m_showNewTabs;
|
||||
private Parameter m_useWysiwygEditor;
|
||||
private Parameter m_rejectionMessage;
|
||||
private Parameter m_threadPageSize;
|
||||
private Parameter m_quickFinish;
|
||||
private Parameter m_deleteSentSubscriptionNotifications;
|
||||
|
||||
public ForumConfig() {
|
||||
|
||||
m_adminEditPosts = new BooleanParameter(
|
||||
"com.arsdigita.forum.admin_can_edit_posts",
|
||||
Parameter.REQUIRED,
|
||||
|
|
@ -84,85 +85,76 @@ public class ForumConfig extends AbstractConfig {
|
|||
"com.arsdigita.forum.digest_user_email",
|
||||
Parameter.OPTIONAL,
|
||||
null);
|
||||
m_disablePageCaching = new BooleanParameter (
|
||||
"com.arsdigita.forum.disable_page_caching",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.FALSE);
|
||||
|
||||
m_adminOnlyCreateTopics = new BooleanParameter (
|
||||
"com.arsdigita.forum.admin_only_to_create_topics",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.FALSE);
|
||||
m_maxImageSize = new IntegerParameter (
|
||||
"com.arsdigita.forum.maximum_image_size",
|
||||
Parameter.OPTIONAL, null);
|
||||
m_maxFileSize = new IntegerParameter (
|
||||
"com.arsdigita.forum.maximum_file_size",
|
||||
Parameter.OPTIONAL, null);
|
||||
|
||||
m_showNewTabs = new BooleanParameter(
|
||||
"com.arsdigita.forum.show_new_tabs",
|
||||
Parameter.OPTIONAL,
|
||||
Boolean.FALSE);
|
||||
m_showAllThreadAlerts = new BooleanParameter(
|
||||
"com.arsdigita.forum.show_all_forum_thread_alerts",
|
||||
Parameter.OPTIONAL,
|
||||
Boolean.TRUE);
|
||||
m_useWysiwygEditor = new BooleanParameter(
|
||||
"com.arsdigita.forum.use_wysiwyg_editor",
|
||||
Parameter.OPTIONAL,
|
||||
Boolean.FALSE);
|
||||
m_rejectionMessage = new StringParameter(
|
||||
"com.arsdigita.forum.rejection_form_message.example",
|
||||
Parameter.OPTIONAL,
|
||||
null);
|
||||
m_threadPageSize = new IntegerParameter (
|
||||
"com.arsdigita.forum.thread_page_size",
|
||||
Parameter.REQUIRED, new Integer(10));
|
||||
m_quickFinish = new BooleanParameter(
|
||||
"com.arsdigita.forum.allow_quick_finish",
|
||||
Parameter.OPTIONAL,
|
||||
Boolean.FALSE);
|
||||
m_deleteSentSubscriptionNotifications = new BooleanParameter(
|
||||
"com.arsdigita.forum.delete_sent_subscription_notifications",
|
||||
Parameter.OPTIONAL,
|
||||
Boolean.FALSE);
|
||||
m_disablePageCaching = new BooleanParameter (
|
||||
"com.arsdigita.forum.disable_page_caching",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.FALSE);
|
||||
|
||||
m_adminOnlyCreateTopics = new BooleanParameter (
|
||||
"com.arsdigita.forum.admin_only_to_create_topics",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.FALSE);
|
||||
m_maxImageSize = new IntegerParameter (
|
||||
"com.arsdigita.forum.maximum_image_size",
|
||||
Parameter.OPTIONAL, null);
|
||||
m_maxFileSize = new IntegerParameter (
|
||||
"com.arsdigita.forum.maximum_file_size",
|
||||
Parameter.OPTIONAL, null);
|
||||
|
||||
m_showNewTabs = new BooleanParameter(
|
||||
"com.arsdigita.forum.show_new_tabs",
|
||||
Parameter.OPTIONAL,
|
||||
Boolean.FALSE);
|
||||
m_showAllThreadAlerts = new BooleanParameter(
|
||||
"com.arsdigita.forum.show_all_forum_thread_alerts",
|
||||
Parameter.OPTIONAL,
|
||||
Boolean.TRUE);
|
||||
m_useWysiwygEditor = new BooleanParameter(
|
||||
"com.arsdigita.forum.use_wysiwyg_editor",
|
||||
Parameter.OPTIONAL,
|
||||
Boolean.FALSE);
|
||||
m_rejectionMessage = new StringParameter(
|
||||
"com.arsdigita.forum.rejection_form_message.example",
|
||||
Parameter.OPTIONAL,
|
||||
null);
|
||||
m_threadPageSize = new IntegerParameter (
|
||||
"com.arsdigita.forum.thread_page_size",
|
||||
Parameter.REQUIRED, new Integer(10));
|
||||
m_quickFinish = new BooleanParameter(
|
||||
"com.arsdigita.forum.allow_quick_finish",
|
||||
Parameter.OPTIONAL,
|
||||
Boolean.FALSE);
|
||||
m_deleteSentSubscriptionNotifications = new BooleanParameter(
|
||||
"com.arsdigita.forum.delete_sent_subscription_notifications",
|
||||
Parameter.OPTIONAL,
|
||||
Boolean.FALSE);
|
||||
|
||||
try {
|
||||
m_adapters = new URLParameter
|
||||
("com.arsdigita.forum.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
new URL(null,
|
||||
"resource:WEB-INF/resources/forum-adapters.xml"));
|
||||
} catch (MalformedURLException ex) {
|
||||
throw new UncheckedWrapperException("Cannot parse URL", ex);
|
||||
}
|
||||
m_adapters = new ResourceParameter
|
||||
("com.arsdigita.forum.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/resources/forum-adapters.xml");
|
||||
|
||||
register(m_digestUserEmail);
|
||||
register(m_adminEditPosts);
|
||||
register(m_authorEditPosts);
|
||||
register(m_replyHostName);
|
||||
register(m_adapters);
|
||||
register(m_disablePageCaching);
|
||||
register(m_adminOnlyCreateTopics);
|
||||
register(m_maxImageSize);
|
||||
register(m_maxFileSize);
|
||||
register(m_showAllThreadAlerts);
|
||||
register(m_showNewTabs);
|
||||
register(m_useWysiwygEditor);
|
||||
register(m_rejectionMessage);
|
||||
register(m_threadPageSize);
|
||||
register(m_quickFinish);
|
||||
register(m_deleteSentSubscriptionNotifications);
|
||||
register(m_disablePageCaching);
|
||||
register(m_adminOnlyCreateTopics);
|
||||
register(m_maxImageSize);
|
||||
register(m_maxFileSize);
|
||||
register(m_showAllThreadAlerts);
|
||||
register(m_showNewTabs);
|
||||
register(m_useWysiwygEditor);
|
||||
register(m_rejectionMessage);
|
||||
register(m_threadPageSize);
|
||||
register(m_quickFinish);
|
||||
register(m_deleteSentSubscriptionNotifications);
|
||||
loadInfo();
|
||||
}
|
||||
|
||||
InputStream getTraversalAdapters() {
|
||||
try {
|
||||
return ((URL)get(m_adapters)).openStream();
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedWrapperException("Cannot read stream", ex);
|
||||
}
|
||||
return (InputStream)get(m_adapters);
|
||||
}
|
||||
|
||||
public boolean canAdminEditPosts() {
|
||||
|
|
@ -189,28 +181,28 @@ public class ForumConfig extends AbstractConfig {
|
|||
return hostName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Supports prevention of client and middleware caching -
|
||||
* use in situations where users with different
|
||||
* permissions share machines
|
||||
* @return
|
||||
*/
|
||||
public boolean disableClientPageCaching () {
|
||||
return ((Boolean)get(m_disablePageCaching)).booleanValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* if true, disables topic tab for non admin users. Topic
|
||||
* tab does not access control topic creation, so set this
|
||||
* to true to maintain control of the topics on the forum.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean topicCreationByAdminOnly () {
|
||||
return ((Boolean)get(m_adminOnlyCreateTopics)).booleanValue();
|
||||
}
|
||||
/**
|
||||
* Supports prevention of client and middleware caching -
|
||||
* use in situations where users with different
|
||||
* permissions share machines
|
||||
* @return
|
||||
*/
|
||||
public boolean disableClientPageCaching () {
|
||||
return ((Boolean)get(m_disablePageCaching)).booleanValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* if true, disables topic tab for non admin users. Topic
|
||||
* tab does not access control topic creation, so set this
|
||||
* to true to maintain control of the topics on the forum.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean topicCreationByAdminOnly () {
|
||||
return ((Boolean)get(m_adminOnlyCreateTopics)).booleanValue();
|
||||
}
|
||||
public User getDigestUser() {
|
||||
String email = getDigestUserEmail();
|
||||
|
||||
|
|
@ -226,85 +218,85 @@ public class ForumConfig extends AbstractConfig {
|
|||
users.close();
|
||||
return user;
|
||||
}
|
||||
/**
|
||||
* returns the maximum allowed size (in bytes) of
|
||||
* image files attached to posts. Any larger
|
||||
* files are rejected by UI validation
|
||||
* @return
|
||||
*/
|
||||
public long getMaxImageSize() {
|
||||
Integer size = (Integer)get(m_maxImageSize);
|
||||
long longSize = Long.MAX_VALUE;
|
||||
if (size != null) {
|
||||
longSize = size.longValue();
|
||||
}
|
||||
return longSize;
|
||||
}
|
||||
/**
|
||||
* returns the maximum allowed size (in bytes) of
|
||||
* files attached to posts. Any larger
|
||||
* files are rejected by UI validation
|
||||
* @return
|
||||
*/
|
||||
public long getMaxFileSize() {
|
||||
Integer size = (Integer)get(m_maxFileSize);
|
||||
long longSize = Long.MAX_VALUE;
|
||||
if (size != null) {
|
||||
longSize = size.longValue();
|
||||
}
|
||||
return longSize;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* if true, alerts tab displays thread alerts for this and all other
|
||||
* forums. If false, only display thread subscriptions for current
|
||||
* forum.
|
||||
* @return
|
||||
*/
|
||||
/*
|
||||
* If true, the thread alert page lists thread alerts from
|
||||
* all forums - alerts not from the current forum have
|
||||
* links to the thread displayed within the context of
|
||||
* the current forum. Looks weird and needs to be sorted out
|
||||
* presumably the correct forum needs to be set in the ForumContext
|
||||
* when a link is selected
|
||||
*/
|
||||
public boolean showThreadAlertsForAllForums () {
|
||||
return ((Boolean)get(m_showAllThreadAlerts)).booleanValue();
|
||||
}
|
||||
/**
|
||||
* if true, displays setup and permissions tabs
|
||||
* @return
|
||||
*/
|
||||
public boolean showNewTabs () {
|
||||
return ((Boolean)get(m_showNewTabs)).booleanValue();
|
||||
}
|
||||
|
||||
public boolean useWysiwygEditor () {
|
||||
return ((Boolean)get(m_useWysiwygEditor)).booleanValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* message added to the bottom of the moderation reection email.
|
||||
* May give details about what the poster can do if not happy
|
||||
* with rejection
|
||||
* @return
|
||||
*/
|
||||
public String getRejectionMessage () {
|
||||
return (String)get(m_rejectionMessage);
|
||||
}
|
||||
|
||||
public int getThreadPageSize () {
|
||||
return ((Integer)get(m_threadPageSize)).intValue();
|
||||
}
|
||||
|
||||
public boolean quickFinishAllowed () {
|
||||
return ((Boolean)get(m_quickFinish)).booleanValue();
|
||||
}
|
||||
|
||||
public boolean deleteNotifications () {
|
||||
return ((Boolean)get(m_deleteSentSubscriptionNotifications)).booleanValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the maximum allowed size (in bytes) of
|
||||
* image files attached to posts. Any larger
|
||||
* files are rejected by UI validation
|
||||
* @return
|
||||
*/
|
||||
public long getMaxImageSize() {
|
||||
Integer size = (Integer)get(m_maxImageSize);
|
||||
long longSize = Long.MAX_VALUE;
|
||||
if (size != null) {
|
||||
longSize = size.longValue();
|
||||
}
|
||||
return longSize;
|
||||
}
|
||||
/**
|
||||
* returns the maximum allowed size (in bytes) of
|
||||
* files attached to posts. Any larger
|
||||
* files are rejected by UI validation
|
||||
* @return
|
||||
*/
|
||||
public long getMaxFileSize() {
|
||||
Integer size = (Integer)get(m_maxFileSize);
|
||||
long longSize = Long.MAX_VALUE;
|
||||
if (size != null) {
|
||||
longSize = size.longValue();
|
||||
}
|
||||
return longSize;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* if true, alerts tab displays thread alerts for this and all other
|
||||
* forums. If false, only display thread subscriptions for current
|
||||
* forum.
|
||||
* @return
|
||||
*/
|
||||
/*
|
||||
* If true, the thread alert page lists thread alerts from
|
||||
* all forums - alerts not from the current forum have
|
||||
* links to the thread displayed within the context of
|
||||
* the current forum. Looks weird and needs to be sorted out
|
||||
* presumably the correct forum needs to be set in the ForumContext
|
||||
* when a link is selected
|
||||
*/
|
||||
public boolean showThreadAlertsForAllForums () {
|
||||
return ((Boolean)get(m_showAllThreadAlerts)).booleanValue();
|
||||
}
|
||||
/**
|
||||
* if true, displays setup and permissions tabs
|
||||
* @return
|
||||
*/
|
||||
public boolean showNewTabs () {
|
||||
return ((Boolean)get(m_showNewTabs)).booleanValue();
|
||||
}
|
||||
|
||||
public boolean useWysiwygEditor () {
|
||||
return ((Boolean)get(m_useWysiwygEditor)).booleanValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* message added to the bottom of the moderation reection email.
|
||||
* May give details about what the poster can do if not happy
|
||||
* with rejection
|
||||
* @return
|
||||
*/
|
||||
public String getRejectionMessage () {
|
||||
return (String)get(m_rejectionMessage);
|
||||
}
|
||||
|
||||
public int getThreadPageSize () {
|
||||
return ((Integer)get(m_threadPageSize)).intValue();
|
||||
}
|
||||
|
||||
public boolean quickFinishAllowed () {
|
||||
return ((Boolean)get(m_quickFinish)).booleanValue();
|
||||
}
|
||||
|
||||
public boolean deleteNotifications () {
|
||||
return ((Boolean)get(m_deleteSentSubscriptionNotifications)).booleanValue();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
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.format=[url]
|
||||
com.arsdigita.forum.traversal_adapters.example=resource:WEB-INF/resources/forum-adapters.xml
|
||||
com.arsdigita.forum.traversal_adapters.format=[string]
|
||||
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.purpose=Email address of the user sending digest emails
|
||||
|
|
@ -18,62 +18,62 @@ com.arsdigita.forum.admin_can_edit_posts.purpose=Whether administrators can edit
|
|||
com.arsdigita.forum.admin_can_edit_posts.format=[boolean]
|
||||
com.arsdigita.forum.admin_can_edit_posts.example=true|false
|
||||
|
||||
com.arsdigita.forum.admin_only_to_create_topics.title=Prevent other users creating new topics
|
||||
com.arsdigita.forum.admin_only_to_create_topics.purpose=Whether only admin can create (true) topics or all users (false)
|
||||
com.arsdigita.forum.admin_only_to_create_topics.format=[boolean]
|
||||
com.arsdigita.forum.admin_only_to_create_topics.example=true|false
|
||||
|
||||
com.arsdigita.forum.admin_only_to_create_topics.title=Prevent other users creating new topics
|
||||
com.arsdigita.forum.admin_only_to_create_topics.purpose=Whether only admin can create (true) topics or all users (false)
|
||||
com.arsdigita.forum.admin_only_to_create_topics.format=[boolean]
|
||||
com.arsdigita.forum.admin_only_to_create_topics.example=true|false
|
||||
|
||||
com.arsdigita.forum.author_can_edit_posts.title=Authors can edit posts
|
||||
com.arsdigita.forum.author_can_edit_posts.purpose=Whether authors can edijt their posts
|
||||
com.arsdigita.forum.author_can_edit_posts.format=[boolean]
|
||||
com.arsdigita.forum.author_can_edit_posts.example=true|false
|
||||
|
||||
com.arsdigita.forum.disable_page_caching.title=Disable client & middleware page caching
|
||||
com.arsdigita.forum.disable_page_caching.purpose=Disable caching, particularly for situations where users share PCs
|
||||
com.arsdigita.forum.disable_page_caching.format=[boolean]
|
||||
com.arsdigita.forum.disable_page_caching.example=true|false
|
||||
|
||||
com.arsdigita.forum.maximum_image_size.title=Maximum size of image uploads in bytes
|
||||
com.arsdigita.forum.maximum_image_size.purpose=Prevent huge images from being uploaded
|
||||
com.arsdigita.forum.maximum_image_size.format=[integer]
|
||||
com.arsdigita.forum.maximum_image_size.example=1048576
|
||||
|
||||
com.arsdigita.forum.maximum_file_size.title=Maximum size of file uploads in bytes
|
||||
com.arsdigita.forum.maximum_file_size.purpose=prevent huge files from being uploaded
|
||||
com.arsdigita.forum.maximum_file_size.format=[integer]
|
||||
com.arsdigita.forum.maximum_file_size.example=1048576
|
||||
|
||||
com.arsdigita.forum.show_all_forum_thread_alerts.title=Display thread alerts from all forums
|
||||
com.arsdigita.forum.show_all_forum_thread_alerts.purpose=decide whether to display thread alerts for this forum only or all alerts for user
|
||||
com.arsdigita.forum.show_all_forum_thread_alerts.format=[boolean]
|
||||
com.arsdigita.forum.show_all_forum_thread_alerts.example=true|false
|
||||
|
||||
com.arsdigita.forum.show_new_tabs.title=Display permissions and setup tabs
|
||||
com.arsdigita.forum.show_new_tabs.purpose=to allow forum users to completely hide new functionality
|
||||
com.arsdigita.forum.show_new_tabs.format=[boolean]
|
||||
com.arsdigita.forum.show_new_tabs.example=true|false
|
||||
|
||||
com.arsdigita.forum.use_wysiwyg_editor.title=Use HTML Editor, or stick with legacy version
|
||||
com.arsdigita.forum.use_wysiwyg_editor.purpose=to allow legacy implementations to stick with existing stylesheets
|
||||
com.arsdigita.forum.use_wysiwyg_editor.format=[boolean]
|
||||
com.arsdigita.forum.use_wysiwyg_editor.example=true|false
|
||||
|
||||
com.arsdigita.forum.rejection_form_message.title=Instructions to poster added to bottom of email
|
||||
com.arsdigita.forum.rejection_form_message.purpose=tail of email that may contain site specific information - who to contact etc
|
||||
com.arsdigita.forum.rejection_form_message.format=[string]
|
||||
com.arsdigita.forum.rejection_form_message.example=Please do not reply to this email. If you have any comments, please email webmaster@example.com
|
||||
|
||||
com.arsdigita.forum.thread_page_size.title=Number of threads displayed per page
|
||||
com.arsdigita.forum.thread_page_size.purpose=balance page loading time against number of key preses
|
||||
com.arsdigita.forum.thread_page_size.format=[integer]
|
||||
com.arsdigita.forum.thread_page_size.example=10
|
||||
|
||||
com.arsdigita.forum.allow_quick_finish.title=Allow quick finish on posts
|
||||
com.arsdigita.forum.allow_quick_finish.purpose=To give users the option of omitting post steps if they have a quick text post
|
||||
com.arsdigita.forum.allow_quick_finish.format=[boolean]
|
||||
com.arsdigita.forum.allow_quick_finish.example=true|false
|
||||
|
||||
com.arsdigita.forum.delete_sent_subscription_notifications.title=Delete Sent Subscription Notifications
|
||||
com.arsdigita.forum.delete_sent_subscription_notifications.purpose=Enable deletion of successfully sent notifications to save space in DB
|
||||
com.arsdigita.forum.delete_sent_subscription_notifications.format=[boolean]
|
||||
com.arsdigita.forum.delete_sent_subscription_notifications.example=true|false
|
||||
com.arsdigita.forum.disable_page_caching.title=Disable client & middleware page caching
|
||||
com.arsdigita.forum.disable_page_caching.purpose=Disable caching, particularly for situations where users share PCs
|
||||
com.arsdigita.forum.disable_page_caching.format=[boolean]
|
||||
com.arsdigita.forum.disable_page_caching.example=true|false
|
||||
|
||||
com.arsdigita.forum.maximum_image_size.title=Maximum size of image uploads in bytes
|
||||
com.arsdigita.forum.maximum_image_size.purpose=Prevent huge images from being uploaded
|
||||
com.arsdigita.forum.maximum_image_size.format=[integer]
|
||||
com.arsdigita.forum.maximum_image_size.example=1048576
|
||||
|
||||
com.arsdigita.forum.maximum_file_size.title=Maximum size of file uploads in bytes
|
||||
com.arsdigita.forum.maximum_file_size.purpose=prevent huge files from being uploaded
|
||||
com.arsdigita.forum.maximum_file_size.format=[integer]
|
||||
com.arsdigita.forum.maximum_file_size.example=1048576
|
||||
|
||||
com.arsdigita.forum.show_all_forum_thread_alerts.title=Display thread alerts from all forums
|
||||
com.arsdigita.forum.show_all_forum_thread_alerts.purpose=decide whether to display thread alerts for this forum only or all alerts for user
|
||||
com.arsdigita.forum.show_all_forum_thread_alerts.format=[boolean]
|
||||
com.arsdigita.forum.show_all_forum_thread_alerts.example=true|false
|
||||
|
||||
com.arsdigita.forum.show_new_tabs.title=Display permissions and setup tabs
|
||||
com.arsdigita.forum.show_new_tabs.purpose=to allow forum users to completely hide new functionality
|
||||
com.arsdigita.forum.show_new_tabs.format=[boolean]
|
||||
com.arsdigita.forum.show_new_tabs.example=true|false
|
||||
|
||||
com.arsdigita.forum.use_wysiwyg_editor.title=Use HTML Editor, or stick with legacy version
|
||||
com.arsdigita.forum.use_wysiwyg_editor.purpose=to allow legacy implementations to stick with existing stylesheets
|
||||
com.arsdigita.forum.use_wysiwyg_editor.format=[boolean]
|
||||
com.arsdigita.forum.use_wysiwyg_editor.example=true|false
|
||||
|
||||
com.arsdigita.forum.rejection_form_message.title=Instructions to poster added to bottom of email
|
||||
com.arsdigita.forum.rejection_form_message.purpose=tail of email that may contain site specific information - who to contact etc
|
||||
com.arsdigita.forum.rejection_form_message.format=[string]
|
||||
com.arsdigita.forum.rejection_form_message.example=Please do not reply to this email. If you have any comments, please email webmaster@example.com
|
||||
|
||||
com.arsdigita.forum.thread_page_size.title=Number of threads displayed per page
|
||||
com.arsdigita.forum.thread_page_size.purpose=balance page loading time against number of key preses
|
||||
com.arsdigita.forum.thread_page_size.format=[integer]
|
||||
com.arsdigita.forum.thread_page_size.example=10
|
||||
|
||||
com.arsdigita.forum.allow_quick_finish.title=Allow quick finish on posts
|
||||
com.arsdigita.forum.allow_quick_finish.purpose=To give users the option of omitting post steps if they have a quick text post
|
||||
com.arsdigita.forum.allow_quick_finish.format=[boolean]
|
||||
com.arsdigita.forum.allow_quick_finish.example=true|false
|
||||
|
||||
com.arsdigita.forum.delete_sent_subscription_notifications.title=Delete Sent Subscription Notifications
|
||||
com.arsdigita.forum.delete_sent_subscription_notifications.purpose=Enable deletion of successfully sent notifications to save space in DB
|
||||
com.arsdigita.forum.delete_sent_subscription_notifications.format=[boolean]
|
||||
com.arsdigita.forum.delete_sent_subscription_notifications.example=true|false
|
||||
|
|
|
|||
|
|
@ -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.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker
|
||||
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.siteproxy.defaulttemplate=resource:WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-siteproxy-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=/WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-siteproxy-item.jsp
|
||||
com.arsdigita.cms.hide_udct_ui=true
|
||||
com.arsdigita.cms.hide_folder_index_checkbox=true
|
||||
|
||||
|
|
|
|||
|
|
@ -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.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker
|
||||
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_folder_index_checkbox=true
|
||||
|
||||
|
|
|
|||
|
|
@ -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.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker
|
||||
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_folder_index_checkbox=true
|
||||
|
||||
|
|
|
|||
|
|
@ -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.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker
|
||||
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_folder_index_checkbox=true
|
||||
|
||||
|
|
|
|||
|
|
@ -18,14 +18,6 @@
|
|||
|
||||
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.RootCategoryCollection;
|
||||
import com.arsdigita.cms.ContentSection;
|
||||
|
|
@ -45,7 +37,13 @@ import com.arsdigita.util.parameter.StringParameter;
|
|||
import com.arsdigita.util.parameter.URLParameter;
|
||||
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.MalformedURLException;
|
||||
|
|
@ -54,6 +52,8 @@ import java.util.HashSet;
|
|||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Loader.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -19,19 +19,16 @@
|
|||
package com.arsdigita.london.atoz;
|
||||
|
||||
import com.arsdigita.runtime.AbstractConfig;
|
||||
|
||||
import com.arsdigita.london.util.ui.ApplicationCategoryPicker;
|
||||
|
||||
import com.arsdigita.util.parameter.BooleanParameter;
|
||||
import com.arsdigita.util.parameter.ClassParameter;
|
||||
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.london.util.ui.ApplicationCategoryPicker;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
|
||||
|
|
@ -49,15 +46,11 @@ public class AtoZConfig extends AbstractConfig {
|
|||
|
||||
public AtoZConfig() {
|
||||
m_types = new HashSet();
|
||||
try {
|
||||
m_adapters = new URLParameter
|
||||
("com.arsdigita.london.atoz.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
new URL(null,
|
||||
"resource:WEB-INF/resources/atoz-adapters.xml"));
|
||||
} catch (MalformedURLException ex) {
|
||||
throw new UncheckedWrapperException("Cannot parse URL", ex);
|
||||
}
|
||||
|
||||
m_adapters = new ResourceParameter
|
||||
("com.arsdigita.london.atoz.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/resources/atoz-adapters.xml");
|
||||
|
||||
m_rootCategoryPicker = new ClassParameter(
|
||||
"com.arsdigita.london.atoz.root_category_picker",
|
||||
|
|
@ -84,11 +77,7 @@ public class AtoZConfig extends AbstractConfig {
|
|||
|
||||
|
||||
InputStream getTraversalAdapters() {
|
||||
try {
|
||||
return ((URL)get(m_adapters)).openStream();
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedWrapperException("Cannot read stream", ex);
|
||||
}
|
||||
return (InputStream)get(m_adapters);
|
||||
}
|
||||
|
||||
public Class getRootCategoryPicker() {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
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.format=[url]
|
||||
com.arsdigita.london.atoz.traversal_adapters.example=resource:WEB-INF/resources/atoz-adapters.xml
|
||||
com.arsdigita.london.atoz.traversal_adapters.format=[string]
|
||||
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.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.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.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.example=true
|
||||
|
||||
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.format=[boolean]
|
||||
|
|
|
|||
|
|
@ -18,30 +18,21 @@
|
|||
|
||||
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.util.UncheckedWrapperException;
|
||||
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 {
|
||||
|
||||
private Parameter m_adapters;
|
||||
|
||||
public ExporterConfig() {
|
||||
try {
|
||||
m_adapters = new URLParameter
|
||||
("com.arsdigita.london.exporter.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
new URL(null,
|
||||
"resource:WEB-INF/resources/exporter-adapters.xml"));
|
||||
} catch (MalformedURLException ex) {
|
||||
throw new UncheckedWrapperException("Cannot parse URL", ex);
|
||||
}
|
||||
m_adapters = new ResourceParameter
|
||||
("com.arsdigita.london.exporter.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/resources/exporter-adapters.xml");
|
||||
|
||||
register(m_adapters);
|
||||
|
||||
|
|
@ -49,11 +40,11 @@ public class ExporterConfig extends AbstractConfig {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return InputStream
|
||||
*/
|
||||
InputStream getTraversalAdapters() {
|
||||
try {
|
||||
return ((URL)get(m_adapters)).openStream();
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedWrapperException("Cannot read stream", ex);
|
||||
}
|
||||
return (InputStream)get(m_adapters);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,22 +35,20 @@ import com.arsdigita.util.parameter.IntegerParameter;
|
|||
import com.arsdigita.util.parameter.StringArrayParameter;
|
||||
import com.arsdigita.util.parameter.StringParameter;
|
||||
import com.arsdigita.util.parameter.ClassParameter;
|
||||
import com.arsdigita.util.parameter.URLParameter;
|
||||
import com.arsdigita.util.parameter.ResourceParameter;
|
||||
import com.arsdigita.web.Application;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Configuration record for the navigation app
|
||||
* @author Daniel Berrange
|
||||
|
|
@ -105,9 +103,9 @@ public final class NavigationConfig extends AbstractConfig {
|
|||
("com.arsdigita.london.navigation.default_template",
|
||||
Parameter.REQUIRED, "/packages/navigation/templates/default.jsp");
|
||||
// not desirable default value (IMHO) but retains existing behaviour
|
||||
m_inheritTemplates = new BooleanParameter
|
||||
("com.arsdigita.london.navigation.inherit_templates",
|
||||
Parameter.REQUIRED, new Boolean(true));
|
||||
m_inheritTemplates = new BooleanParameter
|
||||
("com.arsdigita.london.navigation.inherit_templates",
|
||||
Parameter.REQUIRED, new Boolean(true));
|
||||
m_defaultContentSectionURL = new StringParameter
|
||||
("com.arsdigita.london.navigation.default_content_section_url",
|
||||
Parameter.REQUIRED, "/content/");
|
||||
|
|
@ -123,15 +121,10 @@ public final class NavigationConfig extends AbstractConfig {
|
|||
m_relatedItemsFactory = new ClassParameter
|
||||
("com.arsdigita.london.navigation.related_items_factory",
|
||||
Parameter.REQUIRED, RelatedItemsQueryFactoryImpl.class);
|
||||
try {
|
||||
m_traversalAdapters = new URLParameter
|
||||
("com.arsdigita.london.navigation.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
new URL(null,
|
||||
"resource:WEB-INF/resources/navigation-adapters.xml"));
|
||||
} catch (MalformedURLException ex) {
|
||||
throw new UncheckedWrapperException("Cannot parse URL", ex);
|
||||
}
|
||||
m_traversalAdapters = new ResourceParameter
|
||||
("com.arsdigita.london.navigation.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/resources/navigation-adapters.xml");
|
||||
m_categoryMenuShowNephews = new BooleanParameter
|
||||
("com.arsdigita.london.navigation.category_menu_show_nephews",
|
||||
Parameter.OPTIONAL, new Boolean(false));
|
||||
|
|
@ -149,21 +142,21 @@ public final class NavigationConfig extends AbstractConfig {
|
|||
m_categoryMenuShowGrandChildrenLimit = new IntegerParameter
|
||||
("com.arsdigita.london.navigation.category_menu_show_grand_children_limit",
|
||||
Parameter.OPTIONAL, new Integer(1));
|
||||
// Quasimodo: End
|
||||
m_dateOrderCategories = new StringArrayParameter
|
||||
("com.arsdigita.london.navigation.date_order_categories",
|
||||
Parameter.OPTIONAL, new String[0]);
|
||||
m_topLevelDateOrderCategories = new StringArrayParameter
|
||||
("com.arsdigita.london.navigation.top_level_date_order_categories",
|
||||
Parameter.OPTIONAL, new String[0]);
|
||||
m_defaultMenuCatProvider = new ClassParameter
|
||||
("com.arsdigita.london.navigation.default_menu_cat_provider",
|
||||
Parameter.OPTIONAL, null);
|
||||
// Quasimodo: End
|
||||
m_dateOrderCategories = new StringArrayParameter
|
||||
("com.arsdigita.london.navigation.date_order_categories",
|
||||
Parameter.OPTIONAL, new String[0]);
|
||||
m_topLevelDateOrderCategories = new StringArrayParameter
|
||||
("com.arsdigita.london.navigation.top_level_date_order_categories",
|
||||
Parameter.OPTIONAL, new String[0]);
|
||||
m_defaultMenuCatProvider = new ClassParameter
|
||||
("com.arsdigita.london.navigation.default_menu_cat_provider",
|
||||
Parameter.OPTIONAL, null);
|
||||
|
||||
register(m_indexPageCacheLifetime);
|
||||
register(m_generateItemURL);
|
||||
register(m_defaultTemplate);
|
||||
register(m_inheritTemplates);
|
||||
register(m_inheritTemplates);
|
||||
register(m_defaultContentSectionURL);
|
||||
register(m_relatedItemsContext);
|
||||
register(m_defaultModelClass);
|
||||
|
|
@ -177,9 +170,9 @@ public final class NavigationConfig extends AbstractConfig {
|
|||
register(m_categoryMenuShowGrandChildrenMin);
|
||||
register(m_categoryMenuShowGrandChildrenLimit);
|
||||
// Quasimodo: End
|
||||
register(m_dateOrderCategories);
|
||||
register(m_topLevelDateOrderCategories);
|
||||
register(m_defaultMenuCatProvider);
|
||||
register(m_dateOrderCategories);
|
||||
register(m_topLevelDateOrderCategories);
|
||||
register(m_defaultMenuCatProvider);
|
||||
loadInfo();
|
||||
|
||||
// Quasimodo: Begin
|
||||
|
|
@ -263,11 +256,7 @@ public final class NavigationConfig extends AbstractConfig {
|
|||
}
|
||||
|
||||
InputStream getTraversalAdapters() {
|
||||
try {
|
||||
return ((URL)get(m_traversalAdapters)).openStream();
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedWrapperException("Cannot read stream", ex);
|
||||
}
|
||||
return (InputStream)get(m_traversalAdapters);
|
||||
}
|
||||
|
||||
public final boolean getCategoryMenuShowNephews() {
|
||||
|
|
|
|||
|
|
@ -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.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.format=[url]
|
||||
com.arsdigita.london.navigation.traversal_adapters.example=resource:WEB-INF/resources/navigation-adapters.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=[string]
|
||||
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.purpose=Whether CategoryMenu should display the categories who are nephews to the current category
|
||||
|
|
|
|||
|
|
@ -20,17 +20,13 @@ package com.arsdigita.london.portal;
|
|||
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
import com.arsdigita.runtime.AbstractConfig;
|
||||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
import com.arsdigita.util.parameter.BooleanParameter;
|
||||
import com.arsdigita.util.parameter.Parameter;
|
||||
import com.arsdigita.util.parameter.StringArrayParameter;
|
||||
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.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -40,7 +36,7 @@ public class WorkspaceConfig extends AbstractConfig {
|
|||
|
||||
private static final Logger s_log = Logger.getLogger(WorkspaceConfig.class);
|
||||
|
||||
private URLParameter m_adapters;
|
||||
private ResourceParameter m_adapters;
|
||||
|
||||
private StringParameter m_defaultLayout;
|
||||
|
||||
|
|
@ -50,22 +46,18 @@ public class WorkspaceConfig extends AbstractConfig {
|
|||
|
||||
private Parameter m_adminPortletTypes;
|
||||
|
||||
private BooleanParameter m_htmlPortletWysiwygEditor;
|
||||
private BooleanParameter m_htmlPortletWysiwygEditor;
|
||||
|
||||
private StringParameter m_workspacePartyPrivilege;
|
||||
|
||||
private BooleanParameter m_checkWorkspaceReadPermissions;
|
||||
|
||||
public WorkspaceConfig() {
|
||||
try {
|
||||
m_adapters = new URLParameter(
|
||||
"com.arsdigita.london.portal.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
new URL(null,
|
||||
"resource:WEB-INF/resources/portal-adapters.xml"));
|
||||
} catch (MalformedURLException ex) {
|
||||
throw new UncheckedWrapperException("Cannot parse URL", ex);
|
||||
}
|
||||
|
||||
m_adapters = new ResourceParameter(
|
||||
"com.arsdigita.london.portal.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/resources/portal-adapters.xml");
|
||||
|
||||
m_defaultLayout = new StringParameter(
|
||||
"com.arsdigita.london.portal.default_layout",
|
||||
|
|
@ -108,11 +100,7 @@ public class WorkspaceConfig extends AbstractConfig {
|
|||
}
|
||||
|
||||
InputStream getTraversalAdapters() {
|
||||
try {
|
||||
return ((URL) get(m_adapters)).openStream();
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedWrapperException("Cannot read stream", ex);
|
||||
}
|
||||
return (InputStream) get(m_adapters);
|
||||
}
|
||||
|
||||
public String getDefaultLayout() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
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.format=[url]
|
||||
com.arsdigita.london.portal.traversal_adapters.example=resource:WEB-INF/resources/portal-adapters.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=[string]
|
||||
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.purpose=Default column layout for workspace portals
|
||||
|
|
|
|||
|
|
@ -20,21 +20,21 @@ package com.arsdigita.london.subsite;
|
|||
|
||||
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.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 java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
// import java.net.URL;
|
||||
// import java.net.MalformedURLException;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
public class SubsiteConfig extends AbstractConfig {
|
||||
|
||||
|
|
@ -42,21 +42,17 @@ public class SubsiteConfig extends AbstractConfig {
|
|||
|
||||
private Map m_themes = new HashMap();
|
||||
|
||||
private URLParameter m_adapters;
|
||||
private ResourceParameter m_adapters;
|
||||
private StringParameter m_frontPageApplicationTypeParameter;
|
||||
private StringParameter m_frontPageParentURLParameter;
|
||||
private Parameter m_rootCategoryPicker;
|
||||
|
||||
public SubsiteConfig() {
|
||||
try {
|
||||
m_adapters = new URLParameter
|
||||
("com.arsdigita.london.subsite.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
new URL(null,
|
||||
"resource:WEB-INF/resources/subsite-adapters.xml"));
|
||||
} catch (MalformedURLException ex) {
|
||||
throw new UncheckedWrapperException("Cannot parse URL", ex);
|
||||
}
|
||||
|
||||
m_adapters = new ResourceParameter
|
||||
("com.arsdigita.london.subsite.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/resources/subsite-adapters.xml");
|
||||
|
||||
m_frontPageApplicationTypeParameter = new StringParameter
|
||||
("com.arsdigita.london.subsite.front_page_application",
|
||||
|
|
@ -81,11 +77,7 @@ public class SubsiteConfig extends AbstractConfig {
|
|||
}
|
||||
|
||||
InputStream getTraversalAdapters() {
|
||||
try {
|
||||
return ((URL)get(m_adapters)).openStream();
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedWrapperException("Cannot read stream", ex);
|
||||
}
|
||||
return (InputStream) get(m_adapters);
|
||||
}
|
||||
|
||||
public String getFrontPageApplicationType() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
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.format=[url]
|
||||
com.arsdigita.london.subsite.traversal_adapters.example=resource:WEB-INF/resources/subsite-adapters.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=[string]
|
||||
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.purpose=The Application to use as the front (home) page for a subsite
|
||||
|
|
|
|||
|
|
@ -19,16 +19,12 @@
|
|||
package com.arsdigita.london.terms;
|
||||
|
||||
import com.arsdigita.runtime.AbstractConfig;
|
||||
|
||||
import com.arsdigita.util.parameter.Parameter;
|
||||
import com.arsdigita.util.parameter.ResourceParameter;
|
||||
import com.arsdigita.util.parameter.StringParameter;
|
||||
import com.arsdigita.util.parameter.URLParameter;
|
||||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -41,15 +37,10 @@ public class TermsConfig extends AbstractConfig {
|
|||
private Parameter m_defaultDomain;
|
||||
|
||||
public TermsConfig() {
|
||||
try {
|
||||
m_adapters = new URLParameter
|
||||
("com.arsdigita.london.terms.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
new URL(null,
|
||||
"resource:WEB-INF/resources/terms-adapters.xml"));
|
||||
} catch (MalformedURLException ex) {
|
||||
throw new UncheckedWrapperException("Cannot parse URL", ex);
|
||||
}
|
||||
m_adapters = new ResourceParameter
|
||||
("com.arsdigita.london.terms.traversal_adapters",
|
||||
Parameter.REQUIRED,
|
||||
"/WEB-INF/resources/terms-adapters.xml");
|
||||
|
||||
m_defaultDomain = new StringParameter(
|
||||
"com.arsdigita.london.terms.default_domain",
|
||||
|
|
@ -62,11 +53,7 @@ public class TermsConfig extends AbstractConfig {
|
|||
}
|
||||
|
||||
InputStream getTraversalAdapters() {
|
||||
try {
|
||||
return ((URL)get(m_adapters)).openStream();
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedWrapperException("Cannot read stream", ex);
|
||||
}
|
||||
return (InputStream) get(m_adapters);
|
||||
}
|
||||
|
||||
public String getDefaultDomainKey() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
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.format=[url]
|
||||
com.arsdigita.london.terms.traversal_adapters.example=resource:WEB-INF/resources/terms-adapters.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=[string]
|
||||
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.purpose=The default navigation domain
|
||||
|
|
|
|||
|
|
@ -30,19 +30,15 @@ import com.arsdigita.bebop.event.FormProcessListener;
|
|||
import com.arsdigita.bebop.event.FormValidationListener;
|
||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||
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.StringParameter;
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.persistence.DataCollection;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.GridPanel;
|
||||
import com.arsdigita.util.UncheckedWrapperException;
|
||||
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.ThemeApplication;
|
||||
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.toolbox.ui.Cancellable;
|
||||
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;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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.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
|
||||
; 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.use_html_date_description=false
|
||||
|
|
|
|||
|
|
@ -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.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
|
||||
|
|
|
|||
|
|
@ -6,10 +6,12 @@
|
|||
xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
||||
ccmVersion="6.1"
|
||||
name="aplaws"
|
||||
version="2.9.2"
|
||||
release="1"
|
||||
prettyName="APLAWS plus"
|
||||
version="1-0-5"
|
||||
release="alpha-1"
|
||||
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:database name="postgres"/>
|
||||
|
|
|
|||
|
|
@ -12,13 +12,16 @@
|
|||
indent="yes"
|
||||
xalan:indent-amount="4"/>
|
||||
|
||||
<!-- Evaluate project.xml, ccm:project tag -->
|
||||
<xsl:template match="ccm:project">
|
||||
<xsl:call-template name="CheckDependencies"/>
|
||||
<project name="CCM" default="usage" basedir=".">
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="/ccm:project/ccm:databases/ccm:database">
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
|
|
@ -27,12 +30,14 @@
|
|||
<ccm:database name="oracle-se"/>
|
||||
</xsl:variable>
|
||||
<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:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</project>
|
||||
</xsl:template>
|
||||
</xsl:template> <!-- template ccm:project -->
|
||||
|
||||
<xsl:template name="Main">
|
||||
<xsl:param name="databases"/>
|
||||
|
|
@ -54,10 +59,12 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template name="SharedProperties">
|
||||
<xsl:variable select="@name" name="name"/>
|
||||
<xsl:variable select="@prettyName" name="prettyName" />
|
||||
<xsl:variable select="@webapp" name="context" />
|
||||
<!-- 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="@prettyName" name="prettyName" />
|
||||
<xsl:variable select="@webapp" name="context" />
|
||||
|
||||
<!-- Setting the layout of the basic build environment -->
|
||||
<!-- just in case:
|
||||
|
|
@ -85,7 +92,6 @@
|
|||
<fail message="app.server.home.dir or APP_SERVER_HOME not set.
|
||||
Please check the invoking build.xml script."
|
||||
unless="app.server.home.dir" />
|
||||
|
||||
<!-- Shared Lib directory for use by several web applications of the application server -->
|
||||
<property value="${{env.APP_SERVER_LIB}}" name="app.server.lib.dir"/>
|
||||
<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 -->
|
||||
<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-->
|
||||
<property name="this.appName" value="{$name}"/>
|
||||
<property name="this.appPrettyname" value="{$prettyName}"/>
|
||||
|
|
@ -155,17 +157,22 @@
|
|||
<property value="${{build.dir}}/api" name="javadoc.dir"/>
|
||||
<property value="${{build.dir}}/api-apps" name="app.javadoc.dir"/>
|
||||
<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.optimize"/>
|
||||
<property value="off" name="compile.deprecation"/>
|
||||
<property value="off" name="compile.verbose"/>
|
||||
<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="${{build.dir}}/pmd" name="pmd.report.dir"/>
|
||||
<property value="pmd.${{pmd.format}}" name="pmd.report.file"/>
|
||||
<!-- 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="com.arsdigita.persistence.pdl.PDL" name="ddl.generator.classname"/>
|
||||
<property value="com.arsdigita.persistence.pdl.TestPDLGenerator" name="test.ddl.generator.classname"/>
|
||||
|
||||
|
|
@ -188,12 +195,13 @@
|
|||
<include name="conf"/>
|
||||
</dirset>
|
||||
<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}}">
|
||||
<include name="lib/security/*.jar"/>
|
||||
</fileset>
|
||||
-->
|
||||
</path>
|
||||
|
||||
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
|
||||
<classpath>
|
||||
<pathelement location="${{ccm.tools.lib.dir}}/ant-contrib.jar"/>
|
||||
|
|
@ -204,9 +212,12 @@
|
|||
<pathelement location="${{ccm.tools.rh-jdo.dir}}"/>
|
||||
</classpath>
|
||||
</taskdef>
|
||||
</xsl:template>
|
||||
</xsl:template> <!-- template SharedProperties-->
|
||||
|
||||
|
||||
<xsl:template name="CheckDependencies">
|
||||
<!-- Invoked by template Main at the beginning, check prerequisites -->
|
||||
|
||||
<xsl:for-each select="/ccm:project/ccm:build/ccm:application">
|
||||
<xsl:variable name="appname" select="@name"/>
|
||||
<xsl:variable
|
||||
|
|
@ -231,13 +242,14 @@
|
|||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:template> <!-- template CheckDependencies -->
|
||||
|
||||
|
||||
<xsl:template name="AppProperties">
|
||||
<xsl:for-each select="/ccm:project/ccm:prebuilt/ccm:application">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:variable name="location" select="@location"/>
|
||||
<xsl:variable name="version" select="@version"/>
|
||||
<xsl:variable name="version" select="@version"/>
|
||||
<!-- try to find prebuild modules -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$location">
|
||||
|
|
@ -265,6 +277,7 @@
|
|||
</fileset>
|
||||
</path>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:for-each select="/ccm:project/ccm:build/ccm:application">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:variable name="app"
|
||||
|
|
@ -272,7 +285,11 @@
|
|||
<xsl:variable name="appname" select="$app/@name"/>
|
||||
<xsl:variable name="appprettyname" select="$app/@prettyName"/>
|
||||
<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="requires"
|
||||
select="/ccm:project/ccm:application[@name=$appname]/ccm:dependencies/ccm:requires"/>
|
||||
<path id="apps.{$name}.pdl.path">
|
||||
|
|
@ -317,9 +334,9 @@
|
|||
<xsl:with-param name="requires" select="$requires"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="AppPropertyClassPath">
|
||||
<xsl:with-param name="target" select="@name"/>
|
||||
<xsl:with-param name="type">tests</xsl:with-param>
|
||||
<xsl:with-param name="requires" select="$requires"/>
|
||||
<xsl:with-param name="target" select="@name"/>
|
||||
<xsl:with-param name="type">tests</xsl:with-param>
|
||||
<xsl:with-param name="requires" select="$requires"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
<xsl:call-template name="AppPropertyClassPath">
|
||||
|
|
@ -334,7 +351,7 @@
|
|||
<xsl:with-param name="target">server</xsl:with-param>
|
||||
<xsl:with-param name="type">tests</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
</xsl:template> <!-- template AppProperties -->
|
||||
|
||||
<xsl:template name="AppPropertyClassPath_Requires">
|
||||
<xsl:param name="requires"/>
|
||||
|
|
@ -355,7 +372,7 @@
|
|||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:template> <!-- template AppPropertiesClassPath_Requires -->
|
||||
|
||||
<xsl:template name="AppPropertyClassPath">
|
||||
<xsl:param name="target" select="'default-value'"/>
|
||||
|
|
@ -380,10 +397,12 @@
|
|||
<xsl:with-param name="type" select="$type"/>
|
||||
</xsl:call-template>
|
||||
</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:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:for-each select="/ccm:project/ccm:prebuilt/ccm:application">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<path refid="{$name}.{$type}.classpath"/>
|
||||
|
|
@ -474,23 +493,26 @@
|
|||
</delete>
|
||||
</target>
|
||||
</xsl:for-each>
|
||||
|
||||
<!-- 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 !
|
||||
<delete dir="${{deploy.shared.lib.dir}}"/>
|
||||
-->
|
||||
<!-- is now part of the this.deploy.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}}"/>
|
||||
</target>
|
||||
|
||||
<xsl:call-template name="LocalGroupingTarget">
|
||||
<xsl:with-param name="targetname" select="'clean'"/>
|
||||
<xsl:with-param name="description"
|
||||
select="'Cleans out the build environment and deployment directory'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
</xsl:template> <!-- template TargetClean -->
|
||||
|
||||
<xsl:template name="TargetBuild">
|
||||
<xsl:param name="databases"/>
|
||||
|
|
@ -504,6 +526,7 @@
|
|||
<xsl:variable name="hassqldir"
|
||||
select="$application/ccm:directories/ccm:directory[@name='sql'] or
|
||||
not($application/ccm:directories)"/>
|
||||
<!-- Source dir specified? If not by default standard source dir assumed. -->
|
||||
<xsl:variable name="hassrcdir"
|
||||
select="$application/ccm:directories/ccm:directory[@name='src'] or
|
||||
not($application/ccm:directories)"/>
|
||||
|
|
@ -515,14 +538,19 @@
|
|||
select="/ccm:project/ccm:application[@name=$fullname]/ccm:dependencies/ccm:requires"/>
|
||||
|
||||
<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">
|
||||
<ant target="compile-hook" dir="{$name}" inheritRefs="true">
|
||||
<xsl:attribute name="antfile">
|
||||
<xsl:value-of select="$buildhooks"/>
|
||||
</xsl:attribute>
|
||||
</ant>
|
||||
</xsl:if>
|
||||
</xsl:if> <!-- test buildhooks -->
|
||||
|
||||
<!-- Usually true by default setting, main work is done here! -->
|
||||
<xsl:if test="$hassrcdir">
|
||||
<mkdir dir="{$name}/${{build.src.dir}}"/>
|
||||
<xsl:if test="$jdodirs">
|
||||
|
|
@ -540,7 +568,7 @@
|
|||
<delete file="{$name}/${{build.dir}}/.jdo-timestamp"/>
|
||||
</then>
|
||||
</if>
|
||||
</xsl:if>
|
||||
</xsl:if> <!-- test jdodirs -->
|
||||
<path id="{$name}.compile.srcpath">
|
||||
<pathelement location="{$name}/${{src.dir}}"/>
|
||||
<pathelement location="{$name}/${{build.src.dir}}"/>
|
||||
|
|
@ -555,8 +583,9 @@
|
|||
<xsl:with-param name="classpathref"
|
||||
select="concat($name,'.build.classpath')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</target>
|
||||
</xsl:if> <!-- test hassrcdir -->
|
||||
</target> <!-- compile name -->
|
||||
|
||||
<xsl:if test="$jdodirs">
|
||||
<target name="jdo-{$name}"
|
||||
description="JOD enhances the Java classes for the '{$name}' application"
|
||||
|
|
@ -591,7 +620,7 @@
|
|||
<echo message="jdo-timestamp"
|
||||
file="{$name}/${{build.dir}}/.jdo-timestamp"/>
|
||||
</target>
|
||||
</xsl:if>
|
||||
</xsl:if> <!-- test jdodirs -->
|
||||
|
||||
<xsl:call-template name="TargetManifest">
|
||||
<xsl:with-param name="target" select="$name"/>
|
||||
|
|
@ -645,6 +674,7 @@
|
|||
</target>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:if test="$hassqldir">
|
||||
<target name="copy-sql-{$name}">
|
||||
<mkdir dir="{$name}/${{build.sql.dir}}"/>
|
||||
|
|
@ -655,6 +685,10 @@
|
|||
</copy>
|
||||
</target>
|
||||
</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">
|
||||
<target depends="init" name="copy-src-{$name}">
|
||||
<copy todir="{$name}/${{build.classes.dir}}">
|
||||
|
|
@ -665,7 +699,9 @@
|
|||
</copy>
|
||||
</target>
|
||||
</xsl:if>
|
||||
|
||||
<target name="jar-classes-{$name}" depends="init,build-{$name}">
|
||||
|
||||
<jar destfile="{$name}/${{build.dir}}/${{apps.{$name}.name}}-${{apps.{$name}.version}}.jar"
|
||||
update="true">
|
||||
<fileset dir="{$name}/${{build.classes.dir}}"/>
|
||||
|
|
@ -676,16 +712,18 @@
|
|||
value="${{apps.{$name}.name}}-${{apps.{$name}.version}}-pdl.jar
|
||||
${{apps.{$name}.name}}-${{apps.{$name}.version}}-sql.jar"/>
|
||||
</manifest>
|
||||
</xsl:when>
|
||||
</xsl:when> <!-- hasPdlDir -->
|
||||
<xsl:when test="$hassqldir">
|
||||
<manifest>
|
||||
<attribute name="Class-Path"
|
||||
value="${{apps.{$name}.name}}-${{apps.{$name}.version}}-sql.jar"/>
|
||||
</manifest>
|
||||
</xsl:when>
|
||||
</xsl:when> <!-- hasSqlDir -->
|
||||
</xsl:choose>
|
||||
</jar>
|
||||
|
||||
</target>
|
||||
|
||||
<xsl:if test="$haspdldir">
|
||||
<target name="jar-pdl-{$name}" depends="init,build-{$name}">
|
||||
<mkdir dir="{$name}/${{pdl.dir}}"/>
|
||||
|
|
@ -695,6 +733,7 @@
|
|||
</jar>
|
||||
</target>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="$haspdldir or $hassqldir">
|
||||
<target name="jar-sql-{$name}" depends="init,build-{$name}">
|
||||
<jar destfile="{$name}/${{build.dir}}/${{apps.{$name}.name}}-${{apps.{$name}.version}}-sql.jar"
|
||||
|
|
@ -705,6 +744,7 @@
|
|||
</jar>
|
||||
</target>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Build tasks -->
|
||||
<xsl:call-template name="TargetBuildApp">
|
||||
<xsl:with-param name="target" select="@name"/>
|
||||
|
|
@ -734,6 +774,7 @@
|
|||
select="$application/ccm:directories/ccm:directory[@name='pdl'] or
|
||||
not($application/ccm:directories)"/>
|
||||
<xsl:variable name="jdodirs" select="$application/ccm:jdo/ccm:directory"/>
|
||||
|
||||
<target name="build-{$target}"
|
||||
description="Builds the '{$target}' application (compile, generate DDL, jar, etc)">
|
||||
<xsl:attribute name="depends">
|
||||
|
|
@ -824,7 +865,9 @@
|
|||
</classpath>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="TargetVerify">
|
||||
|
||||
<target name="verify-pdl" depends="init" unless="pdl.no.verify"
|
||||
description="Verifies that the PDL files compile">
|
||||
<java classname="${{ddl.generator.classname}}" failonerror="yes" fork="yes">
|
||||
|
|
@ -837,6 +880,7 @@
|
|||
</java>
|
||||
<echo message="PDL files compiled successfully."/>
|
||||
</target>
|
||||
|
||||
<target name="jsp-compiler-check">
|
||||
<condition property="jsp.compiler.available">
|
||||
<and>
|
||||
|
|
@ -847,6 +891,7 @@
|
|||
</and>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="compile-jsp" depends="init,deploy,jsp-compiler-check" if="jsp.compiler.available">
|
||||
<taskdef classname="org.apache.jasper.JspC" name="jasper2">
|
||||
<xsl:call-template name="TargetJSPCompilerClasspath"/>
|
||||
|
|
@ -857,6 +902,7 @@
|
|||
webXmlFragment="${{build.dir}}/generated_web.xml"
|
||||
outputDir="${{build.dir}}/jsp-java" />
|
||||
</target>
|
||||
|
||||
<target name="build-jsp" depends="init,compile-jsp" if="jsp.compiler.available">
|
||||
<javac
|
||||
debug="${{compile.debug}}"
|
||||
|
|
@ -869,15 +915,25 @@
|
|||
<xsl:call-template name="TargetJSPCompilerClasspath"/>
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="no-build-jsp" unless="jsp.compiler.available">
|
||||
<echo message="JSP verification skipped.
|
||||
The CATALINA_HOME environment variable must point to a Tomcat 4.1 installation."/>
|
||||
</target>
|
||||
|
||||
<target name="verify-jsp" depends="init,build-jsp,no-build-jsp"
|
||||
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:param name="name"/>
|
||||
<xsl:param name="package"/>
|
||||
|
|
@ -895,6 +951,7 @@
|
|||
</then>
|
||||
</if>
|
||||
</xsl:template>
|
||||
-->
|
||||
|
||||
<!-- D E P L O Y
|
||||
construct ant script for the deploy target -->
|
||||
|
|
@ -935,27 +992,35 @@
|
|||
<mkdir dir="${{this.deploy.lib.dir}}"/>
|
||||
<copy todir="${{this.deploy.lib.dir}}"
|
||||
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:call-template name="TargetDeploySystemJar">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="package" select="@path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
-->
|
||||
</target>
|
||||
|
||||
<!-- Deploy classes -->
|
||||
<!-- Deploy classes -->
|
||||
<xsl:if test="$hassrcdir or $haspdldir">
|
||||
<target name="deploy-classes-{$name}" depends="init,build-{$name}">
|
||||
<mkdir dir="${{this.deploy.classes.dir}}"/>
|
||||
<copy todir="${{this.deploy.classes.dir}}">
|
||||
<fileset dir="{$name}/${{build.classes.dir}}"/>
|
||||
</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:call-template name="TargetDeploySystemJar">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="package" select="@path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
-->
|
||||
</target>
|
||||
</xsl:if>
|
||||
|
||||
|
|
@ -1067,14 +1132,22 @@
|
|||
<fileset dir="${{apps.{$name}.location}}">
|
||||
<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"/>
|
||||
-->
|
||||
</fileset>
|
||||
</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">
|
||||
<fileset dir="${{apps.{$name}.location}}">
|
||||
<include name="{$name}-{$version}-system.jar"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
-->
|
||||
<copy todir="${{deploy.external.lib.dir.{$name}}}" preservelastmodified="true">
|
||||
<fileset dir="${{apps.{$name}.location}}">
|
||||
<include name="{$name}-{$version}/**"/>
|
||||
|
|
@ -1138,7 +1211,8 @@
|
|||
</target>
|
||||
|
||||
<!-- 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">
|
||||
Builds and deploys all applications, also deploys prebuilt applications and config files
|
||||
</xsl:attribute>
|
||||
|
|
@ -1186,14 +1260,16 @@
|
|||
<mkdir dir="${{package.dir}}/binaries/"/>
|
||||
<copy todir="${{package.dir}}/binaries/"
|
||||
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:call-template name="TargetDeploySystemJar">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="package" select="@path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
-->
|
||||
-->
|
||||
</target>
|
||||
|
||||
<!-- Package pdl -->
|
||||
|
|
@ -1300,8 +1376,7 @@
|
|||
|
||||
|
||||
<!-- Master step create-war -->
|
||||
<!-- depends="init,deploy-global,deploy-local,copy-webxml"
|
||||
-->
|
||||
<!-- depends="init,deploy-global,deploy-local,copy-webxml" -->
|
||||
<target name="create-war">
|
||||
<xsl:attribute name="description">
|
||||
Creates a WAR file of the deployed application.
|
||||
|
|
@ -1314,7 +1389,7 @@
|
|||
</xsl:attribute>
|
||||
|
||||
<echo>
|
||||
Creating a WAR file from directory ${{deploy.dir}}/webapps/ROOT
|
||||
Creating a WAR file from directory ${{this.deploy.dir}}/webapps/ROOT
|
||||
REMEMBER:
|
||||
You have to perform the load-bundle step first if you would like
|
||||
to have a valid web.xml file and a basic configuration!
|
||||
|
|
@ -1901,13 +1976,18 @@
|
|||
|
||||
<!-- Deployment directory structure -->
|
||||
<property value="${{app.server.webapp.dir}}/${{this.appContext}}" name="this.deploy.dir"/>
|
||||
<!-- DEPRECATED
|
||||
system jar should be no longer requirred. Will be removed asap. -->
|
||||
<condition property="deploy.system.jars.dir" value="${{app.server.shared.dir}}/system">
|
||||
<not><isset property="deploy.system.jars.dir"/></not>
|
||||
</condition>
|
||||
|
||||
<!-- Should the jars and/or libs get installed into a shared directory?
|
||||
<!-- system.jar no longer needed nor supported. See related comments above.
|
||||
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>
|
||||
</condition>
|
||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<!-- Should the jars and/or libs get installed into a shared directory? -->
|
||||
<!-- Selection currently DEACTIVATED, always copied into WEB-INF private
|
||||
<xsl:choose>
|
||||
<xsl:when test="$shared = 'false'">
|
||||
-->
|
||||
|
|
@ -1920,10 +2000,12 @@
|
|||
<xsl:otherwise>
|
||||
-->
|
||||
<!-- 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.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:choose>
|
||||
|
|
|
|||
Loading…
Reference in New Issue