[jboss-jira] [JBoss JIRA] Created: (JBPORTAL-1606) Portlet and service to see current users online

Luca Stancapiano (JIRA) jira-events at lists.jboss.org
Sat Jul 21 12:16:47 EDT 2007


Portlet and service to see current users online
-----------------------------------------------

                 Key: JBPORTAL-1606
                 URL: http://jira.jboss.com/jira/browse/JBPORTAL-1606
             Project: JBoss Portal
          Issue Type: Task
      Security Level: Public (Everyone can see)
          Components: Portal Core, Portal Samples
    Affects Versions: 2.6 Final
         Environment: developed with Eclipse 3.2.2 and jboss portal from http://anonsvn.jboss.org/repos/portal/tags/JBoss_Portal_2_6_0
            Reporter: Luca Stancapiano
         Assigned To: Julien Viet
             Fix For: 2.6.1 Final


I developed together with Bolek a portlet and service to see current users online.

UI part is into portal-samples project. Modified and added files are:

// descriptors for portlet......I add portal-lib.tld to get support for i18n and Context to send info from portlet to jsp
core-samples/src/resources/portal-users-samples-war/WEB-INF/portlet.xml
core-samples/src/resources/portal-users-samples-war/WEB-INF/jboss-portlet.xml
core-samples/src/resources/portal-users-samples-war/WEB-INF/portal-lib.tld
core-samples/src/resources/portal-users-samples-war/WEB-INF/portlet-instances.xml

// I create three jsp....one when no user is online, one when there is a only user online and one for all other users online
core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/oneUser.jsp
core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/users.jsp
core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/noUser.jsp

// I add support for i18n with english and italian language
core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource.properties
core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_it.properties

// this is a simple portlet that call a UserActivityService that schedule activities of users. This portlet print current users online and number of current users online
core-samples/src/main/org/jboss/portal/core/samples/users/CurrentUsersPortlet.java

// I updated build.xml to build portal-users-samples.war package to deploy it into application server
core-samples/build.xml


part about service and interceptor is into core:

// we add UsersActivityStatsService service and UserStats interceptor. The interceptor is added into InterceptorStackFactory,type=Server of jboss portal to catch all activities of users.
// rows updated are: 
core/src/resources/portal-core-sar/META-INF/jboss-service.xml

// classes for  UsersActivityStatsService service. There are an interface of service, an implementation and a class that represents an user activity registered into the service
core/src/main/org/jboss/portal/core/identity/UsersActivityStatsServiceImpl.java
core/src/main/org/jboss/portal/core/identity/UsersActivityStatsService.java
core/src/main/org/jboss/portal/core/identity/UserActivity.java

// this is UserStats interceptor
core/src/main/org/jboss/portal/core/aspects/server/UserStatsInterceptor.java


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list