diff --git a/ccm-auth-http/application.xml b/ccm-auth-http/application.xml index af5b49c70..53302c8b1 100755 --- a/ccm-auth-http/application.xml +++ b/ccm-auth-http/application.xml @@ -3,7 +3,9 @@ name="ccm-auth-http" prettyName="Auth HTTP" version="6.5.0" - release="1"> + release="1" + webapp="ROOT"> + @@ -15,4 +17,5 @@ The Red Hat Web Application Framework is a platform for writing database-backed web applications in Java. + diff --git a/ccm-auth-http/doc/standalone-conf/README b/ccm-auth-http/doc/standalone-conf/README new file mode 100644 index 000000000..71fd0a1a3 --- /dev/null +++ b/ccm-auth-http/doc/standalone-conf/README @@ -0,0 +1,21 @@ +Up to APLAWS version 1.0.4 auth-http had been installed into its own +application context: [webapps]/ccm-auth-http. + +Now it is installed inside the main APLAWS application context along +with all other applications. + +If shortcuts should be installed as its own web context again following +modifications are necessary: +1. remove webapp="xxx" from application.xml +2. move the files in this dir to WEB-INF/ +3. change src/com/ad/auth/http/HTTPAuth.java + method getServletContext() as back to "/files" +4. edit __ccm__/.../xsl/index.xsl according the comment + + +Running it in its own webapplication context nevertheless is not suggestive. +It needs several xsl files of the main application (esp. core) for basic +operations, which hac been directly mapped from the main applications directory +tree into its own directory tree. So no module separation is possible, no +security context useable etc. + diff --git a/ccm-auth-http/web/WEB-INF/bebop-define.tld b/ccm-auth-http/doc/standalone-conf/bebop-define.tld similarity index 100% rename from ccm-auth-http/web/WEB-INF/bebop-define.tld rename to ccm-auth-http/doc/standalone-conf/bebop-define.tld diff --git a/ccm-auth-http/web/WEB-INF/bebop-show.tld b/ccm-auth-http/doc/standalone-conf/bebop-show.tld similarity index 100% rename from ccm-auth-http/web/WEB-INF/bebop-show.tld rename to ccm-auth-http/doc/standalone-conf/bebop-show.tld diff --git a/ccm-auth-http/web/WEB-INF/web.xml b/ccm-auth-http/doc/standalone-conf/web.xml similarity index 100% rename from ccm-auth-http/web/WEB-INF/web.xml rename to ccm-auth-http/doc/standalone-conf/web.xml diff --git a/ccm-auth-http/src/com/arsdigita/auth/http/HTTPAuth.java b/ccm-auth-http/src/com/arsdigita/auth/http/HTTPAuth.java index b394b03ae..b7cb70dfc 100755 --- a/ccm-auth-http/src/com/arsdigita/auth/http/HTTPAuth.java +++ b/ccm-auth-http/src/com/arsdigita/auth/http/HTTPAuth.java @@ -54,12 +54,44 @@ public class HTTPAuth extends Application { super(oid); } - public String getContextPath() { - return "/ccm-auth-http"; - } +// /* +// * Application specific method only required if installed in its own +// * web application context +// */ +// public String getContextPath() { +// return "/ccm-auth-http"; +// } + /** + * Returns the path name of the location of the applications servlet/JSP. + * + * The method overwrites the super class to provide an application specific + * location for servlets/JSP. This is necessary if you whish to install the + * module (application) along with others in one context. If you install the + * module into its own context (no longer recommended for versions newer + * than 1.0.4) you may use a standard location. + * + * Usually it is a symbolic name/path, which will be mapped in the web.xml + * to the real location in the file system. Example: + * + * auth-http-files + * com.arsdigita.web.ApplicationFileServlet + * + * template-path + * /templates/ccm-auth-http + * + * + * + * + * auth-http-files + * /ccm-auth-http/files/* + * + * + * @return path name to the applications servlet/JSP + */ public String getServletPath() { - return "/files"; + // return "/files"; + return "/ccm-auth-http/files"; } } diff --git a/ccm-auth-http/web/WEB-INF/web.xml-auth-http.in b/ccm-auth-http/web/WEB-INF/web.xml-auth-http.in new file mode 100755 index 000000000..785eaf03c --- /dev/null +++ b/ccm-auth-http/web/WEB-INF/web.xml-auth-http.in @@ -0,0 +1,19 @@ + + + + auth-http-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-auth-http + + + + + + + auth-http-files + /ccm-auth-http/files/* + + + diff --git a/ccm-auth-http/web/__ccm__/apps/auth-http/xsl/index.xsl b/ccm-auth-http/web/__ccm__/apps/auth-http/xsl/index.xsl index 700d755e2..d5bc1f8da 100755 --- a/ccm-auth-http/web/__ccm__/apps/auth-http/xsl/index.xsl +++ b/ccm-auth-http/web/__ccm__/apps/auth-http/xsl/index.xsl @@ -1,8 +1,13 @@ - + + + + diff --git a/ccm-core/src/com/arsdigita/web/Application.java b/ccm-core/src/com/arsdigita/web/Application.java index 4be88d048..6399b0ec7 100755 --- a/ccm-core/src/com/arsdigita/web/Application.java +++ b/ccm-core/src/com/arsdigita/web/Application.java @@ -109,10 +109,10 @@ public class Application extends Resource { public static Application createRootApplication(final ApplicationType type, final String title, final boolean createContainerGroup) { - if (Assert.isAssertEnabled()) { + if (Assert.isEnabled()) { Assert.exists(type, ApplicationType.class); Assert.exists(title, String.class); - Assert.truth(type.m_legacyFree); + Assert.isTrue(type.m_legacyFree); } return Application.make(type, null, title, null, createContainerGroup); @@ -131,11 +131,11 @@ public class Application extends Resource { final String title, final Application parent, final boolean createContainerGroup) { - if (Assert.isAssertEnabled()) { + if (Assert.isEnabled()) { Assert.exists(type, ApplicationType.class); Assert.exists(fragment, String.class); Assert.exists(title, String.class); - Assert.truth(!fragment.equals(""), + Assert.isTrue(!fragment.equals(""), "The URL fragment must not be the empty string"); } @@ -178,8 +178,8 @@ public class Application extends Resource { if (createContainerGroup) { app.createGroup(); } - if (Assert.isAssertEnabled() && fragment != null) { - Assert.truth(fragment.indexOf('/') == -1, + if (Assert.isEnabled() && fragment != null) { + Assert.isTrue(fragment.indexOf('/') == -1, "The URL fragment must not contain " + "slashes; I got '" + fragment + "'"); } @@ -499,9 +499,9 @@ public class Application extends Resource { * Sets the dispatcher path of this application. The */ public final void setPath(String path) { - if (Assert.isAssertEnabled()) { + if (Assert.isEnabled()) { Assert.exists(path, String.class); - Assert.truth + Assert.isTrue (path.equals("") || (path.startsWith(SLASH) && !path.endsWith(SLASH)), "The path must either be the empty string (for the " + @@ -586,6 +586,35 @@ public class Application extends Resource { return ""; } + /** + * Returns the path name of the location of the applications servlet/JSP. + * + * Application implementations may overwrite this method to provide an + * application specific location, especially if an application (module) is + * to be installed along with others in one context. + * + * If you install the module into its own context you may use a standard + * location. In most cases though all modules (applications) of an + * webapplication should be installed into one context. + * + * Frequently it is a symbolic name/path, which will be mapped in the web.xml + * to the real location in the file system. Example: + * + * applicationName-files + * com.arsdigita.web.ApplicationFileServlet + * + * template-path + * /templates/ccm-applicationName + * + * + * + * + * applicationName-files + * /ccm-applicationName/files/* + * + * + * @return path name to the applications servlet/JSP + */ public String getServletPath() { return URL.SERVLET_DIR + "/legacy-adapter"; } @@ -652,7 +681,7 @@ public class Application extends Resource { if (parentGroup != null) { parentGroup.addSubgroup(group); s_log.debug("setting new group as subgroup of " + parentGroup.getName()); - } + } } @@ -664,7 +693,7 @@ public class Application extends Resource { Group containerGroup = getGroup(); if (containerGroup != null) { containerGroup.setName(getTitle() + " Groups"); - } + } } /** * Group associated with this application type. Usually diff --git a/ccm-core/web/WEB-INF/web.xml-default b/ccm-core/web/WEB-INF/web.xml-ccm-core similarity index 71% rename from ccm-core/web/WEB-INF/web.xml-default rename to ccm-core/web/WEB-INF/web.xml-ccm-core index caaf8b985..14daaf830 100755 --- a/ccm-core/web/WEB-INF/web.xml-default +++ b/ccm-core/web/WEB-INF/web.xml-ccm-core @@ -4,12 +4,34 @@ - + + + + CCM + Content and Collaboration Management + + + com.arsdigita.web.CCMApplicationContextListener + + reg com.arsdigita.web.ContextRegistrationServlet @@ -66,29 +88,36 @@ com.arsdigita.web.ResourceServlet - + content-section com.arsdigita.cms.ContentSectionServlet - - content-item-xsl - com.arsdigita.cms.dispatcher.ContentItemXSLServlet - - content-type-xsl com.arsdigita.cms.dispatcher.ContentTypeXSLServlet + + content-item-xsl + com.arsdigita.cms.dispatcher.ContentItemXSLServlet + + template-xsl com.arsdigita.cms.dispatcher.TemplateXSLServlet - + + reg @@ -130,7 +159,10 @@ /resource/* - + content-section @@ -152,7 +184,9 @@ /__ccm__/servlet/template/* - + com.arsdigita.dispatcher.AccessDeniedException @@ -189,7 +223,10 @@ /error/general.jsp - + + /WEB-INF/bebop-show.tld /WEB-INF/bebop-show.tld diff --git a/ccm-core/web/WEB-INF/web.xml.optional b/ccm-core/web/WEB-INF/web.xml-core-optional.in similarity index 100% rename from ccm-core/web/WEB-INF/web.xml.optional rename to ccm-core/web/WEB-INF/web.xml-core-optional.in diff --git a/ccm-formbuilder-pdf/application.xml b/ccm-formbuilder-pdf/application.xml index bccc45647..625211393 100755 --- a/ccm-formbuilder-pdf/application.xml +++ b/ccm-formbuilder-pdf/application.xml @@ -3,7 +3,8 @@ name="ccm-formbuilder-pdf" prettyName="PDFConverter" version="6.5.0" - release="1"> + release="1" + webapp="ROOT"> diff --git a/ccm-formbuilder-pdf/doc/formbuilder-pdf-standalone/README b/ccm-formbuilder-pdf/doc/formbuilder-pdf-standalone/README new file mode 100644 index 000000000..cd4df68c2 --- /dev/null +++ b/ccm-formbuilder-pdf/doc/formbuilder-pdf-standalone/README @@ -0,0 +1,22 @@ +Up to APLAWS version 1.0.4 formbuildeer-pdf had been installed into its own +application context: [webapps]/ccm-formbuilder-pdf. + +Now it is installed inside the main APLAWS application context along +with all other applications. + +If shortcuts should be installed as its own web context again following +modifications are necessary: +1. remove webapp="xxx" from application.xml +2. move the files in this dir to WEB-INF/ +3. edit __ccm__/.../xsl/index.xsl according the comment + +xsl dir hab been moved from root dir (not CCM compliant practice) into +package/ccm-formbuilder-pdf/xsl/main.xsl + + +Running it in its own webapplication context nevertheless is not suggestive. +It needs several xsl files of the main application (esp. core) for basic +operations, which hac been directly mapped from the main applications directory +tree into its own directory tree. So no module separation is possible, no +security context useable etc. + diff --git a/ccm-formbuilder-pdf/web/WEB-INF/bebop-define.tld b/ccm-formbuilder-pdf/doc/formbuilder-pdf-standalone/bebop-define.tld similarity index 100% rename from ccm-formbuilder-pdf/web/WEB-INF/bebop-define.tld rename to ccm-formbuilder-pdf/doc/formbuilder-pdf-standalone/bebop-define.tld diff --git a/ccm-formbuilder-pdf/web/WEB-INF/bebop-show.tld b/ccm-formbuilder-pdf/doc/formbuilder-pdf-standalone/bebop-show.tld similarity index 100% rename from ccm-formbuilder-pdf/web/WEB-INF/bebop-show.tld rename to ccm-formbuilder-pdf/doc/formbuilder-pdf-standalone/bebop-show.tld diff --git a/ccm-formbuilder-pdf/web/WEB-INF/web.xml b/ccm-formbuilder-pdf/doc/formbuilder-pdf-standalone/web.xml similarity index 100% rename from ccm-formbuilder-pdf/web/WEB-INF/web.xml rename to ccm-formbuilder-pdf/doc/formbuilder-pdf-standalone/web.xml diff --git a/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig.java b/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig.java index 4c30fd0fd..4c7fa8b0e 100755 --- a/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig.java +++ b/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig.java @@ -57,7 +57,9 @@ public class PDFConfig extends AbstractConfig { m_xslFile = new StringParameter( "com.arsdigita.formbuilder.pdf.xsl_file", Parameter.REQUIRED, - "webapps/ccm-formbuilder-pdf/xsl/main.xsl"); + "/packages/ccm-formbuilder-pdf/xsl/main.xsl"); + // if installed into its own webapp context, originally: + // "webapps/ccm-formbuilder-pdf/xsl/main.xsl"); register(m_xslFile); diff --git a/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig_parameter.properties b/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig_parameter.properties index f24908bb2..5546cc9a5 100755 --- a/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig_parameter.properties +++ b/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig_parameter.properties @@ -1,5 +1,5 @@ com.arsdigita.formbuilder.pdf.xsl_file.title=Formbuilder PDF XSL Stylesheet com.arsdigita.formbuilder.pdf.xsl_file.purpose=FOP Stylesheet for displaying PDFs from forms com.arsdigita.formbuilder.pdf.xsl_file.format=[filename] -com.arsdigita.formbuilder.pdf.xsl_file.example=webapps/ccm-formbuilder-pdf/xsl/main.xsl +com.arsdigita.formbuilder.pdf.xsl_file.example=/packages/ccm-formbuilder-pdf/xsl/main.xsl diff --git a/ccm-formbuilder-pdf/web/WEB-INF/web.xml-formbuilder-pdf.in b/ccm-formbuilder-pdf/web/WEB-INF/web.xml-formbuilder-pdf.in new file mode 100755 index 000000000..059885407 --- /dev/null +++ b/ccm-formbuilder-pdf/web/WEB-INF/web.xml-formbuilder-pdf.in @@ -0,0 +1,15 @@ + + + + Converter + com.arsdigita.formbuilder.pdf.Converter + + + + + + Converter + /Converter/ + + + diff --git a/ccm-formbuilder-pdf/web/xsl/main.xsl b/ccm-formbuilder-pdf/web/packages/ccm-formbuilder-pdf/xsl/main.xsl similarity index 100% rename from ccm-formbuilder-pdf/web/xsl/main.xsl rename to ccm-formbuilder-pdf/web/packages/ccm-formbuilder-pdf/xsl/main.xsl diff --git a/ccm-forum/application.xml b/ccm-forum/application.xml index af6405da1..483772bd9 100755 --- a/ccm-forum/application.xml +++ b/ccm-forum/application.xml @@ -3,9 +3,10 @@ name="ccm-forum" prettyName="Forum" version="6.5.2" - release="1"> - + release="1" + webapp="ROOT"> + diff --git a/ccm-forum/doc/forum-standalone/README b/ccm-forum/doc/forum-standalone/README new file mode 100644 index 000000000..52a3aaad1 --- /dev/null +++ b/ccm-forum/doc/forum-standalone/README @@ -0,0 +1,23 @@ +Up to APLAWS version 1.0.4 forum had been installed into its own +application context: [webapps]/ccm-forum. + +Now it is installed inside the main APLAWS application context along +with all other applications. + +If shortcuts should be installed as its own web context again following +modifications are necessary: +1. remove webapp="xxx" from application.xml +2. move the files in this dir to WEB-INF/ +3. change src/com/ad/london/forum/Forum.java + method getServletContext() as back to "/files" +4. edit __ccm__/.../xsl/index.xsl according the comment +5. edit in ccm-ldn-aplaws /web/__ccm__/themes/aplaws/forum* + according to the comment + + +Running it in its own webapplication context nevertheless is not suggestive. +It needs several xsl files of the main application (esp. core) for basic +operations, which hac been directly mapped from the main applications directory +tree into its own directory tree. So no module separation is possible, no +security context useable etc. + diff --git a/ccm-forum/web/WEB-INF/web.xml b/ccm-forum/doc/forum-standalone/web.xml similarity index 100% rename from ccm-forum/web/WEB-INF/web.xml rename to ccm-forum/doc/forum-standalone/web.xml diff --git a/ccm-forum/src/com/arsdigita/forum/Forum.java b/ccm-forum/src/com/arsdigita/forum/Forum.java index f05d9ea3d..05d7b5fa8 100755 --- a/ccm-forum/src/com/arsdigita/forum/Forum.java +++ b/ccm-forum/src/com/arsdigita/forum/Forum.java @@ -18,10 +18,10 @@ */ package com.arsdigita.forum; -import java.math.BigDecimal; - -import org.apache.log4j.Logger; - +import java.math.BigDecimal; + +import org.apache.log4j.Logger; + import com.arsdigita.categorization.Category; import com.arsdigita.cms.lifecycle.LifecycleDefinition; import com.arsdigita.domain.DataObjectNotFoundException; @@ -41,7 +41,7 @@ import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.DataQuery; import com.arsdigita.persistence.Filter; -import com.arsdigita.persistence.FilterFactory; +import com.arsdigita.persistence.FilterFactory; import com.arsdigita.persistence.OID; import com.arsdigita.persistence.Session; import com.arsdigita.persistence.SessionManager; @@ -53,15 +53,15 @@ import com.arsdigita.web.Application; * * @author Kevin Scaldeferri (kevin@arsdigita.com) * - * @version $Revision: 1.7 $ $Author: chrisg23 $ $DateTime: 2004/08/17 23:26:27 $ + * @version $Revision: 1.7 $ $Author: chrisg23 $ $DateTime: 2004/08/17 23:26:27 $ */ public class Forum extends Application { - public static final String THREAD_SUBSCRIPTION_GROUPS_NAME = "Thread Subscription Groups"; + public static final String THREAD_SUBSCRIPTION_GROUPS_NAME = "Thread Subscription Groups"; public static final String versionId = - "$Id: Forum.java 1628 2007-09-17 08:10:40Z chrisg23 $" - + "$Author: chrisg23 $" - + "$DateTime: 2004/08/17 23:26:27 $"; + "$Id: Forum.java 1628 2007-09-17 08:10:40Z chrisg23 $" + + "$Author: chrisg23 $" + + "$DateTime: 2004/08/17 23:26:27 $"; private static ForumConfig s_config = new ForumConfig(); @@ -80,48 +80,48 @@ public class Forum extends Application { "com.arsdigita.forum.Forum"; public static final String PACKAGE_TYPE = "forum"; - ////// - //Forum specific privileges - ///// - public static final String FORUM_MODERATION_PRIVILEGE = "forum_moderation"; - public static final String CREATE_THREAD_PRIVILEGE = "forum_create_thread"; - public static final String RESPOND_TO_THREAD_PRIVILEGE = "forum_respond"; - // separate read privilege required because all public users - // have READ on homepage, which is parent of forum, hence - // everyone inherits READ cg - // - // note in hindsight, I have stopped homepage being set as - // permission context for forum, because site search checks - // for READ privilege anyway, and so search results were being - // returned for non public posts. This means there is no longer - // any need for a separate forum_read privilege, though it - // does no harm. Now removed - // public static final String FORUM_READ_PRIVILEGE = "forum_read"; - - /////// - // pdl forum attribute/association names - /////// + ////// + //Forum specific privileges + ///// + public static final String FORUM_MODERATION_PRIVILEGE = "forum_moderation"; + public static final String CREATE_THREAD_PRIVILEGE = "forum_create_thread"; + public static final String RESPOND_TO_THREAD_PRIVILEGE = "forum_respond"; + // separate read privilege required because all public users + // have READ on homepage, which is parent of forum, hence + // everyone inherits READ cg + // + // note in hindsight, I have stopped homepage being set as + // permission context for forum, because site search checks + // for READ privilege anyway, and so search results were being + // returned for non public posts. This means there is no longer + // any need for a separate forum_read privilege, though it + // does no harm. Now removed + // public static final String FORUM_READ_PRIVILEGE = "forum_read"; + + /////// + // pdl forum attribute/association names + /////// private static final String POSTS = "posts"; private static final String SUBSCRIPTIONS = "subscriptions"; private static final String MODERATION = "isModerated"; private static final String NOTICEBOARD = "isNoticeboard"; - private static final String ADMIN_GROUP = "adminGroup"; + private static final String ADMIN_GROUP = "adminGroup"; private static final String MODERATION_GROUP = "moderationGroup"; - private static final String THREAD_CREATE_GROUP = "threadCreateGroup"; - private static final String THREAD_RESPONDER_GROUP = "threadRespondGroup"; - private static final String READ_GROUP = "readGroup"; + private static final String THREAD_CREATE_GROUP = "threadCreateGroup"; + private static final String THREAD_RESPONDER_GROUP = "threadRespondGroup"; + private static final String READ_GROUP = "readGroup"; private static final String CATEGORY = "category"; private static final String EXPIRE_AFTER = "expireAfter"; private static final String LIFECYCLE_DEFINITION = "lifecycleDefinition"; - // additional attributes added chris.gilbert@westsussex.gov.uk - private static final String ALLOW_FILE_ATTACHMENTS = - "fileAttachmentsAllowed"; - private static final String ALLOW_IMAGE_UPLOADS = "imageUploadsAllowed"; - private static final String AUTOSUBSCRIBE_THREAD_STARTER = - "autoSubscribeThreadStarter"; - private static final String INTRODUCTION = "introduction"; - private static final String NO_CATEGORY_POSTS = "noCategoryPostsAllowed"; - private static final String ANONYMOUS_POSTS = "anonymousPostsAllowed"; + // additional attributes added chris.gilbert@westsussex.gov.uk + private static final String ALLOW_FILE_ATTACHMENTS = + "fileAttachmentsAllowed"; + private static final String ALLOW_IMAGE_UPLOADS = "imageUploadsAllowed"; + private static final String AUTOSUBSCRIBE_THREAD_STARTER = + "autoSubscribeThreadStarter"; + private static final String INTRODUCTION = "introduction"; + private static final String NO_CATEGORY_POSTS = "noCategoryPostsAllowed"; + private static final String ANONYMOUS_POSTS = "anonymousPostsAllowed"; public Forum(DataObject data) { super(data); @@ -147,26 +147,26 @@ public class Forum extends Application { * category for the Forum in the event that the Forum should be * categorized. * This also sets up instant and daily subscriptions on the Forum. - * The default for moderation is false. - * - * Also sets default values for other forum settings. These can be - * amended under the setup tab in the ui + * The default for moderation is false. + * + * Also sets default values for other forum settings. These can be + * amended under the setup tab in the ui */ public static Forum create(String urlName, String title, Application parent, boolean moderated) { s_log.debug("creating forum " + title); Forum forum = (Forum) Application.createApplication - (BASE_DATA_OBJECT_TYPE, urlName, title, parent, true); + (BASE_DATA_OBJECT_TYPE, urlName, title, parent, true); forum.setModerated(moderated); - // default settings ensure legacy forum users do not - // see any change chris.gilbert@westsussex.gov.uk - forum.setAllowFileAttachments(false); - forum.setAllowImageUploads(false); - forum.setAutoSubscribeThreadCreator(false); - forum.setNoCategoryPostsAllowed(true); - forum.setAnonymousPostsAllowed(false); + // default settings ensure legacy forum users do not + // see any change chris.gilbert@westsussex.gov.uk + forum.setAllowFileAttachments(false); + forum.setAllowImageUploads(false); + forum.setAutoSubscribeThreadCreator(false); + forum.setNoCategoryPostsAllowed(true); + forum.setAnonymousPostsAllowed(false); return forum; } @@ -195,22 +195,22 @@ public class Forum extends Application { } /** - * Set introduction - */ - public void setIntroduction(String introduction) { - set(INTRODUCTION, introduction); - } - - /** - * @return introduction - */ - - public String getIntroduction() { - return (String) get(INTRODUCTION); - - } - - /** + * Set introduction + */ + public void setIntroduction(String introduction) { + set(INTRODUCTION, introduction); + } + + /** + * @return introduction + */ + + public String getIntroduction() { + return (String) get(INTRODUCTION); + + } + + /** * creates a Root Category for the forum. */ private Category createRootCategory() { @@ -222,11 +222,11 @@ public class Forum extends Application { return category; } - private void createGroups() { - Group administrators = new Group(); - administrators.setName(getTitle() + " Administrators"); - setAssociation(ADMIN_GROUP, administrators); - + private void createGroups() { + Group administrators = new Group(); + administrators.setName(getTitle() + " Administrators"); + setAssociation(ADMIN_GROUP, administrators); + Group moderators = new Group(); moderators.setName(getTitle() + " Moderators"); setAssociation( MODERATION_GROUP, moderators ); @@ -240,37 +240,37 @@ public class Forum extends Application { // Actually, the only hack involved is making the email address unique. String email = "forum-moderator-" + getID() + "-" + moderators.getID() + "@" + s_config.getReplyHostName(); moderators.setPrimaryEmail(new EmailAddress(email)); - - // chris.gilbert@westsussex.gov.uk create additional groups for privilege - // assignment - could have assigned privileges directly without having associated - // groups, but this reduces rows in the (already enormous) dnm_permissions - // table - Group threadCreators = new Group(); - threadCreators.setName(getTitle() + " Thread Creators"); - setAssociation(THREAD_CREATE_GROUP, threadCreators); - - Group threadResponders = new Group(); - threadResponders.setName(getTitle() + " Thread Responders"); - setAssociation(THREAD_RESPONDER_GROUP, threadResponders); - - Group forumReaders = new Group(); - forumReaders.setName(getTitle() + " Readers"); - setAssociation(READ_GROUP, forumReaders); - - Group container = getGroup(); - - container.addSubgroup(administrators); - container.addSubgroup(moderators); - container.addSubgroup(threadCreators); - container.addSubgroup(threadResponders); - container.addSubgroup(forumReaders); - Group threadSubscriptions = new Group(); - threadSubscriptions.setName(THREAD_SUBSCRIPTION_GROUPS_NAME); - container.addSubgroup(threadSubscriptions); - container.save(); - - - + + // chris.gilbert@westsussex.gov.uk create additional groups for privilege + // assignment - could have assigned privileges directly without having associated + // groups, but this reduces rows in the (already enormous) dnm_permissions + // table + Group threadCreators = new Group(); + threadCreators.setName(getTitle() + " Thread Creators"); + setAssociation(THREAD_CREATE_GROUP, threadCreators); + + Group threadResponders = new Group(); + threadResponders.setName(getTitle() + " Thread Responders"); + setAssociation(THREAD_RESPONDER_GROUP, threadResponders); + + Group forumReaders = new Group(); + forumReaders.setName(getTitle() + " Readers"); + setAssociation(READ_GROUP, forumReaders); + + Group container = getGroup(); + + container.addSubgroup(administrators); + container.addSubgroup(moderators); + container.addSubgroup(threadCreators); + container.addSubgroup(threadResponders); + container.addSubgroup(forumReaders); + Group threadSubscriptions = new Group(); + threadSubscriptions.setName(THREAD_SUBSCRIPTION_GROUPS_NAME); + container.addSubgroup(threadSubscriptions); + container.save(); + + + } public void initialize() { @@ -279,13 +279,13 @@ public class Forum extends Application { if (isNew()) { setModerated(false); setNoticeboard(false); - setAllowFileAttachments(false); - setAllowImageUploads(false); - setAutoSubscribeThreadCreator(false); - setNoCategoryPostsAllowed(true); - setAnonymousPostsAllowed(false); + setAllowFileAttachments(false); + setAllowImageUploads(false); + setAutoSubscribeThreadCreator(false); + setNoCategoryPostsAllowed(true); + setAnonymousPostsAllowed(false); createRootCategory(); - + } } @@ -299,71 +299,71 @@ public class Forum extends Application { protected void afterSave() { if (m_wasNew) { PermissionService.setContext(getRootCategory(), this); - createGroups(); - if (getAdminGroup() != null) { - PermissionService.grantPermission( - new PermissionDescriptor( - PrivilegeDescriptor.ADMIN, - this, - getAdminGroup())); - s_log.debug( - "Current user : " - + Kernel.getContext().getParty().getPrimaryEmail() - + " class is " - + Kernel.getContext().getParty().getClass()); - // - // chris.gilbert@westsussex.gov.uk Original plan was that creator of forum - // is administrator by default, but party from Kernel at this point in code is - // acs-system-party - creation must happen in a KernelExcersion somewhere - // though I can't immediately see where. - // as a consequence, code below justs causes a classcast exception, - // - // revisit, but in meantime, only site admin can administer new forum - // until forum admin permissions set in UI - // - // User creator = (User) Kernel.getContext().getParty(); - // can't be null but let's be supercautious - // if (creator != null) { - // getAdminGroup().addMember(creator); - // } - /// - } + createGroups(); + if (getAdminGroup() != null) { + PermissionService.grantPermission( + new PermissionDescriptor( + PrivilegeDescriptor.ADMIN, + this, + getAdminGroup())); + s_log.debug( + "Current user : " + + Kernel.getContext().getParty().getPrimaryEmail() + + " class is " + + Kernel.getContext().getParty().getClass()); + // + // chris.gilbert@westsussex.gov.uk Original plan was that creator of forum + // is administrator by default, but party from Kernel at this point in code is + // acs-system-party - creation must happen in a KernelExcersion somewhere + // though I can't immediately see where. + // as a consequence, code below justs causes a classcast exception, + // + // revisit, but in meantime, only site admin can administer new forum + // until forum admin permissions set in UI + // + // User creator = (User) Kernel.getContext().getParty(); + // can't be null but let's be supercautious + // if (creator != null) { + // getAdminGroup().addMember(creator); + // } + /// + } if (getModerationGroup() != null ) { PermissionService.grantPermission( new PermissionDescriptor( PrivilegeDescriptor.get(FORUM_MODERATION_PRIVILEGE), this, - getModerationGroup())); - } - if (getThreadCreateGroup() != null) { - PermissionService.grantPermission( - new PermissionDescriptor( - PrivilegeDescriptor.get(CREATE_THREAD_PRIVILEGE), - this, - getThreadCreateGroup())); - // chris.gilbert@westsussex.gov.uk - // wouldn't do this normally, but this enables legacy implementations - // to use new version without any side effects - // public can view forum by default and see create thread link - existing - // code forces login if link is selected - getThreadCreateGroup().addMember(Kernel.getPublicUser()); - } - - if (getThreadResponderGroup() != null) { - PermissionService.grantPermission( - new PermissionDescriptor( - PrivilegeDescriptor.get(RESPOND_TO_THREAD_PRIVILEGE), - this, - getThreadResponderGroup())); - } - - if (getReadGroup() != null) { - PermissionService.grantPermission( - new PermissionDescriptor( - PrivilegeDescriptor.READ, - this, - getReadGroup())); + getModerationGroup())); + } + if (getThreadCreateGroup() != null) { + PermissionService.grantPermission( + new PermissionDescriptor( + PrivilegeDescriptor.get(CREATE_THREAD_PRIVILEGE), + this, + getThreadCreateGroup())); + // chris.gilbert@westsussex.gov.uk + // wouldn't do this normally, but this enables legacy implementations + // to use new version without any side effects + // public can view forum by default and see create thread link - existing + // code forces login if link is selected + getThreadCreateGroup().addMember(Kernel.getPublicUser()); + } + + if (getThreadResponderGroup() != null) { + PermissionService.grantPermission( + new PermissionDescriptor( + PrivilegeDescriptor.get(RESPOND_TO_THREAD_PRIVILEGE), + this, + getThreadResponderGroup())); + } + + if (getReadGroup() != null) { + PermissionService.grantPermission( + new PermissionDescriptor( + PrivilegeDescriptor.READ, + this, + getReadGroup())); } KernelExcursion excursion = new KernelExcursion() { protected void excurse() { @@ -400,15 +400,15 @@ public class Forum extends Application { } - // chris.gilbert@westsussex.gov.uk line removed. - // afterSave in Application sets permission - // context of forum to parent app (portal homepage) - // don't want to inherit permissions of portal, - // as public users have 'READ' privilege on this - // and so get shown postings in search results. - // - // - // super.afterSave(); + // chris.gilbert@westsussex.gov.uk line removed. + // afterSave in Application sets permission + // context of forum to parent app (portal homepage) + // don't want to inherit permissions of portal, + // as public users have 'READ' privilege on this + // and so get shown postings in search results. + // + // + // super.afterSave(); } protected String getBaseDataObjectType() { @@ -452,38 +452,38 @@ public class Forum extends Application { } /** - * gets all pending messages and messages for reapproval - allows - * moderators to see which messages require their attention - * @return - */ - public DataAssociation getPendingPosts() { - // doesn't use getPosts in view of the warning that it - // may disappear - DataAssociation posts = (DataAssociation) get(POSTS); - FilterFactory factory = posts.getFilterFactory(); - Filter pending = factory.equals(Post.STATUS, Post.PENDING); - Filter reapprove = factory.equals(Post.STATUS, Post.REAPPROVE); - ; - - posts.addFilter(factory.or().addFilter(pending).addFilter(reapprove)); - - return posts; - } - - /** - * gets all suppressed messages - allows moderators to see which messages - * heve been rejectedrequire their attention - * @return - */ - public DataAssociation getSuppressedPosts() { - // doesn't use getPosts in view of the warning that it - // may disappear - DataAssociation posts = (DataAssociation) get(POSTS); - posts.addEqualsFilter(Post.STATUS, Post.SUPPRESSED); - return posts; - } - - /** + * gets all pending messages and messages for reapproval - allows + * moderators to see which messages require their attention + * @return + */ + public DataAssociation getPendingPosts() { + // doesn't use getPosts in view of the warning that it + // may disappear + DataAssociation posts = (DataAssociation) get(POSTS); + FilterFactory factory = posts.getFilterFactory(); + Filter pending = factory.equals(Post.STATUS, Post.PENDING); + Filter reapprove = factory.equals(Post.STATUS, Post.REAPPROVE); + ; + + posts.addFilter(factory.or().addFilter(pending).addFilter(reapprove)); + + return posts; + } + + /** + * gets all suppressed messages - allows moderators to see which messages + * heve been rejectedrequire their attention + * @return + */ + public DataAssociation getSuppressedPosts() { + // doesn't use getPosts in view of the warning that it + // may disappear + DataAssociation posts = (DataAssociation) get(POSTS); + posts.addEqualsFilter(Post.STATUS, Post.SUPPRESSED); + return posts; + } + + /** * Gets a ThreadCollection of the threads in this forum. I.e. the * top-level posts which are not replies to any other post. */ @@ -557,7 +557,7 @@ public class Forum extends Application { return threads; - } + } /** * Sets up instant and daily subscriptions for the forum. Daily @@ -724,12 +724,12 @@ public class Forum extends Application { return Boolean.TRUE.equals(get(NOTICEBOARD)); } - /** Returns the administrator group. Null if it doesn't exist */ - public Group getAdminGroup() { - DataObject dObj = (DataObject) get(ADMIN_GROUP); - Assert.exists(dObj, DataObject.class); - return (Group) DomainObjectFactory.newInstance(dObj); - } + /** Returns the administrator group. Null if it doesn't exist */ + public Group getAdminGroup() { + DataObject dObj = (DataObject) get(ADMIN_GROUP); + Assert.exists(dObj, DataObject.class); + return (Group) DomainObjectFactory.newInstance(dObj); + } /** Returns the moderator group. Null if it doesn't exist */ public Group getModerationGroup() { DataObject dObj = (DataObject) get( MODERATION_GROUP ); @@ -737,34 +737,26 @@ public class Forum extends Application { return (Group)DomainObjectFactory.newInstance(dObj); } - /** Returns the thread create group. Null if it doesn't exist */ - public Group getThreadCreateGroup() { - DataObject dObj = (DataObject) get(THREAD_CREATE_GROUP); - Assert.exists(dObj, DataObject.class); - return (Group) DomainObjectFactory.newInstance(dObj); - } - - /** Returns the thread reply group. Null if it doesn't exist */ - public Group getThreadResponderGroup() { - DataObject dObj = (DataObject) get(THREAD_RESPONDER_GROUP); - Assert.exists(dObj, DataObject.class); - return (Group) DomainObjectFactory.newInstance(dObj); - } - - /** Returns the read group. Null if it doesn't exist */ - public Group getReadGroup() { - DataObject dObj = (DataObject) get(READ_GROUP); - Assert.exists(dObj, DataObject.class); - return (Group) DomainObjectFactory.newInstance(dObj); - } - - public String getContextPath() { - return "/ccm-forum"; - } + /** Returns the thread create group. Null if it doesn't exist */ + public Group getThreadCreateGroup() { + DataObject dObj = (DataObject) get(THREAD_CREATE_GROUP); + Assert.exists(dObj, DataObject.class); + return (Group) DomainObjectFactory.newInstance(dObj); + } - public String getServletPath() { - return "/main"; - } + /** Returns the thread reply group. Null if it doesn't exist */ + public Group getThreadResponderGroup() { + DataObject dObj = (DataObject) get(THREAD_RESPONDER_GROUP); + Assert.exists(dObj, DataObject.class); + return (Group) DomainObjectFactory.newInstance(dObj); + } + + /** Returns the read group. Null if it doesn't exist */ + public Group getReadGroup() { + DataObject dObj = (DataObject) get(READ_GROUP); + Assert.exists(dObj, DataObject.class); + return (Group) DomainObjectFactory.newInstance(dObj); + } public void setExpireAfter(int value) { set(EXPIRE_AFTER, new BigDecimal(value)); @@ -779,7 +771,7 @@ public class Forum extends Application { } LifecycleDefinition newLife = new LifecycleDefinition(); newLife.setLabel("Delete expired noticeboard postings"); - newLife.addPhaseDefinition("Forum posting lifespan", + newLife.addPhaseDefinition("Forum posting lifespan", null, new Integer(0), new Integer(1440 * value), // in minutes @@ -789,20 +781,20 @@ public class Forum extends Application { // have the same expiration policy. DataAssociationCursor posts = getPosts().cursor(); while (posts.next()) { - Post post = - (Post) DomainObjectFactory.newInstance(posts.getDataObject()); - if (post - .getThread() - .getRootMessage() - .getID() - .equals(post.getID())) { - - s_log.debug( - "Resetting expiration lifecycle for " + post.getOID()); + Post post = + (Post) DomainObjectFactory.newInstance(posts.getDataObject()); + if (post + .getThread() + .getRootMessage() + .getID() + .equals(post.getID())) { + + s_log.debug( + "Resetting expiration lifecycle for " + post.getOID()); post.setLifecycle(newLife); } } - } + } public int getExpireAfter() { BigDecimal expire = (BigDecimal) get(EXPIRE_AFTER); @@ -825,119 +817,156 @@ public class Forum extends Application { set(LIFECYCLE_DEFINITION, life); } - /** - * method required for upgrade - normally groups are set during forum creation and so - * there is no need to invoke a setter - * @author cgyg9330 - * - */ - public void setAdminGroup(Group group) { - setAssociation(ADMIN_GROUP, group); - PermissionService.grantPermission( - new PermissionDescriptor(PrivilegeDescriptor.ADMIN, this, group)); - } - /** - * method required for upgrade - normally groups are set during forum creation and so - * there is no need to invoke a setter - * @author cgyg9330 - * - */ - public void setThreadCreatorGroup(Group group) { - setAssociation(THREAD_CREATE_GROUP, group); - PermissionService.grantPermission( - new PermissionDescriptor( - PrivilegeDescriptor.get(CREATE_THREAD_PRIVILEGE), - this, - group)); - } - /** - * method required for upgrade - normally groups are set during forum creation and so - * there is no need to invoke a setter - * @author cgyg9330 - * - */ - public void setThreadResponderGroup(Group group) { - setAssociation(THREAD_RESPONDER_GROUP, group); - PermissionService.grantPermission( - new PermissionDescriptor( - PrivilegeDescriptor.get(RESPOND_TO_THREAD_PRIVILEGE), - this, - group)); - } - /** - * method required for upgrade - normally groups are set during forum creation and so - * there is no need to invoke a setter - * @author cgyg9330 - * - */ - public void setReaderGroup(Group group) { - setAssociation(READ_GROUP, group); - PermissionService.grantPermission( - new PermissionDescriptor(PrivilegeDescriptor.READ, this, group)); - } - - /** - * @return - */ - public boolean allowFileAttachments() { - return ((Boolean) get(ALLOW_FILE_ATTACHMENTS)).booleanValue(); - } - public boolean allowImageUploads() { - return ((Boolean) get(ALLOW_IMAGE_UPLOADS)).booleanValue(); - } - - public boolean autoSubscribeThreadStarter() { - return ((Boolean) get(AUTOSUBSCRIBE_THREAD_STARTER)).booleanValue(); - } - - public boolean noCategoryPostsAllowed() { - return ((Boolean) get(NO_CATEGORY_POSTS)).booleanValue(); - } - public boolean anonymousPostsAllowed() { - return ((Boolean) get(ANONYMOUS_POSTS)).booleanValue(); - } - - public void setAllowFileAttachments(boolean allow) { - set(ALLOW_FILE_ATTACHMENTS, new Boolean(allow)); - } - public void setAllowImageUploads(boolean allow) { - set(ALLOW_IMAGE_UPLOADS, new Boolean(allow)); - } - public void setAutoSubscribeThreadCreator(boolean subscribe) { - set(AUTOSUBSCRIBE_THREAD_STARTER, new Boolean(subscribe)); - } - - public void setNoCategoryPostsAllowed(boolean allow) { - set(NO_CATEGORY_POSTS, new Boolean(allow)); - } - - public void setAnonymousPostsAllowed(boolean allow) { - set(ANONYMOUS_POSTS, new Boolean(allow)); - } - - public void setTitle (String title) { - String oldTitle = getTitle(); - super.setTitle(title); - if (!oldTitle.equals(title)) { - // 1. rename permission groups - getAdminGroup().setName(title + " Administrators"); - getModerationGroup().setName(title + " Moderators"); - getThreadCreateGroup().setName(title + " Thread Creators"); - getThreadResponderGroup().setName(title + " Thread Responders"); - getReadGroup().setName(title + " Readers"); - DataCollection subscriptions = getSubscriptions(); - while (subscriptions.next()) { - ForumSubscription subscription = (ForumSubscription)DomainObjectFactory.newInstance(subscriptions.getDataObject()); - subscription.getGroup().setName(subscription.getGroupName(this)); - } - ThreadCollection threads = getThreads(); - while (threads.next()) { - ThreadSubscription threadSub = ThreadSubscription.getThreadSubscription(threads.getMessageThread()); - threadSub.getGroup().setName(threadSub.getSubscriptionGroupName(this)); - - } - - } + /** + * method required for upgrade - normally groups are set during + * forum creation and so there is no need to invoke a setter + * @author cgyg9330 + * + */ + public void setAdminGroup(Group group) { + setAssociation(ADMIN_GROUP, group); + PermissionService.grantPermission( + new PermissionDescriptor(PrivilegeDescriptor.ADMIN, this, group)); + } + /** + * method required for upgrade - normally groups are set during + * forum creation and so there is no need to invoke a setter + * @author cgyg9330 + * + */ + public void setThreadCreatorGroup(Group group) { + setAssociation(THREAD_CREATE_GROUP, group); + PermissionService.grantPermission( + new PermissionDescriptor( + PrivilegeDescriptor.get(CREATE_THREAD_PRIVILEGE), + this, + group)); + } + /** + * method required for upgrade - normally groups are set during forum + * creation and so there is no need to invoke a setter + * @author cgyg9330 + * + */ + public void setThreadResponderGroup(Group group) { + setAssociation(THREAD_RESPONDER_GROUP, group); + PermissionService.grantPermission( + new PermissionDescriptor( + PrivilegeDescriptor.get(RESPOND_TO_THREAD_PRIVILEGE), + this, + group)); + } + /** + * method required for upgrade - normally groups are set during forum creation and so + * creation and so there is no need to invoke a setter + * @author cgyg9330 + * + */ + public void setReaderGroup(Group group) { + setAssociation(READ_GROUP, group); + PermissionService.grantPermission( + new PermissionDescriptor(PrivilegeDescriptor.READ, this, group)); + } + /** + * @return + */ + public boolean allowFileAttachments() { + return ((Boolean) get(ALLOW_FILE_ATTACHMENTS)).booleanValue(); + } + public boolean allowImageUploads() { + return ((Boolean) get(ALLOW_IMAGE_UPLOADS)).booleanValue(); + } + + public boolean autoSubscribeThreadStarter() { + return ((Boolean) get(AUTOSUBSCRIBE_THREAD_STARTER)).booleanValue(); + } + + public boolean noCategoryPostsAllowed() { + return ((Boolean) get(NO_CATEGORY_POSTS)).booleanValue(); + } + public boolean anonymousPostsAllowed() { + return ((Boolean) get(ANONYMOUS_POSTS)).booleanValue(); + } + + public void setAllowFileAttachments(boolean allow) { + set(ALLOW_FILE_ATTACHMENTS, new Boolean(allow)); + } + public void setAllowImageUploads(boolean allow) { + set(ALLOW_IMAGE_UPLOADS, new Boolean(allow)); + } + public void setAutoSubscribeThreadCreator(boolean subscribe) { + set(AUTOSUBSCRIBE_THREAD_STARTER, new Boolean(subscribe)); + } + + public void setNoCategoryPostsAllowed(boolean allow) { + set(NO_CATEGORY_POSTS, new Boolean(allow)); + } + + public void setAnonymousPostsAllowed(boolean allow) { + set(ANONYMOUS_POSTS, new Boolean(allow)); + } + + public void setTitle (String title) { + String oldTitle = getTitle(); + super.setTitle(title); + if (!oldTitle.equals(title)) { + // 1. rename permission groups + getAdminGroup().setName(title + " Administrators"); + getModerationGroup().setName(title + " Moderators"); + getThreadCreateGroup().setName(title + " Thread Creators"); + getThreadResponderGroup().setName(title + " Thread Responders"); + getReadGroup().setName(title + " Readers"); + DataCollection subscriptions = getSubscriptions(); + while (subscriptions.next()) { + ForumSubscription subscription = (ForumSubscription)DomainObjectFactory.newInstance(subscriptions.getDataObject()); + subscription.getGroup().setName(subscription.getGroupName(this)); + } + ThreadCollection threads = getThreads(); + while (threads.next()) { + ThreadSubscription threadSub = ThreadSubscription.getThreadSubscription(threads.getMessageThread()); + threadSub.getGroup().setName(threadSub.getSubscriptionGroupName(this)); + + } + + } + + } + +// /* +// * Application specific method only required if installed in its own +// * web application context +// */ +// public String getContextPath() { +// return "/ccm-forum"; +// } + + /** + * Returns the path name of the location of the applications servlet/JSP. + * + * The method overwrites the super class to provide an application specific + * location for servlets/JSP. This is necessary if you whish to install the + * module (application) along with others in one context. If you install the + * module into its own context (no longer recommended for versions newer + * than 1.0.4) you may use a standard location. + * + * Usually it is a symbolic name/path, which will be mapped in the web.xml + * to the real location in the file system. Example: + * + * forum-main + * com.arsdigita.forum.ForumServlet + * + * + * + * forum-main + * /ccm-forum/main/* + * + * + * @return path name to the applications servlet/JSP + */ + public String getServletPath() { + // sufficient it installed into its own web appl. context (ccm-forum) + // return "/main"; + return "/forum-main/main"; + } } -} diff --git a/ccm-forum/src/com/arsdigita/forum/ForumServlet.java b/ccm-forum/src/com/arsdigita/forum/ForumServlet.java index 39a22afb5..7f6ce0e30 100755 --- a/ccm-forum/src/com/arsdigita/forum/ForumServlet.java +++ b/ccm-forum/src/com/arsdigita/forum/ForumServlet.java @@ -18,67 +18,70 @@ */ package com.arsdigita.forum; -import java.util.Iterator; -import java.util.Map; - +import java.util.Iterator; +// unused import +//import java.util.Map; + import com.arsdigita.forum.ui.Constants; import com.arsdigita.bebop.Page; import com.arsdigita.bebop.page.BebopApplicationServlet; -import com.arsdigita.bebop.parameters.BigDecimalParameter; +// unused import +// import com.arsdigita.bebop.parameters.BigDecimalParameter; import javax.servlet.ServletException; - + import org.apache.log4j.Logger; /** * @author Justin Ross <jross@redhat.com> - * @version $Id: ForumServlet.java 1628 2007-09-17 08:10:40Z chrisg23 $ - * - * Updated chris.gilbert@westsussex.gov.uk to make use of PageFactory and to enable - * disablement of client/middleware caching + * @version $Id: ForumServlet.java 1628 2007-09-17 08:10:40Z chrisg23 $ + * + * Updated chris.gilbert@westsussex.gov.uk to make use of PageFactory and to enable + * disablement of client/middleware caching */ public class ForumServlet extends BebopApplicationServlet implements Constants { public static final String versionId = - "$Id: ForumServlet.java 1628 2007-09-17 08:10:40Z chrisg23 $" + - "$Author: chrisg23 $" + + "$Id: ForumServlet.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(ForumServlet.class); public void init() throws ServletException { super.init(); - s_log.debug("creating forum page"); - final Page forum = ForumPageFactory.getPage(ForumPageFactory.FORUM_PAGE); - s_log.debug("creating thread page"); - final Page thread = ForumPageFactory.getPage(ForumPageFactory.THREAD_PAGE); + s_log.debug("creating forum page"); + final Page forum = ForumPageFactory.getPage(ForumPageFactory.FORUM_PAGE); + s_log.debug("creating thread page"); + final Page thread = ForumPageFactory.getPage(ForumPageFactory.THREAD_PAGE); put("/", forum); put("/index.jsp", forum); put("/thread.jsp", thread); - if (Forum.getConfig().disableClientPageCaching()) { - s_log.debug("caching disabled"); - disableClientCaching("/"); - disableClientCaching("/index.jsp"); - disableClientCaching("/thread.jsp"); - } - - // allow other pages to be added - // eg - allows categorised forum to add load-category page - // for AJAX category asignment - Iterator it = ForumPageFactory.getPages(); - while (it.hasNext()) { - Object key = (Object)it.next(); - if (!key.equals(ForumPageFactory.FORUM_PAGE) && !key.equals(ForumPageFactory.THREAD_PAGE)) { - put("/" + key, ForumPageFactory.getPage((String)key)); - if (Forum.getConfig().disableClientPageCaching()) { - disableClientCaching("/" + key); - + if (Forum.getConfig().disableClientPageCaching()) { + s_log.debug("caching disabled"); + disableClientCaching("/"); + disableClientCaching("/index.jsp"); + disableClientCaching("/thread.jsp"); + } + + // allow other pages to be added + // eg - allows categorised forum to add load-category page + // for AJAX category asignment + Iterator it = ForumPageFactory.getPages(); + while (it.hasNext()) { + Object key = (Object)it.next(); + if (!key.equals(ForumPageFactory.FORUM_PAGE) && + !key.equals(ForumPageFactory.THREAD_PAGE)) { + put("/" + key, ForumPageFactory.getPage((String)key)); + if (Forum.getConfig().disableClientPageCaching()) { + disableClientCaching("/" + key); + + } + } + } + } + + + } - } - - } - - - -} diff --git a/ccm-forum/web/WEB-INF/web.xml-forum.in b/ccm-forum/web/WEB-INF/web.xml-forum.in new file mode 100755 index 000000000..aec5702ca --- /dev/null +++ b/ccm-forum/web/WEB-INF/web.xml-forum.in @@ -0,0 +1,15 @@ + + + + forum-main + com.arsdigita.forum.ForumServlet + + + + + + forum-main + /forum-main/main/* + + + diff --git a/ccm-forum/web/packages/forum/xsl/forum.xsl b/ccm-forum/web/packages/forum/xsl/forum.xsl index b6523f3ff..e4052b92c 100755 --- a/ccm-forum/web/packages/forum/xsl/forum.xsl +++ b/ccm-forum/web/packages/forum/xsl/forum.xsl @@ -4,8 +4,15 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + + + + diff --git a/ccm-ldn-aplaws/application.xml b/ccm-ldn-aplaws/application.xml index 63af13a6f..5b88b02ab 100755 --- a/ccm-ldn-aplaws/application.xml +++ b/ccm-ldn-aplaws/application.xml @@ -3,7 +3,7 @@ name="ccm-ldn-aplaws" prettyName="APLAWS" version="6.5.0" - release="1" + release="2" webapp="ROOT"> diff --git a/ccm-ldn-aplaws/bundles/complete/cfg/web.xml b/ccm-ldn-aplaws/bundles/complete/cfg/web.xml index bf9060c95..fa23cc1c9 100755 --- a/ccm-ldn-aplaws/bundles/complete/cfg/web.xml +++ b/ccm-ldn-aplaws/bundles/complete/cfg/web.xml @@ -4,15 +4,8 @@ - - secured - com.arsdigita.web.SecureFilter - - - - profiler - com.arsdigita.profiler.ProfilerFilter - + CCM + Content and Collaboration Management shortcuts @@ -24,19 +17,12 @@ com.arsdigita.london.subsite.SubsiteFilter - - secured - /* - - - - profiler - /* - - subsite + /ccm/* + @@ -44,12 +30,20 @@ /* - + com.arsdigita.web.CCMApplicationContextListener + + reg com.arsdigita.web.ContextRegistrationServlet @@ -106,7 +100,10 @@ com.arsdigita.web.ResourceServlet - + content-section @@ -128,6 +125,7 @@ com.arsdigita.cms.dispatcher.TemplateXSLServlet + TextOnlyServlet Text Only Servlet @@ -152,17 +150,27 @@ - - ThemePreviewServlet - Servlet to allow admins to preview look/feel - - com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet - - - prefix - /theme - - + + + + + atoz-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-atoz + + + + + + + forum-main + com.arsdigita.forum.ForumServlet + + @@ -192,17 +200,130 @@ portlet-type-xsl com.arsdigita.dispatcher.PortletTypeXSLServlet + + + + rss-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-rss + + + file-resolver + com.arsdigita.london.rss.RSSFileResolver + + + + + + + worker + com.arsdigita.london.search.SearchWorkerServlet + 4 + + + + search-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-search + + + + + AxisServlet + Apache-Axis Servlet + + org.apache.axis.transport.http.AxisServlet + + + + + + + shortcuts-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-shortcuts + + + + + + subsite-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-subsite + + + + + + + terms-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-terms + + + + + + + theme-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-theme + + + + + ThemeDownload + com.arsdigita.london.theme.dispatcher.ThemeDownloadServlet + + + + ThemePreviewServlet + Servlet to allow admins to preview look/feel + + com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet + + + prefix + /theme + + + + + + + + + atoz-files + /ccm-ldn-atoz/files/* + + + + + + forum-main + /forum-main/main/* + + portlet-type-xsl /__ccm__/servlet/portlet-type/* - - reg - /__ccm__/null/reg/* - - portal-files /ccm-ldn-portal/files/* @@ -213,12 +334,71 @@ /ccm-ldn-navigation/files/* - - ThemePreviewServlet - /theme/* - + + + rss-files + /ccm-ldn-rss/files/* + - + + + search-files + /ccm-ldn-search/files/* + + + + AxisServlet + /services/* + + + + + + shortcuts-files + /ccm-ldn-shortcuts/files/* + + + + + subsite-files + /ccm-ldn-subsite/files/* + + + + + + terms-files + /ccm-ldn-terms/files/* + + + + + + theme-files + /theme-files/* + + + + ThemeDownload + /theme-files/download/* + + + + ThemePreviewServlet + /theme/* + + + + + + + + reg + /__ccm__/null/reg/* + ccm-dispatcher @@ -255,7 +435,10 @@ /resource/* - + content-section @@ -263,13 +446,13 @@ - content-type-xsl - /__ccm__/servlet/content-type/* + content-item-xsl + /__ccm__/servlet/content-item/* - content-item-xsl - /__ccm__/servlet/content-item/* + content-type-xsl + /__ccm__/servlet/content-type/* @@ -287,7 +470,10 @@ /print/* - + + com.arsdigita.dispatcher.AccessDeniedException @@ -314,13 +500,20 @@ /error/db-not-available.jsp - java.lang.Exception /error/general.jsp - + + java.lang.Error + /error/general.jsp + + + + /WEB-INF/bebop-show.tld /WEB-INF/bebop-show.tld diff --git a/ccm-ldn-aplaws/bundles/demo/cfg/web.xml b/ccm-ldn-aplaws/bundles/demo/cfg/web.xml index 8a942cef2..fa23cc1c9 100755 --- a/ccm-ldn-aplaws/bundles/demo/cfg/web.xml +++ b/ccm-ldn-aplaws/bundles/demo/cfg/web.xml @@ -4,6 +4,9 @@ + CCM + Content and Collaboration Management + shortcuts com.arsdigita.london.shortcuts.ShortcutFilter @@ -16,7 +19,10 @@ subsite + /ccm/* + @@ -24,12 +30,20 @@ /* - + com.arsdigita.web.CCMApplicationContextListener + + reg com.arsdigita.web.ContextRegistrationServlet @@ -86,7 +100,10 @@ com.arsdigita.web.ResourceServlet - + content-section @@ -108,6 +125,7 @@ com.arsdigita.cms.dispatcher.TemplateXSLServlet + TextOnlyServlet Text Only Servlet @@ -132,17 +150,27 @@ - - ThemePreviewServlet - Servlet to allow admins to preview look/feel - - com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet - - - prefix - /theme - - + + + + + atoz-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-atoz + + + + + + + forum-main + com.arsdigita.forum.ForumServlet + + @@ -172,17 +200,130 @@ portlet-type-xsl com.arsdigita.dispatcher.PortletTypeXSLServlet + + + + rss-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-rss + + + file-resolver + com.arsdigita.london.rss.RSSFileResolver + + + + + + + worker + com.arsdigita.london.search.SearchWorkerServlet + 4 + + + + search-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-search + + + + + AxisServlet + Apache-Axis Servlet + + org.apache.axis.transport.http.AxisServlet + + + + + + + shortcuts-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-shortcuts + + + + + + subsite-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-subsite + + + + + + + terms-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-terms + + + + + + + theme-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-theme + + + + + ThemeDownload + com.arsdigita.london.theme.dispatcher.ThemeDownloadServlet + + + + ThemePreviewServlet + Servlet to allow admins to preview look/feel + + com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet + + + prefix + /theme + + + + + + + + + atoz-files + /ccm-ldn-atoz/files/* + + + + + + forum-main + /forum-main/main/* + + portlet-type-xsl /__ccm__/servlet/portlet-type/* - - reg - /__ccm__/null/reg/* - - portal-files /ccm-ldn-portal/files/* @@ -193,7 +334,71 @@ /ccm-ldn-navigation/files/* - + + + rss-files + /ccm-ldn-rss/files/* + + + + + search-files + /ccm-ldn-search/files/* + + + + AxisServlet + /services/* + + + + + + shortcuts-files + /ccm-ldn-shortcuts/files/* + + + + + subsite-files + /ccm-ldn-subsite/files/* + + + + + + terms-files + /ccm-ldn-terms/files/* + + + + + + theme-files + /theme-files/* + + + + ThemeDownload + /theme-files/download/* + + + + ThemePreviewServlet + /theme/* + + + + + + + + reg + /__ccm__/null/reg/* + ccm-dispatcher @@ -230,7 +435,10 @@ /resource/* - + content-section @@ -238,13 +446,13 @@ - content-type-xsl - /__ccm__/servlet/content-type/* + content-item-xsl + /__ccm__/servlet/content-item/* - content-item-xsl - /__ccm__/servlet/content-item/* + content-type-xsl + /__ccm__/servlet/content-type/* @@ -262,13 +470,10 @@ /print/* - - ThemePreviewServlet - /theme/* - - - + com.arsdigita.dispatcher.AccessDeniedException @@ -295,10 +500,28 @@ /error/db-not-available.jsp - java.lang.Exception /error/general.jsp + + java.lang.Error + /error/general.jsp + + + + + + /WEB-INF/bebop-show.tld + /WEB-INF/bebop-show.tld + + + + /WEB-INF/bebop-define.tld + /WEB-INF/bebop-define.tld + + diff --git a/ccm-ldn-aplaws/bundles/devel/cfg/web.xml b/ccm-ldn-aplaws/bundles/devel/cfg/web.xml index 8a942cef2..fa23cc1c9 100755 --- a/ccm-ldn-aplaws/bundles/devel/cfg/web.xml +++ b/ccm-ldn-aplaws/bundles/devel/cfg/web.xml @@ -4,6 +4,9 @@ + CCM + Content and Collaboration Management + shortcuts com.arsdigita.london.shortcuts.ShortcutFilter @@ -16,7 +19,10 @@ subsite + /ccm/* + @@ -24,12 +30,20 @@ /* - + com.arsdigita.web.CCMApplicationContextListener + + reg com.arsdigita.web.ContextRegistrationServlet @@ -86,7 +100,10 @@ com.arsdigita.web.ResourceServlet - + content-section @@ -108,6 +125,7 @@ com.arsdigita.cms.dispatcher.TemplateXSLServlet + TextOnlyServlet Text Only Servlet @@ -132,17 +150,27 @@ - - ThemePreviewServlet - Servlet to allow admins to preview look/feel - - com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet - - - prefix - /theme - - + + + + + atoz-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-atoz + + + + + + + forum-main + com.arsdigita.forum.ForumServlet + + @@ -172,17 +200,130 @@ portlet-type-xsl com.arsdigita.dispatcher.PortletTypeXSLServlet + + + + rss-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-rss + + + file-resolver + com.arsdigita.london.rss.RSSFileResolver + + + + + + + worker + com.arsdigita.london.search.SearchWorkerServlet + 4 + + + + search-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-search + + + + + AxisServlet + Apache-Axis Servlet + + org.apache.axis.transport.http.AxisServlet + + + + + + + shortcuts-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-shortcuts + + + + + + subsite-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-subsite + + + + + + + terms-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-terms + + + + + + + theme-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-theme + + + + + ThemeDownload + com.arsdigita.london.theme.dispatcher.ThemeDownloadServlet + + + + ThemePreviewServlet + Servlet to allow admins to preview look/feel + + com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet + + + prefix + /theme + + + + + + + + + atoz-files + /ccm-ldn-atoz/files/* + + + + + + forum-main + /forum-main/main/* + + portlet-type-xsl /__ccm__/servlet/portlet-type/* - - reg - /__ccm__/null/reg/* - - portal-files /ccm-ldn-portal/files/* @@ -193,7 +334,71 @@ /ccm-ldn-navigation/files/* - + + + rss-files + /ccm-ldn-rss/files/* + + + + + search-files + /ccm-ldn-search/files/* + + + + AxisServlet + /services/* + + + + + + shortcuts-files + /ccm-ldn-shortcuts/files/* + + + + + subsite-files + /ccm-ldn-subsite/files/* + + + + + + terms-files + /ccm-ldn-terms/files/* + + + + + + theme-files + /theme-files/* + + + + ThemeDownload + /theme-files/download/* + + + + ThemePreviewServlet + /theme/* + + + + + + + + reg + /__ccm__/null/reg/* + ccm-dispatcher @@ -230,7 +435,10 @@ /resource/* - + content-section @@ -238,13 +446,13 @@ - content-type-xsl - /__ccm__/servlet/content-type/* + content-item-xsl + /__ccm__/servlet/content-item/* - content-item-xsl - /__ccm__/servlet/content-item/* + content-type-xsl + /__ccm__/servlet/content-type/* @@ -262,13 +470,10 @@ /print/* - - ThemePreviewServlet - /theme/* - - - + com.arsdigita.dispatcher.AccessDeniedException @@ -295,10 +500,28 @@ /error/db-not-available.jsp - java.lang.Exception /error/general.jsp + + java.lang.Error + /error/general.jsp + + + + + + /WEB-INF/bebop-show.tld + /WEB-INF/bebop-show.tld + + + + /WEB-INF/bebop-define.tld + /WEB-INF/bebop-define.tld + + diff --git a/ccm-ldn-aplaws/bundles/standard/cfg/web.xml b/ccm-ldn-aplaws/bundles/standard/cfg/web.xml index 8a942cef2..fa23cc1c9 100755 --- a/ccm-ldn-aplaws/bundles/standard/cfg/web.xml +++ b/ccm-ldn-aplaws/bundles/standard/cfg/web.xml @@ -4,6 +4,9 @@ + CCM + Content and Collaboration Management + shortcuts com.arsdigita.london.shortcuts.ShortcutFilter @@ -16,7 +19,10 @@ subsite + /ccm/* + @@ -24,12 +30,20 @@ /* - + com.arsdigita.web.CCMApplicationContextListener + + reg com.arsdigita.web.ContextRegistrationServlet @@ -86,7 +100,10 @@ com.arsdigita.web.ResourceServlet - + content-section @@ -108,6 +125,7 @@ com.arsdigita.cms.dispatcher.TemplateXSLServlet + TextOnlyServlet Text Only Servlet @@ -132,17 +150,27 @@ - - ThemePreviewServlet - Servlet to allow admins to preview look/feel - - com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet - - - prefix - /theme - - + + + + + atoz-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-atoz + + + + + + + forum-main + com.arsdigita.forum.ForumServlet + + @@ -172,17 +200,130 @@ portlet-type-xsl com.arsdigita.dispatcher.PortletTypeXSLServlet + + + + rss-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-rss + + + file-resolver + com.arsdigita.london.rss.RSSFileResolver + + + + + + + worker + com.arsdigita.london.search.SearchWorkerServlet + 4 + + + + search-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-search + + + + + AxisServlet + Apache-Axis Servlet + + org.apache.axis.transport.http.AxisServlet + + + + + + + shortcuts-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-shortcuts + + + + + + subsite-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-subsite + + + + + + + terms-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-terms + + + + + + + theme-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-theme + + + + + ThemeDownload + com.arsdigita.london.theme.dispatcher.ThemeDownloadServlet + + + + ThemePreviewServlet + Servlet to allow admins to preview look/feel + + com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet + + + prefix + /theme + + + + + + + + + atoz-files + /ccm-ldn-atoz/files/* + + + + + + forum-main + /forum-main/main/* + + portlet-type-xsl /__ccm__/servlet/portlet-type/* - - reg - /__ccm__/null/reg/* - - portal-files /ccm-ldn-portal/files/* @@ -193,7 +334,71 @@ /ccm-ldn-navigation/files/* - + + + rss-files + /ccm-ldn-rss/files/* + + + + + search-files + /ccm-ldn-search/files/* + + + + AxisServlet + /services/* + + + + + + shortcuts-files + /ccm-ldn-shortcuts/files/* + + + + + subsite-files + /ccm-ldn-subsite/files/* + + + + + + terms-files + /ccm-ldn-terms/files/* + + + + + + theme-files + /theme-files/* + + + + ThemeDownload + /theme-files/download/* + + + + ThemePreviewServlet + /theme/* + + + + + + + + reg + /__ccm__/null/reg/* + ccm-dispatcher @@ -230,7 +435,10 @@ /resource/* - + content-section @@ -238,13 +446,13 @@ - content-type-xsl - /__ccm__/servlet/content-type/* + content-item-xsl + /__ccm__/servlet/content-item/* - content-item-xsl - /__ccm__/servlet/content-item/* + content-type-xsl + /__ccm__/servlet/content-type/* @@ -262,13 +470,10 @@ /print/* - - ThemePreviewServlet - /theme/* - - - + com.arsdigita.dispatcher.AccessDeniedException @@ -295,10 +500,28 @@ /error/db-not-available.jsp - java.lang.Exception /error/general.jsp + + java.lang.Error + /error/general.jsp + + + + + + /WEB-INF/bebop-show.tld + /WEB-INF/bebop-show.tld + + + + /WEB-INF/bebop-define.tld + /WEB-INF/bebop-define.tld + + diff --git a/ccm-ldn-aplaws/web/WEB-INF/web.xml-aplaws b/ccm-ldn-aplaws/web/WEB-INF/web.xml-aplaws index 7d1b5386f..fa23cc1c9 100755 --- a/ccm-ldn-aplaws/web/WEB-INF/web.xml-aplaws +++ b/ccm-ldn-aplaws/web/WEB-INF/web.xml-aplaws @@ -4,6 +4,9 @@ + CCM + Content and Collaboration Management + shortcuts com.arsdigita.london.shortcuts.ShortcutFilter @@ -17,6 +20,9 @@ subsite /ccm/* + @@ -24,12 +30,20 @@ /* - + com.arsdigita.web.CCMApplicationContextListener + + reg com.arsdigita.web.ContextRegistrationServlet @@ -86,37 +100,32 @@ com.arsdigita.web.ResourceServlet - + content-section com.arsdigita.cms.ContentSectionServlet - - content-item-xsl - com.arsdigita.cms.dispatcher.ContentItemXSLServlet - - content-type-xsl com.arsdigita.cms.dispatcher.ContentTypeXSLServlet + + content-item-xsl + com.arsdigita.cms.dispatcher.ContentItemXSLServlet + + template-xsl com.arsdigita.cms.dispatcher.TemplateXSLServlet - - AxisServlet - Apache-Axis Servlet - - org.apache.axis.transport.http.AxisServlet - - - TextOnlyServlet Text Only Servlet @@ -141,17 +150,27 @@ - - ThemePreviewServlet - Servlet to allow admins to preview look/feel - - com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet - - - prefix - /theme - - + + + + + atoz-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-atoz + + + + + + + forum-main + com.arsdigita.forum.ForumServlet + + @@ -181,6 +200,124 @@ portlet-type-xsl com.arsdigita.dispatcher.PortletTypeXSLServlet + + + + rss-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-rss + + + file-resolver + com.arsdigita.london.rss.RSSFileResolver + + + + + + + worker + com.arsdigita.london.search.SearchWorkerServlet + 4 + + + + search-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-search + + + + + AxisServlet + Apache-Axis Servlet + + org.apache.axis.transport.http.AxisServlet + + + + + + + shortcuts-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-shortcuts + + + + + + subsite-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-subsite + + + + + + + terms-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-terms + + + + + + + theme-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-theme + + + + + ThemeDownload + com.arsdigita.london.theme.dispatcher.ThemeDownloadServlet + + + + ThemePreviewServlet + Servlet to allow admins to preview look/feel + + com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet + + + prefix + /theme + + + + + + + + + atoz-files + /ccm-ldn-atoz/files/* + + + + + + forum-main + /forum-main/main/* + + portlet-type-xsl @@ -197,7 +334,71 @@ /ccm-ldn-navigation/files/* - + + + rss-files + /ccm-ldn-rss/files/* + + + + + search-files + /ccm-ldn-search/files/* + + + + AxisServlet + /services/* + + + + + + shortcuts-files + /ccm-ldn-shortcuts/files/* + + + + + subsite-files + /ccm-ldn-subsite/files/* + + + + + + terms-files + /ccm-ldn-terms/files/* + + + + + + theme-files + /theme-files/* + + + + ThemeDownload + /theme-files/download/* + + + + ThemePreviewServlet + /theme/* + + + + + + + + reg + /__ccm__/null/reg/* + ccm-dispatcher @@ -234,7 +435,10 @@ /resource/* - + content-section @@ -256,11 +460,6 @@ /__ccm__/servlet/template/* - - AxisServlet - /services/* - - TextOnlyServlet /text/* @@ -271,12 +470,10 @@ /print/* - - ThemePreviewServlet - /theme/* - - + com.arsdigita.dispatcher.AccessDeniedException @@ -303,13 +500,20 @@ /error/db-not-available.jsp - java.lang.Exception /error/general.jsp - + + java.lang.Error + /error/general.jsp + + + + /WEB-INF/bebop-show.tld /WEB-INF/bebop-show.tld diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/atoz-admin.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/atoz-admin.xsl index 54752a849..c5ca40b98 100755 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/atoz-admin.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/atoz-admin.xsl @@ -4,7 +4,12 @@ xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0" version="1.0"> + + + diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/atoz-index.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/atoz-index.xsl index 7c8801ce9..60a6818b6 100755 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/atoz-index.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/atoz-index.xsl @@ -11,7 +11,13 @@ exclude-result-prefixes="xsl bebop aplaws ui cms nav search atoz" version="1.0"> - + + + + diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/categorised-forum/forum-categories.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/categorised-forum/forum-categories.xsl index 29b1d85d0..026e60e21 100644 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/categorised-forum/forum-categories.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/categorised-forum/forum-categories.xsl @@ -1,15 +1,21 @@ - - + + + + @@ -198,10 +204,12 @@
- + + - + diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/categorised-forum/forum-index.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/categorised-forum/forum-index.xsl index 2e9a02f75..8562e9ee6 100644 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/categorised-forum/forum-index.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/categorised-forum/forum-index.xsl @@ -8,23 +8,33 @@ exclude-result-prefixes="xsl bebop nav search portal forum cms" version="1.0"> - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/forum-index.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/forum-index.xsl index 4185540ef..95c94f2cf 100644 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/forum-index.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-example/forum-index.xsl @@ -1,20 +1,33 @@ + xmlns:bebop="http://www.arsdigita.com/bebop/1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:nav="http://ccm.redhat.com/london/navigation" + xmlns:search="http://rhea.redhat.com/search/1.0" + xmlns:portal="http://www.uk.arsdigita.com/portal/1.0" + xmlns:cms="http://www.arsdigita.com/cms/1.0" + exclude-result-prefixes="xsl bebop nav search portal forum cms" + version="1.0"> + + + + + + + + + @@ -23,7 +36,8 @@ - + @@ -145,12 +159,12 @@
- - Approve - - -   +   diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-index.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-index.xsl index c3d86fb8a..b7b067338 100755 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-index.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/forum-index.xsl @@ -4,7 +4,13 @@ xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0" version="1.0"> + + + + diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/search-admin.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/search-admin.xsl index 760c4eebd..1d143a00e 100755 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/search-admin.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/search-admin.xsl @@ -11,7 +11,11 @@ exclude-result-prefixes="xsl bebop aplaws ui cms nav search" version="1.0"> - - + + + - + diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/search-index.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/search-index.xsl index c356d590e..ba76bc478 100755 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/search-index.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/search-index.xsl @@ -11,25 +11,31 @@ exclude-result-prefixes="xsl bebop aplaws ui cms nav search" version="1.0"> - - - - - + + + + + + + - - - + + + - + /> - - + + APLAWS+: Search @@ -43,29 +49,24 @@ - - + + - - - - - - - + +
- + + + + - + - - - + + + - -
- - - + +

