KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > services > portletstats > PortletStatsService


1 /*
2  * Copyright 2000-2001,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.jetspeed.services.portletstats;
18
19 // turbine stuff
20
import org.apache.turbine.util.RunData;
21 import org.apache.turbine.services.Service;
22
23 //jetspeed stuff
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 JavaDoc 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 JavaDoc 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 JavaDoc statusCode, long time);
70
71 }
72
73
Popular Tags