Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

For uPortal 3.1 a database persistent PortalEvent logger will be included. The logger will use the same JPA/Hibernate persistence API that other new database facing code in uPortal 3 uses. The event driven portal statistics model introduced in uPortal 2.6 is used which allows new events to be logged by this handler by simply adding the appropriate Hibernate mapping information about the class.

Database Tables

The following tables are used to log portal event information.

Each PortalEvent has a corresponding event type. This is tied to a unique key specified by each implementation of PortalEvent. These keys are logged to STATS_EVENT_TYPE which is referenced by the STATS_EVENT table.

PortalEvents always include an IPerson object representing the portal user that triggered the event. The model this event logger uses is that the first time a PortalEvent is logged for a user a statistics session is created which logs the user id and the groups that user is in to the STATS_SESSION and STATS_SESSION_GROUPS tables. The ID of the stats session is then included with each entry in the STATS_EVENT table.

For each event there will be an entry added to the STATS_EVENT table. Along with possibly entries in STATS_FOLDER, STATS_CHANNEL, and STATS_RENDER_TIME based on what the PortalEvent is for.

PortalEvent Types

PortalEvent Class

STATS_EVENT_TYPE Key

Affected Tables

UserLoggedInPortalEvent

LOGIN

STATS_EVENT

UserLoggedOutPortalEvent

LOGOUT

STATS_EVENT

UserSessionCreatedPortalEvent

SESSION_CREATED

STATS_EVENT

UserSessionDestroyedPortalEvent

SESSION_DESTROYED

STATS_EVENT

ChannelAddedToLayoutPortalEvent

LAYOUT_CHANNEL_ADDED

STATS_EVENT, STATS_CHANNEL, STATS_FOLDER

ChannelUpdatedInLayoutPortalEvent

LAYOUT_CHANNEL_UPDATED

STATS_EVENT, STATS_CHANNEL, STATS_FOLDER

ChannelMovedInLayoutPortalEvent

LAYOUT_CHANNEL_MOVED

STATS_EVENT, STATS_CHANNEL, STATS_FOLDER

ChannelRemovedFromLayoutPortalEvent

LAYOUT_CHANNEL_REMOVED

STATS_EVENT, STATS_CHANNEL, STATS_FOLDER

ChannelInstanciatedInLayoutPortalEvent

CHANNEL_INSTANTIATED

STATS_EVENT, STATS_CHANNEL, STATS_FOLDER

ChannelTargetedInLayoutPortalEvent

CHANNEL_TARGETED

STATS_EVENT, STATS_CHANNEL, STATS_FOLDER

ChannelRenderedInLayoutPortalEvent

CHANNEL_RENDERED

STATS_EVENT, STATS_CHANNEL, STATS_FOLDER, STATS_RENDER_TIME

PortletActionInLayoutPortalEvent

PORTLET_ACTION

STATS_EVENT, STATS_CHANNEL, STATS_FOLDER, STATS_RENDER_TIME

PublishedChannelDefinitionPortalEvent

CHANNEL_DEFINITION_PUBLISHED

STATS_EVENT, STATS_CHANNEL

ModifiedChannelDefinitionPortalEvent

CHANNEL_DEFINITION_MODIFIED

STATS_EVENT, STATS_CHANNEL

RemovedChannelDefinitionPortalEvent

CHANNEL_DEFINITION_REMOVED

STATS_EVENT, STATS_CHANNEL

UserAddedFolderToLayoutPortalEvent

LAYOUT_FOLDER_ADDED

STATS_EVENT, STATS_FOLDER

UserUpdatedFolderInLayoutPortalEvent

LAYOUT_FOLDER_UPDATED

STATS_EVENT, STATS_FOLDER

UserMovedFolderInLayoutPortalEvent

LAYOUT_FOLDER_MOVED

STATS_EVENT, STATS_FOLDER

UserRemovedFolderFromLayoutPortalEvent

LAYOUT_FOLDER_REMOVED

STATS_EVENT, STATS_FOLDER

PageRenderTimePortalEvent

PAGE_RENDER_TIME

STATS_EVENT, STATS_FOLDER, STATS_RENDER_TIME

Event Logging Configuration

TODO:

  • how to enable the logger
  • how to configure which events are logged

Adding Events / Modifying Mappings

The Hibernate entity mappings for the logged PortalEvents is done in the file uportal-impl/src/main/resources/properties/db/stats/portalEvents.hbm.xml. If you add a new PortalEvent implementation that should be logged to the database it needs to be mapped correctly in this file. Unmapped PortalEvents are ignored by the database logging code.

  • No labels