Varaible versionID entfernt bzw. in Javadoc verschoben.

git-svn-id: https://svn.libreccm.org/ccm/trunk@341 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2010-02-09 00:18:37 +00:00
parent 9ee625f50c
commit 9b74239a61
26 changed files with 295 additions and 362 deletions

View File

@ -32,10 +32,6 @@ import org.apache.log4j.Logger;
* @version $Id: AddressInitializer.java 1597 2007-07-10 16:27:26Z p_boy $ * @version $Id: AddressInitializer.java 1597 2007-07-10 16:27:26Z p_boy $
*/ */
public class AddressInitializer extends ContentTypeInitializer { public class AddressInitializer extends ContentTypeInitializer {
public final static String versionId =
"$Id: AddressInitializer.java 1597 2007-07-10 16:27:26Z p_boy $" +
"$Author: p_boy $" +
"$DateTime: 2004/08/17 23:15:09 $";
private static final Logger s_log = Logger.getLogger(AddressInitializer.class); private static final Logger s_log = Logger.getLogger(AddressInitializer.class);

View File

@ -30,10 +30,6 @@ import org.apache.log4j.Logger;
* @version $Id: AddressLoader.java 1597 2007-07-10 16:27:26Z p_boy $ * @version $Id: AddressLoader.java 1597 2007-07-10 16:27:26Z p_boy $
*/ */
public class AddressLoader extends AbstractContentTypeLoader { public class AddressLoader extends AbstractContentTypeLoader {
public final static String versionId =
"$Id: AddressLoader.java 1597 2007-07-10 16:27:26Z p_boy $" +
"$Author: p_boy $" +
"$DateTime: 2004/08/17 23:15:09 $";
private static final Logger s_log = Logger.getLogger(AddressLoader.class); private static final Logger s_log = Logger.getLogger(AddressLoader.class);

View File

@ -25,12 +25,11 @@ import org.apache.log4j.Logger;
* *
* @author Rafael H. Schloming <rhs@mit.edu> * @author Rafael H. Schloming <rhs@mit.edu>
* @version $Revision: #7 $ $Date: 2004/08/17 $ * @version $Revision: #7 $ $Date: 2004/08/17 $
* @version $Id: EventInitializer.java 1595 2007-07-10 16:14:44Z p_boy $
**/ **/
public class EventInitializer extends ContentTypeInitializer { public class EventInitializer extends ContentTypeInitializer {
public final static String versionId = "$Id: EventInitializer.java 1595 2007-07-10 16:14:44Z p_boy $ by $Author: p_boy $, $DateTime: 2004/08/17 23:15:09 $";
private static final Logger s_log = Logger.getLogger(EventInitializer.class); private static final Logger s_log = Logger.getLogger(EventInitializer.class);
public EventInitializer() { public EventInitializer() {

View File

@ -25,12 +25,11 @@ import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
* *
* @author Rafael H. Schloming <rhs@mit.edu> * @author Rafael H. Schloming <rhs@mit.edu>
* @version $Revision: #6 $ $Date: 2004/08/17 $ * @version $Revision: #6 $ $Date: 2004/08/17 $
* @version $Id: EventLoader.java 1595 2007-07-10 16:14:44Z p_boy $
**/ **/
public class EventLoader extends AbstractContentTypeLoader { public class EventLoader extends AbstractContentTypeLoader {
public final static String versionId = "$Id: EventLoader.java 1595 2007-07-10 16:14:44Z p_boy $ by $Author: p_boy $, $DateTime: 2004/08/17 23:15:09 $";
private static final String[] TYPES = { private static final String[] TYPES = {
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Event.xml" "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Event.xml"
}; };

View File

@ -1,9 +1,5 @@
# EventResources_de.properties # EventResources_de.properties
# Alle deutschem Umlaute muessen als UTF-8 eingetragen werden: # Alle deutschem Umlaute muessen als UTF-8 eingetragen werden:
# \u00C3\u00A4 = \u00E4 \u00C3\u0084 = \u00C4
# \u00C3\u00BC = \u00FC \u00C3\u009C = \u00DC
# \u00C3\u00B6 = \u00F6 \u00C3\u0096 = \u00D6
# \u00C3\u009F = \u00DF
event.authoring.basic_properties.description=Bearbeitung des Titels, Namens, Datums, Zeit, Ort, Haupt- Mitarbeiter, Typ, Link zur Karte und Kosten event.authoring.basic_properties.description=Bearbeitung des Titels, Namens, Datums, Zeit, Ort, Haupt- Mitarbeiter, Typ, Link zur Karte und Kosten
# #
# useless here, must be transferred to CMSResources # useless here, must be transferred to CMSResources

View File

@ -52,17 +52,15 @@ import com.arsdigita.web.Application;
* The Forum class represents a discussion forum. * The Forum class represents a discussion forum.
* *
* @author Kevin Scaldeferri (kevin@arsdigita.com) * @author Kevin Scaldeferri (kevin@arsdigita.com)
* * @author chrisg23
* @version $Revision: 1.7 $ $Author: chrisg23 $ $DateTime: 2004/08/17 23:26:27 $ * @version $Revision: $
* @version $Id: Forum.java 1628 2007-09-17 08:10:40Z chrisg23 $
*/ */
public class Forum extends Application { public class Forum extends Application {
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 $";
public static final String THREAD_SUBSCRIPTION_GROUPS_NAME = "Thread Subscription Groups";
private static ForumConfig s_config = new ForumConfig(); private static ForumConfig s_config = new ForumConfig();
static { static {

View File

@ -44,10 +44,6 @@ import org.apache.log4j.Logger;
* @version $Id: ForumConfig.java 1628 2007-09-17 08:10:40Z chrisg23 $ * @version $Id: ForumConfig.java 1628 2007-09-17 08:10:40Z chrisg23 $
*/ */
public class ForumConfig extends AbstractConfig { public class ForumConfig extends AbstractConfig {
// public final static String versionId =
// "$Id: ForumConfig.java 1628 2007-09-17 08:10:40Z chrisg23 $" +
// "$Author: chrisg23 $" +
// "$DateTime: 2004/08/17 23:26:27 $";
private static final Logger s_log = Logger.getLogger(ForumConfig.class); private static final Logger s_log = Logger.getLogger(ForumConfig.class);

View File

@ -33,17 +33,13 @@ import org.apache.log4j.Logger;
/** /**
* @author Justin Ross &lt;<a href="mailto:jross@redhat.com">jross@redhat.com</a>&gt; * @author Justin Ross &lt;<a href="mailto:jross@redhat.com">jross@redhat.com</a>&gt;
* @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 * Updated chris.gilbert@westsussex.gov.uk to make use of PageFactory and to enable
* disablement of client/middleware caching * disablement of client/middleware caching
* @version $Id: ForumServlet.java 1628 2007-09-17 08:10:40Z chrisg23 $
*/ */
public class ForumServlet extends BebopApplicationServlet public class ForumServlet extends BebopApplicationServlet
implements Constants { implements Constants {
public static final String versionId =
"$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); private static final Logger s_log = Logger.getLogger(ForumServlet.class);

View File

@ -28,10 +28,10 @@ import com.arsdigita.util.UncheckedWrapperException;
/** /**
* *
* @version $Revision: 1.1 $ $DateTime: 2004/08/17 23:15:09 $ * @version $Revision: 1.1 $ $DateTime: 2004/08/17 23:15:09 $
* @version $Id: RemoveUnattachedAssetsTask.java,v 1.1 2006/07/13 10:19:28 cgyg9330 Exp $
**/ **/
class RemoveUnattachedAssetsTask extends TimerTask { class RemoveUnattachedAssetsTask extends TimerTask {
public static final String versionId = "$Id: RemoveUnattachedAssetsTask.java,v 1.1 2006/07/13 10:19:28 cgyg9330 Exp $ by $Author: cgyg9330 $, $DateTime: 2004/08/17 23:15:09 $";
private static final Logger s_log = Logger.getLogger(RemoveUnattachedAssetsTask.class); private static final Logger s_log = Logger.getLogger(RemoveUnattachedAssetsTask.class);
public void run() { public void run() {
RemoveUnattachedAssetsScheduler.run(); RemoveUnattachedAssetsScheduler.run();

View File

@ -18,17 +18,17 @@
*/ */
package com.arsdigita.forum; package com.arsdigita.forum;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.mail.Mail; import com.arsdigita.mail.Mail;
import com.arsdigita.messaging.ThreadedMessage; import com.arsdigita.messaging.ThreadedMessage;
import com.arsdigita.notification.BaseSubscription; import com.arsdigita.notification.BaseSubscription;
import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.OID; import com.arsdigita.persistence.OID;
import com.arsdigita.util.Assert; import com.arsdigita.util.Assert;
import com.arsdigita.web.ParameterMap; import com.arsdigita.web.ParameterMap;
import com.arsdigita.web.URL; import com.arsdigita.web.URL;
/** /**
* The abstract Subscription class provides the ability for Users * The abstract Subscription class provides the ability for Users
@ -39,16 +39,14 @@ import com.arsdigita.web.URL;
* should override sendNotification() to alter this behavior. * should override sendNotification() to alter this behavior.
* *
* @author Kevin Scaldeferri (kevin@arsdigita.com) * @author Kevin Scaldeferri (kevin@arsdigita.com)
* @author chrisg23
* @version $Id: Subscription.java 1628 2007-09-17 08:10:40Z chrisg23 $
*/ */
public abstract class Subscription extends BaseSubscription { public abstract class Subscription extends BaseSubscription {
public static final String versionId =
"$Id: Subscription.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(Subscription.class); private static final Logger s_log = Logger.getLogger(Subscription.class);
protected static final String HTML_SEPARATOR = "<br><br>\n<hr>\n<br><br>\n"; protected static final String HTML_SEPARATOR = "<br><br>\n<hr>\n<br><br>\n";
public Subscription(String objectType) { public Subscription(String objectType) {
super(objectType); super(objectType);
} }
@ -84,16 +82,16 @@ public abstract class Subscription extends BaseSubscription {
author = "Unknown"; author = "Unknown";
} }
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) { if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) {
sb.append("<font size='medium' face='Verdana, Arial, Helvetica, sans-serif'>"); sb.append("<font size='medium' face='Verdana, Arial, Helvetica, sans-serif'>");
sb.append("Forum : "); sb.append("Forum : ");
sb.append(post.getForum().getDisplayName()).append("\n<br>"); sb.append(post.getForum().getDisplayName()).append("\n<br>");
sb.append("Subject : "); sb.append("Subject : ");
sb.append(post.getSubject()).append("\n<br>"); sb.append(post.getSubject()).append("\n<br>");
sb.append("Posted by: "); sb.append("Posted by: ");
sb.append(author).append("\n<br><br>"); sb.append(author).append("\n<br><br>");
} else { } else {
sb.append("Forum : "); sb.append("Forum : ");
sb.append(post.getForum().getDisplayName()).append("\n"); sb.append(post.getForum().getDisplayName()).append("\n");
sb.append("Subject : "); sb.append("Subject : ");
@ -101,9 +99,9 @@ public abstract class Subscription extends BaseSubscription {
sb.append("Posted by: "); sb.append("Posted by: ");
sb.append(author).append("\n\n"); sb.append(author).append("\n\n");
} }
return sb.toString(); return sb.toString();
} }
@ -112,12 +110,12 @@ public abstract class Subscription extends BaseSubscription {
* implementation returns a separator and a generic messages. * implementation returns a separator and a generic messages.
*/ */
public String getSignature(ThreadedMessage post) { public String getSignature(ThreadedMessage post) {
if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) { if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) {
return HTML_SEPARATOR + ALERT_BLURB + "</font>"; return HTML_SEPARATOR + ALERT_BLURB + "</font>";
} else { } else {
return SEPARATOR + ALERT_BLURB; return SEPARATOR + ALERT_BLURB;
} }
} }
/** /**
* @return an appropriate message to direct people back to the * @return an appropriate message to direct people back to the
@ -133,13 +131,13 @@ public abstract class Subscription extends BaseSubscription {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
sb.append("To reply to this message, go to:\n"); sb.append("To reply to this message, go to:\n");
if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) { if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) {
sb.append("<br><a href='" + url.getURL() + "'>" + url.getURL() + "</a>"); sb.append("<br><a href='" + url.getURL() + "'>" + url.getURL() + "</a>");
} else { } else {
sb.append(url.getURL()); sb.append(url.getURL());
} }
return sb.toString(); return sb.toString();
} }
} }

View File

@ -42,14 +42,14 @@ import com.arsdigita.portal.Portlet;
import com.arsdigita.portal.apportlet.AppPortlet; import com.arsdigita.portal.apportlet.AppPortlet;
/** /**
* portlet with no attributes that displays links to all forums that user has
* read access to
*
* *
* @author chris.gilbert@westsussex.gov.uk * @author chris.gilbert@westsussex.gov.uk
* * @version $Id: MyForumsPortlet.java,v 1.4 2006/07/13 10:19:28 cgyg9330 Exp $
* portlet with no attributes that displays links to all forums that user has read access to
*
*/ */
public class MyForumsPortlet extends Portlet { public class MyForumsPortlet extends Portlet {
public static final String versionId = "$Id: MyForumsPortlet.java,v 1.4 2006/07/13 10:19:28 cgyg9330 Exp $ by $Author: cgyg9330 $, $DateTime: 2004/08/17 23:26:27 $";
public static final String BASE_DATA_OBJECT_TYPE = public static final String BASE_DATA_OBJECT_TYPE =
"com.arsdigita.forum.MyForumsPortlet"; "com.arsdigita.forum.MyForumsPortlet";

View File

@ -35,9 +35,12 @@ import com.arsdigita.web.ParameterMap;
import com.arsdigita.portal.apportlet.AppPortlet; import com.arsdigita.portal.apportlet.AppPortlet;
public class RecentPostingsPortlet extends AppPortlet { /**
public static final String versionId = "$Id: RecentPostingsPortlet.java 1628 2007-09-17 08:10:40Z chrisg23 $ by $Author: chrisg23 $, $DateTime: 2004/08/17 23:26:27 $"; *
* @version $Id: RecentPostingsPortlet.java 1628 2007-09-17 08:10:40Z chrisg23 $
*/
public class RecentPostingsPortlet extends AppPortlet {
public static final String BASE_DATA_OBJECT_TYPE = public static final String BASE_DATA_OBJECT_TYPE =
"com.arsdigita.forum.RecentPostingsPortlet"; "com.arsdigita.forum.RecentPostingsPortlet";
@ -93,7 +96,7 @@ class RecentPostingsPortletRenderer
Forum forum = (Forum)m_portlet.getParentApplication(); Forum forum = (Forum)m_portlet.getParentApplication();
content.addAttribute("noticeboard", (new Boolean(forum.isNoticeboard())).toString()); content.addAttribute("noticeboard", (new Boolean(forum.isNoticeboard())).toString());
content.addAttribute("forumName", forum.getTitle()); content.addAttribute("forumName", forum.getTitle());
Party party = Kernel.getContext().getParty(); Party party = Kernel.getContext().getParty();

View File

@ -21,14 +21,14 @@ package com.arsdigita.forum.ui;
import com.arsdigita.bebop.Form; import com.arsdigita.bebop.Form;
import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.FormProcessException; import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.Label; import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SaveCancelSection; import com.arsdigita.bebop.SaveCancelSection;
import com.arsdigita.bebop.event.FormInitListener; import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.event.FormSubmissionListener; import com.arsdigita.bebop.event.FormSubmissionListener;
import com.arsdigita.bebop.form.Submit; import com.arsdigita.bebop.form.Submit;
import com.arsdigita.bebop.form.TextArea; import com.arsdigita.bebop.form.TextArea;
import com.arsdigita.bebop.form.TextField; import com.arsdigita.bebop.form.TextField;
@ -48,13 +48,11 @@ import org.apache.log4j.Logger;
* parent category. temporary hack for testing purposes * parent category. temporary hack for testing purposes
* *
* @author <a href=mailto:sarah@arsdigita.com>Sarah Barwig</a> * @author <a href=mailto:sarah@arsdigita.com>Sarah Barwig</a>
* @version $Revision: 1.2 $ $Author: chrisg23 $ $DateTime: 2004/08/17 23:26:27 $ * @author rewritten by Chris Gilbert
* @version $Revision: 1.2 $ $Author: chrisg23 $ $DateTime: 2004/08/17 23:26:27 $
* @version $Id: CategoryAddForm.java 1628 2007-09-17 08:10:40Z chrisg23 $
*/ */
public class CategoryAddForm extends Form { public class CategoryAddForm extends Form {
public static final String versionId =
"$Id: CategoryAddForm.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 private static final Logger s_log = Logger.getLogger
(CategoryAddForm.class); (CategoryAddForm.class);
@ -81,24 +79,24 @@ public class CategoryAddForm extends Form {
m_description.setWrap(TextArea.SOFT); m_description.setWrap(TextArea.SOFT);
add(m_description); add(m_description);
// Cancel button added cg // Cancel button added cg
// Would have used a saveCancel section but this would make existing // Would have used a saveCancel section but this would make existing
// stylesheets for legacy forums miss the buttons // stylesheets for legacy forums miss the buttons
Submit submit = new Submit(Text.gz("forum.ui.topic.save")); Submit submit = new Submit(Text.gz("forum.ui.topic.save"));
final Submit cancel = new Submit(Text.gz("forum.ui.cancel")); final Submit cancel = new Submit(Text.gz("forum.ui.cancel"));
add(submit); add(submit);
add(cancel); add(cancel);
addSubmissionListener(new FormSubmissionListener(){ addSubmissionListener(new FormSubmissionListener(){
public void submitted(FormSectionEvent e) throws FormProcessException { public void submitted(FormSectionEvent e) throws FormProcessException {
PageState state = e.getPageState(); PageState state = e.getPageState();
if (cancel.isSelected(state)){ if (cancel.isSelected(state)){
fireCompletionEvent(state); fireCompletionEvent(state);
throw new FormProcessException("cancelled"); throw new FormProcessException("cancelled");
} }
} }
}); });
/* /*
* Listener to process form data. Just adds the categories, then * Listener to process form data. Just adds the categories, then

View File

@ -18,10 +18,10 @@
*/ */
package com.arsdigita.forum.ui; package com.arsdigita.forum.ui;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import com.arsdigita.bebop.FormProcessException; import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.Page; import com.arsdigita.bebop.Page;
import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SimpleContainer; import com.arsdigita.bebop.SimpleContainer;
import com.arsdigita.bebop.Wizard; import com.arsdigita.bebop.Wizard;
@ -29,253 +29,245 @@ import com.arsdigita.bebop.event.FormCancelListener;
import com.arsdigita.bebop.event.FormInitListener; import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.event.FormSubmissionListener; import com.arsdigita.bebop.event.FormSubmissionListener;
import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.forum.Forum; import com.arsdigita.forum.Forum;
import com.arsdigita.forum.ForumContext; import com.arsdigita.forum.ForumContext;
import com.arsdigita.forum.Post; import com.arsdigita.forum.Post;
import com.arsdigita.forum.ThreadSubscription; import com.arsdigita.forum.ThreadSubscription;
import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.User; import com.arsdigita.kernel.User;
import com.arsdigita.kernel.security.UserContext; import com.arsdigita.kernel.security.UserContext;
import com.arsdigita.kernel.ui.ACSObjectSelectionModel; import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
import com.arsdigita.xml.Element; import com.arsdigita.xml.Element;
/** /**
* Class PostForm * Abstract form for behaviour shared by all types of post. Different types of
* post (new or reply) have different text screens, retrieved using
* the abstract getTextStep method and also may behave
* differently in final processing (final meaning on the last step
* of the wizard) by overriding the processWidgets method.
*
* They all share the remainder of the steps (currently add files, add images and preview)
* and processing relating to shared behaviour
* *
* @author Jon Orris (jorris@arsdigita.com) * @author Jon Orris (jorris@arsdigita.com)
* * @author rewritten by Chris Gilbert
* @version $Revision #1 $DateTime: 2004/08/17 23:26:27 $ * @version $Revision #1 $DateTime: 2004/08/17 23:26:27 $
* * @version $Id: PostForm.java 1628 2007-09-17 08:10:40Z chrisg23 $
* rewritten Chris Gilbert.
*
* Abstract form for behaviour shared by all types of post. Different types of
* post (new or reply) have different text screens, retrieved using
* the abstract getTextStep method and also may behave
* differently in final processing (final meaning on the last step
* of the wizard) by overriding the processWidgets method.
*
* They all share the remainder of the steps (currently add files, add images and preview)
* and processing relating to shared behaviour
*/ */
public abstract class PostForm extends Wizard implements Constants { public abstract class PostForm extends Wizard implements Constants {
public static final String versionId =
"$Id: PostForm.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(PostForm.class); private static final Logger s_log = Logger.getLogger(PostForm.class);
private PostTextStep m_textStep; private PostTextStep m_textStep;
private ImagesStep m_attachImages; private ImagesStep m_attachImages;
private AttachedFilesStep m_attachFiles; private AttachedFilesStep m_attachFiles;
private ConfirmStep m_confirm; private ConfirmStep m_confirm;
private ACSObjectSelectionModel m_post; private ACSObjectSelectionModel m_post;
/**
* context is used because when editing, we might use the root post
* form (with topic selection) or the reply to post form (without
* topic selection). context allows form to behave appropriately
*
*/
private StringParameter m_context = new StringParameter("context");
public static final String NEW_CONTEXT = "new"; /**
public static final String REPLY_CONTEXT = "reply"; * context is used because when editing, we might use the root post
public static final String EDIT_CONTEXT = "edit"; * form (with topic selection) or the reply to post form (without
* topic selection). context allows form to behave appropriately
/** *
* */
* Form used for new thread - no existing post object private StringParameter m_context = new StringParameter("context");
*
*/ public static final String NEW_CONTEXT = "new";
public static final String REPLY_CONTEXT = "reply";
public static final String EDIT_CONTEXT = "edit";
/**
*
* Form used for new thread - no existing post object
*
*/
public PostForm(String name) { public PostForm(String name) {
this(name, null); this(name, null);
} }
/** /**
* Used when editing an existing post * Used when editing an existing post
* @param name * @param name
* @param post * @param post
*/ */
public PostForm(String name, ACSObjectSelectionModel post) { public PostForm(String name, ACSObjectSelectionModel post) {
super(name, new SimpleContainer(), Forum.getConfig().quickFinishAllowed(), true); super(name, new SimpleContainer(), Forum.getConfig().quickFinishAllowed(), true);
// note that encoding must be multipart/form-data,and method must be post // note that encoding must be multipart/form-data,and method must be post
// in order for attachments to be uploaded. Ensure that these properties // in order for attachments to be uploaded. Ensure that these properties
// are carried through in XSL if not simply applying the default bebop // are carried through in XSL if not simply applying the default bebop
// templates // templates
setEncType("multipart/form-data"); setEncType("multipart/form-data");
setMethod(POST); setMethod(POST);
//setMethod(GET); //setMethod(GET);
m_post = post; m_post = post;
} }
public void setContext(PageState state, String context) { public void setContext(PageState state, String context) {
state.setValue(m_context, context); state.setValue(m_context, context);
} }
public String getContext(PageState state) { public String getContext(PageState state) {
return (String) state.getValue(m_context); return (String) state.getValue(m_context);
} }
protected void setupComponent() { protected void setupComponent() {
m_textStep = getTextStep(m_post); m_textStep = getTextStep(m_post);
add(m_textStep); add(m_textStep);
m_attachImages = new ImagesStep(m_post, this); m_attachImages = new ImagesStep(m_post, this);
add(m_attachImages); add(m_attachImages);
m_attachFiles = new AttachedFilesStep(m_post, this); m_attachFiles = new AttachedFilesStep(m_post, this);
add(m_attachFiles); add(m_attachFiles);
m_confirm = new ConfirmStep(m_post, this); m_confirm = new ConfirmStep(m_post, this);
add(m_confirm); add(m_confirm);
addInitListener(new PostInitListener()); addInitListener(new PostInitListener());
addCancelListener(new PostCancelListener()); addCancelListener(new PostCancelListener());
addSubmissionListener(new PostSubmissionListener()); addSubmissionListener(new PostSubmissionListener());
addProcessListener(new PostProcessListener()); addProcessListener(new PostProcessListener());
} }
public void register(Page p) { public void register(Page p) {
super.register(p); super.register(p);
p.addGlobalStateParam(m_context); p.addGlobalStateParam(m_context);
} }
/** /**
* return text step appropriate for the type of post - reply doesn't give the option * return text step appropriate for the type of post - reply doesn't give the option
* to choose a topic * to choose a topic
* @param post * @param post
* @return * @return
*/ */
protected abstract PostTextStep getTextStep(ACSObjectSelectionModel m_post); protected abstract PostTextStep getTextStep(ACSObjectSelectionModel m_post);
/** /**
* potentially create a new post object (unless we are editing one) Subclasses * potentially create a new post object (unless we are editing one) Subclasses
* should create a post in whatever way is appropriate (eg a reply form * should create a post in whatever way is appropriate (eg a reply form
* will need to tie the new post to the one that is being replied to) * will need to tie the new post to the one that is being replied to)
* @param state * @param state
* @return * @return
*/ */
protected abstract Post getPost(PageState state); protected abstract Post getPost(PageState state);
// //
// //
// FORM EVENT LISTENERS. NOTE THAT INDIVIDUAL STEP LISTENERS ARE // FORM EVENT LISTENERS. NOTE THAT INDIVIDUAL STEP LISTENERS ARE
// NOTIFIED AFTER THE MAIN FORM LISTENERS - BE AWARE // NOTIFIED AFTER THE MAIN FORM LISTENERS - BE AWARE
// //
// //
// //
private class PostInitListener implements FormInitListener { private class PostInitListener implements FormInitListener {
public void init(FormSectionEvent e) { public void init(FormSectionEvent e) {
s_log.debug("init called on parent form"); s_log.debug("init called on parent form");
PageState state = e.getPageState(); PageState state = e.getPageState();
if (Kernel.getContext().getParty() == null if (Kernel.getContext().getParty() == null
&& !ForumContext && !ForumContext
.getContext(state) .getContext(state)
.getForum() .getForum()
.anonymousPostsAllowed()) { .anonymousPostsAllowed()) {
UserContext.redirectToLoginPage(state.getRequest()); UserContext.redirectToLoginPage(state.getRequest());
} }
} }
} }
private class PostSubmissionListener implements FormSubmissionListener { private class PostSubmissionListener implements FormSubmissionListener {
/** /**
* potentially skip steps of the wizard if the forum does not * potentially skip steps of the wizard if the forum does not
* allow images or file attachments * allow images or file attachments
*/ */
public void submitted(FormSectionEvent e) { public void submitted(FormSectionEvent e) {
s_log.debug("page submitted"); s_log.debug("page submitted");
PageState state = e.getPageState(); PageState state = e.getPageState();
ForumContext ctx = ForumContext.getContext(state); ForumContext ctx = ForumContext.getContext(state);
Forum forum = ctx.getForum(); Forum forum = ctx.getForum();
if (!forum.allowImageUploads()) { if (!forum.allowImageUploads()) {
hideStep(1, state); hideStep(1, state);
} }
if (!forum.allowFileAttachments()) { if (!forum.allowFileAttachments()) {
hideStep(2, state); hideStep(2, state);
} }
} }
} }
private class PostCancelListener implements FormCancelListener { private class PostCancelListener implements FormCancelListener {
public void cancel(FormSectionEvent e) throws FormProcessException { public void cancel(FormSectionEvent e) throws FormProcessException {
PageState state = e.getPageState(); PageState state = e.getPageState();
clearParameters(state); clearParameters(state);
fireCompletionEvent(state); fireCompletionEvent(state);
} }
} }
private class PostProcessListener implements FormProcessListener { private class PostProcessListener implements FormProcessListener {
public void process(FormSectionEvent e) throws FormProcessException { public void process(FormSectionEvent e) throws FormProcessException {
s_log.debug("process called on Parent Form"); s_log.debug("process called on Parent Form");
final PageState state = e.getPageState(); final PageState state = e.getPageState();
Post post = getPost(state); Post post = getPost(state);
//m_post.setSelectedObject(state, post); //m_post.setSelectedObject(state, post);
post.setStatus(state); post.setStatus(state);
m_textStep.setText(post, state); m_textStep.setText(post, state);
post.save(); post.save();
m_attachFiles.attachFiles(post, state); m_attachFiles.attachFiles(post, state);
m_attachImages.attachImages(post, state); m_attachImages.attachImages(post, state);
// sort out notifications // sort out notifications
if (getContext(state).equals(NEW_CONTEXT)) { if (getContext(state).equals(NEW_CONTEXT)) {
s_log.debug("new thread - create subscription"); s_log.debug("new thread - create subscription");
ThreadSubscription sub = post.createThreadSubscription(); ThreadSubscription sub = post.createThreadSubscription();
ForumContext ctx = ForumContext.getContext(state); ForumContext ctx = ForumContext.getContext(state);
Forum forum = ctx.getForum(); Forum forum = ctx.getForum();
if (forum.autoSubscribeThreadStarter()) { if (forum.autoSubscribeThreadStarter()) {
User threadStarter = (User) Kernel.getContext().getParty(); User threadStarter = (User) Kernel.getContext().getParty();
if (threadStarter != null if (threadStarter != null
&& !threadStarter.equals(Kernel.getPublicUser())) { && !threadStarter.equals(Kernel.getPublicUser())) {
s_log.debug("auto subscribing current user"); s_log.debug("auto subscribing current user");
sub.subscribe(threadStarter); sub.subscribe(threadStarter);
} }
} }
} }
post.sendNotifications((String) state.getValue(m_context)); post.sendNotifications((String) state.getValue(m_context));
post.sendModeratorAlerts(); post.sendModeratorAlerts();
clearParameters(state); clearParameters(state);
fireCompletionEvent(state); fireCompletionEvent(state);
} }
} }
public Post getSelectedPost(PageState state) { public Post getSelectedPost(PageState state) {
if (m_post == null) { if (m_post == null) {
return null; return null;
} else { } else {
return (Post) m_post.getSelectedObject(state); return (Post) m_post.getSelectedObject(state);
} }
} }
/** /**
* required for confirmation step. Post hasn't been created so we * required for confirmation step. Post hasn't been created so we
* cannot traverse a domain object. Instead, the form is responsible * cannot traverse a domain object. Instead, the form is responsible
* for retrieving a representation of the post as it will appear when saved * for retrieving a representation of the post as it will appear when saved
* @param state * @param state
* @param content * @param content
*/ */
protected void generatePostXML(PageState state, Element content) { protected void generatePostXML(PageState state, Element content) {
m_textStep.generatePostXML(state, content); m_textStep.generatePostXML(state, content);
m_attachFiles.generatePostXML(state, content); m_attachFiles.generatePostXML(state, content);
m_attachImages.generatePostXML(state, content); m_attachImages.generatePostXML(state, content);
} }
private void clearParameters(PageState state) { private void clearParameters(PageState state) {
state.setValue(m_context, null); state.setValue(m_context, null);
m_attachImages.clearParameters(state); m_attachImages.clearParameters(state);
m_attachFiles.clearParameters(state); m_attachFiles.clearParameters(state);
} }
} }

View File

@ -19,17 +19,17 @@
package com.arsdigita.forum.ui; package com.arsdigita.forum.ui;
import com.arsdigita.bebop.Container; import com.arsdigita.bebop.Container;
import com.arsdigita.bebop.FormProcessException; import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.Page; import com.arsdigita.bebop.Page;
import com.arsdigita.bebop.event.FormInitListener; import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.forum.Post; import com.arsdigita.forum.Post;
import com.arsdigita.forum.ForumContext; import com.arsdigita.forum.ForumContext;
import com.arsdigita.forum.Forum; import com.arsdigita.forum.Forum;
import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.Party; import com.arsdigita.kernel.Party;
import com.arsdigita.kernel.ui.ACSObjectSelectionModel; import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -37,21 +37,18 @@ import org.apache.log4j.Logger;
* Class ReplyToPostForm * Class ReplyToPostForm
* *
* @author Jon Orris (jorris@arsdigita.com) * @author Jon Orris (jorris@arsdigita.com)
* * @author rewritten by Chris Gilbert
* @version $Revision #1 $DateTime: 2004/08/17 23:26:27 $ * @version $Revision #1 $DateTime: 2004/08/17 23:26:27 $
* @version $Id: ReplyToPostForm.java 1628 2007-09-17 08:10:40Z chrisg23 $
*/ */
public class ReplyToPostForm extends PostForm { public class ReplyToPostForm extends PostForm {
public static final String versionId =
"$Id: ReplyToPostForm.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(ReplyToPostForm.class); private static final Logger s_log = Logger.getLogger(ReplyToPostForm.class);
public ReplyToPostForm(ACSObjectSelectionModel post) { public ReplyToPostForm(ACSObjectSelectionModel post) {
super("replyPostForm", post); super("replyPostForm", post);
setupComponent(); setupComponent();
} }
@ -60,32 +57,32 @@ public class ReplyToPostForm extends PostForm {
protected PostTextStep getTextStep(ACSObjectSelectionModel post) { protected PostTextStep getTextStep(ACSObjectSelectionModel post) {
return new ReplyToPostTextStep(post, this); return new ReplyToPostTextStep(post, this);
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see com.arsdigita.forum.ui.PostForm#getPost(com.arsdigita.bebop.PageState) * @see com.arsdigita.forum.ui.PostForm#getPost(com.arsdigita.bebop.PageState)
*/ */
protected Post getPost(PageState state) { protected Post getPost(PageState state) {
Post reply; Post reply;
if (getContext(state).equals(PostForm.REPLY_CONTEXT)) { if (getContext(state).equals(PostForm.REPLY_CONTEXT)) {
// post model contains the parent post, reply hasn't been created yet // post model contains the parent post, reply hasn't been created yet
Post parent = getSelectedPost(state); Post parent = getSelectedPost(state);
reply = (Post) parent.replyTo(); reply = (Post) parent.replyTo();
Party party = Kernel.getContext().getParty(); Party party = Kernel.getContext().getParty();
if (party == null) { if (party == null) {
// anonymous posts MUST be allowed if we have reached here // anonymous posts MUST be allowed if we have reached here
party = Kernel.getPublicUser(); party = Kernel.getPublicUser();
} }
reply.setFrom(party); reply.setFrom(party);
} else { } else {
// reply is the post in the post model // reply is the post in the post model
reply = getSelectedPost(state); reply = getSelectedPost(state);
} }
return reply; return reply;
} }

View File

@ -40,13 +40,11 @@ import org.apache.log4j.Logger;
/** /**
* @see com.arsdigita.forum.Post.java * @see com.arsdigita.forum.Post.java
* @see com.arsdigita.forum.EditPostForm.java * @see com.arsdigita.forum.EditPostForm.java
* @author rewritten by Chris Gilbert
* @version $Id: RootPostForm.java,v 1.3 2006/07/13 10:19:28 cgyg9330 Exp $
*/ */
class RootPostForm extends PostForm { class RootPostForm extends PostForm {
public static final String versionId =
"$Id: RootPostForm.java,v 1.3 2006/07/13 10:19:28 cgyg9330 Exp $"
+ "$Author: cgyg9330 $"
+ "$DateTime: 2004/08/17 23:26:27 $";
private static final Logger s_log = Logger.getLogger(RootPostForm.class); private static final Logger s_log = Logger.getLogger(RootPostForm.class);

View File

@ -55,10 +55,6 @@ import org.apache.log4j.Logger;
* @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $
*/ */
public class Loader extends PackageLoader { public class Loader extends PackageLoader {
// public final static String versionId =
// "$Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $" +
// "$Author: sskracic $" +
// "$DateTime: 2004/03/03 12:26:48 $";
private static final Logger s_log = Logger.getLogger(Loader.class); private static final Logger s_log = Logger.getLogger(Loader.class);

View File

@ -38,11 +38,10 @@ import org.apache.log4j.Logger;
* &lt;define:component name="navRootIndex" classname="com.arsdigita.navigation.ui.NavigationRootIndexItem" /&gt; * &lt;define:component name="navRootIndex" classname="com.arsdigita.navigation.ui.NavigationRootIndexItem" /&gt;
* *
* @version $Revision: $ $Date: $ * @version $Revision: $ $Date: $
* @version $Id: $
*/ */
public class NavigationRootIndexItem extends AbstractComponent { public class NavigationRootIndexItem extends AbstractComponent {
public static final String versionId = "$Id: $";
private static Logger log = Logger.getLogger(NavigationRootIndexItem.class);; private static Logger log = Logger.getLogger(NavigationRootIndexItem.class);;
private static final String TAG_PARENT = "navrootindex"; private static final String TAG_PARENT = "navrootindex";

View File

@ -39,8 +39,6 @@ import com.arsdigita.london.navigation.Navigation;
*/ */
public class CategoryTree extends Tree { public class CategoryTree extends Tree {
public static final String versionId = "$Id: CategoryTree.java 1695 2008-03-18 11:47:59Z terry $ by $Author: terry $, $DateTime: 2004/01/21 09:04:39 $";
/** /**
* Construct a new CategoryTree * Construct a new CategoryTree
*/ */

View File

@ -22,11 +22,11 @@ import com.arsdigita.cms.search.VersionFilterType;
import com.arsdigita.cms.search.LuceneQueryEngine; import com.arsdigita.cms.search.LuceneQueryEngine;
import com.arsdigita.db.DbHelper; import com.arsdigita.db.DbHelper;
import com.arsdigita.persistence.pdl.ManifestSource; import com.arsdigita.persistence.pdl.ManifestSource;
import com.arsdigita.runtime.PDLInitializer;
import com.arsdigita.runtime.CompoundInitializer;
import com.arsdigita.persistence.pdl.NameFilter; import com.arsdigita.persistence.pdl.NameFilter;
import com.arsdigita.runtime.RuntimeConfig; import com.arsdigita.runtime.CompoundInitializer;
import com.arsdigita.runtime.DomainInitEvent; import com.arsdigita.runtime.DomainInitEvent;
import com.arsdigita.runtime.PDLInitializer;
import com.arsdigita.runtime.RuntimeConfig;
import com.arsdigita.search.IndexerType; import com.arsdigita.search.IndexerType;
import com.arsdigita.search.FilterType; import com.arsdigita.search.FilterType;
import com.arsdigita.search.QueryEngineRegistry; import com.arsdigita.search.QueryEngineRegistry;
@ -41,10 +41,6 @@ import com.arsdigita.london.search.HostFilterType;
* @version $Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $ * @version $Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $
*/ */
public class Initializer extends CompoundInitializer { public class Initializer extends CompoundInitializer {
public final static String versionId =
"$Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $" +
"$Author: sskracic $" +
"$DateTime: $";
public Initializer() { public Initializer() {
final String url = RuntimeConfig.getConfig().getJDBCURL(); final String url = RuntimeConfig.getConfig().getJDBCURL();

View File

@ -31,16 +31,12 @@ import com.arsdigita.web.ApplicationType;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* Loader. * Loader (initial setup executed once at installation time).
* *
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;
* @version $Id: Loader.java 758 2005-09-02 14:26:56Z sskracic $ * @version $Id: Loader.java 758 2005-09-02 14:26:56Z sskracic $
*/ */
public class Loader extends PackageLoader { public class Loader extends PackageLoader {
public final static String versionId =
"$Id: Loader.java 758 2005-09-02 14:26:56Z sskracic $" +
"$Author: sskracic $" +
"$DateTime: 2003/10/28 14:25:13 $";
private static final Logger s_log = Logger.getLogger(Loader.class); private static final Logger s_log = Logger.getLogger(Loader.class);

View File

@ -37,10 +37,6 @@ import org.apache.log4j.Logger;
* @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $
*/ */
public class Loader extends PackageLoader { public class Loader extends PackageLoader {
public final static String versionId =
"$Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $" +
"$Author: sskracic $" +
"$DateTime: 2004/01/23 10:22:44 $";
private static final Logger s_log = Logger.getLogger(Loader.class); private static final Logger s_log = Logger.getLogger(Loader.class);

View File

@ -28,7 +28,6 @@ import java.math.BigDecimal;
* @version $Id: ShortcutCollection.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: ShortcutCollection.java 287 2005-02-22 00:29:02Z sskracic $
*/ */
public class ShortcutCollection extends DomainCollection { public class ShortcutCollection extends DomainCollection {
public static final String versionId = "$Id: ShortcutCollection.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2003/10/22 07:27:00 $";
protected ShortcutCollection(DataCollection dataCollection) { protected ShortcutCollection(DataCollection dataCollection) {
super(dataCollection); super(dataCollection);

View File

@ -36,11 +36,6 @@ import org.apache.log4j.Logger;
*/ */
public final class ShortcutsConfig extends AbstractConfig { public final class ShortcutsConfig extends AbstractConfig {
public static final String versionId =
"$Id: ShortcutsConfig.java 796 2005-09-12 15:06:53Z fabrice $" +
"$Author: fabrice $" +
"$DateTime: 2003/10/28 14:25:41 $";
private static final Logger s_log = Logger.getLogger(ShortcutsConfig.class); private static final Logger s_log = Logger.getLogger(ShortcutsConfig.class);
public ShortcutsConfig() { public ShortcutsConfig() {

View File

@ -19,7 +19,7 @@
package com.arsdigita.london.theme.ui; package com.arsdigita.london.theme.ui;
import com.arsdigita.london.theme.Theme; import com.arsdigita.london.theme.Theme;
import com.arsdigita.london.theme.ThemeApplication; // import com.arsdigita.london.theme.ThemeApplication;
import com.arsdigita.bebop.Form; import com.arsdigita.bebop.Form;
import com.arsdigita.bebop.SaveCancelSection; import com.arsdigita.bebop.SaveCancelSection;
import com.arsdigita.bebop.form.TextField; import com.arsdigita.bebop.form.TextField;

View File

@ -32,14 +32,10 @@ import org.apache.log4j.Logger;
/* Class to store configuration parameters for Webpage /* Class to store configuration parameters for Webpage
* *
* @author Crag Wolfe * @author Crag Wolfe
* @version $Id: WebpageConfig.java,v 1.2 2004/03/05 04:32:56 tzumainn Exp $
*/ */
public final class WebpageConfig extends AbstractConfig { public final class WebpageConfig extends AbstractConfig {
public static final String versionId =
"$Id: WebpageConfig.java,v 1.2 2004/03/05 04:32:56 tzumainn Exp $" +
"$Author: tzumainn $" +
"$DateTime: 2004/01/14 15:24:15 $";
private static final Logger s_log = Logger.getLogger(WebpageConfig.class); private static final Logger s_log = Logger.getLogger(WebpageConfig.class);
private StringParameter m_contentSection = null; private StringParameter m_contentSection = null;