[jboss-svn-commits] JBL Code SVN: r7094 - in labs/jbossforums/branches/forums26: forums/src/main/org/jboss/portlet/forums forums/src/main/org/jboss/portlet/forums/command forums/src/main/org/jboss/portlet/forums/command/filter forums/src/main/org/jboss/portlet/forums/command/result forums/src/main/org/jboss/portlet/forums/commands forums/src/main/org/jboss/portlet/forums/commands/admin forums/src/main/org/jboss/portlet/forums/commands/moderation forums/src/main/org/jboss/portlet/forums/commands/post forums/src/main/org/jboss/portlet/forums/impl forums/src/main/org/jboss/portlet/forums/interceptors forums/src/main/org/jboss/portlet/forums/ui forums/src/resources/portal-forums-sar/META-INF forums/src/resources/portal-forums-war/views/profile forums/src/resources/portal-forums-war/views/topics thirdparty/jbportal/lib
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Oct 24 19:51:34 EDT 2006
Author: unibrew
Date: 2006-10-24 19:50:11 -0400 (Tue, 24 Oct 2006)
New Revision: 7094
Added:
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/AbstractCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/ActionCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/AttributeType.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/Command.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CommandConstants.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CommandException.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CompositeCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/Configurator.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/EmptyConfigurator.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/NoSuchAttachmentException.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/ReflectedConfigurator.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/UnexpectedCommandException.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/AbstractCommandFilter.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/CommandFilter.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/CompositeFilter.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/ExecuteFilter.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/CompositeResult.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/ImmutableResult.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/Result.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/ResultType.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/SimpleResult.java
Modified:
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ForumsModule.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ForumsPortlet.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/AbstractCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/BBAttributeType.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CommandConstants.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CompositeCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CompositeResult.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/SimpleResultType.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/ValidationException.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/CreateCategoryCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/CreateForumCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteCategoryCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteForumCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteMoveCategoryCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteMoveForumCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/OrderCategoryCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/OrderForumCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/UpdateCategoryCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/UpdateForumCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/DeleteTopicCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/LockTopicCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/MoveTopicCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/SplitTopicCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/DeletePollCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/DeletePostCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/EditPostCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/ForumCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/NewTopicCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/ReplyCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/RepostCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/VoteTopicCommand.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/FloodControlInterceptor.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/IndexInterceptor.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/NotificationInterceptor.java
labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ui/PortalUtil.java
labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-sar/META-INF/jboss-service.xml
labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-war/views/profile/viewprofile_body.xhtml
labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml
labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/jboss-portlet-api-lib.jar
labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-api-lib.jar
labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-common-lib.jar
labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-core-lib.jar
labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-format-lib.jar
labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-identity-lib.jar
labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-jems-lib.jar
labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-portlet-lib.jar
labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-server-lib.jar
labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portlet-api-lib.jar
Log:
[JBFORUMS-136] Refactoring and a few small issues sollutions in order to make Forums run on JBoss Portal 2.6DR.
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ForumsModule.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ForumsModule.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ForumsModule.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -13,10 +13,10 @@
import org.jboss.portal.identity.User;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portal.jems.hibernate.HibernateProvider;
-import org.jboss.portal.common.command.result.Result;
-import org.jboss.portal.common.command.CommandException;
+import org.jboss.portlet.forums.command.result.Result;
+import org.jboss.portlet.forums.command.CommandException;
import org.jboss.portlet.forums.model.*;
-import org.jboss.portlet.command.ActionCommand;
+import org.jboss.portlet.forums.command.ActionCommand;
import java.util.Date;
import java.util.List;
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ForumsPortlet.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ForumsPortlet.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ForumsPortlet.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -11,12 +11,12 @@
package org.jboss.portlet.forums;
-import org.jboss.portal.common.command.CommandException;
-import org.jboss.portal.common.command.result.Result;
-import org.jboss.portal.common.command.result.ResultType;
-import org.jboss.portal.common.context.DelegateContext;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.result.Result;
+import org.jboss.portlet.forums.command.result.ResultType;
+import org.jboss.portal.format.template.DelegateContext;
import org.jboss.portal.common.util.ProxyInfo;
-import org.jboss.portal.identity.PropertyMap;
+import org.jboss.portal.identity.ProfileMap;
import org.jboss.portal.identity.User;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portal.core.servlet.jsp.PortalJsp;
@@ -1210,7 +1210,7 @@
try
{
PortletPreferences pp = request.getPreferences();
- PropertyMap upm = request.getUser().getProperties();
+ ProfileMap upm = request.getUser().getProfile();
if (!pp.isReadOnly("notifyreply"))
{
pp.setValue("notifyreply", request.getParameter("notifyreply"));
@@ -1910,7 +1910,7 @@
if (ctx.p_preview)
{
- PropertyMap upm = request.getUser().getProperties();
+ ProfileMap upm = request.getUser().getProfile();
String sign = (String)upm.get(ForumsConstants.USER_SIGNATURE_PROPERTY);
String addsign = (String)upm.get(ForumsConstants.USER_SIGNATURE_ADD_PROPERTY);
String preview_message = "";
@@ -3778,7 +3778,7 @@
}
PortletPreferences pp = req.getPreferences();
- PropertyMap upm = req.getUser().getProperties();
+ ProfileMap upm = req.getUser().getProfile();
if (pp.getValue("notifyreply", "0").equals("1"))
{
root.put("NOTIFY_REPLY_YES", "CHECKED");
@@ -3985,27 +3985,27 @@
root.put("USERNAME", user.getGivenName());
//root.put("EMAIL_IMG", user.getFakeEmail());
- //String homepage = (String)(user.getProperties().get(CoreConstants.INFO_USER_HOMEPAGE));
+ //String homepage = (String)(user.getProfile().get(CoreConstants.INFO_USER_HOMEPAGE));
//root.put("WWW", "<a href=\"" + homepage + "\">"+ homepage + "</a>");
- root.put("LOCATION", (String)(user.getProperties().get(User.INFO_USER_LOCATION)));
- root.put("OCCUPATION", (String)(user.getProperties().get(User.INFO_USER_OCCUPATION)));
- root.put("INTERESTS", (String)(user.getProperties().get(User.INFO_USER_INTERESTS)));
+ root.put("LOCATION", (String)(user.getProfile().get(User.INFO_USER_LOCATION)));
+ root.put("OCCUPATION", (String)(user.getProfile().get(User.INFO_USER_OCCUPATION)));
+ root.put("INTERESTS", (String)(user.getProfile().get(User.INFO_USER_INTERESTS)));
- //root.put("ICQ_IMG", (String)(user.getProperties().get(CoreConstants.INFO_USER_IM_ICQ)));
- //root.put("AIM_IMG", (String)(user.getProperties().get(CoreConstants.INFO_USER_IM_AIM)));
- //root.put("YIM_IMG", (String)(user.getProperties().get(CoreConstants.INFO_USER_IM_YIM)));
- root.put("MSN_IMG", (String)(user.getProperties().get(User.INFO_USER_IM_MSNM)));
- root.put("SKYPE_IMG", (String)(user.getProperties().get(User.INFO_USER_IM_SKYPE)));
+ //root.put("ICQ_IMG", (String)(user.getProfile().get(CoreConstants.INFO_USER_IM_ICQ)));
+ //root.put("AIM_IMG", (String)(user.getProfile().get(CoreConstants.INFO_USER_IM_AIM)));
+ //root.put("YIM_IMG", (String)(user.getProfile().get(CoreConstants.INFO_USER_IM_YIM)));
+ root.put("MSN_IMG", (String)(user.getProfile().get(User.INFO_USER_IM_MSNM)));
+ root.put("SKYPE_IMG", (String)(user.getProfile().get(User.INFO_USER_IM_SKYPE)));
root.put("JOINED", "" + user.getRegistrationDate());
root.put("POSTS", "" + poster.getPostCount());
String fakeEmail = user.getFakeEmail();
- String homepage = (String)(user.getProperties().get(User.INFO_USER_HOMEPAGE));
- String icqAddr = (String)(user.getProperties().get(User.INFO_USER_IM_ICQ));
- String aimAddr = (String)(user.getProperties().get(User.INFO_USER_IM_AIM));
- String yimAddr = (String)(user.getProperties().get(User.INFO_USER_IM_YIM));
+ String homepage = (String)(user.getProfile().get(User.INFO_USER_HOMEPAGE));
+ String icqAddr = (String)(user.getProfile().get(User.INFO_USER_IM_ICQ));
+ String aimAddr = (String)(user.getProfile().get(User.INFO_USER_IM_AIM));
+ String yimAddr = (String)(user.getProfile().get(User.INFO_USER_IM_YIM));
if (fakeEmail != null && fakeEmail.length() > 0)
@@ -4204,7 +4204,7 @@
if (req.getParameters().getParameterExists("preview"))
{
- PropertyMap upm = req.getUser().getProperties();
+ ProfileMap upm = req.getUser().getProfile();
String sign = (String)upm.get(ForumsConstants.USER_SIGNATURE_PROPERTY);
String addsign = (String)upm.get(ForumsConstants.USER_SIGNATURE_ADD_PROPERTY);
@@ -4456,7 +4456,7 @@
postRow.put("POST_DATE", getSDF(req).format(post.getCreateDate()));
postRow.put("POST_SUBJECT", post.getMessage().getSubject());
String message = post.getMessage().getText();
- PropertyMap upm = post.getPoster().getUser().getProperties();
+ ProfileMap upm = post.getPoster().getUser().getProfile();
String sign = (String)upm.get(ForumsConstants.USER_SIGNATURE_PROPERTY);
String addsign = (String)upm.get(ForumsConstants.USER_SIGNATURE_ADD_PROPERTY);
if ((addsign != null) && (sign != null) && addsign.equals("1"))
@@ -4465,7 +4465,7 @@
}
postRow.put("MESSAGE", formatMessage(req, message, true, true));
postRow.put("POST_ROW_INDEX", "" + rowindex);
- postRow.put("POST_ID", post.getId());
+ postRow.put("POST_ID", ""+post.getId());
postRow.put("IMG_MINIPOST", theme.resourceIconMinipostURL);
//TODO:this spacer link is corrupted
postRow.put("IMG_SPACER", theme.resourceIconSpacerURL);
@@ -5396,7 +5396,7 @@
String postDate = sdf.format(post.getCreateDate());
String posterPosts = req.getRemoteUser() != null ? (bundle.getString("Posts")
+ ":" + poster.getUserName()) : "";
- String location = (String)poster.getProperties().get("LOCATION");
+ String location = (String)poster.getProfile().get("LOCATION");
String posterFrom = (req.getRemoteUser() != null && (location != null)) ? (bundle
.getString("Location")
+ ":" + location) : "";
@@ -5498,12 +5498,12 @@
{
//user.getPreferenceStore().
String fakeEmail = poster.getFakeEmail();
- String homepage = (String)(poster.getProperties().get(User.INFO_USER_HOMEPAGE));
- String icqAddr = (String)(poster.getProperties().get(User.INFO_USER_IM_ICQ));
- String aimAddr = (String)(poster.getProperties().get(User.INFO_USER_IM_AIM));
- String msnmAddr = (String)(poster.getProperties().get(User.INFO_USER_IM_MSNM));
- String yimAddr = (String)(poster.getProperties().get(User.INFO_USER_IM_YIM));
- String skypeAddr = (String)(poster.getProperties().get(User.INFO_USER_IM_SKYPE));
+ String homepage = (String)(poster.getProfile().get(User.INFO_USER_HOMEPAGE));
+ String icqAddr = (String)(poster.getProfile().get(User.INFO_USER_IM_ICQ));
+ String aimAddr = (String)(poster.getProfile().get(User.INFO_USER_IM_AIM));
+ String msnmAddr = (String)(poster.getProfile().get(User.INFO_USER_IM_MSNM));
+ String yimAddr = (String)(poster.getProfile().get(User.INFO_USER_IM_YIM));
+ String skypeAddr = (String)(poster.getProfile().get(User.INFO_USER_IM_SKYPE));
profileImgLnk = ForumsTools.createImageLink(userProfileURL.toString(), theme.resourceIconProfileURL, "");
if (fakeEmail != null && fakeEmail.length() > 0)
@@ -5652,7 +5652,7 @@
text = new String(message.getText());
}
- PropertyMap upm = post.getPoster().getUser().getProperties();
+ ProfileMap upm = post.getPoster().getUser().getProfile();
String sign = (String)upm.get(ForumsConstants.USER_SIGNATURE_PROPERTY);
String addsign = (String)upm.get(ForumsConstants.USER_SIGNATURE_ADD_PROPERTY);
if ((addsign != null) && (sign != null) && addsign.equals("1"))
@@ -6566,14 +6566,13 @@
PortletURL viewForumURL = resp.createRenderURL();
viewForumURL.setParameter("op", OP_SHOWFORUM);
viewForumURL.setParameter("f", forumIdAsString);
- root
- .next("forum_watch_row")
+ root.next("forum_watch_row")
.put("ROW_CLASS",
theme
.getProperty(((i.getIndex() & 1) == 0) ? "td_class1"
: "td_class2")).put("U_FORUM_LINK",
viewForumURL.toString()).put("FORUMWATCH_ID",
- watch.getId()).put("FORUM_ID", forumIdAsString)
+ ""+watch.getId()).put("FORUM_ID", forumIdAsString)
.put("S_FORUM_TITLE", forum.getName()).put("LINKED",
linked ? "checked=\"checked\"" : "").put("EMBEDED", linked ? "" : "checked=\"checked\"");
}
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/AbstractCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/AbstractCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/AbstractCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+import org.apache.log4j.Logger;
+
+/** @author <a href="theute at users.sourceforge.net">Thomas Heute</a> $Revision: 5448 $ */
+public abstract class AbstractCommand
+ implements Command, CommandConstants
+{
+
+ protected Logger log = Logger.getLogger(getClass());
+
+ private final ReflectedConfigurator configurator = new ReflectedConfigurator(this);
+
+ public Configurator getConfigurator()
+ {
+ return configurator;
+ }
+
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/AbstractCommand.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/ActionCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/ActionCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/ActionCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+import org.jboss.portlet.JBossActionRequest;
+import org.jboss.portlet.JBossActionResponse;
+
+/**
+ * A command executed during the action request of a portlet.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public abstract class ActionCommand implements Command
+{
+
+ private final JBossActionRequest request;
+ private final JBossActionResponse response;
+
+ protected ActionCommand(JBossActionRequest request, JBossActionResponse response)
+ {
+ if (request == null)
+ {
+ throw new IllegalArgumentException("Request cannot be null");
+ }
+ if (response == null)
+ {
+ throw new IllegalArgumentException("Response cannot be null");
+ }
+ this.request = request;
+ this.response = response;
+ }
+
+ public JBossActionRequest getRequest()
+ {
+ return request;
+ }
+
+ public JBossActionResponse getResponse()
+ {
+ return response;
+ }
+
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/ActionCommand.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/AttributeType.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/AttributeType.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/AttributeType.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+/**
+ * A type safe key for the command configuration.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class AttributeType
+{
+
+ private final String name;
+
+ protected AttributeType(String name)
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException("Name cannot be null");
+ }
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/AttributeType.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/Command.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/Command.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/Command.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+import org.jboss.portlet.forums.command.result.Result;
+
+/**
+ * A business command.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public interface Command
+{
+ /** Execute the real business job. */
+ Result execute() throws CommandException;
+
+ /** Returns the command configurator. */
+ Configurator getConfigurator();
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/Command.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CommandConstants.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CommandConstants.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CommandConstants.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,32 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+import org.jboss.portlet.forums.command.result.ImmutableResult;
+import org.jboss.portlet.forums.command.result.ResultType;
+
+/** @author <a href="theute at users.sourceforge.net">Thomas Heute</a> $Revision: 5448 $ */
+public interface CommandConstants
+{
+ ResultType TYPE_COMPOSITE = new ImmutableResult("TYPE_COMPOSITE");
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CommandConstants.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CommandException.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CommandException.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CommandException.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class CommandException extends Exception
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -3088751508628488782L;
+
+ public CommandException()
+ {
+ }
+
+ public CommandException(String message)
+ {
+ super(message);
+ }
+
+ public CommandException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public CommandException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CommandException.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CompositeCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CompositeCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CompositeCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+import org.jboss.portlet.forums.command.result.Result;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class CompositeCommand
+ implements Command
+{
+
+ private final LinkedList list = new LinkedList();
+
+ public void add(Command cmd)
+ {
+ list.add(cmd);
+ }
+
+ public Configurator getConfigurator()
+ {
+ return EmptyConfigurator.EMPTY_CONFIGURATOR;
+ }
+
+ public Iterator iterator()
+ {
+ return list.iterator();
+ }
+
+ public Result execute()
+ {
+ throw new RuntimeException("Cannot be executed directly");
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/CompositeCommand.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/Configurator.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/Configurator.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/Configurator.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public interface Configurator
+{
+ boolean contains(AttributeType attribute);
+
+ void setObject(AttributeType attribute, Object value) throws NoSuchAttachmentException;
+
+ void setInt(AttributeType attribute, int value) throws NoSuchAttachmentException;
+
+ void setBoolean(AttributeType attribute, boolean value) throws NoSuchAttachmentException;
+
+ void setFloat(AttributeType attribute, float value) throws NoSuchAttachmentException;
+
+ void setLong(AttributeType attribute, long value) throws NoSuchAttachmentException;
+
+ void setDouble(AttributeType attribute, double value) throws NoSuchAttachmentException;
+
+ void setChar(AttributeType attribute, char value) throws NoSuchAttachmentException;
+
+ void setShort(AttributeType attribute, short value) throws NoSuchAttachmentException;
+
+ void setByte(AttributeType attribute, byte value) throws NoSuchAttachmentException;
+
+ Object getObject(AttributeType attribute) throws NoSuchAttachmentException;
+
+ int getInt(AttributeType attribute) throws NoSuchAttachmentException;
+
+ boolean getBoolean(AttributeType attribute) throws NoSuchAttachmentException;
+
+ float getFloat(AttributeType attribute) throws NoSuchAttachmentException;
+
+ long getLong(AttributeType attribute) throws NoSuchAttachmentException;
+
+ double getDouble(AttributeType attribute) throws NoSuchAttachmentException;
+
+ char getChar(AttributeType attribute) throws NoSuchAttachmentException;
+
+ short getShort(AttributeType attribute) throws NoSuchAttachmentException;
+
+ byte getByte(AttributeType attribute) throws NoSuchAttachmentException;
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/Configurator.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/EmptyConfigurator.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/EmptyConfigurator.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/EmptyConfigurator.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,132 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class EmptyConfigurator implements Configurator
+{
+
+ public static final EmptyConfigurator EMPTY_CONFIGURATOR = new EmptyConfigurator();
+
+ private EmptyConfigurator()
+ {
+ }
+
+ public boolean contains(AttributeType attribute)
+ {
+ return false;
+ }
+
+ public void setObject(AttributeType attribute, Object value) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public void setInt(AttributeType attribute, int value) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public void setBoolean(AttributeType attribute, boolean value) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public void setFloat(AttributeType attribute, float value) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public void setLong(AttributeType attribute, long value) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public void setDouble(AttributeType attribute, double value) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public void setChar(AttributeType attribute, char value) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public void setShort(AttributeType attribute, short value) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public void setByte(AttributeType attribute, byte value) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public Object getObject(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public int getInt(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public boolean getBoolean(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public float getFloat(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public long getLong(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public double getDouble(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public char getChar(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public short getShort(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+
+ public byte getByte(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ throw new NoSuchAttachmentException();
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/EmptyConfigurator.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/NoSuchAttachmentException.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/NoSuchAttachmentException.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/NoSuchAttachmentException.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+/**
+ * Signal that an attachment cannot be found.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class NoSuchAttachmentException extends RuntimeException
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -8928758813193855439L;
+
+ public NoSuchAttachmentException()
+ {
+ }
+
+ public NoSuchAttachmentException(String message)
+ {
+ super(message);
+ }
+
+ public NoSuchAttachmentException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public NoSuchAttachmentException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/NoSuchAttachmentException.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/ReflectedConfigurator.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/ReflectedConfigurator.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/ReflectedConfigurator.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,356 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+import org.apache.log4j.Logger;
+
+import java.lang.reflect.Field;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class ReflectedConfigurator implements Configurator
+{
+
+ private static final Logger log = Logger.getLogger(ReflectedConfigurator.class);
+ private final Object target;
+
+ public ReflectedConfigurator(Object target)
+ {
+ if (target == null)
+ {
+ throw new IllegalArgumentException("Target cannot be null");
+ }
+ this.target = target;
+ }
+
+ private Field getTargetField(String name) throws NoSuchFieldException
+ {
+ return getClass().getField(name);
+ }
+
+ public boolean contains(AttributeType attribute)
+ {
+ try
+ {
+ getClass().getField(attribute.getName());
+ return true;
+ }
+ catch (NoSuchFieldException ignore)
+ {
+ }
+ catch (SecurityException ignore)
+ {
+ }
+ return false;
+ }
+
+ public void setObject(AttributeType attribute, Object value) throws NoSuchAttachmentException
+ {
+ try
+ {
+ getTargetField(attribute.getName()).set(target, value);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public void setInt(AttributeType attribute, int value) throws NoSuchAttachmentException
+ {
+ try
+ {
+ getTargetField(attribute.getName()).setInt(target, value);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public void setBoolean(AttributeType attribute, boolean value) throws NoSuchAttachmentException
+ {
+ try
+ {
+ getTargetField(attribute.getName()).setBoolean(target, value);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public void setFloat(AttributeType attribute, float value) throws NoSuchAttachmentException
+ {
+ try
+ {
+ getTargetField(attribute.getName()).setFloat(target, value);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public void setLong(AttributeType attribute, long value) throws NoSuchAttachmentException
+ {
+ try
+ {
+ getTargetField(attribute.getName()).setLong(target, value);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public void setDouble(AttributeType attribute, double value) throws NoSuchAttachmentException
+ {
+ try
+ {
+ getTargetField(attribute.getName()).setDouble(target, value);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public void setChar(AttributeType attribute, char value) throws NoSuchAttachmentException
+ {
+ try
+ {
+ getTargetField(attribute.getName()).setChar(target, value);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public void setShort(AttributeType attribute, short value) throws NoSuchAttachmentException
+ {
+ try
+ {
+ getTargetField(attribute.getName()).setShort(target, value);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public void setByte(AttributeType attribute, byte value) throws NoSuchAttachmentException
+ {
+ try
+ {
+ getTargetField(attribute.getName()).setByte(target, value);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public final Object getObject(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ try
+ {
+ return getTargetField(attribute.getName()).get(target);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public final int getInt(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ try
+ {
+ return getTargetField(attribute.getName()).getInt(target);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public final boolean getBoolean(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ try
+ {
+ return getTargetField(attribute.getName()).getBoolean(target);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public final float getFloat(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ try
+ {
+ return getTargetField(attribute.getName()).getFloat(target);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public final long getLong(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ try
+ {
+ return getTargetField(attribute.getName()).getLong(target);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public final double getDouble(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ try
+ {
+ return getTargetField(attribute.getName()).getDouble(target);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public final char getChar(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ try
+ {
+ return getTargetField(attribute.getName()).getChar(target);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public final short getShort(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ try
+ {
+ return getTargetField(attribute.getName()).getShort(target);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+
+ public final byte getByte(AttributeType attribute) throws NoSuchAttachmentException
+ {
+ try
+ {
+ return getTargetField(attribute.getName()).getByte(target);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new NoSuchAttachmentException(e);
+ }
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/ReflectedConfigurator.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/UnexpectedCommandException.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/UnexpectedCommandException.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/UnexpectedCommandException.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class UnexpectedCommandException extends CommandException
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -2140160435848799779L;
+
+ public UnexpectedCommandException()
+ {
+ }
+
+ public UnexpectedCommandException(String message)
+ {
+ super(message);
+ }
+
+ public UnexpectedCommandException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public UnexpectedCommandException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/UnexpectedCommandException.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/AbstractCommandFilter.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/AbstractCommandFilter.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/AbstractCommandFilter.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command.filter;
+
+import org.apache.log4j.Logger;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public abstract class AbstractCommandFilter implements CommandFilter
+{
+
+ protected final Logger log = Logger.getLogger(getClass());
+
+ private CommandFilter next;
+
+ public CommandFilter getNext()
+ {
+ return next;
+ }
+
+ public void setNext(CommandFilter next)
+ {
+ this.next = next;
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/AbstractCommandFilter.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/CommandFilter.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/CommandFilter.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/CommandFilter.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command.filter;
+
+import org.jboss.portlet.forums.command.Command;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.result.Result;
+
+/**
+ * A command filter which adds value around the command execution.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public interface CommandFilter
+{
+ Result filter(Command command) throws CommandException;
+
+ void setNext(CommandFilter filter);
+
+ CommandFilter getNext();
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/CommandFilter.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/CompositeFilter.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/CompositeFilter.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/CompositeFilter.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command.filter;
+
+import org.jboss.portlet.forums.command.Command;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.CompositeCommand;
+import org.jboss.portlet.forums.command.result.CompositeResult;
+import org.jboss.portlet.forums.command.result.Result;
+
+import java.util.Iterator;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class CompositeFilter extends AbstractCommandFilter
+{
+ public Result filter(Command cmd) throws CommandException
+ {
+ if (cmd instanceof CompositeCommand)
+ {
+ CompositeResult result = new CompositeResult();
+ Iterator iterator = ((CompositeCommand)cmd).iterator();
+ while (iterator.hasNext())
+ {
+ result.addResult(getNext().filter((Command)iterator.next()));
+ }
+ return result;
+ }
+ else
+ {
+ return getNext().filter(cmd);
+ }
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/CompositeFilter.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/ExecuteFilter.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/ExecuteFilter.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/ExecuteFilter.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,45 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command.filter;
+
+import org.jboss.portlet.forums.command.Command;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.result.Result;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class ExecuteFilter extends AbstractCommandFilter
+{
+ public Result filter(Command cmd) throws CommandException
+ {
+ Result result = cmd.execute();
+ // Allow post processing
+ if (getNext() != null)
+ {
+ getNext().filter(cmd);
+ }
+ return result;
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/filter/ExecuteFilter.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/CompositeResult.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/CompositeResult.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/CompositeResult.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command.result;
+
+import org.jboss.portlet.forums.command.CommandConstants;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version <tt>$Revision: 5448 $</tt>
+ */
+public class CompositeResult
+ implements Result
+{
+
+ private final List results = new LinkedList();
+
+ public void addResult(Result result)
+ {
+ results.add(result);
+ }
+
+ public Iterator iterator()
+ {
+ return results.iterator();
+ }
+
+ public ResultType getType()
+ {
+ return CommandConstants.TYPE_COMPOSITE;
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/CompositeResult.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/ImmutableResult.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/ImmutableResult.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/ImmutableResult.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command.result;
+
+
+/** @author <a href="theute at users.sourceforge.net">Thomas Heute</a> $Revision: 5448 $ */
+public class ImmutableResult
+ extends ResultType
+ implements Result
+{
+
+ public ImmutableResult(String name)
+ {
+ super(name);
+ }
+
+ public ResultType getType()
+ {
+ return this;
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/ImmutableResult.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/Result.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/Result.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/Result.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,32 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command.result;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public interface Result
+{
+ ResultType getType();
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/Result.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/ResultType.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/ResultType.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/ResultType.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command.result;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class ResultType
+{
+
+ private String name;
+
+ protected ResultType(String name)
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException("Name cannot be null");
+ }
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/ResultType.java
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/SimpleResult.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/SimpleResult.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/SimpleResult.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.command.result;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public class SimpleResult
+ implements Result
+{
+
+ private ResultType type;
+ private Map values;
+
+ public SimpleResult(ResultType type)
+ {
+ this.type = type;
+ this.values = null;
+ }
+
+ public void put(String key, Object value)
+ {
+ if (values == null)
+ {
+ values = new HashMap();
+ }
+ values.put(key, value);
+ }
+
+ public Object get(String key)
+ {
+ return values != null ? values.get(key) : null;
+ }
+
+ public ResultType getType()
+ {
+ return type;
+ }
+}
Property changes on: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/command/result/SimpleResult.java
___________________________________________________________________
Name: svn:executable
+ *
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/AbstractCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/AbstractCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/AbstractCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -11,12 +11,11 @@
package org.jboss.portlet.forums.commands;
import org.apache.log4j.Logger;
-import org.jboss.portal.common.command.Command;
-import org.jboss.portal.common.command.Configurator;
-import org.jboss.portal.common.command.ReflectedConfigurator;
-import org.jboss.portlet.command.ActionCommand;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.ActionCommand;
+import org.jboss.portlet.forums.command.Configurator;
+import org.jboss.portlet.forums.command.ReflectedConfigurator;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/BBAttributeType.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/BBAttributeType.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/BBAttributeType.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,7 +10,7 @@
*****************************************/
package org.jboss.portlet.forums.commands;
-import org.jboss.portal.common.command.AttributeType;
+import org.jboss.portlet.forums.command.AttributeType;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CommandConstants.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CommandConstants.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CommandConstants.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,9 +10,10 @@
*****************************************/
package org.jboss.portlet.forums.commands;
-import org.jboss.portal.common.command.result.Result;
-import org.jboss.portal.common.command.result.ResultType;
+import org.jboss.portlet.forums.command.result.Result;
+import org.jboss.portlet.forums.command.result.ResultType;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CompositeCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CompositeCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CompositeCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -13,11 +13,12 @@
import java.util.Iterator;
import java.util.LinkedList;
-import org.jboss.portal.common.command.Command;
-import org.jboss.portal.common.command.Configurator;
-import org.jboss.portal.common.command.EmptyConfigurator;
-import org.jboss.portal.common.command.result.Result;
+import org.jboss.portlet.forums.command.Command;
+import org.jboss.portlet.forums.command.Configurator;
+import org.jboss.portlet.forums.command.EmptyConfigurator;
+import org.jboss.portlet.forums.command.result.Result;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @version $Revision: 55 $
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CompositeResult.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CompositeResult.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/CompositeResult.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -14,9 +14,10 @@
import java.util.LinkedList;
import java.util.List;
-import org.jboss.portal.common.command.result.Result;
-import org.jboss.portal.common.command.result.ResultType;
+import org.jboss.portlet.forums.command.result.Result;
+import org.jboss.portlet.forums.command.result.ResultType;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @version $Revision: 55 $
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/SimpleResultType.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/SimpleResultType.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/SimpleResultType.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,8 +10,9 @@
*****************************************/
package org.jboss.portlet.forums.commands;
-import org.jboss.portal.common.command.result.ResultType;
+import org.jboss.portlet.forums.command.result.ResultType;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @version $Revision: 878 $
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/ValidationException.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/ValidationException.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/ValidationException.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,7 +10,7 @@
*****************************************/
package org.jboss.portlet.forums.commands;
-import org.jboss.portal.common.command.result.Result;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/CreateCategoryCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/CreateCategoryCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/CreateCategoryCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,12 +10,12 @@
*****************************************/
package org.jboss.portlet.forums.commands.admin;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.ForumsModule;
import org.jboss.portlet.forums.commands.AbstractCommand;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/CreateForumCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/CreateForumCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/CreateForumCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,13 +10,13 @@
*****************************************/
package org.jboss.portlet.forums.commands.admin;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.ForumsModule;
import org.jboss.portlet.forums.commands.AbstractCommand;
import org.jboss.portlet.forums.model.Category;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteCategoryCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteCategoryCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteCategoryCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,9 +10,10 @@
*****************************************/
package org.jboss.portlet.forums.commands.admin;
+import org.jboss.portlet.forums.command.result.Result;
+
//import org.jboss.nukes.addons.modules.bb.commands.AbstractCommand;
-import org.jboss.portal.common.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteForumCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteForumCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteForumCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,7 +10,6 @@
*****************************************/
package org.jboss.portlet.forums.commands.admin;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.ForumsModule;
import org.jboss.portlet.forums.ForumsConstants;
@@ -26,6 +25,8 @@
import java.util.Iterator;
+import org.jboss.portlet.forums.command.result.Result;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteMoveCategoryCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteMoveCategoryCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteMoveCategoryCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,13 +10,13 @@
*****************************************/
package org.jboss.portlet.forums.commands.admin;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.ForumsModule;
import org.jboss.portlet.forums.commands.AbstractCommand;
import org.jboss.portlet.forums.model.*;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteMoveForumCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteMoveForumCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/DeleteMoveForumCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -13,13 +13,13 @@
import java.util.Iterator;
import java.util.ArrayList;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.ForumsModule;
import org.jboss.portlet.forums.commands.AbstractCommand;
import org.jboss.portlet.forums.model.*;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/OrderCategoryCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/OrderCategoryCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/OrderCategoryCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -12,13 +12,13 @@
import java.util.Iterator;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.ForumsModule;
import org.jboss.portlet.forums.commands.AbstractCommand;
import org.jboss.portlet.forums.model.Category;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/OrderForumCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/OrderForumCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/OrderForumCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -12,13 +12,13 @@
import java.util.Iterator;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.ForumsModule;
import org.jboss.portlet.forums.commands.AbstractCommand;
import org.jboss.portlet.forums.model.Forum;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/UpdateCategoryCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/UpdateCategoryCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/UpdateCategoryCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,11 +10,11 @@
*****************************************/
package org.jboss.portlet.forums.commands.admin;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portlet.forums.commands.AbstractCommand;
import org.jboss.portlet.forums.model.Category;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/UpdateForumCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/UpdateForumCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/admin/UpdateForumCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,12 +10,12 @@
*****************************************/
package org.jboss.portlet.forums.commands.admin;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portlet.forums.commands.AbstractCommand;
import org.jboss.portlet.forums.model.Category;
import org.jboss.portlet.forums.model.Forum;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/DeleteTopicCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/DeleteTopicCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/DeleteTopicCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -15,14 +15,15 @@
import org.jboss.portlet.forums.ForumsModule;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
-import org.jboss.portal.common.command.result.Result;
-import org.jboss.portal.common.command.CommandException;
import org.jboss.portal.core.modules.ModuleException;
import java.util.Iterator;
import java.util.Collection;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.result.Result;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/LockTopicCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/LockTopicCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/LockTopicCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -16,14 +16,15 @@
import org.jboss.portlet.forums.ForumsModule;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
-import org.jboss.portal.common.command.result.Result;
-import org.jboss.portal.common.command.CommandException;
import org.jboss.portal.core.modules.ModuleException;
import java.util.Iterator;
import java.util.Collection;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.result.Result;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/MoveTopicCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/MoveTopicCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/MoveTopicCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -16,14 +16,15 @@
import org.jboss.portlet.forums.ForumsModule;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
-import org.jboss.portal.common.command.result.Result;
-import org.jboss.portal.common.command.CommandException;
import org.jboss.portal.core.modules.ModuleException;
import java.util.Iterator;
import java.util.Collection;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.result.Result;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/SplitTopicCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/SplitTopicCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/moderation/SplitTopicCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -18,14 +18,15 @@
import org.jboss.portlet.forums.impl.TopicImpl;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
-import org.jboss.portal.common.command.result.Result;
-import org.jboss.portal.common.command.CommandException;
import org.jboss.portal.core.modules.ModuleException;
import java.util.Iterator;
import java.util.Collection;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.result.Result;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/DeletePollCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/DeletePollCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/DeletePollCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -11,12 +11,12 @@
package org.jboss.portlet.forums.commands.post;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.commands.ValidationException;
import org.jboss.portlet.forums.model.AuthType;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/DeletePostCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/DeletePostCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/DeletePostCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -11,14 +11,14 @@
package org.jboss.portlet.forums.commands.post;
-import org.jboss.portal.common.command.result.Result;
-import org.jboss.portal.common.command.result.SimpleResult;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.commands.ValidationException;
import org.jboss.portlet.forums.model.Post;
import org.jboss.portlet.forums.model.AuthType;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
+import org.jboss.portlet.forums.command.result.SimpleResult;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/EditPostCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/EditPostCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/EditPostCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -12,7 +12,6 @@
import java.util.*;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.commands.ValidationException;
import org.jboss.portlet.forums.model.AuthType;
@@ -20,6 +19,7 @@
import org.jboss.portlet.forums.model.Attachment;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/ForumCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/ForumCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/ForumCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,7 +10,6 @@
*****************************************/
package org.jboss.portlet.forums.commands.post;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.identity.User;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.ForumsModule;
@@ -23,6 +22,7 @@
import org.jboss.portlet.forums.model.Poster;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/NewTopicCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/NewTopicCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/NewTopicCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,7 +10,6 @@
*****************************************/
package org.jboss.portlet.forums.commands.post;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
@@ -21,6 +20,8 @@
import java.util.Date;
import java.util.List;
+import org.jboss.portlet.forums.command.result.Result;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @author <a href="mailto:theute at users.sourceforge.net">Thomas Heute</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/ReplyCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/ReplyCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/ReplyCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -12,13 +12,13 @@
import java.util.Date;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portlet.forums.commands.ValidationException;
import org.jboss.portlet.forums.model.Post;
import org.jboss.portlet.forums.model.AuthType;
import org.jboss.portlet.forums.ForumsConstants;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/RepostCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/RepostCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/RepostCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -11,11 +11,11 @@
package org.jboss.portlet.forums.commands.post;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portlet.forums.commands.CommandConstants;
import org.jboss.portlet.forums.model.AuthType;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/VoteTopicCommand.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/VoteTopicCommand.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/commands/post/VoteTopicCommand.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -11,7 +11,6 @@
package org.jboss.portlet.forums.commands.post;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portlet.forums.model.*;
import org.jboss.portlet.JBossActionRequest;
@@ -19,6 +18,8 @@
import java.util.Iterator;
+import org.jboss.portlet.forums.command.result.Result;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @author <a href="">Boleslaw Dawidowicz</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -11,12 +11,6 @@
package org.jboss.portlet.forums.impl;
import org.apache.log4j.Logger;
-import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.common.command.result.Result;
-import org.jboss.portal.common.command.CommandException;
-import org.jboss.portal.common.command.filter.CompositeFilter;
-import org.jboss.portal.common.command.filter.ExecuteFilter;
-import org.jboss.portal.common.command.filter.CommandFilter;
import org.jboss.portal.identity.User;
import org.jboss.portal.core.modules.ModuleException;
import org.jboss.portal.core.modules.AbstractModule;
@@ -35,7 +29,6 @@
import org.jboss.portlet.forums.model.TopicWatch;
import org.jboss.portlet.forums.model.Attachment;
import org.jboss.portlet.forums.interceptors.FloodControlInterceptor;
-import org.jboss.portlet.command.ActionCommand;
import org.hibernate.Session;
import org.hibernate.HibernateException;
import org.hibernate.Query;
@@ -46,6 +39,13 @@
import java.util.List;
import java.util.ArrayList;
+import org.jboss.portlet.forums.command.ActionCommand;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.filter.CommandFilter;
+import org.jboss.portlet.forums.command.filter.CompositeFilter;
+import org.jboss.portlet.forums.command.filter.ExecuteFilter;
+import org.jboss.portlet.forums.command.result.Result;
+
/**
* @author <a href="mailto:theute at jboss.org">Thomas Heute </a>
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/FloodControlInterceptor.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/FloodControlInterceptor.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/FloodControlInterceptor.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -12,12 +12,12 @@
import java.util.Date;
-import org.jboss.portal.common.command.Command;
-import org.jboss.portal.common.command.CommandException;
-import org.jboss.portal.common.command.filter.AbstractCommandFilter;
-import org.jboss.portal.common.command.result.Result;
import org.jboss.portal.identity.User;
import org.jboss.portal.core.modules.ModuleException;
+import org.jboss.portlet.forums.command.Command;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.filter.AbstractCommandFilter;
+import org.jboss.portlet.forums.command.result.Result;
import org.jboss.portlet.forums.commands.CommandConstants;
import org.jboss.portlet.forums.commands.post.ForumCommand;
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/IndexInterceptor.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/IndexInterceptor.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/IndexInterceptor.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -10,10 +10,10 @@
*****************************************/
package org.jboss.portlet.forums.interceptors;
-import org.jboss.portal.common.command.Command;
-import org.jboss.portal.common.command.CommandException;
-import org.jboss.portal.common.command.filter.AbstractCommandFilter;
-import org.jboss.portal.common.command.result.Result;
+import org.jboss.portlet.forums.command.Command;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.filter.AbstractCommandFilter;
+import org.jboss.portlet.forums.command.result.Result;
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/NotificationInterceptor.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/NotificationInterceptor.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/interceptors/NotificationInterceptor.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -12,10 +12,10 @@
import EDU.oswego.cs.dl.util.concurrent.LinkedQueue;
import EDU.oswego.cs.dl.util.concurrent.QueuedExecutor;
-import org.jboss.portal.common.command.Command;
-import org.jboss.portal.common.command.CommandException;
-import org.jboss.portal.common.command.filter.AbstractCommandFilter;
-import org.jboss.portal.common.command.result.Result;
+import org.jboss.portlet.forums.command.Command;
+import org.jboss.portlet.forums.command.CommandException;
+import org.jboss.portlet.forums.command.filter.AbstractCommandFilter;
+import org.jboss.portlet.forums.command.result.Result;
import org.jboss.portal.common.transaction.Transactions;
import org.jboss.portal.core.modules.MailModule;
import org.jboss.portal.core.modules.ModuleConstants;
@@ -26,7 +26,7 @@
import org.jboss.portal.identity.User;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
-import org.jboss.portlet.command.ActionCommand;
+import org.jboss.portlet.forums.command.ActionCommand;
import org.jboss.portlet.forums.ForumsConstants;
import org.jboss.portlet.forums.ForumsModule;
import org.jboss.portlet.forums.ForumsPortlet;
Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ui/PortalUtil.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ui/PortalUtil.java 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/ui/PortalUtil.java 2006-10-24 23:50:11 UTC (rev 7094)
@@ -57,7 +57,7 @@
import org.jboss.portal.core.CoreConstants;
import org.jboss.portal.core.modules.ModuleConstants;
-import org.jboss.portal.identity.PropertyMap;
+import org.jboss.portal.identity.ProfileMap;
import org.jboss.portal.identity.UserModule;
import org.jboss.portal.identity.User;
import org.jboss.portal.format.render.bbcodehtml.ToHTMLConfig;
@@ -107,7 +107,7 @@
return false;
}
- public PropertyMap getProperties() {
+ public ProfileMap getProfile() {
return null;
}
Modified: labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-sar/META-INF/jboss-service.xml
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-sar/META-INF/jboss-service.xml 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-sar/META-INF/jboss-service.xml 2006-10-24 23:50:11 UTC (rev 7094)
@@ -4,7 +4,7 @@
code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
name="portal.forums:service=Hibernate"
xmbean-dd=""
- xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
<attribute name="DoChecking">true</attribute>
@@ -15,7 +15,7 @@
code="org.jboss.portlet.forums.impl.ForumsModuleImpl"
name="portal.forums:service=Module,type=Forums"
xmbean-dd=""
- xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<!-- Flood interval in seconds -->
<attribute name="FloodInterval">30</attribute>
Modified: labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-war/views/profile/viewprofile_body.xhtml
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-war/views/profile/viewprofile_body.xhtml 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-war/views/profile/viewprofile_body.xhtml 2006-10-24 23:50:11 UTC (rev 7094)
@@ -90,7 +90,7 @@
<span class="gen">${resource.L_LOCATION}: </span>
</td>
<td>
- <b><span class="gen">#{forums:userProperty(profile.poster.user.properties,"INFO_USER_LOCATION")}</span></b>
+ <b><span class="gen">#{forums:userProperty(profile.poster.user.profile,"INFO_USER_LOCATION")}</span></b>
</td>
</tr>
<tr>
@@ -99,9 +99,9 @@
</td>
<td>
<span class="gen">
- <c:if test="#{forums:userProperty(profile.poster.user.properties,'INFO_USER_HOMEPAGE')!=null}" >
+ <c:if test="#{forums:userProperty(profile.poster.user.profile,'INFO_USER_HOMEPAGE')!=null}" >
<b>
- <a href="${forums:userProperty(profile.poster.user.properties,'INFO_USER_HOMEPAGE')}" style="text-decoration: none;">
+ <a href="${forums:userProperty(profile.poster.user.profile,'INFO_USER_HOMEPAGE')}" style="text-decoration: none;">
<img border="0"
src="#{forums:themeURL('resourceIconWWWURL')}"
alt="${resource.Visit_website}"/>
@@ -116,7 +116,7 @@
<span class="gen">${resource.L_OCCUPATION}: </span>
</td>
<td>
- <b><span class="gen">#{forums:userProperty(profile.poster.user.properties,"INFO_USER_OCCUPATION")}</span></b>
+ <b><span class="gen">#{forums:userProperty(profile.poster.user.profile,"INFO_USER_OCCUPATION")}</span></b>
</td>
</tr>
<tr>
@@ -124,7 +124,7 @@
<span class="gen">${resource.L_INTERESTS}:</span>
</td>
<td>
- <b><span class="gen">#{forums:userProperty(profile.poster.user.properties,"INFO_USER_INTERESTS")}</span></b>
+ <b><span class="gen">#{forums:userProperty(profile.poster.user.profile,"INFO_USER_INTERESTS")}</span></b>
</td>
</tr>
</table>
@@ -167,8 +167,8 @@
</td>
<td class="row1" valign="middle">
<span class="gen">
- <c:if test="#{forums:userProperty(profile.poster.user.properties,'INFO_USER_IM_SKYPE')!=null}" >
- <a href="skype:#{forums:userProperty(profile.poster.user.properties,'INFO_USER_IM_SKYPE')}?add" style="text-decoration: none;">
+ <c:if test="#{forums:userProperty(profile.poster.user.profile,'INFO_USER_IM_SKYPE')!=null}" >
+ <a href="skype:#{forums:userProperty(profile.poster.user.profile,'INFO_USER_IM_SKYPE')}?add" style="text-decoration: none;">
<img border="0"
src="#{forums:themeURL('resourceIconSkypeURL')}"
alt="${resource.L_SKYPE}"/>
@@ -183,7 +183,7 @@
</td>
<td class="row1" valign="middle">
<span class="gen">
- #{forums:userProperty(profile.poster.user.properties,"INFO_USER_IM_MSNM")}
+ #{forums:userProperty(profile.poster.user.profile,"INFO_USER_IM_MSNM")}
</span>
</td>
</tr>
@@ -193,8 +193,8 @@
</td>
<td class="row1" valign="middle">
<span class="gen">
- <c:if test="#{forums:userProperty(profile.poster.user.properties,'INFO_USER_IM_YIM')!=null}" >
- <a href="http://edit.yahoo.com/config/send_webmesg?.target=#{forums:userProperty(profile.poster.user.properties,'INFO_USER_IM_YIM')}&.src=pg" style="text-decoration: none;">
+ <c:if test="#{forums:userProperty(profile.poster.user.profile,'INFO_USER_IM_YIM')!=null}" >
+ <a href="http://edit.yahoo.com/config/send_webmesg?.target=#{forums:userProperty(profile.poster.user.profile,'INFO_USER_IM_YIM')}&.src=pg" style="text-decoration: none;">
<img border="0"
src="#{forums:themeURL('resourceIconYIMURL')}"
alt="${resource.YIM}"/>
@@ -209,8 +209,8 @@
</td>
<td class="row1" valign="middle">
<span class="gen">
- <c:if test="#{forums:userProperty(profile.poster.user.properties,'INFO_USER_IM_AIM')!=null}" >
- <a href="aim:goim?screenname=#{forums:userProperty(profile.poster.user.properties,'INFO_USER_IM_AIM')}&message=Hello+Are+you+there?" style="text-decoration: none;">
+ <c:if test="#{forums:userProperty(profile.poster.user.profile,'INFO_USER_IM_AIM')!=null}" >
+ <a href="aim:goim?screenname=#{forums:userProperty(profile.poster.user.profile,'INFO_USER_IM_AIM')}&message=Hello+Are+you+there?" style="text-decoration: none;">
<img border="0"
src="#{forums:themeURL('resourceIconAIMURL')}"
alt="${resource.AIM}"/>
@@ -224,7 +224,7 @@
<span class="gen">${resource.L_ICQ_NUMBER}:</span>
</td>
<td class="row1">
- <c:if test="#{forums:userProperty(profile.poster.user.properties,'INFO_USER_IM_ICQ')!=null}" >
+ <c:if test="#{forums:userProperty(profile.poster.user.profile,'INFO_USER_IM_ICQ')!=null}" >
<script language="JavaScript" type="text/javascript"><!--
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
@@ -233,7 +233,7 @@
document.write('<table cellspacing="0" cellpadding="0" border="0"><tr><td nowrap="nowrap"><div style="position:relative;height:18px"><div style="position:absolute">${n:out("ICQ_IMG")}</div><div style="position:absolute;left:3px;top:-1px">${n:out("ICQ_STATUS_IMG")}</div></div></td></tr></table>');
//--></script>
- <a href="http://www.icq.com/scripts/search.dll?to=#{forums:userProperty(profile.poster.user.properties,'INFO_USER_IM_ICQ')}" style="text-decoration: none;">
+ <a href="http://www.icq.com/scripts/search.dll?to=#{forums:userProperty(profile.poster.user.profile,'INFO_USER_IM_ICQ')}" style="text-decoration: none;">
<img border="0"
src="#{forums:themeURL('resourceIconICQURL')}"
alt="${resource.ICQ}"/>
Modified: labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-10-24 23:44:48 UTC (rev 7093)
+++ labs/jbossforums/branches/forums26/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-10-24 23:50:11 UTC (rev 7094)
@@ -387,8 +387,8 @@
alt="${resource.Send_email}"/>
</a>
</c:if>
- <c:if test="${forums:userProperty(postrow.poster.user.properties,'INFO_USER_HOMEPAGE') ne null}">
- <h:outputLink value="${forums:userProperty(postrow.poster.user.properties,'INFO_USER_HOMEPAGE')}" style="text-decoration: none;">
+ <c:if test="${forums:userProperty(postrow.poster.user.profile,'INFO_USER_HOMEPAGE') ne null}">
+ <h:outputLink value="${forums:userProperty(postrow.poster.user.profile,'INFO_USER_HOMEPAGE')}" style="text-decoration: none;">
<f:verbatim>
<img border="0"
src="#{forums:themeURL('resourceIconWWWURL')}"
@@ -396,29 +396,29 @@
</f:verbatim>
</h:outputLink>
</c:if>
- <c:if test="${forums:userProperty(postrow.poster.user.properties,'INFO_USER_IM_AIM') ne null}">
- <a href="aim:goim?screenname=#{forums:userProperty(postrow.poster.user.properties,'INFO_USER_IM_AIM')}&message=Hello+Are+you+there?" style="text-decoration: none;">
+ <c:if test="${forums:userProperty(postrow.poster.user.profile,'INFO_USER_IM_AIM') ne null}">
+ <a href="aim:goim?screenname=#{forums:userProperty(postrow.poster.user.profile,'INFO_USER_IM_AIM')}&message=Hello+Are+you+there?" style="text-decoration: none;">
<img border="0"
src="#{forums:themeURL('resourceIconAIMURL')}"
alt="${resource.AIM}"/>
</a>
</c:if>
- <c:if test="${forums:userProperty(postrow.poster.user.properties,'INFO_USER_IM_YIM') ne null}">
- <a href="http://edit.yahoo.com/config/send_webmesg?.target=#{forums:userProperty(postrow.poster.user.properties,'INFO_USER_IM_YIM')}&.src=pg" style="text-decoration: none;">
+ <c:if test="${forums:userProperty(postrow.poster.user.profile,'INFO_USER_IM_YIM') ne null}">
+ <a href="http://edit.yahoo.com/config/send_webmesg?.target=#{forums:userProperty(postrow.poster.user.profile,'INFO_USER_IM_YIM')}&.src=pg" style="text-decoration: none;">
<img border="0"
src="#{forums:themeURL('resourceIconYIMURL')}"
alt="${resource.YIM}"/>
</a>
</c:if>
- <c:if test="${forums:userProperty(postrow.poster.user.properties,'INFO_USER_IM_SKYPE') ne null}">
+ <c:if test="${forums:userProperty(postrow.poster.user.profile,'INFO_USER_IM_SKYPE') ne null}">
<!-- TODO: some more functionality may be added. Like automatic skype instalation and status checker.-->
- <a href="skype:#{forums:userProperty(postrow.poster.user.properties,'INFO_USER_IM_SKYPE')}?add" style="text-decoration: none;">
+ <a href="skype:#{forums:userProperty(postrow.poster.user.profile,'INFO_USER_IM_SKYPE')}?add" style="text-decoration: none;">
<img border="0"
src="#{forums:themeURL('resourceIconSkypeURL')}"
alt="${resource.L_SKYPE}"/>
</a>
</c:if>
- <c:if test="${forums:userProperty(postrow.poster.user.properties,'INFO_USER_IM_MSNM') ne null}">
+ <c:if test="${forums:userProperty(postrow.poster.user.profile,'INFO_USER_IM_MSNM') ne null}">
<h:outputLink value="#{forums:outputLink(shared.links['profile'],true)}" style="text-decoration: none;">
<f:param name="uid"
value="#{postrow.poster.user.id}"/>
@@ -429,8 +429,8 @@
</f:verbatim>
</h:outputLink>
</c:if>
- <c:if test="${forums:userProperty(postrow.poster.user.properties,'INFO_USER_IM_ICQ') ne null}">
- <a href="http://www.icq.com/scripts/search.dll?to=#{forums:userProperty(postrow.poster.user.properties,'INFO_USER_IM_ICQ')}" style="text-decoration: none;">
+ <c:if test="${forums:userProperty(postrow.poster.user.profile,'INFO_USER_IM_ICQ') ne null}">
+ <a href="http://www.icq.com/scripts/search.dll?to=#{forums:userProperty(postrow.poster.user.profile,'INFO_USER_IM_ICQ')}" style="text-decoration: none;">
<img border="0"
src="#{forums:themeURL('resourceIconICQURL')}"
alt="${resource.ICQ}"/>
Modified: labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/jboss-portlet-api-lib.jar
===================================================================
(Binary files differ)
Modified: labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-api-lib.jar
===================================================================
(Binary files differ)
Modified: labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-common-lib.jar
===================================================================
(Binary files differ)
Modified: labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-core-lib.jar
===================================================================
(Binary files differ)
Modified: labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-format-lib.jar
===================================================================
(Binary files differ)
Modified: labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-identity-lib.jar
===================================================================
(Binary files differ)
Modified: labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-jems-lib.jar
===================================================================
(Binary files differ)
Modified: labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-portlet-lib.jar
===================================================================
(Binary files differ)
Modified: labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portal-server-lib.jar
===================================================================
(Binary files differ)
Modified: labs/jbossforums/branches/forums26/thirdparty/jbportal/lib/portlet-api-lib.jar
===================================================================
(Binary files differ)
More information about the jboss-svn-commits
mailing list