001/* 002 * Copyright 2011 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.web.sitemap; 017 018import java.util.List; 019 020import org.ametys.web.repository.page.Page; 021import org.ametys.web.repository.site.Site; 022import org.ametys.web.repository.sitemap.Sitemap; 023 024/** 025 * Interface representing a sitemap decorator 026 */ 027public interface SitemapDecoratorsHandler 028{ 029 /** Avalon Role */ 030 public static final String ROLE = SitemapDecoratorsHandler.class.getName(); 031 032 /** 033 * Get the list of available decorators 034 * @param site the site name 035 * @return the list of available decorators 036 */ 037 public List<SitemapDecorator> getDecorators (Site site); 038 039 /** 040 * Get the list of available decorators 041 * @param sitemap the sitemap 042 * @return the list of available decorators 043 */ 044 public List<SitemapDecorator> getDecorators (Sitemap sitemap); 045 046 /** 047 * Get the list of decorators for a given page 048 * @param page the page 049 * @return decorators of page 050 */ 051 public List<SitemapDecorator> getDecorators (Page page); 052 053 /** 054 * Get the icon of the page 055 * @param page the page 056 * @return the file icon path 057 */ 058 public SitemapIcon getIcon (Page page); 059 060 /** 061 * Get the list of available icons 062 * @param site the site name 063 * @return the list of available icons 064 */ 065 public List<SitemapIcon> getIcons (Site site); 066}