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 $
*/
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);

View File

@ -30,10 +30,6 @@ import org.apache.log4j.Logger;
* @version $Id: AddressLoader.java 1597 2007-07-10 16:27:26Z p_boy $
*/
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);

View File

@ -25,12 +25,11 @@ import org.apache.log4j.Logger;
*
* @author Rafael H. Schloming <rhs@mit.edu>
* @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 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);
public EventInitializer() {

View File

@ -25,12 +25,11 @@ import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
*
* @author Rafael H. Schloming <rhs@mit.edu>
* @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 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 = {
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Event.xml"
};

View File

@ -1,9 +1,5 @@
# EventResources_de.properties
# 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
#
# 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.
*
* @author Kevin Scaldeferri (kevin@arsdigita.com)
*
* @version $Revision: 1.7 $ $Author: chrisg23 $ $DateTime: 2004/08/17 23:26:27 $
* @author chrisg23
* @version $Revision: $
* @version $Id: Forum.java 1628 2007-09-17 08:10:40Z chrisg23 $
*/
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();
static {

View File

@ -44,10 +44,6 @@ import org.apache.log4j.Logger;
* @version $Id: ForumConfig.java 1628 2007-09-17 08:10:40Z chrisg23 $
*/
public class ForumConfig extends AbstractConfig {
// public final static String versionId =
// "$Id: ForumConfig.java 1628 2007-09-17 08:10:40Z chrisg23 $" +
// "$Author: chrisg23 $" +
// "$DateTime: 2004/08/17 23:26:27 $";
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;
* @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 $
*/
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 $" +
"$DateTime: 2004/08/17 23:26:27 $";
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 $Id: RemoveUnattachedAssetsTask.java,v 1.1 2006/07/13 10:19:28 cgyg9330 Exp $
**/
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);
public void run() {
RemoveUnattachedAssetsScheduler.run();

View File

@ -18,17 +18,17 @@
*/
package com.arsdigita.forum;
import org.apache.log4j.Logger;
import org.apache.log4j.Logger;
import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.mail.Mail;
import com.arsdigita.mail.Mail;
import com.arsdigita.messaging.ThreadedMessage;
import com.arsdigita.notification.BaseSubscription;
import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.OID;
import com.arsdigita.util.Assert;
import com.arsdigita.web.ParameterMap;
import com.arsdigita.web.URL;
import com.arsdigita.web.ParameterMap;
import com.arsdigita.web.URL;
/**
* 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.
*
* @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 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);
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) {
super(objectType);
}
@ -84,16 +82,16 @@ public abstract class Subscription extends BaseSubscription {
author = "Unknown";
}
StringBuffer sb = new StringBuffer();
if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) {
sb.append("<font size='medium' face='Verdana, Arial, Helvetica, sans-serif'>");
sb.append("Forum : ");
sb.append(post.getForum().getDisplayName()).append("\n<br>");
sb.append("Subject : ");
sb.append(post.getSubject()).append("\n<br>");
sb.append("Posted by: ");
sb.append(author).append("\n<br><br>");
} else {
if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) {
sb.append("<font size='medium' face='Verdana, Arial, Helvetica, sans-serif'>");
sb.append("Forum : ");
sb.append(post.getForum().getDisplayName()).append("\n<br>");
sb.append("Subject : ");
sb.append(post.getSubject()).append("\n<br>");
sb.append("Posted by: ");
sb.append(author).append("\n<br><br>");
} else {
sb.append("Forum : ");
sb.append(post.getForum().getDisplayName()).append("\n");
sb.append("Subject : ");
@ -101,9 +99,9 @@ public abstract class Subscription extends BaseSubscription {
sb.append("Posted by: ");
sb.append(author).append("\n\n");
}
}
return sb.toString();
}
@ -112,12 +110,12 @@ public abstract class Subscription extends BaseSubscription {
* implementation returns a separator and a generic messages.
*/
public String getSignature(ThreadedMessage post) {
if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) {
return HTML_SEPARATOR + ALERT_BLURB + "</font>";
} else {
if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) {
return HTML_SEPARATOR + ALERT_BLURB + "</font>";
} else {
return SEPARATOR + ALERT_BLURB;
}
}
}
/**
* @return an appropriate message to direct people back to the
@ -133,13 +131,13 @@ public abstract class Subscription extends BaseSubscription {
StringBuffer sb = new StringBuffer();
sb.append("To reply to this message, go to:\n");
if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) {
sb.append("<br><a href='" + url.getURL() + "'>" + url.getURL() + "</a>");
} else {
if (Mail.getConfig().sendHTMLMessageAsHTMLEmail()) {
sb.append("<br><a href='" + url.getURL() + "'>" + url.getURL() + "</a>");
} else {
sb.append(url.getURL());
}
}
return sb.toString();
}
}

View File

@ -42,14 +42,14 @@ import com.arsdigita.portal.Portlet;
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
*
* portlet with no attributes that displays links to all forums that user has read access to
*
* @version $Id: MyForumsPortlet.java,v 1.4 2006/07/13 10:19:28 cgyg9330 Exp $
*/
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 =
"com.arsdigita.forum.MyForumsPortlet";

View File

@ -35,9 +35,12 @@ import com.arsdigita.web.ParameterMap;
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 =
"com.arsdigita.forum.RecentPostingsPortlet";
@ -93,7 +96,7 @@ class RecentPostingsPortletRenderer
Forum forum = (Forum)m_portlet.getParentApplication();
content.addAttribute("noticeboard", (new Boolean(forum.isNoticeboard())).toString());
content.addAttribute("forumName", forum.getTitle());
content.addAttribute("forumName", forum.getTitle());
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.FormData;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.Label;
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.FormProcessListener;
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.TextArea;
import com.arsdigita.bebop.form.TextField;
@ -48,13 +48,11 @@ import org.apache.log4j.Logger;
* parent category. temporary hack for testing purposes
*
* @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 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
(CategoryAddForm.class);
@ -81,24 +79,24 @@ public class CategoryAddForm extends Form {
m_description.setWrap(TextArea.SOFT);
add(m_description);
// Cancel button added cg
// Would have used a saveCancel section but this would make existing
// stylesheets for legacy forums miss the buttons
Submit submit = new Submit(Text.gz("forum.ui.topic.save"));
final Submit cancel = new Submit(Text.gz("forum.ui.cancel"));
// Cancel button added cg
// Would have used a saveCancel section but this would make existing
// stylesheets for legacy forums miss the buttons
Submit submit = new Submit(Text.gz("forum.ui.topic.save"));
final Submit cancel = new Submit(Text.gz("forum.ui.cancel"));
add(submit);
add(cancel);
addSubmissionListener(new FormSubmissionListener(){
public void submitted(FormSectionEvent e) throws FormProcessException {
PageState state = e.getPageState();
if (cancel.isSelected(state)){
fireCompletionEvent(state);
throw new FormProcessException("cancelled");
}
}
});
add(cancel);
addSubmissionListener(new FormSubmissionListener(){
public void submitted(FormSectionEvent e) throws FormProcessException {
PageState state = e.getPageState();
if (cancel.isSelected(state)){
fireCompletionEvent(state);
throw new FormProcessException("cancelled");
}
}
});
/*
* Listener to process form data. Just adds the categories, then

View File

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

View File

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

View File

@ -55,10 +55,6 @@ import org.apache.log4j.Logger;
* @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $
*/
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);

View File

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

View File

@ -22,11 +22,11 @@ import com.arsdigita.cms.search.VersionFilterType;
import com.arsdigita.cms.search.LuceneQueryEngine;
import com.arsdigita.db.DbHelper;
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.runtime.RuntimeConfig;
import com.arsdigita.runtime.CompoundInitializer;
import com.arsdigita.runtime.DomainInitEvent;
import com.arsdigita.runtime.PDLInitializer;
import com.arsdigita.runtime.RuntimeConfig;
import com.arsdigita.search.IndexerType;
import com.arsdigita.search.FilterType;
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 $
*/
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() {
final String url = RuntimeConfig.getConfig().getJDBCURL();

View File

@ -31,16 +31,12 @@ import com.arsdigita.web.ApplicationType;
import org.apache.log4j.Logger;
/**
* Loader.
* Loader (initial setup executed once at installation time).
*
* @author Justin Ross &lt;jross@redhat.com&gt;
* @version $Id: Loader.java 758 2005-09-02 14:26:56Z sskracic $
*/
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);

View File

@ -37,10 +37,6 @@ import org.apache.log4j.Logger;
* @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $
*/
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);

View File

@ -28,7 +28,6 @@ import java.math.BigDecimal;
* @version $Id: ShortcutCollection.java 287 2005-02-22 00:29:02Z sskracic $
*/
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) {
super(dataCollection);

View File

@ -36,11 +36,6 @@ import org.apache.log4j.Logger;
*/
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);
public ShortcutsConfig() {

View File

@ -19,7 +19,7 @@
package com.arsdigita.london.theme.ui;
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.SaveCancelSection;
import com.arsdigita.bebop.form.TextField;

View File

@ -32,14 +32,10 @@ import org.apache.log4j.Logger;
/* Class to store configuration parameters for Webpage
*
* @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 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 StringParameter m_contentSection = null;