1/*2 * Licensed to the Apache Software Foundation (ASF) under one or more3 * contributor license agreements. See the NOTICE file distributed with4 * this work for additional information regarding copyright ownership.5 * The ASF licenses this file to You under the Apache License, Version 2.06 * (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 * 9 * http://www.apache.org/licenses/LICENSE-2.010 * 11 * Unless required by applicable law or agreed to in writing, software12 * distributed under the License is distributed on an "AS IS" BASIS,13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14 * See the License for the specific language governing permissions and15 * limitations under the License.16 */17packageorg.apache.jetspeed.portlets.profiler;
1819// import java.io.Serializable;20import java.util.Collection;
21//import java.util.LinkedList;22import java.util.Map;
2324import javax.faces.context.FacesContext;
2526import org.apache.jetspeed.CommonPortletServices;
27import org.apache.jetspeed.profiler.Profiler;
2829/***30 * Profile Rules Extent31 *32 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>33 * @version $Id: ProfileRulesExtent.java 348264 2005-11-22 22:06:45Z taylor $34 */35publicclassProfileRulesExtent// implements Serializable36 {
3738public Collection getExtent()
39 {
40 Map appMap = FacesContext.getCurrentInstance().getExternalContext().getApplicationMap();
41 Profiler profiler = (Profiler)appMap.get(CommonPortletServices.CPS_PROFILER_COMPONENT);
42return profiler.getRules(); // TODO: optimize with cache43 }
44 }