001/* 002 * Copyright 2017 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.plugins.linkdirectory.dynamic; 017 018import org.apache.avalon.framework.component.Component; 019import org.xml.sax.ContentHandler; 020 021import org.ametys.runtime.i18n.I18nizableText; 022 023/** 024 * Interface representing a provider of dynamic information 025 */ 026public interface DynamicInformationProvider extends Component 027{ 028 029 /** 030 * SAX the dynamic information for a specific link 031 * @param contentHandler The contenthandler to sax into 032 * @param linkId The id of link. 033 * @param siteName The current site name 034 * @param language The language used. 035 * @param nbItems The number of item to get for tooltip. 036 * @throws Exception if an exception error occurs. 037 */ 038 public void saxDynamicInformation(ContentHandler contentHandler, String linkId, String siteName, String language, int nbItems) throws Exception; 039 040 /** 041 * Get id of this provider 042 * @return The id of this provider 043 */ 044 public String getId(); 045 046 /** 047 * Get label of this provider 048 * @return The label of this provider 049 */ 050 public I18nizableText getLabel(); 051 052}