1 16 17 package org.apache.jetspeed.services; 18 19 import org.apache.jetspeed.services.portletstats.PortletStatsService; 21 import org.apache.jetspeed.portal.Portlet; 22 23 import org.apache.turbine.services.TurbineServices; 25 import org.apache.turbine.util.RunData; 26 27 28 36 public class PortletStats { 37 38 41 public static final String ACCESS_OK = "200"; 42 43 46 public static final String ACCESS_DENIED = "401"; 47 48 52 private static PortletStatsService getService() 53 { 54 return (PortletStatsService)TurbineServices 55 .getInstance() 56 .getService(PortletStatsService.SERVICE_NAME); 57 } 58 59 62 public static boolean isEnabled() 63 { 64 return getService().isEnabled(); 65 } 66 67 70 public static boolean setEnabled(boolean state) 71 { 72 return getService().setEnabled(state); 73 } 74 75 78 public static void logAccess(RunData data, Portlet portlet, String statusCode) 79 { 80 getService().logAccess(data, portlet, statusCode); 81 } 82 83 86 public static void logAccess(RunData data, Portlet portlet, String statusCode, long time) 87 { 88 getService().logAccess(data, portlet, statusCode, time); 89 } 90 } 91 | Popular Tags |