1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.services.portletstats;
18
19
20 import org.apache.turbine.util.RunData;
21 import org.apache.turbine.services.Service;
22
23
24 import org.apache.jetspeed.portal.Portlet;
25
26 /***
27 * This service is responsible for logging access to portlets.
28 *
29 * @author <a href="mailto:morciuch@apache.org">Mark Orciuch</a>
30 * @version $Id: PortletStatsService.java,v 1.3 2004/02/23 03:36:27 jford Exp $
31 */
32 public interface PortletStatsService extends Service
33 {
34
35 /*** The default control to use when none is specified */
36 public String SERVICE_NAME = "PortletStats";
37
38 /***
39 * Returns sevice enabled state
40 *
41 * @return true if service is enabled
42 */
43 public boolean isEnabled();
44
45 /***
46 * Sets service enabled state
47 *
48 * @param state new state
49 * @return original service enabled state
50 */
51 public boolean setEnabled(boolean state);
52
53 /***
54 * Logs portlet access using default load time.
55 *
56 * @param data Current request info object
57 * @param portlet Portlet being logged
58 * @param statusCode HTTP status code. For now, either 200 (successfull) or 401 (unauthorized)
59 */
60 public void logAccess(RunData data, Portlet portlet, String statusCode);
61
62 /***
63 * Logs portlet access.
64 *
65 * @param data Current request info object
66 * @param portlet Portlet being logged
67 * @param statusCode HTTP status code. For now, either 200 (successfull) or 401 (unauthorized)
68 */
69 public void logAccess(RunData data, Portlet portlet, String statusCode, long time);
70
71 }
72