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 at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * 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 and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.services.portletstats;
1819// turbine stuff20import org.apache.turbine.util.RunData;
21import org.apache.turbine.services.Service;
2223//jetspeed stuff24import org.apache.jetspeed.portal.Portlet;
2526/***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 */32publicinterfacePortletStatsServiceextends Service
33 {
3435/*** The default control to use when none is specified */36public String SERVICE_NAME = "PortletStats";
3738/***39 * Returns sevice enabled state40 * 41 * @return true if service is enabled42 */43publicboolean isEnabled();
4445/***46 * Sets service enabled state47 * 48 * @param state new state49 * @return original service enabled state50 */51publicboolean setEnabled(boolean state);
5253/***54 * Logs portlet access using default load time.55 * 56 * @param data Current request info object57 * @param portlet Portlet being logged58 * @param statusCode HTTP status code. For now, either 200 (successfull) or 401 (unauthorized)59 */60publicvoid logAccess(RunData data, Portlet portlet, String statusCode);
6162/***63 * Logs portlet access.64 * 65 * @param data Current request info object66 * @param portlet Portlet being logged67 * @param statusCode HTTP status code. For now, either 200 (successfull) or 401 (unauthorized)68 */69publicvoid logAccess(RunData data, Portlet portlet, String statusCode, long time);
7071 }
72