Skip navigation links
SAP NetWeaver 7.50 SP 13 KMC

Package com.sapportals.wcm.repository.service.accessstatistic

Provides a service that keeps track of the time and date of content access.

See: Description

Package com.sapportals.wcm.repository.service.accessstatistic Description

Provides a service that keeps track of the time and date of content access.

Package Specification

Purpose
Detailed Concept
Interfaces and Classes
Configuration
Code Samples

Purpose

The access statistics service can determine when a resource was last read by a specific user. It stores the date when the resource was read for each user that accesses the resource.

The service is particularly useful for an application that needs to know whether a new version of a resource has been read by a specific user. When the resource is changed, the last-read date is removed and is only reset for the user in question when he or she accesses the resource. Therefore, if no last read-date is available, the application can recognize that this particular user has not yet viewed the new version of the resource.

Detailed Concept

When the access statistics service is configured for a repository, then the last-read date is automatically stored for each user that accesses resources in the repository. The date is stored as a user-related application property of the resource on the database. Whenever the resource is read or changed, the service registers the event and updates the property in the database.

When the service is in operation, it makes use of an AccessStatistic property filter. The application filter is necessary because the information when a resource was accessed is stored on the database as an application property. The filter has the purpose of making the application property visible as a normal property of the resource.

Interfaces and Classes

The interfaces available for using the access statistics service are:

IAccessStatisticsManager
This simply offers a method to get an IAccessStatistic object

IAccessStatistic
This serves as a container for the access statistics of a resource

Configuration

The access statistic service is preconfigured in the KM standard configuration. No further configuration is possible. However, it is necessary to register the access statistic service and the application property service for each repository where it is to be active.
For more information on how to register the service with the help of the user interface of the Content Management configuration framework, see the documentation Administering Content Management.

Code Samples

As the use of the access statistics service is straightforward, the following summarizes the steps to use the service without providing a code sample. If an application wants to find out the last date on which a user read a resource or whether a resource has been read, it needs to:

  1. Get an instance of the IAccessStatisticsManager.
  2. Obtain an IAccessStatistic object with the getAccessStatistic() method of the IAccessStatisiticsManager
  3. Use the method getLastReadDate(IResource resource) of the IAccessStatistic interface to find out the date when the resource was last read by the user stored in the resource context.
Skip navigation links
SAP NetWeaver 7.50 SP 13 KMC

Copyright 2018 SAP AG Complete Copyright Notice