Search

-
+
| @@ -77,122 +78,101 @@ -
- -
+
+ + +
+ + +
+

+ home + &gt; + + + Search + Advanced Search + Remote Search + + + +

+
+
+ - - - - - - - - - -
-

-home -&gt; - - - Search - Advanced Search - Remote Search - - - -

-
-
- - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - -
+ + +
@@ -212,20 +192,15 @@
-
-
- -
+
+
+ +
- - - - - - - -
+ + +
@@ -267,21 +242,15 @@
-
-
- -
+
+
+ +
- - - - - - - - -
+ + +
@@ -326,14 +295,10 @@
-
-
- -
- - - - +
+
+ +
diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/shortcuts-index.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/shortcuts-index.xsl index c49c5ccfc..a4e103c89 100755 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/shortcuts-index.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/shortcuts-index.xsl @@ -4,7 +4,12 @@ xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0" version="1.0"> - + + + diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/subsite-index.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/subsite-index.xsl index a46650d03..cb04a688c 100755 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/subsite-index.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/subsite-index.xsl @@ -4,7 +4,13 @@ xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0" version="1.0"> + + + + diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/terms-index.css b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/terms-index.css index b369a874f..15fd56956 100755 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/terms-index.css +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/terms-index.css @@ -1,2 +1,6 @@ @import url(/css/acs-master.css); -@import url(/ccm-ldn-terms/__ccm__/apps/terms/xsl/index.css); +/* Following import is valid if terms is executed in its own */ +/* web application context (ccm-ldn-terms) */ +/* @import url(/ccm-ldn-terms/__ccm__/apps/terms/xsl/index.css); */ +/* import if installed in the main (common) web context */ +@import url(/__ccm__/apps/terms/xsl/index.css); diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/terms-index.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/terms-index.xsl index 9d4811bf9..0ee053d22 100755 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/terms-index.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/terms-index.xsl @@ -4,7 +4,12 @@ xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0" version="1.0"> + + + diff --git a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/theme-index.xsl b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/theme-index.xsl index e1072552e..44121cbda 100755 --- a/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/theme-index.xsl +++ b/ccm-ldn-aplaws/web/__ccm__/themes/aplaws/theme-index.xsl @@ -4,7 +4,13 @@ xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0" version="1.0"> + + + + diff --git a/ccm-ldn-atoz/application.xml b/ccm-ldn-atoz/application.xml index 483fc0ea0..b1c84ac24 100755 --- a/ccm-ldn-atoz/application.xml +++ b/ccm-ldn-atoz/application.xml @@ -3,7 +3,9 @@ name="ccm-ldn-atoz" prettyName="A-Z" version="6.6.0" - release="4"> + release="4" + webapp="ROOT"> + @@ -22,4 +24,5 @@ The Red Hat Web Application Framework is a platform for writing database-backed web applications in Java. + diff --git a/ccm-ldn-atoz/doc/atoz-standalone/README b/ccm-ldn-atoz/doc/atoz-standalone/README new file mode 100644 index 000000000..266de3f1a --- /dev/null +++ b/ccm-ldn-atoz/doc/atoz-standalone/README @@ -0,0 +1,23 @@ +Up to APLAWS version 1.0.4 atoz had been installed into its own +application context: [webapps]/ccm-ldn-atoz. + +Now it is installed inside the main APLAWS application context along +with all other applications. + +If shortcuts should be installed as its own web context again following +modifications are necessary: +1. remove webapp="xxx" from application.xml +2. move the files in this dir to WEB-INF/ +3. change src/com/ad/london/atoz/AtoZ.java + method getServletContext() as back to "/files" +4. edit __ccm__/.../xsl/index.xsl according the comment +5. edit in ccm-ldn-aplaws /web/__ccm__/themes/aplaws/atoz.xml + according to the comment + + +Running it in its own webapplication context nevertheless is not suggestive. +It needs several xsl files of the main application (esp. core) for basic +operations, which hac been directly mapped from the main applications directory +tree into its own directory tree. So no module separation is possible, no +security context useable etc. + diff --git a/ccm-ldn-atoz/web/WEB-INF/bebop-define.tld b/ccm-ldn-atoz/doc/atoz-standalone/bebop-define.tld similarity index 100% rename from ccm-ldn-atoz/web/WEB-INF/bebop-define.tld rename to ccm-ldn-atoz/doc/atoz-standalone/bebop-define.tld diff --git a/ccm-ldn-atoz/web/WEB-INF/bebop-show.tld b/ccm-ldn-atoz/doc/atoz-standalone/bebop-show.tld similarity index 100% rename from ccm-ldn-atoz/web/WEB-INF/bebop-show.tld rename to ccm-ldn-atoz/doc/atoz-standalone/bebop-show.tld diff --git a/ccm-ldn-atoz/web/WEB-INF/web.xml b/ccm-ldn-atoz/doc/atoz-standalone/web.xml similarity index 100% rename from ccm-ldn-atoz/web/WEB-INF/web.xml rename to ccm-ldn-atoz/doc/atoz-standalone/web.xml diff --git a/ccm-ldn-atoz/src/com/arsdigita/london/atoz/AtoZ.java b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/AtoZ.java index b9073548d..77279fe9c 100755 --- a/ccm-ldn-atoz/src/com/arsdigita/london/atoz/AtoZ.java +++ b/ccm-ldn-atoz/src/com/arsdigita/london/atoz/AtoZ.java @@ -34,6 +34,10 @@ import com.arsdigita.util.Assert; import java.util.List; import java.util.ArrayList; +/** + * Base class of the AtoZ application (module) + * + */ public class AtoZ extends Application { public static final String BASE_DATA_OBJECT_TYPE @@ -60,14 +64,6 @@ public class AtoZ extends Application { public AtoZ(OID oid) { super(oid); } - - public String getContextPath() { - return "/ccm-ldn-atoz"; - } - - public String getServletPath() { - return "/files"; - } public void addProvider(AtoZProvider provider) { DataObject link = add(PROVIDERS, provider); @@ -101,9 +97,50 @@ public class AtoZ extends Application { public static Element newElement(String name) { - Assert.truth(name.indexOf(":") == -1, "name does not contain :"); + Assert.isTrue(name.indexOf(":") == -1, "name does not contain :"); return new Element("atoz:" + name, "http://xmlns.redhat.com/atoz/1.0"); } + +// /* +// * Application specific method only required if installed in its own +// * web application context +// */ +// public String getContextPath() { +// return "/ccm-ldn-atoz"; +// } + + /** + * Returns the path name of the location of the applications servlet/JSP. + * + * The method overwrites the super class to provide an application specific + * location for servlets/JSP. This is necessary if you whish to install the + * module (application) along with others in one context. If you install the + * module into its own context (no longer recommended for versions newer + * than 1.0.4) you may use a standard location. + * + * Usually it is a symbolic name/path, which will be mapped in the web.xml + * to the real location in the file system. Example: + * + * atoz-files + * com.arsdigita.web.ApplicationFileServlet + * + * template-path + * /templates/ccm-ldn-atoz + * + * + * + * + * atoz-files + * /ccm-ldn-atoz/files/* + * + * + * @return path name to the applications servlet/JSP + */ + public String getServletPath() { + // return "/files"; + return "/ccm-ldn-atoz/files"; + } + } diff --git a/ccm-ldn-atoz/web/WEB-INF/web.xml-atoz.in b/ccm-ldn-atoz/web/WEB-INF/web.xml-atoz.in new file mode 100755 index 000000000..1dbb9ecd1 --- /dev/null +++ b/ccm-ldn-atoz/web/WEB-INF/web.xml-atoz.in @@ -0,0 +1,19 @@ + + + + atoz-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-atoz + + + + + + + atoz-files + /ccm-ldn-atoz/files/* + + + diff --git a/ccm-ldn-atoz/web/__ccm__/apps/atoz/xsl/index.xsl b/ccm-ldn-atoz/web/__ccm__/apps/atoz/xsl/index.xsl index 0ed0c5dec..54fdf2e14 100755 --- a/ccm-ldn-atoz/web/__ccm__/apps/atoz/xsl/index.xsl +++ b/ccm-ldn-atoz/web/__ccm__/apps/atoz/xsl/index.xsl @@ -6,10 +6,16 @@ xmlns:atoz="http://xmlns.redhat.com/atoz/1.0" version="1.0"> + + + + + diff --git a/ccm-ldn-exporter/application.xml b/ccm-ldn-exporter/application.xml index 2f65c243f..b79605400 100755 --- a/ccm-ldn-exporter/application.xml +++ b/ccm-ldn-exporter/application.xml @@ -3,7 +3,8 @@ name="ccm-ldn-exporter" prettyName="exporter" version="6.5.0" - release="1"> + release="1" + webapp="ROOT"> diff --git a/ccm-ldn-importer/application.xml b/ccm-ldn-importer/application.xml index 1ea4ba6be..4daada172 100755 --- a/ccm-ldn-importer/application.xml +++ b/ccm-ldn-importer/application.xml @@ -3,7 +3,8 @@ name="ccm-ldn-importer" prettyName="Importer" version="6.5.0" - release="1"> + release="1" + webapp="ROOT"> diff --git a/ccm-ldn-portal/web/WEB-INF/web.xml-optional b/ccm-ldn-portal/web/WEB-INF/web.xml-portal.in similarity index 69% rename from ccm-ldn-portal/web/WEB-INF/web.xml-optional rename to ccm-ldn-portal/web/WEB-INF/web.xml-portal.in index 6c5dded5b..5593064b8 100755 --- a/ccm-ldn-portal/web/WEB-INF/web.xml-optional +++ b/ccm-ldn-portal/web/WEB-INF/web.xml-portal.in @@ -3,6 +3,8 @@ "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"> + + files com.arsdigita.web.ApplicationFileServlet @@ -11,10 +13,13 @@ /templates/ccm-ldn-portal + + files /files/* + diff --git a/ccm-ldn-portal/web/packages/workspace/xsl/portlets.xsl b/ccm-ldn-portal/web/packages/workspace/xsl/portlets.xsl index e6ff9e54f..f1303e12a 100755 --- a/ccm-ldn-portal/web/packages/workspace/xsl/portlets.xsl +++ b/ccm-ldn-portal/web/packages/workspace/xsl/portlets.xsl @@ -12,7 +12,12 @@ - - + + + + diff --git a/ccm-ldn-rss/application.xml b/ccm-ldn-rss/application.xml index 2720f86f9..91de3d902 100755 --- a/ccm-ldn-rss/application.xml +++ b/ccm-ldn-rss/application.xml @@ -3,7 +3,8 @@ name="ccm-ldn-rss" prettyName="RSS" version="6.5.0" - release="1"> + release="1" + webapp="ROOT"> diff --git a/ccm-ldn-rss/doc/rss-standalone/README b/ccm-ldn-rss/doc/rss-standalone/README new file mode 100644 index 000000000..27fe5d314 --- /dev/null +++ b/ccm-ldn-rss/doc/rss-standalone/README @@ -0,0 +1,21 @@ +Up to APLAWS version 1.0.4 rss had been installed into its own +application context: [webapps]/ccm-ldn-rss. + +Now it is installed inside the main APLAWS application context along +with all other applications. + +If shortcuts should be installed as its own web context again following +modifications are necessary: +1. remove webapp="xxx" from application.xml +2. move the files in this dir to WEB-INF/ +3. change src/com/ad/london/rss/RSS.java + method getServletContext() as back to "/files" +4. edit __ccm__/.../xsl/index.xsl according the comment + + +Running it in its own webapplication context nevertheless is not suggestive. +It needs several xsl files of the main application (esp. core) for basic +operations, which hac been directly mapped from the main applications directory +tree into its own directory tree. So no module separation is possible, no +security context useable etc. + diff --git a/ccm-ldn-portal/web/WEB-INF/bebop-define.tld b/ccm-ldn-rss/doc/rss-standalone/bebop-define.tld similarity index 100% rename from ccm-ldn-portal/web/WEB-INF/bebop-define.tld rename to ccm-ldn-rss/doc/rss-standalone/bebop-define.tld diff --git a/ccm-ldn-portal/web/WEB-INF/bebop-show.tld b/ccm-ldn-rss/doc/rss-standalone/bebop-show.tld similarity index 100% rename from ccm-ldn-portal/web/WEB-INF/bebop-show.tld rename to ccm-ldn-rss/doc/rss-standalone/bebop-show.tld diff --git a/ccm-ldn-rss/web/WEB-INF/web.xml b/ccm-ldn-rss/doc/rss-standalone/web.xml similarity index 100% rename from ccm-ldn-rss/web/WEB-INF/web.xml rename to ccm-ldn-rss/doc/rss-standalone/web.xml diff --git a/ccm-ldn-rss/src/com/arsdigita/london/rss/Initializer.java b/ccm-ldn-rss/src/com/arsdigita/london/rss/Initializer.java index 8f4302188..fac514e5e 100755 --- a/ccm-ldn-rss/src/com/arsdigita/london/rss/Initializer.java +++ b/ccm-ldn-rss/src/com/arsdigita/london/rss/Initializer.java @@ -47,6 +47,7 @@ public class Initializer extends CompoundInitializer { ("ccm-ldn-rss.pdl.mf", new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl")))); + // XXX rss.enterprise.init is empty. not needed here add(new LegacyInitializer("com/arsdigita/london/rss/enterprise.init")); } } diff --git a/ccm-ldn-rss/src/com/arsdigita/london/rss/RSS.java b/ccm-ldn-rss/src/com/arsdigita/london/rss/RSS.java index 0d65ac9a7..26bcb481e 100755 --- a/ccm-ldn-rss/src/com/arsdigita/london/rss/RSS.java +++ b/ccm-ldn-rss/src/com/arsdigita/london/rss/RSS.java @@ -23,6 +23,10 @@ import com.arsdigita.persistence.OID; import com.arsdigita.web.Application; +/** + * Base class of the RSS application (module). + * + */ public class RSS extends Application { public static final String BASE_DATA_OBJECT_TYPE @@ -53,11 +57,45 @@ public class RSS extends Application { super(oid); } - public String getContextPath() { - return "/ccm-ldn-rss"; - } +// /* +// * Application specific method only required if installed in its own +// * web application context +// */ +// public String getContextPath() { +// return "/ccm-ldn-rss"; +// } + /** + * Returns the path name of the location of the applications servlet/JSP. + * + * The methods overwrites the super class to provide an application specific + * location for servlets/JSP. This is necessary if you whish to install the + * module (application) along with others in one context. If you install the + * module into its own context (no longer recommended for versions newer + * than 1.0.4) you may use a standard location. + * + * Usually it is a symbolic name/path, which will be mapped in the web.xml + * to the real location in the file system. You will use the following + * kind of code: + * + * rss-files + * com.arsdigita.web.ApplicationFileServlet + * + * template-path + * /templates/ccm-ldn-rss + * + * + * + * + * rss-files + * /ccm-ldn-rss/files/* + * + * + * @return path name to the applications servlet/JSP + */ public String getServletPath() { - return "/files"; + // sufficient if execute in its own web context + // return "/files"; + return "/ccm-ldn-rss/files"; } } diff --git a/ccm-ldn-rss/web/WEB-INF/web.xml-rss.in b/ccm-ldn-rss/web/WEB-INF/web.xml-rss.in new file mode 100755 index 000000000..6174c341d --- /dev/null +++ b/ccm-ldn-rss/web/WEB-INF/web.xml-rss.in @@ -0,0 +1,21 @@ + + + + rss-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-rss + + + file-resolver + com.arsdigita.london.rss.RSSFileResolver + + + + + + rss-files + /ccm-ldn-rss/files/* + + diff --git a/ccm-ldn-rss/web/__ccm__/apps/rss/xsl/index.xsl b/ccm-ldn-rss/web/__ccm__/apps/rss/xsl/index.xsl index 700d755e2..e0d205a02 100755 --- a/ccm-ldn-rss/web/__ccm__/apps/rss/xsl/index.xsl +++ b/ccm-ldn-rss/web/__ccm__/apps/rss/xsl/index.xsl @@ -2,7 +2,14 @@ - - + + + + + diff --git a/ccm-ldn-search/application.xml b/ccm-ldn-search/application.xml index 2aa78025e..f014ab86b 100755 --- a/ccm-ldn-search/application.xml +++ b/ccm-ldn-search/application.xml @@ -3,7 +3,8 @@ name="ccm-ldn-search" prettyName="Search" version="6.5.1" - release="1"> + release="1" + webapp="ROOT"> diff --git a/ccm-ldn-search/doc/search-standalone/README b/ccm-ldn-search/doc/search-standalone/README new file mode 100644 index 000000000..01022d194 --- /dev/null +++ b/ccm-ldn-search/doc/search-standalone/README @@ -0,0 +1,22 @@ +Up to APLAWS version 1.0.4 search had been installed into its own +application context: [webapps]/ccm-ldn-search. + +Now it is installed inside the main APLAWS application context along +with all other applications. + +If search should be installed as its own web context again following +modifications are necessary: +1. remove webapp="xxx" from application.xml +2. move the files in this dir to WEB-INF/ +3. change src/com/ad/london/search/Search.java + method getServletContext() as back to "/files" +4. edit __ccm__/.../xsl/index.xsl according the comment +5. edit in ccm-ldn-aplaws /web/__ccm__/themes/aplaws/search.xml + according to the comment + +Running it in its own webapplication context nevertheless is not suggestive. +It needs several xsl files of the main application (esp. core) for basic +operations, which hac been directly mapped from the main applications directory +tree into its own directory tree. So no module separation is possible, no +security context useable etc. + diff --git a/ccm-ldn-rss/web/WEB-INF/bebop-define.tld b/ccm-ldn-search/doc/search-standalone/bebop-define.tld similarity index 100% rename from ccm-ldn-rss/web/WEB-INF/bebop-define.tld rename to ccm-ldn-search/doc/search-standalone/bebop-define.tld diff --git a/ccm-ldn-rss/web/WEB-INF/bebop-show.tld b/ccm-ldn-search/doc/search-standalone/bebop-show.tld similarity index 100% rename from ccm-ldn-rss/web/WEB-INF/bebop-show.tld rename to ccm-ldn-search/doc/search-standalone/bebop-show.tld diff --git a/ccm-ldn-search/doc/search-standalone/server-config.wsdd b/ccm-ldn-search/doc/search-standalone/server-config.wsdd new file mode 100755 index 000000000..6e51c4fa9 --- /dev/null +++ b/ccm-ldn-search/doc/search-standalone/server-config.wsdd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-ldn-search/web/WEB-INF/web.xml b/ccm-ldn-search/doc/search-standalone/web.xml similarity index 100% rename from ccm-ldn-search/web/WEB-INF/web.xml rename to ccm-ldn-search/doc/search-standalone/web.xml diff --git a/ccm-ldn-search/src/com/arsdigita/london/search/Search.java b/ccm-ldn-search/src/com/arsdigita/london/search/Search.java index b60044349..4bd0bd264 100755 --- a/ccm-ldn-search/src/com/arsdigita/london/search/Search.java +++ b/ccm-ldn-search/src/com/arsdigita/london/search/Search.java @@ -23,6 +23,10 @@ import com.arsdigita.persistence.OID; import com.arsdigita.web.Application; +/** + * Base class for the search application (module) + * + */ public class Search extends Application { public static final String BASE_DATA_OBJECT_TYPE @@ -46,11 +50,43 @@ public class Search extends Application { super(oid); } - public String getContextPath() { - return "/ccm-ldn-search"; - } +// /* +// * Application specific method only required if installed in its own +// * web application context +// */ +// public String getContextPath() { +// return "/ccm-ldn-search"; +// } + /** + * Returns the path name of the location of the applications servlet/JSP. + * + * The method overwrites the super class to provide an application specific + * location for servlets/JSP. This is necessary if you whish to install the + * module (application) along with others in one context. If you install the + * module into its own context (no longer recommended for versions newer + * than 1.0.4) you may use a standard location. + * + * Usually it is a symbolic name/path, which will be mapped in the web.xml + * to the real location in the file system. Example: + * + * search-files + * com.arsdigita.web.ApplicationFileServlet + * + * template-path + * /templates/ccm-ldn-search + * + * + * + * + * search-files + * /ccm-ldn-search/files/* + * + * + * @return path name to the applications servlet/JSP + */ public String getServletPath() { - return "/files"; + //return "/files"; + return "/ccm-ldn-search/files"; } } diff --git a/ccm-ldn-search/web/WEB-INF/server-config.wsdd b/ccm-ldn-search/web/WEB-INF/server-config.wsdd index 6e51c4fa9..5cf365ccb 100755 --- a/ccm-ldn-search/web/WEB-INF/server-config.wsdd +++ b/ccm-ldn-search/web/WEB-INF/server-config.wsdd @@ -1,5 +1,6 @@ + @@ -38,4 +39,4 @@ - \ No newline at end of file + diff --git a/ccm-ldn-search/web/WEB-INF/web.xml-optional b/ccm-ldn-search/web/WEB-INF/web.xml-optional deleted file mode 100755 index f0334aac2..000000000 --- a/ccm-ldn-search/web/WEB-INF/web.xml-optional +++ /dev/null @@ -1,20 +0,0 @@ - - - - - files - com.arsdigita.web.ApplicationFileServlet - - template-path - /templates/ccm-ldn-search - - - - - files - /files/* - - - diff --git a/ccm-ldn-search/web/WEB-INF/web.xml-search.in b/ccm-ldn-search/web/WEB-INF/web.xml-search.in new file mode 100755 index 000000000..c9bb32e3b --- /dev/null +++ b/ccm-ldn-search/web/WEB-INF/web.xml-search.in @@ -0,0 +1,38 @@ + + + + worker + com.arsdigita.london.search.SearchWorkerServlet + 4 + + + + search-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-search + + + + + AxisServlet + Apache-Axis Servlet + + org.apache.axis.transport.http.AxisServlet + + + + + + + search-files + /ccm-ldn-search/files/* + + + + AxisServlet + /services/* + + + diff --git a/ccm-ldn-search/web/__ccm__/apps/search/xsl/index.xsl b/ccm-ldn-search/web/__ccm__/apps/search/xsl/index.xsl index c92475b01..e77edff3f 100755 --- a/ccm-ldn-search/web/__ccm__/apps/search/xsl/index.xsl +++ b/ccm-ldn-search/web/__ccm__/apps/search/xsl/index.xsl @@ -5,10 +5,20 @@ xmlns:bebop="http://www.arsdigita.com/bebop/1.0" version="1.0"> + + + + + + + + diff --git a/ccm-ldn-shortcuts/application.xml b/ccm-ldn-shortcuts/application.xml index be4af6d77..234bad70c 100755 --- a/ccm-ldn-shortcuts/application.xml +++ b/ccm-ldn-shortcuts/application.xml @@ -3,7 +3,8 @@ name="ccm-ldn-shortcuts" prettyName="Shortcuts" version="6.5.0" - release="1"> + release="1" + webapp="ROOT"> diff --git a/ccm-ldn-shortcuts/doc/shortcuts-standalone/README b/ccm-ldn-shortcuts/doc/shortcuts-standalone/README new file mode 100644 index 000000000..c07fad383 --- /dev/null +++ b/ccm-ldn-shortcuts/doc/shortcuts-standalone/README @@ -0,0 +1,25 @@ +Up to APLAWS version 1.0.4 shortcuts had been installed into its own +application context: [webapps]/ccm-ldn-shortcuts. + +Now it is installed inside the main APLAWS application context along +with all other applications. + +If shortcuts should be installed as its own web context again following +modifications are necessary: +1. remove webapp="xxx" from application.xml +2. move the files in this dir to WEB-INF/ +3. change src/com/ad/london/shortcuts/Shortcuts.java + method getServletContext() as back to "/files" +4. edit __ccm__/.../xsl/index.xsl according the comment +5. edit in ccm-ldn-aplaws /web/__ccm__/themes/aplaws/shortcuts.xml + according to the comment +6. Add the filter expression in web.xml-shortcuts.in into the + main applications web.xml + + +Running it in its own webapplication context nevertheless is not suggestive. +It needs several xsl files of the main application (esp. core) for basic +operations, which hac been directly mapped from the main applications directory +tree into its own directory tree. So no module separation is possible, no +security context useable etc. + diff --git a/ccm-ldn-search/web/WEB-INF/bebop-define.tld b/ccm-ldn-shortcuts/doc/shortcuts-standalone/bebop-define.tld similarity index 100% rename from ccm-ldn-search/web/WEB-INF/bebop-define.tld rename to ccm-ldn-shortcuts/doc/shortcuts-standalone/bebop-define.tld diff --git a/ccm-ldn-search/web/WEB-INF/bebop-show.tld b/ccm-ldn-shortcuts/doc/shortcuts-standalone/bebop-show.tld similarity index 100% rename from ccm-ldn-search/web/WEB-INF/bebop-show.tld rename to ccm-ldn-shortcuts/doc/shortcuts-standalone/bebop-show.tld diff --git a/ccm-ldn-shortcuts/web/WEB-INF/web.xml b/ccm-ldn-shortcuts/doc/shortcuts-standalone/web.xml similarity index 100% rename from ccm-ldn-shortcuts/web/WEB-INF/web.xml rename to ccm-ldn-shortcuts/doc/shortcuts-standalone/web.xml diff --git a/ccm-ldn-shortcuts/src/com/arsdigita/london/shortcuts/Shortcuts.java b/ccm-ldn-shortcuts/src/com/arsdigita/london/shortcuts/Shortcuts.java index 36a45e387..e663df5af 100755 --- a/ccm-ldn-shortcuts/src/com/arsdigita/london/shortcuts/Shortcuts.java +++ b/ccm-ldn-shortcuts/src/com/arsdigita/london/shortcuts/Shortcuts.java @@ -23,6 +23,10 @@ import com.arsdigita.persistence.OID; import com.arsdigita.web.Application; +/** + * Base class of the shortcuts application. + * + */ public class Shortcuts extends Application { public static final String BASE_DATA_OBJECT_TYPE @@ -45,12 +49,45 @@ public class Shortcuts extends Application { public Shortcuts(OID oid) { super(oid); } - - public String getContextPath() { - return "/ccm-ldn-shortcuts"; - } +// /* +// * Application specific method only required if installed in its own +// * web application context +// */ +// public String getContextPath() { +// return "/ccm-ldn-shortcuts"; +// } + + /** + * Returns the path name of the location of the applications servlet/JSP. + * + * The methods overwrites the super class to provide an application specific + * location for servlets/JSP. This is necessary if you whish to install the + * module (application) along with others in one context. If you install the + * module into its own context (no longer recommended for versions newer + * than 1.0.4) you may use a standard location. + * + * Usually it is a symbolic name/path, which will be mapped in the web.xml + * to the real location in the file system. You will use the following + * kind of code: + * + * shortcuts-files + * com.arsdigita.web.ApplicationFileServlet + * + * template-path + * /templates/ccm-ldn-shortcuts + * + * + * + * + * shortcuts-files + * /ccm-ldn-shortcuts/files/* + * + * + * @return path name to the applications servlet/JSP + */ public String getServletPath() { - return "/files"; + // return "/files"; + return "/ccm-ldn-shortcuts/files"; } } diff --git a/ccm-ldn-shortcuts/web/WEB-INF/web.xml-shortcuts.in b/ccm-ldn-shortcuts/web/WEB-INF/web.xml-shortcuts.in new file mode 100644 index 000000000..b1aa87ccd --- /dev/null +++ b/ccm-ldn-shortcuts/web/WEB-INF/web.xml-shortcuts.in @@ -0,0 +1,16 @@ + + + shortcuts-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-shortcuts + + + + + + shortcuts-files + /ccm-ldn-shortcuts/files/* + + diff --git a/ccm-ldn-shortcuts/web/__ccm__/apps/shortcuts/xsl/index.xsl b/ccm-ldn-shortcuts/web/__ccm__/apps/shortcuts/xsl/index.xsl index 2135ce5d8..2afabfcbb 100755 --- a/ccm-ldn-shortcuts/web/__ccm__/apps/shortcuts/xsl/index.xsl +++ b/ccm-ldn-shortcuts/web/__ccm__/apps/shortcuts/xsl/index.xsl @@ -4,7 +4,14 @@ xmlns:shortcuts="http://www.arsdigita.com/shortcuts/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"> + + + + + diff --git a/ccm-ldn-shortcuts/web/templates/ccm-ldn-shortcuts/index.jsp b/ccm-ldn-shortcuts/web/templates/ccm-ldn-shortcuts/index.jsp index a3e522d9b..7fc4039fe 100755 --- a/ccm-ldn-shortcuts/web/templates/ccm-ldn-shortcuts/index.jsp +++ b/ccm-ldn-shortcuts/web/templates/ccm-ldn-shortcuts/index.jsp @@ -3,20 +3,23 @@ xmlns:show="/WEB-INF/bebop-show.tld" version="1.2"> - - + + DispatcherHelper.cacheDisable(response); + title="Shortcuts Admin" cache="true"> - + - shortcutsPage.addRequestListener(new ApplicationAuthenticationListener()); + shortcutsPage.addRequestListener(new ApplicationAuthenticationListener()); diff --git a/ccm-ldn-subsite/application.xml b/ccm-ldn-subsite/application.xml index 0bb54b3d4..86db24db7 100755 --- a/ccm-ldn-subsite/application.xml +++ b/ccm-ldn-subsite/application.xml @@ -3,7 +3,8 @@ name="ccm-ldn-subsite" prettyName="Subsite" version="6.5.0" - release="1"> + release="1" + webapp="ROOT"> diff --git a/ccm-ldn-subsite/doc/subsite-standalone/README b/ccm-ldn-subsite/doc/subsite-standalone/README new file mode 100644 index 000000000..437eee35a --- /dev/null +++ b/ccm-ldn-subsite/doc/subsite-standalone/README @@ -0,0 +1,24 @@ +Up to APLAWS version 1.0.4 subsite had been installed into its own +application context: [webapps]/ccm-ldn-subsite. + +Now it is installed inside the main APLAWS application context along +with all other applications. + +If shortcuts should be installed as its own web context again following +modifications are necessary: +1. remove webapp="xxx" from application.xml +2. move the files in this dir to WEB-INF/ +3. change src/com/ad/london/subsite/Subsite.java + method getServletContext() as back to "/files" +4. edit __ccm__/.../xsl/index.xsl according the comment +5. edit in ccm-ldn-aplaws /web/__ccm__/themes/aplaws/subsite.xml + according to the comment +6. Add the filter expression in web.xml-subsite.in into the + main applications web.xml + +Running it in its own webapplication context nevertheless is not suggestive. +It needs several xsl files of the main application (esp. core) for basic +operations, which hac been directly mapped from the main applications directory +tree into its own directory tree. So no module separation is possible, no +security context useable etc. + diff --git a/ccm-ldn-shortcuts/web/WEB-INF/bebop-define.tld b/ccm-ldn-subsite/doc/subsite-standalone/bebop-define.tld similarity index 100% rename from ccm-ldn-shortcuts/web/WEB-INF/bebop-define.tld rename to ccm-ldn-subsite/doc/subsite-standalone/bebop-define.tld diff --git a/ccm-ldn-shortcuts/web/WEB-INF/bebop-show.tld b/ccm-ldn-subsite/doc/subsite-standalone/bebop-show.tld similarity index 100% rename from ccm-ldn-shortcuts/web/WEB-INF/bebop-show.tld rename to ccm-ldn-subsite/doc/subsite-standalone/bebop-show.tld diff --git a/ccm-ldn-subsite/web/WEB-INF/web.xml b/ccm-ldn-subsite/doc/subsite-standalone/web.xml similarity index 100% rename from ccm-ldn-subsite/web/WEB-INF/web.xml rename to ccm-ldn-subsite/doc/subsite-standalone/web.xml diff --git a/ccm-ldn-subsite/src/com/arsdigita/london/subsite/Subsite.java b/ccm-ldn-subsite/src/com/arsdigita/london/subsite/Subsite.java index 35431fe6c..7c517a8c3 100755 --- a/ccm-ldn-subsite/src/com/arsdigita/london/subsite/Subsite.java +++ b/ccm-ldn-subsite/src/com/arsdigita/london/subsite/Subsite.java @@ -25,6 +25,10 @@ import com.arsdigita.domain.DataObjectNotFoundException; import org.apache.log4j.Logger; +/** + * Base class of the subsite application. + * + */ public class Subsite extends Application { private static final Logger s_log = Logger.getLogger(Subsite.class); @@ -69,12 +73,44 @@ public class Subsite extends Application { super(oid); } - public String getContextPath() { - return "/ccm-ldn-subsite"; - } +// /* +// * Application specific method only required if installed in its own +// * web application context +// */ +// public String getContextPath() { +// return "/ccm-ldn-subsite"; +// } + /** + * Returns the path name of the location of the applications servlet/JSP. + * + * The method overwrites the super class to provide an application specific + * location for servlets/JSP. This is necessary if you whish to install the + * module (application) along with others in one context. If you install the + * module into its own context (no longer recommended for versions newer + * than 1.0.4) you may use a standard location. + * + * Usually it is a symbolic name/path, which will be mapped in the web.xml + * to the real location in the file system. Example: + * + * subsite-files + * com.arsdigita.web.ApplicationFileServlet + * + * template-path + * /templates/ccm-ldn-subsite + * + * + * + * + * subsite-files + * /ccm-ldn-subsite/files/* + * + * + * @return path name to the applications servlet/JSP + */ public String getServletPath() { - return "/files"; + // return "/files"; + return "/ccm-ldn-subsite/files"; } } diff --git a/ccm-ldn-subsite/web/WEB-INF/web.xml-subsite.in b/ccm-ldn-subsite/web/WEB-INF/web.xml-subsite.in new file mode 100755 index 000000000..14a65dcbf --- /dev/null +++ b/ccm-ldn-subsite/web/WEB-INF/web.xml-subsite.in @@ -0,0 +1,19 @@ + + + + subsite-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-subsite + + + + + + + subsite-files + /ccm-ldn-subsite/files/* + + + diff --git a/ccm-ldn-subsite/web/__ccm__/apps/subsite/xsl/index.xsl b/ccm-ldn-subsite/web/__ccm__/apps/subsite/xsl/index.xsl index dbb5107cc..9cbd59a25 100755 --- a/ccm-ldn-subsite/web/__ccm__/apps/subsite/xsl/index.xsl +++ b/ccm-ldn-subsite/web/__ccm__/apps/subsite/xsl/index.xsl @@ -6,8 +6,15 @@ xmlns:subsite="http://ccm.redhat.com/london/subsite/1.0" version="1.0"> + + + + + diff --git a/ccm-ldn-terms/application.xml b/ccm-ldn-terms/application.xml index 56ef1617d..916d5eb05 100755 --- a/ccm-ldn-terms/application.xml +++ b/ccm-ldn-terms/application.xml @@ -3,7 +3,8 @@ name="ccm-ldn-terms" prettyName="Terms" version="6.5.0" - release="1"> + release="1" + webapp="ROOT"> diff --git a/ccm-ldn-terms/doc/terms-standalone/README b/ccm-ldn-terms/doc/terms-standalone/README new file mode 100644 index 000000000..666e7a958 --- /dev/null +++ b/ccm-ldn-terms/doc/terms-standalone/README @@ -0,0 +1,22 @@ +Up to APLAWS version 1.0.4 terms had been installed into its own +application context: [webapps]/ccm-ldn-terms. + +Now it is installed inside the main APLAWS application context along +with all other applications. + +If shortcuts should be installed as its own web context again following +modifications are necessary: +1. remove webapp="xxx" from application.xml +2. move the files in this dir to WEB-INF/ +3. change src/com/ad/london/terms/Terms.java + method getServletContext() as back to "/files" +4. edit __ccm__/.../xsl/index.xsl according the comment +5. edit in ccm-ldn-aplaws /web/__ccm__/themes/aplaws/terms.xml + according to the comment + +Running it in its own webapplication context nevertheless is not suggestive. +It needs several xsl files of the main application (esp. core) for basic +operations, which hac been directly mapped from the main applications directory +tree into its own directory tree. So no module separation is possible, no +security context useable etc. + diff --git a/ccm-ldn-subsite/web/WEB-INF/bebop-define.tld b/ccm-ldn-terms/doc/terms-standalone/bebop-define.tld similarity index 100% rename from ccm-ldn-subsite/web/WEB-INF/bebop-define.tld rename to ccm-ldn-terms/doc/terms-standalone/bebop-define.tld diff --git a/ccm-ldn-subsite/web/WEB-INF/bebop-show.tld b/ccm-ldn-terms/doc/terms-standalone/bebop-show.tld similarity index 100% rename from ccm-ldn-subsite/web/WEB-INF/bebop-show.tld rename to ccm-ldn-terms/doc/terms-standalone/bebop-show.tld diff --git a/ccm-ldn-terms/web/WEB-INF/web.xml b/ccm-ldn-terms/doc/terms-standalone/web.xml similarity index 100% rename from ccm-ldn-terms/web/WEB-INF/web.xml rename to ccm-ldn-terms/doc/terms-standalone/web.xml diff --git a/ccm-ldn-terms/src/com/arsdigita/london/terms/Initializer.java b/ccm-ldn-terms/src/com/arsdigita/london/terms/Initializer.java index 0818297c6..3e68ff271 100755 --- a/ccm-ldn-terms/src/com/arsdigita/london/terms/Initializer.java +++ b/ccm-ldn-terms/src/com/arsdigita/london/terms/Initializer.java @@ -44,6 +44,10 @@ import com.arsdigita.kernel.NoValidURLException; import com.arsdigita.xml.XML; +/** + * + * + */ public class Initializer extends CompoundInitializer { public Initializer() { diff --git a/ccm-ldn-terms/src/com/arsdigita/london/terms/Loader.java b/ccm-ldn-terms/src/com/arsdigita/london/terms/Loader.java index 774cd96cc..bcde4bd11 100755 --- a/ccm-ldn-terms/src/com/arsdigita/london/terms/Loader.java +++ b/ccm-ldn-terms/src/com/arsdigita/london/terms/Loader.java @@ -17,7 +17,8 @@ */ package com.arsdigita.london.terms; -import com.arsdigita.london.terms.Terms; +// unused import +// import com.arsdigita.london.terms.Terms; import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.KernelExcursion; diff --git a/ccm-ldn-terms/src/com/arsdigita/london/terms/TermCategoryListener.java b/ccm-ldn-terms/src/com/arsdigita/london/terms/TermCategoryListener.java index 5198d79a1..b026956a5 100755 --- a/ccm-ldn-terms/src/com/arsdigita/london/terms/TermCategoryListener.java +++ b/ccm-ldn-terms/src/com/arsdigita/london/terms/TermCategoryListener.java @@ -47,7 +47,7 @@ public class TermCategoryListener implements CategoryListener { public void onUnmap(Category cat, ACSObject obj) {} /** - * Create new term by hooking into setDefaultParent() category + * Create new term by hooking into setDefaultParent() category * event. First, check whether the category is a model for an * existing term. If yes, do nothing. Otherwise, find the * terms domain in which the parent cat has been defined. diff --git a/ccm-ldn-terms/src/com/arsdigita/london/terms/Terms.java b/ccm-ldn-terms/src/com/arsdigita/london/terms/Terms.java index 593c91bf7..947b84f74 100755 --- a/ccm-ldn-terms/src/com/arsdigita/london/terms/Terms.java +++ b/ccm-ldn-terms/src/com/arsdigita/london/terms/Terms.java @@ -25,6 +25,10 @@ import com.arsdigita.web.Application; import com.arsdigita.xml.Element; +/** + * Base class of the ccm-ldn-terms application (module) + * + */ public class Terms extends Application { public static final String XML_NS = "http://xmlns.redhat.com/london/terms/1.0"; @@ -55,12 +59,45 @@ public class Terms extends Application { super(oid); } - public String getContextPath() { - return "/ccm-ldn-terms"; - } +// /* +// * Application specific method only required if installed in its own +// * web application context +// */ +// public String getContextPath() { +// return "/ccm-ldn-terms"; +// } + /** + * Returns the path name of the location of the applications servlet/JSP. + * + * The method overwrites the super class to provide an application specific + * location for servlets/JSP. This is necessary if you whish to install the + * module (application) along with others in one context. If you install the + * module into its own context (no longer recommended for versions newer + * than 1.0.4) you may use a standard location. + * + * Usually it is a symbolic name/path, which will be mapped in the web.xml + * to the real location in the file system. Example: + * + * terms-files + * com.arsdigita.web.ApplicationFileServlet + * + * template-path + * /templates/ccm-ldn-terms + * + * + * + * + * terms-files + * /ccm-ldn-terms/files/* + * + * + * @return path name to the applications servlet/JSP + */ public String getServletPath() { - return "/files"; + // sufficient if running in its own web application context ccm-ldn-terms + // return "/files"; + return "/ccm-ldn-terms/files"; } } diff --git a/ccm-ldn-terms/src/com/arsdigita/london/terms/Util.java b/ccm-ldn-terms/src/com/arsdigita/london/terms/Util.java index 3ab56541e..55c102217 100755 --- a/ccm-ldn-terms/src/com/arsdigita/london/terms/Util.java +++ b/ccm-ldn-terms/src/com/arsdigita/london/terms/Util.java @@ -6,9 +6,10 @@ package com.arsdigita.london.terms; import org.apache.log4j.Logger; -import com.arsdigita.cms.ContentBundle; -import com.arsdigita.cms.ContentItem; -import com.arsdigita.cms.ContentPage; +// unused import +// import com.arsdigita.cms.ContentBundle; +// import com.arsdigita.cms.ContentItem; +// import com.arsdigita.cms.ContentPage; import com.arsdigita.domain.DomainCollection; import com.arsdigita.persistence.DataQuery; import com.arsdigita.persistence.SessionManager; @@ -35,7 +36,9 @@ public class Util { applicationDomain = Domain.retrieve((String) domains.get("domainKey")); } else { - throw new UncheckedWrapperException("No Default Navigation domain found for application " + app == null ? null : app.getTitle()); + throw new UncheckedWrapperException( + "No Default Navigation domain found for application " + + app == null ? null : app.getTitle()); } domains.close(); diff --git a/ccm-ldn-terms/web/WEB-INF/web.xml-terms.in b/ccm-ldn-terms/web/WEB-INF/web.xml-terms.in new file mode 100755 index 000000000..4034181f9 --- /dev/null +++ b/ccm-ldn-terms/web/WEB-INF/web.xml-terms.in @@ -0,0 +1,20 @@ + + + + terms-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-terms + + + + + + + terms-files + /ccm-ldn-terms/files/* + + + + diff --git a/ccm-ldn-terms/web/__ccm__/apps/terms/xsl/index.xsl b/ccm-ldn-terms/web/__ccm__/apps/terms/xsl/index.xsl index 20f027ddf..5a48cefd6 100755 --- a/ccm-ldn-terms/web/__ccm__/apps/terms/xsl/index.xsl +++ b/ccm-ldn-terms/web/__ccm__/apps/terms/xsl/index.xsl @@ -4,8 +4,16 @@ xmlns:terms="http://xmlns.redhat.com/london/terms/1.0" version="1.0"> + + + + + + diff --git a/ccm-ldn-theme/application.xml b/ccm-ldn-theme/application.xml index 41772a253..b4bd17e44 100755 --- a/ccm-ldn-theme/application.xml +++ b/ccm-ldn-theme/application.xml @@ -3,7 +3,8 @@ name="ccm-ldn-theme" prettyName="Theme" version="6.5.0" - release="1"> + release="1" + webapp="ROOT"> diff --git a/ccm-ldn-theme/doc/theme-standalone/README b/ccm-ldn-theme/doc/theme-standalone/README new file mode 100644 index 000000000..6aacc8c7b --- /dev/null +++ b/ccm-ldn-theme/doc/theme-standalone/README @@ -0,0 +1,23 @@ +Up to APLAWS version 1.0.4 theme had been installed into its own +application context: [webapps]/ccm-ldn-theme. + +Now it is installed inside the main APLAWS application context along +with all other applications. + +If shortcuts should be installed as its own web context again following +modifications are necessary: +1. remove webapp="xxx" from application.xml +2. move the files in this dir to WEB-INF/ +3. change src/com/ad/london/theme/ThemeApplication.java + method getServletContext() as back to "/files" +4. edit __ccm__/.../xsl/index.xsl according the comment +5. edit in ccm-ldn-aplaws /web/__ccm__/themes/aplaws/theme.xml + according to the comment + + +Running it in its own webapplication context nevertheless is not suggestive. +It needs several xsl files of the main application (esp. core) for basic +operations, which hac been directly mapped from the main applications directory +tree into its own directory tree. So no module separation is possible, no +security context useable etc. + diff --git a/ccm-ldn-terms/web/WEB-INF/bebop-define.tld b/ccm-ldn-theme/doc/theme-standalone/bebop-define.tld similarity index 100% rename from ccm-ldn-terms/web/WEB-INF/bebop-define.tld rename to ccm-ldn-theme/doc/theme-standalone/bebop-define.tld diff --git a/ccm-ldn-terms/web/WEB-INF/bebop-show.tld b/ccm-ldn-theme/doc/theme-standalone/bebop-show.tld similarity index 100% rename from ccm-ldn-terms/web/WEB-INF/bebop-show.tld rename to ccm-ldn-theme/doc/theme-standalone/bebop-show.tld diff --git a/ccm-ldn-theme/web/WEB-INF/web.xml b/ccm-ldn-theme/doc/theme-standalone/web.xml similarity index 100% rename from ccm-ldn-theme/web/WEB-INF/web.xml rename to ccm-ldn-theme/doc/theme-standalone/web.xml diff --git a/ccm-ldn-theme/src/com/arsdigita/london/theme/Theme.java b/ccm-ldn-theme/src/com/arsdigita/london/theme/Theme.java index d6d8923ef..36c4bf023 100755 --- a/ccm-ldn-theme/src/com/arsdigita/london/theme/Theme.java +++ b/ccm-ldn-theme/src/com/arsdigita/london/theme/Theme.java @@ -33,8 +33,8 @@ import java.util.Date; /** - * this represents a Theme within the system. Specifically, it represents - * a grouping of files that can be used to style a given subsite. + * Represents a Theme within the system. Specifically, it represents + * a grouping of files that can be used to style a given subsite. * * @author Randy Graebner %lt;randyg@alum.mit.edu> */ diff --git a/ccm-ldn-theme/src/com/arsdigita/london/theme/ThemeApplication.java b/ccm-ldn-theme/src/com/arsdigita/london/theme/ThemeApplication.java index e1352e725..d03b39a55 100755 --- a/ccm-ldn-theme/src/com/arsdigita/london/theme/ThemeApplication.java +++ b/ccm-ldn-theme/src/com/arsdigita/london/theme/ThemeApplication.java @@ -25,6 +25,10 @@ import com.arsdigita.domain.DataObjectNotFoundException; import org.apache.log4j.Logger; +/** + * Base class of the ccm-ldn-theme application (module) + * + */ public class ThemeApplication extends Application { public static final String DEFAULT_THEME = "defaultTheme"; @@ -54,14 +58,6 @@ public class ThemeApplication extends Application { super(oid); } - public String getContextPath() { - return "/ccm-ldn-theme"; - } - - public String getServletPath() { - return "/theme-files"; - } - public Theme getDefaultTheme() { DataObject dObj = (DataObject) get( DEFAULT_THEME ); if( null == dObj ) return null; @@ -72,4 +68,45 @@ public class ThemeApplication extends Application { public void setDefaultTheme( Theme theme ) { set( DEFAULT_THEME, theme ); } + +// /* +// * Application specific method only required if installed in its own +// * web application context +// */ +// public String getContextPath() { +// return "/ccm-ldn-theme"; +// } + + /** + * Returns the path name of the location of the applications servlet/JSP. + * + * The method overwrites the super class to provide an application specific + * location for servlets/JSP. This is necessary if you whish to install the + * module (application) along with others in one context. If you install the + * module into its own context (no longer recommended for versions newer + * than 1.0.4) you may use a standard location. + * + * Usually it is a symbolic name/path, which will be mapped in the web.xml + * to the real location in the file system. Example: + * + * theme-files + * com.arsdigita.web.ApplicationFileServlet + * + * template-path + * /templates/ccm-ldn-theme + * + * + * + * + * theme-files + * /ccm-ldn-theme/files/* + * + * + * @return path name to the applications servlet/JSP + */ + public String getServletPath() { + // sufficient if executed in its own web application context (ccm-ldn-theme) + return "/theme-files"; + // return "/ccm-ldn-theme/files"; + } } diff --git a/ccm-ldn-theme/web/WEB-INF/web.xml-theme.in b/ccm-ldn-theme/web/WEB-INF/web.xml-theme.in new file mode 100755 index 000000000..ab5bd62de --- /dev/null +++ b/ccm-ldn-theme/web/WEB-INF/web.xml-theme.in @@ -0,0 +1,46 @@ + + + + theme-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-ldn-theme + + + + + ThemeDownload + com.arsdigita.london.theme.dispatcher.ThemeDownloadServlet + + + + ThemePreviewServlet + Servlet to allow admins to preview look/feel + + com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet + + + prefix + /theme + + + + + + + theme-files + /theme-files/* + + + + ThemeDownload + /theme-files/download/* + + + + ThemePreviewServlet + /theme/* + + + diff --git a/ccm-ldn-theme/web/__ccm__/apps/theme/xsl/index.xsl b/ccm-ldn-theme/web/__ccm__/apps/theme/xsl/index.xsl index 5130a81a5..a97699f5e 100755 --- a/ccm-ldn-theme/web/__ccm__/apps/theme/xsl/index.xsl +++ b/ccm-ldn-theme/web/__ccm__/apps/theme/xsl/index.xsl @@ -5,8 +5,15 @@ xmlns:theme="http://ccm.redhat.com/london/theme/1.0" version="1.0"> + + + + + diff --git a/ccm-simplesurvey/application.xml b/ccm-simplesurvey/application.xml index c1d0d7bc8..0d7094ae1 100755 --- a/ccm-simplesurvey/application.xml +++ b/ccm-simplesurvey/application.xml @@ -3,7 +3,8 @@ name="ccm-simplesurvey" prettyName="Core" version="6.5.0" - release="1"> + release="1" + webapp="ROOT"> diff --git a/ccm-simplesurvey/doc/simplesurvey-standalone/README b/ccm-simplesurvey/doc/simplesurvey-standalone/README new file mode 100644 index 000000000..4f29c42b1 --- /dev/null +++ b/ccm-simplesurvey/doc/simplesurvey-standalone/README @@ -0,0 +1,21 @@ +Up to APLAWS version 1.0.4 simplesurvey had been installed into its own +application context: [webapps]/ccm-simplesurvey. + +Now it is installed inside the main APLAWS application context along +with all other applications. + +If shortcuts should be installed as its own web context again following +modifications are necessary: +1. remove webapp="xxx" from application.xml +2. move the files in this dir to WEB-INF/ +3. change src/com/ad/london/simplesurvey/SimpleSurvey.java + method getServletContext() as back to "/files" +4. edit __ccm__/.../xsl/index.xsl according the comment + + +Running it in its own webapplication context nevertheless is not suggestive. +It needs several xsl files of the main application (esp. core) for basic +operations, which hac been directly mapped from the main applications directory +tree into its own directory tree. So no module separation is possible, no +security context useable etc. + diff --git a/ccm-ldn-theme/web/WEB-INF/bebop-define.tld b/ccm-simplesurvey/doc/simplesurvey-standalone/bebop-define.tld similarity index 100% rename from ccm-ldn-theme/web/WEB-INF/bebop-define.tld rename to ccm-simplesurvey/doc/simplesurvey-standalone/bebop-define.tld diff --git a/ccm-ldn-theme/web/WEB-INF/bebop-show.tld b/ccm-simplesurvey/doc/simplesurvey-standalone/bebop-show.tld similarity index 100% rename from ccm-ldn-theme/web/WEB-INF/bebop-show.tld rename to ccm-simplesurvey/doc/simplesurvey-standalone/bebop-show.tld diff --git a/ccm-simplesurvey/web/WEB-INF/web.xml b/ccm-simplesurvey/doc/simplesurvey-standalone/web.xml similarity index 100% rename from ccm-simplesurvey/web/WEB-INF/web.xml rename to ccm-simplesurvey/doc/simplesurvey-standalone/web.xml diff --git a/ccm-simplesurvey/src/com/arsdigita/simplesurvey/SimpleSurvey.java b/ccm-simplesurvey/src/com/arsdigita/simplesurvey/SimpleSurvey.java index 454766d84..ff8aa9d07 100755 --- a/ccm-simplesurvey/src/com/arsdigita/simplesurvey/SimpleSurvey.java +++ b/ccm-simplesurvey/src/com/arsdigita/simplesurvey/SimpleSurvey.java @@ -43,12 +43,45 @@ public class SimpleSurvey extends Application { super(oid); } - public String getContextPath() { - return "/ccm-simplesurvey"; - } +// /* +// * Application specific method only required if installed in its own +// * web application context +// */ +// public String getContextPath() { +// return "/ccm-simplesurvey"; +// } + /** + * Returns the path name of the location of the applications servlet/JSP. + * + * The method overwrites the super class to provide an application specific + * location for servlets/JSP. This is necessary if you whish to install the + * module (application) along with others in one context. If you install the + * module into its own context (no longer recommended for versions newer + * than 1.0.4) you may use a standard location. + * + * Usually it is a symbolic name/path, which will be mapped in the web.xml + * to the real location in the file system. Example: + * + * simplesurvey-files + * com.arsdigita.web.ApplicationFileServlet + * + * template-path + * /templates/ccm-simplesurvey + * + * + * + * + * simplesurvey-files + * /ccm-simplesurvey/files/* + * + * + * @return path name to the applications servlet/JSP + */ public String getServletPath() { - return "/files"; + // sufficient if installed into its own web appl. context (ccm-simplesurvey) + // return "/files"; + return "/simplesurvey/files"; } } diff --git a/ccm-simplesurvey/web/WEB-INF/bebop-define.tld b/ccm-simplesurvey/web/WEB-INF/bebop-define.tld deleted file mode 100755 index d34f653f2..000000000 --- a/ccm-simplesurvey/web/WEB-INF/bebop-define.tld +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - 1.0 - 1.1 - bebop-define - http://www.arsdigita.com/bebop-define/tld/1.0 - - this is a tag library for defining Bebop pages via JSP. - - - page - com.arsdigita.bebop.jsp.DefinePage - com.arsdigita.bebop.jsp.DefinePageExtraInfo - JSP - - title - false - true - - - name - true - true - - - application - false - true - - - master - false - true - - - pageClass - false - true - - - cache - false - true - - - - - component - com.arsdigita.bebop.jsp.DefineComponentImpl - com.arsdigita.bebop.jsp.DefineComponentExtraInfo - JSP - - name - false - true - - - classname - true - true - - - - - form - com.arsdigita.bebop.jsp.DefineForm - com.arsdigita.bebop.jsp.DefineFormExtraInfo - JSP - - name - true - true - - - encType - false - true - - - method - false - true - - - action - false - true - - - onSubmit - false - true - - - onReset - false - true - - - - - link - com.arsdigita.bebop.jsp.DefineLink - JSP - - url - true - true - - - name - false - true - - - - - image - com.arsdigita.bebop.jsp.DefineImage - JSP - - src - true - true - - - alt - false - true - - - width - false - true - - - height - false - true - - - border - false - true - - - name - false - true - - - - - tabbedPane - com.arsdigita.bebop.jsp.DefineTabbedPane - JSP - - name - true - true - - - - - tab - com.arsdigita.bebop.jsp.DefineTab - JSP - - name - true - true - - - label - true - true - - - - - text - com.arsdigita.bebop.jsp.DefineText - com.arsdigita.bebop.jsp.DefineWidgetExtraInfo - JSP - - name - true - true - - - type - false - true - - - size - false - true - - - maxlength - false - true - - - - - password - com.arsdigita.bebop.jsp.DefinePassword - com.arsdigita.bebop.jsp.DefineWidgetExtraInfo - JSP - - name - true - true - - - size - false - true - - - maxlength - false - true - - - - - textArea - com.arsdigita.bebop.jsp.DefineTextArea - com.arsdigita.bebop.jsp.DefineWidgetExtraInfo - JSP - - name - true - true - - - type - false - true - - - rows - false - true - - - cols - false - true - - - wrap - false - true - - - - - submit - com.arsdigita.bebop.jsp.DefineSubmit - JSP - - name - true - true - - - label - false - true - - - bundle - false - true - - - - - option - com.arsdigita.bebop.jsp.DefineOption - JSP - - name - true - true - - - value - false - true - - - selected - false - true - - - bundle - false - true - - - - - radioGroup - com.arsdigita.bebop.jsp.DefineRadioGroup - JSP - - name - true - true - - - - - checkboxGroup - com.arsdigita.bebop.jsp.DefineCheckboxGroup - JSP - - name - true - true - - - vertical - false - true - - - - - select - com.arsdigita.bebop.jsp.DefineSelect - JSP - - name - true - true - - - onChange - false - true - - - - - multipleSelect - com.arsdigita.bebop.jsp.DefineMultipleSelect - JSP - - name - true - true - - - - - slave - com.arsdigita.bebop.jsp.DefineSlave - empty - - - - list - com.arsdigita.bebop.jsp.DefineList - com.arsdigita.bebop.jsp.DefineListExtraInfo - JSP - - name - true - true - - - - - table - com.arsdigita.bebop.jsp.DefineTable - com.arsdigita.bebop.jsp.DefineTableExtraInfo - JSP - - name - true - true - - - - diff --git a/ccm-simplesurvey/web/WEB-INF/bebop-show.tld b/ccm-simplesurvey/web/WEB-INF/bebop-show.tld deleted file mode 100755 index ab98aba89..000000000 --- a/ccm-simplesurvey/web/WEB-INF/bebop-show.tld +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - 1.0 - 1.1 - bebop-define - http://www.arsdigita.com/bebop-define/tld/1.0 - - this is a tag library for showing components from Bebop pages - inside of a JSP. - - - page - com.arsdigita.bebop.jsp.ShowPage - com.arsdigita.bebop.jsp.ShowPageExtraInfo - JSP - - pageClass - false - true - - - master - false - true - - - - - all - com.arsdigita.bebop.jsp.ShowAll - JSP - - - - component - com.arsdigita.bebop.jsp.ShowComponent - JSP - - name - true - true - - - - - form - com.arsdigita.bebop.jsp.ShowForm - JSP - - name - true - true - - - - - list - com.arsdigita.bebop.jsp.ShowList - JSP - - name - true - true - - - - - - listItem - com.arsdigita.bebop.jsp.ShowListItem - empty - - - - table - com.arsdigita.bebop.jsp.ShowTable - JSP - - name - true - true - - - - - thead - com.arsdigita.bebop.jsp.ShowTableHeader - JSP - - - - tbody - com.arsdigita.bebop.jsp.ShowTableBody - JSP - - - - row - com.arsdigita.bebop.jsp.ShowTableRow - JSP - - - - col - com.arsdigita.bebop.jsp.ShowListItem - empty - - - - slave - com.arsdigita.bebop.jsp.ShowSlave - JSP - - diff --git a/ccm-simplesurvey/web/WEB-INF/web.xml-simplesurvey.in b/ccm-simplesurvey/web/WEB-INF/web.xml-simplesurvey.in new file mode 100755 index 000000000..a3d5c59f5 --- /dev/null +++ b/ccm-simplesurvey/web/WEB-INF/web.xml-simplesurvey.in @@ -0,0 +1,17 @@ + + + + simplesurvey-files + com.arsdigita.web.ApplicationFileServlet + + template-path + /templates/ccm-simplesurvey + + + + + + simplesurvey-files + /ccm-simplesurvey/files/* + + diff --git a/ccm-simplesurvey/web/packages/simplesurvey/xsl/simplesurvey.xsl b/ccm-simplesurvey/web/packages/simplesurvey/xsl/simplesurvey.xsl index b225838eb..2fdc2038b 100755 --- a/ccm-simplesurvey/web/packages/simplesurvey/xsl/simplesurvey.xsl +++ b/ccm-simplesurvey/web/packages/simplesurvey/xsl/simplesurvey.xsl @@ -4,13 +4,19 @@ xmlns:simplesurvey="http://www.arsdigita.com/simplesurvey/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"> - + - - + + - - - + + + + + + diff --git a/ccm-simplesurvey/web/packages/simplesurvey/xsl/survey-response-data.xsl b/ccm-simplesurvey/web/packages/simplesurvey/xsl/survey-response-data.xsl index b841f0da9..2cb80b719 100755 --- a/ccm-simplesurvey/web/packages/simplesurvey/xsl/survey-response-data.xsl +++ b/ccm-simplesurvey/web/packages/simplesurvey/xsl/survey-response-data.xsl @@ -4,13 +4,13 @@ xmlns:simplesurvey="http://www.arsdigita.com/simplesurvey/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"> - - - + + + - - - + + +