Author: bdaw
Date: 2007-08-19 14:01:55 -0400 (Sun, 19 Aug 2007)
New Revision: 7992
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/user/
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/user/CurrentUsersPortlet.java
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/user/event/
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/user/event/UserEventListener.java
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-sar/
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-sar/META-INF/
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_it.properties
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jboss-portlet.xml
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/noUser.jsp
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/oneUser.jsp
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/users.jsp
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portal-lib.tld
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portlet-instances.xml
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivity.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivityNotificationBroadcaster.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivityNotificationBroadcasterMBean.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsService.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsServiceImpl.java
Modified:
branches/JBoss_Portal_Branch_2_6/build/build.xml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-samples/core-samples.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/identity/identity.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/migration/migration.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/widget/widget.iml
branches/JBoss_Portal_Branch_2_6/core-samples/build.xml
branches/JBoss_Portal_Branch_2_6/core/build.xml
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/data/default-object.xml
Log:
JBPORTAL-1606 - Portlet and service to see current users online.
Modified: branches/JBoss_Portal_Branch_2_6/build/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-08-18 20:25:26 UTC (rev 7991)
+++ branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-08-19 18:01:55 UTC (rev 7992)
@@ -295,6 +295,7 @@
<copy file="../core-samples/output/lib/portal-news-samples.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
<copy file="../core-samples/output/lib/portal-jsp-samples.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
<copy file="../core-samples/output/lib/portal-weather-samples.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
+ <copy file="../core-samples/output/lib/portal-users-samples.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
<!--<copy file="../core-search/output/lib/portal-search.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>-->
<copy file="../widget/output/lib/widget.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
<copy file="../wsrp/output/lib/portal-wsrp.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
@@ -312,6 +313,7 @@
<delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-news-samples.war"/>
<delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-jsp-samples.war"/>
<delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-weather-samples.war"/>
+ <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-users-samples.sar"/>
<!--<delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-search.sar"/>-->
<delete
file="${jboss.home}/server/${portal.deploy.dir}/widget.war"/>
<delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-wsrp.sar"/>
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml 2007-08-18
20:25:26 UTC (rev 7991)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml 2007-08-19
18:01:55 UTC (rev 7992)
@@ -276,6 +276,33 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-concurrent/lib/concurrent.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/backport-concurrent/lib/jboss-backport-concurrent.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/core-libs/lib/jbossha.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-samples/core-samples.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-samples/core-samples.iml 2007-08-18
20:25:26 UTC (rev 7991)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-samples/core-samples.iml 2007-08-19
18:01:55 UTC (rev 7992)
@@ -51,6 +51,15 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/core-libs/lib/jboss-jmx.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/identity/identity.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/identity/identity.iml 2007-08-18
20:25:26 UTC (rev 7991)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/identity/identity.iml 2007-08-19
18:01:55 UTC (rev 7992)
@@ -82,7 +82,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module" module-name="jems" />
<orderEntry type="module-library">
<library>
<CLASSES>
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/migration/migration.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/migration/migration.iml 2007-08-18
20:25:26 UTC (rev 7991)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/migration/migration.iml 2007-08-19
18:01:55 UTC (rev 7992)
@@ -79,7 +79,7 @@
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
- <option name="ACTIVE_VCS_NAME" value="CVS" />
+ <option name="ACTIVE_VCS_NAME" value="svn" />
<option name="USE_PROJECT_VCS" value="false" />
</component>
<component name="copyright">
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/widget/widget.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/widget/widget.iml 2007-08-18
20:25:26 UTC (rev 7991)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/widget/widget.iml 2007-08-19
18:01:55 UTC (rev 7992)
@@ -48,6 +48,24 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/core-libs/lib/jboss-common.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/core-libs/lib/jboss-xml-binding.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: branches/JBoss_Portal_Branch_2_6/core/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-08-18 20:25:26 UTC (rev 7991)
+++ branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-08-19 18:01:55 UTC (rev 7992)
@@ -90,6 +90,7 @@
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="jboss.portal/modules/web.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
+ <path refid="jboss/backport.concurrent.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="jboss.cache.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
Added:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivity.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivity.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivity.java 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,117 @@
+/*
+* 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.portal.core.identity;
+
+import javax.management.Notification;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @author <a href="mailto:jedim@vige.it">Luca Stancapiano</a>
+ * @version $Revision: 0.1 $
+ */
+public class UserActivity
+{
+
+ public static final int NAVIGATION = 0;
+
+ public static final int SIGN_OUT = 1;
+
+ private String id;
+
+ private long timestamp;
+
+ private final int type;
+
+ private UserActivity()
+ {
+ this.type = NAVIGATION;
+ }
+
+ public UserActivity(String id, long timestamp, int type)
+ {
+ if (id == null)
+ {
+ throw new IllegalArgumentException("Id cannot be null");
+ }
+
+ this.id = id;
+ this.timestamp = timestamp;
+ this.type = type;
+ }
+
+ public UserActivity(Notification notification)
+ {
+ if (notification.getMessage() == null)
+ {
+ throw new IllegalArgumentException("Id (notification message) cannot be
null");
+ }
+ this.id = notification.getMessage();
+ this.timestamp = notification.getTimeStamp();
+ this.type = Integer.parseInt(notification.getType());
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public long getTimestamp()
+ {
+ return timestamp;
+ }
+
+ public int getType()
+ {
+ return type;
+ }
+
+
+ public boolean equals(Object o)
+ {
+ if (this == o)
+ {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass())
+ {
+ return false;
+ }
+
+ UserActivity that = (UserActivity)o;
+
+ if (!id.equals(that.id))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ public int hashCode()
+ {
+ int result;
+ result = id.hashCode();
+ return result;
+ }
+
+}
Added:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivityNotificationBroadcaster.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivityNotificationBroadcaster.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivityNotificationBroadcaster.java 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,37 @@
+/*
+* 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.portal.core.identity;
+
+import org.jboss.ha.jmx.HAServiceMBeanSupport;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version $Revision: 0.1 $
+ */
+public class UserActivityNotificationBroadcaster extends HAServiceMBeanSupport implements
UserActivityNotificationBroadcasterMBean
+{
+ /**
+ * Nothing special at the moment...
+ */
+
+}
Added:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivityNotificationBroadcasterMBean.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivityNotificationBroadcasterMBean.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UserActivityNotificationBroadcasterMBean.java 2007-08-19
18:01:55 UTC (rev 7992)
@@ -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.portal.core.identity;
+
+import org.jboss.ha.jmx.HAServiceMBean;
+
+import javax.management.Notification;
+import javax.management.NotificationListener;
+import javax.management.NotificationFilter;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version $Revision: 0.1 $
+ */
+public interface UserActivityNotificationBroadcasterMBean //extends HAServiceMBean
+{
+ public String getPartitionName();
+
+ public void sendNotification(Notification notification);
+
+ public void addNotificationListener(NotificationListener notificationListener,
NotificationFilter notificationFilter, Object object);
+}
Added:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsService.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsService.java 2007-08-19
18:01:55 UTC (rev 7992)
@@ -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.portal.core.identity;
+
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version $Revision: 0.1 $
+ */
+public interface UsersActivityStatsService
+{
+
+ public Set getActiveUsersIds(long period);
+
+ public Set getActiveUsersNames(long period);
+
+ public Set getUsersActivities(long period);
+
+ public void registerActivity(final UserActivity userActivity);
+}
Added:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsServiceImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsServiceImpl.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsServiceImpl.java 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,322 @@
+/*
+* 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.portal.core.identity;
+
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+
+import java.util.Set;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import edu.emory.mathcs.backport.java.util.concurrent.Executor;
+import edu.emory.mathcs.backport.java.util.concurrent.ScheduledExecutorService;
+import edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue;
+import edu.emory.mathcs.backport.java.util.concurrent.Executors;
+import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
+import edu.emory.mathcs.backport.java.util.concurrent.FutureTask;
+import edu.emory.mathcs.backport.java.util.concurrent.Callable;
+import edu.emory.mathcs.backport.java.util.Queue;
+
+import javax.management.NotificationListener;
+import javax.management.Notification;
+import javax.management.ObjectName;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @author <a href="mailto:jedim@vige.it">Luca Stancapiano</a>
+ * @version $Revision: 0.1 $
+ */
+public class UsersActivityStatsServiceImpl extends AbstractJBossService implements
UsersActivityStatsService, NotificationListener
+{
+ /** Our logger. */
+ private static final Logger log =
Logger.getLogger(UsersActivityStatsServiceImpl.class);
+
+ //TODO: some value just to begin - find some good default
+ private int userTrackerThreadsNumber = 10;
+
+ private int updaterThreadsNumber = 1;
+
+ private int updaterInterval = 1000;
+
+ private int activityQueueLimit = 1000;
+
+ private long activityTimeout = 1800000;
+
+ private Executor userTrackerExecutor;
+
+ private ScheduledExecutorService updaterExecutor;
+
+ private Queue activityQueue;
+
+ private volatile Set activityResults = new HashSet();
+
+ private UserActivityNotificationBroadcasterMBean activityBroadcaster;
+
+ public UsersActivityStatsServiceImpl()
+ {
+ }
+
+ protected void startService() throws Exception
+ {
+ super.startService();
+
+ activityQueue = new LinkedBlockingQueue(getActivityQueueLimit());
+
+ userTrackerExecutor = Executors.newFixedThreadPool(getUserTrackerThreadsNumber());
+
+ updaterExecutor = Executors.newScheduledThreadPool(getUpdaterThreadsNumber());
+
+ updaterExecutor.scheduleWithFixedDelay(new Updater(activityQueue),
getUpdaterInterval(), getUpdaterInterval(), TimeUnit.MILLISECONDS);
+
+ if (activityBroadcaster != null)
+ {
+ activityBroadcaster.addNotificationListener(this, null, null);
+ }
+ else
+ {
+ addNotificationListener(this, null, null);
+ }
+
+
+ }
+
+ protected void stopService() throws Exception
+ {
+ super.stopService();
+
+ // /TODO: stop all the threads
+ }
+
+ public Set getActiveUsersIds(long period)
+ {
+ long currentTime = System.currentTimeMillis();
+
+ Set results = new HashSet();
+ for (Iterator iterator = activityResults.iterator(); iterator.hasNext();)
+ {
+ UserActivity ua = (UserActivity)iterator.next();
+ if (currentTime - ua.getTimestamp() < period)
+ {
+ results.add(ua.getId());
+ }
+ }
+ return results;
+ }
+
+ public Set getActiveUsersNames(long period)
+ {
+ long currentTime = System.currentTimeMillis();
+ Set results = new HashSet();
+ for (Iterator iterator = activityResults.iterator(); iterator.hasNext();)
+ {
+ UserActivity ua = (UserActivity)iterator.next();
+ if (currentTime - ua.getTimestamp() < period)
+ {
+ results.add(ua.getId());
+ }
+ }
+ return results;
+ }
+
+ public Set getUsersActivities(long period)
+ {
+ long currentTime = System.currentTimeMillis();
+ Set results = new HashSet();
+ for (Iterator iterator = activityResults.iterator(); iterator.hasNext();)
+ {
+ UserActivity ua = (UserActivity)iterator.next();
+ if (currentTime - ua.getTimestamp() < period)
+ {
+ results.add(ua);
+ }
+ }
+ return results;
+ }
+
+ public void registerActivity(final UserActivity userActivity)
+ {
+ try
+ {
+ Notification notification = new
Notification(Integer.toString(userActivity.getType()),
+ this.getServiceName(),
+ userActivity.getTimestamp(),
+ userActivity.getTimestamp(),
+ userActivity.getId());
+
+
+ if (activityBroadcaster != null)
+ {
+ System.out.println("### Broadcasting user activity notification
");
+
+ activityBroadcaster.sendNotification(notification);
+ }
+ else
+ {
+ System.out.println("### Sending local user activity notification
");
+ sendNotification(notification);
+ }
+
+ }
+ catch (Exception e)
+ {
+ log.error("Failed to send user activity notification: ", e);
+ }
+
+
+
+ }
+
+ public void handleNotification(Notification notification, Object object)
+ {
+ System.out.println("### Handling user activity notification ");
+ final UserActivity ac = new UserActivity(notification);
+
+ FutureTask task = new FutureTask(new Callable()
+ {
+ public Object call() throws Exception
+ {
+
+ boolean success = activityQueue.offer(ac);
+ if (log.isTraceEnabled())
+ {
+ if (!success)
+ {
+ log.trace("Failed track user activity - activityQueue is full
");
+ }
+ }
+ return null;
+ }
+ });
+
+ userTrackerExecutor.execute(task);
+ }
+
+
+ public int getUserTrackerThreadsNumber()
+ {
+ return userTrackerThreadsNumber;
+ }
+
+ public void setUserTrackerThreadsNumber(int userTrackerThreadsNumber)
+ {
+ this.userTrackerThreadsNumber = userTrackerThreadsNumber;
+ }
+
+ public int getUpdaterThreadsNumber()
+ {
+ return updaterThreadsNumber;
+ }
+
+ public void setUpdaterThreadsNumber(int updaterThreadsNumber)
+ {
+ this.updaterThreadsNumber = updaterThreadsNumber;
+ }
+
+ public int getUpdaterInterval()
+ {
+ return updaterInterval;
+ }
+
+ public void setUpdaterInterval(int updaterInterval)
+ {
+ this.updaterInterval = updaterInterval;
+ }
+
+ public int getActivityQueueLimit()
+ {
+ return activityQueueLimit;
+ }
+
+ public void setActivityQueueLimit(int activityQueueLimit)
+ {
+ this.activityQueueLimit = activityQueueLimit;
+ }
+
+ public long getActivityTimeout()
+ {
+ return activityTimeout;
+ }
+
+ public void setActivityTimeout(long activityTimeout)
+ {
+ this.activityTimeout = activityTimeout;
+ }
+
+ public UserActivityNotificationBroadcasterMBean getActivityBroadcaster()
+ {
+ return activityBroadcaster;
+ }
+
+ public void setActivityBroadcaster(UserActivityNotificationBroadcasterMBean
activityBroadcaster)
+ {
+ this.activityBroadcaster = activityBroadcaster;
+ }
+
+ private class Updater implements Runnable
+ {
+ private final Queue activityQueue;
+
+ public Updater(Queue activityQueue)
+ {
+ this.activityQueue = activityQueue;
+ }
+
+ //never run
+ private Updater()
+ {
+ this.activityQueue = null;
+ }
+
+ public void run()
+ {
+ long currentTime = System.currentTimeMillis();
+
+ Set stillActive = getUsersActivities(activityTimeout);
+
+ while (!activityQueue.isEmpty())
+ {
+ UserActivity activity = (UserActivity)activityQueue.poll();
+ if (activity != null && ((currentTime - activity.getTimestamp()) <
activityTimeout))
+ {
+ if (activity.getType() != UserActivity.SIGN_OUT)
+ stillActive.add(activity);
+ else
+ stillActive.remove(activity);
+ }
+ }
+
+ activityResults = Collections.unmodifiableSet(stillActive);
+
+ }
+ }
+
+
+}
+
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-08-18
20:25:26 UTC (rev 7991)
+++
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-08-19
18:01:55 UTC (rev 7992)
@@ -66,7 +66,7 @@
name="portal:service=AuthorizationDomainRegistry"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
+ <xmbean/>
</mbean>
<mbean
code="org.jboss.portal.security.impl.jacc.JACCPortalAuthorizationManagerFactory"
@@ -451,7 +451,7 @@
<attribute name="CacheMode">REPL_SYNC</attribute>
<attribute name="ClusterName">portal.hibernate</attribute>
</mbean>
-
+
<mbean
code="org.jboss.portal.jems.hibernate.JBossTreeCacheProvider"
name="portal:service=TreeCacheProvider,type=hibernate">
@@ -570,6 +570,38 @@
<attribute
name="AuthConfig">conf/login-config.xml</attribute>
</mbean>
+ <!-- a service to schedule activity of the users -->
+ <mbean
+ code="org.jboss.portal.core.identity.UsersActivityStatsServiceImpl"
+ name="portal:service=Module,type=UsersActivityStatsService"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <!--
+ |Uncomment in clustered mode : broadcaster will spread info about user activity
in cluster
+ @portal.single.xml.close@
+
+ <depends
+ optional-attribute-name="ActivityBroadcaster"
+
proxy-type="attribute">portal:service=HAUserActivityNotificationBroadcaster</depends>
+
+ @portal.single.xml.open@
+ -->
+ </mbean>
+
+ <!--
+ |Uncomment in clustered mode : broadcaster will spread info about user activity in
cluster
+ @portal.single.xml.close@
+
+ <mbean
code="org.jboss.portal.core.identity.UserActivityNotificationBroadcaster"
+ name="portal:service=HAUserActivityNotificationBroadcaster">
+
<depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
+ </mbean>
+
+ @portal.single.xml.open@
+ -->
+
+
<!-- Registries -->
<mbean
code="org.jboss.portal.portlet.impl.container.PortletApplicationRegistryImpl"
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/data/default-object.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/data/default-object.xml 2007-08-18
20:25:26 UTC (rev 7991)
+++
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/data/default-object.xml 2007-08-19
18:01:55 UTC (rev 7992)
@@ -163,6 +163,12 @@
<region>left</region>
<height>1</height>
</window>
+ <window>
+ <window-name>CurrentUsersPortletWindow</window-name>
+ <instance-ref>CurrentUsersPortletInstance</instance-ref>
+ <region>left</region>
+ <height>2</height>
+ </window>
</page>
</portal>
</deployment>
Modified: branches/JBoss_Portal_Branch_2_6/core-samples/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/build.xml 2007-08-18 20:25:26 UTC (rev
7991)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/build.xml 2007-08-19 18:01:55 UTC (rev
7992)
@@ -235,6 +235,22 @@
<fileset dir="${build.classes}"
includes="org/jboss/portal/core/samples/weather/**"/>
</jar>
+
+ <!-- portal-users-samples-lib.jar -->
+ <jar jarfile="${build.lib}/portal-users-samples-lib.jar">
+ <fileset dir="${build.classes}"
includes="org/jboss/portal/core/samples/users/**">
+ </fileset>
+ </jar>
+ <copy todir="${build.resources}/portal-users-samples.sar">
+ <fileset dir="${build.resources}/portal-users-samples-sar"/>
+ </copy>
+ <copy
todir="${build.resources}/portal-users-samples.sar/portal-users-samples.war">
+ <fileset dir="${build.resources}/portal-users-samples-war"/>
+ </copy>
+ <copy todir="${build.resources}/portal-users-samples.sar/lib">
+ <fileset dir="${build.lib}"
includes="portal-users-samples-lib.jar"/>
+ </copy>
+
</target>
<!-- Build the portal-basic-samples.sar -->
@@ -251,6 +267,9 @@
<implode
dir="${build.resources}/portal-weather-samples.war"
tofile="${build.lib}/portal-weather-samples.war"/>
+ <implode
+ dir="${build.resources}/portal-users-samples.sar"
+ tofile="${build.lib}/portal-users-samples.sar"/>
</target>
<!-- create artifacts for running the portlet tests (except TCK) target output
should have already been executed -->
@@ -300,7 +319,8 @@
<copy file="${build.lib}/portal-basic-samples.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
<copy file="${build.lib}/portal-jsp-samples.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
<copy file="${build.lib}/portal-news-samples.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
- <copy file="${build.lib}/portal-weather-samples.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
+ <copy file="${build.lib}/portal-weather-samples.war"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
+ <copy file="${build.lib}/portal-users-samples.sar"
todir="${jboss.home}/server/${portal.deploy.dir}"
overwrite="true"/>
</target>
<!--
@@ -314,6 +334,7 @@
<delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-jsp-samples.war"/>
<delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-news-samples.war"/>
<delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-weather-samples.war"/>
+ <delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-users-samples.sar"/>
</target>
<target name="tests" depends="init,
_buildmagic:configure:deployment">
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/user/CurrentUsersPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/user/CurrentUsersPortlet.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/user/CurrentUsersPortlet.java 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.portal.core.samples.users;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Set;
+
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.UnavailableException;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.core.identity.UsersActivityStatsService;
+import org.jboss.portal.core.servlet.jsp.PortalJsp;
+import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
+import org.jboss.portlet.JBossPortlet;
+import org.jboss.portlet.JBossRenderRequest;
+import org.jboss.portlet.JBossRenderResponse;
+
+/**
+ * Read the current users online and write them in output.
+ *
+ * @author <a href="mailto:jedim@vige.it">Luca Stancapiano</a>
+ */
+public class CurrentUsersPortlet extends JBossPortlet {
+
+ /**
+ * Logger
+ */
+ public static Logger log = Logger.getLogger(CurrentUsersPortlet.class);
+
+ protected void doView(JBossRenderRequest rRequest, JBossRenderResponse rResponse)
+ throws PortletException, IOException, UnavailableException {
+ UsersActivityStatsService uass = (UsersActivityStatsService) this
+ .getPortletContext().getAttribute("UsersActivityStats");
+
+ rResponse.setContentType("text/html");
+ PrintWriter writer = rResponse.getWriter();
+
+ //TODO: this is wrong - should pass period instead of current time - actually it
works by a coincedence...
+ Set users = uass.getActiveUsersNames(System.currentTimeMillis());
+
+ if (users.size() == 1) {
+ DelegateContext ctx = new DelegateContext();
+ ctx.put("USERS", users.toString());
+ ctx.put("USERS_COUNT", Integer.toString(users.size()));
+ rRequest.setAttribute(PortalJsp.CTX_REQUEST, ctx);
+ PortletRequestDispatcher rd =
getPortletContext().getRequestDispatcher("/WEB-INF/jsp/users/oneUser.jsp");
+ rd.include(rRequest, rResponse);
+ } else if (users.size() > 1) {
+ DelegateContext ctx = new DelegateContext();
+ ctx.put("USERS", users.toString());
+ ctx.put("USERS_COUNT", Integer.toString(users.size()));
+ rRequest.setAttribute(PortalJsp.CTX_REQUEST, ctx);
+ PortletRequestDispatcher rd =
getPortletContext().getRequestDispatcher("/WEB-INF/jsp/users/users.jsp");
+ rd.include(rRequest, rResponse);
+ } else {
+ PortletRequestDispatcher rd =
getPortletContext().getRequestDispatcher("/WEB-INF/jsp/users/noUser.jsp");
+ rd.include(rRequest, rResponse);
+ }
+
+
+ writer.close();
+ }
+}
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/user/event/UserEventListener.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/user/event/UserEventListener.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/user/event/UserEventListener.java 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,109 @@
+/******************************************************************************
+ * 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.portal.core.samples.users.event;
+
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+import org.apache.log4j.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.portal.api.event.PortalEvent;
+import org.jboss.portal.api.event.PortalEventContext;
+import org.jboss.portal.api.event.PortalEventListener;
+import org.jboss.portal.api.user.event.UserAuthenticationEvent;
+import org.jboss.portal.core.identity.UserActivity;
+import org.jboss.portal.core.identity.UsersActivityStatsService;
+
+/**
+ * @author <a href="mailto:jedim@vige.it">Luca Stancapiano</a>
+ * @version $Revision: 1.1 $
+ */
+public class UserEventListener implements PortalEventListener
+{
+
+ /**
+ * Our logger.
+ */
+ private static final Logger log = Logger
+ .getLogger(UserEventListener.class);
+
+ private UsersActivityStatsService activityService;
+
+ public UsersActivityStatsService getStatsService()
+ {
+ if (activityService == null)
+ {
+ try
+ {
+ MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
+ activityService = (UsersActivityStatsService)MBeanProxy
+ .get(
+ UsersActivityStatsService.class,
+ new ObjectName(
+ "portal:service=Module,type=UsersActivityStatsService"),
+ mbeanServer);
+ }
+ catch (MBeanProxyCreationException e)
+ {
+ log
+ .error(
+ "could not obtain a proxy for User Activity Statistics
Service",
+ e);
+ }
+ catch (MalformedObjectNameException e2)
+ {
+ log
+ .error(
+ "object name to obtain User Activity Statistics Service is
wrong",
+ e2);
+ }
+ }
+ return activityService;
+ }
+
+ public void onEvent(PortalEventContext eventContext, PortalEvent event)
+ {
+ if (event instanceof UserAuthenticationEvent)
+ {
+
+ UserAuthenticationEvent userEvent = (UserAuthenticationEvent)event;
+
+ UserActivity userActivity = null;
+
+ if (userEvent.getType() == UserAuthenticationEvent.SIGN_IN)
+ {
+ userActivity = new UserActivity(userEvent.getUserId(), System
+ .currentTimeMillis(), UserActivity.NAVIGATION);
+ }
+ else if (userEvent.getType() == UserAuthenticationEvent.SIGN_OUT)
+ {
+ userActivity = new UserActivity(userEvent.getUserId(), System
+ .currentTimeMillis(), UserActivity.SIGN_OUT);
+ }
+ getStatsService().registerActivity(userActivity);
+ }
+ }
+}
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-sar/META-INF/jboss-service.xml
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-sar/META-INF/jboss-service.xml 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<server>
+
+ <mbean
+ code="org.jboss.portal.core.event.PortalEventListenerServiceImpl"
+ name="portal:service=ListenerService,type=counter_listener"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends
+ optional-attribute-name="Registry"
+
proxy-type="attribute">portal:service=ListenerRegistry</depends>
+ <attribute name="RegistryId">counter_listener</attribute>
+ <attribute
name="ListenerClassName">org.jboss.portal.core.samples.users.event.UserEventListener</attribute>
+ </mbean>
+
+</server>
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource.properties
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource.properties 2007-08-19
18:01:55 UTC (rev 7992)
@@ -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. #
+################################################################################
+
+NO_USERS_ONLINE=No user is logged
+ONE_USER_ONLINE_0=Actually there is <b>
+ONE_USER_ONLINE_1=</b> user online:
+ONE_USER_IS_0=<b>
+ONE_USER_IS_1=</b>
+USERS_ONLINE_0=Actually there are <b>
+USERS_ONLINE_1=</b> users online:
+USERS_ARE_0=<b>
+USERS_ARE_1=</b>
\ No newline at end of file
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_it.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_it.properties
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_it.properties 2007-08-19
18:01:55 UTC (rev 7992)
@@ -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. #
+################################################################################
+
+NO_USERS_ONLINE=Nessun utente e' online
+ONE_USER_ONLINE_0=Al momento c'e' <b>
+ONE_USER_ONLINE_1=</b> utente online:
+ONE_USER_IS_0=<b>
+ONE_USER_IS_1=</b>
+USERS_ONLINE_0=Al momento ci sono <b>
+USERS_ONLINE_1=</b> utenti online:
+USERS_ARE_0=<b>
+USERS_ARE_1=</b>
\ No newline at end of file
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jboss-portlet.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jboss-portlet.xml
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jboss-portlet.xml 2007-08-19
18:01:55 UTC (rev 7992)
@@ -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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+
+<portlet-app>
+ <remotable>true</remotable>
+
+ <portlet>
+ <portlet-name>CurrentUsersPortlet</portlet-name>
+ </portlet>
+
+ <service>
+ <service-name>UsersActivityStats</service-name>
+
<service-class>org.jboss.portal.core.identity.UsersActivityStatsService</service-class>
+
<service-ref>:service=Module,type=UsersActivityStatsService</service-ref>
+ </service>
+</portlet-app>
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/noUser.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/noUser.jsp
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/noUser.jsp 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,40 @@
+<%@ page import="org.jboss.portal.core.CoreConstants" %>
+<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~ 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. ~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+<%@ page language="java"
extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
+<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
+<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ page isELIgnored="false" %>
+<portlet:defineObjects/>
+
+<div class="box" align="center">
+ <table border="0" class="portlet-font"
cellspacing="0" cellpadding="2">
+ <tr>
+ <td colspan="1">
+ <span class="portlet-text">
+ ${n:i18n("NO_USERS_ONLINE")}
+ </span>
+ </td>
+ </tr>
+ </table>
+</div>
\ No newline at end of file
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/oneUser.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/oneUser.jsp
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/oneUser.jsp 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,46 @@
+<%@ page import="org.jboss.portal.core.CoreConstants" %>
+<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~ 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. ~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+<%@ page language="java"
extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
+<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
+<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ page isELIgnored="false" %>
+<portlet:defineObjects/>
+
+<div class="box" align="center">
+ <table border="0" class="portlet-font"
cellspacing="0" cellpadding="2">
+ <tr>
+ <td colspan="1">
+ <span class="portlet-text">
+ ${n:i18n("ONE_USER_ONLINE_0")}
+ ${n:out("USERS_COUNT")}
+ ${n:i18n("ONE_USER_ONLINE_1")}
+ <br/><br/>
+ ${n:i18n("ONE_USER_IS_0")}
+ ${n:out("USERS")}
+ ${n:i18n("ONE_USER_IS_1")}
+ </span>
+ </td>
+ </tr>
+ </table>
+</div>
\ No newline at end of file
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/users.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/users.jsp
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/users.jsp 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,46 @@
+<%@ page import="org.jboss.portal.core.CoreConstants" %>
+<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~ 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. ~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+<%@ page language="java"
extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
+<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
+<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<%@ page isELIgnored="false" %>
+<portlet:defineObjects/>
+
+<div class="box" align="center">
+ <table border="0" class="portlet-font"
cellspacing="0" cellpadding="2">
+ <tr>
+ <td colspan="1">
+ <span class="portlet-text">
+ ${n:i18n("USERS_ONLINE_0")}
+ ${n:out("USERS_COUNT")}
+ ${n:i18n("USERS_ONLINE_1")}
+ <br/><br/>
+ ${n:i18n("USERS_ARE_0")}
+ ${n:out("USERS")}
+ ${n:i18n("USERS_ARE_1")}
+ </span>
+ </td>
+ </tr>
+ </table>
+</div>
\ No newline at end of file
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portal-lib.tld
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portal-lib.tld
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portal-lib.tld 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,104 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<taglib
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ version="2.0">
+ <tlib-version>1.1</tlib-version>
+ <short-name>JBoss-Portal-tags</short-name>
+
+ <tag>
+ <name>if</name>
+ <tag-class>org.jboss.portal.core.servlet.jsp.taglib.IfTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>ctx</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>iterate</name>
+
<tag-class>org.jboss.portal.core.servlet.jsp.taglib.IterateTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>ctx</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>include</name>
+
<tag-class>org.jboss.portal.core.servlet.jsp.taglib.IncludeTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>page</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>error</name>
+
<tag-class>org.jboss.portal.core.servlet.jsp.taglib.ErrorTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>key</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>errors</name>
+
<tag-class>org.jboss.portal.core.servlet.jsp.taglib.ErrorsTag</tag-class>
+ <body-content>JSP</body-content>
+ </tag>
+
+ <tag>
+ <name>success</name>
+
<tag-class>org.jboss.portal.core.servlet.jsp.taglib.SuccessTag</tag-class>
+ <body-content>JSP</body-content>
+ </tag>
+ <function>
+ <name>i18n</name>
+
<function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class>
+ <function-signature>java.lang.String
getMessage(java.lang.String)</function-signature>
+ </function>
+
+ <function>
+ <name>out</name>
+
<function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class>
+ <function-signature>java.lang.String
out(java.lang.String)</function-signature>
+ </function>
+
+ <function>
+ <name>i18nout</name>
+
<function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class>
+ <function-signature>java.lang.String
i18nOut(java.lang.String)</function-signature>
+ </function>
+
+</taglib>
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portlet-instances.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portlet-instances.xml
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portlet-instances.xml 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,36 @@
+<?xml version="1.0" standalone="yes"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE deployments PUBLIC
+ "-//JBoss Portal//DTD Portlet Instances 2.6//EN"
+ "http://www.jboss.org/portal/dtd/portlet-instances_2_6.dtd">
+
+<deployments>
+ <deployment>
+ <instance>
+ <instance-id>CurrentUsersPortletInstance</instance-id>
+ <portlet-ref>CurrentUsersPortlet</portlet-ref>
+ </instance>
+ </deployment>
+</deployments>
\ No newline at end of file
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portlet.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portlet.xml
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/portlet.xml 2007-08-19
18:01:55 UTC (rev 7992)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<portlet-app
+
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1...
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ version="1.0">
+ <portlet>
+ <description>Current users portlet</description>
+ <portlet-name>CurrentUsersPortlet</portlet-name>
+ <display-name>Current Users Portlet</display-name>
+
<portlet-class>org.jboss.portal.core.samples.users.CurrentUsersPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <supported-locale>it</supported-locale>
+ <resource-bundle>Resource</resource-bundle>
+ <portlet-info>
+ <title>Current users</title>
+ <keywords>sample,test</keywords>
+ </portlet-info>
+ </portlet>
+</portlet-app>