001/* 002 * Copyright 2025 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 org.ametys.runtime.i18n.I18nizableText; 019import org.ametys.runtime.plugin.component.Prioritizable; 020import org.ametys.web.repository.page.SitemapElement; 021 022/** 023 * Interface representing a sitemap's indicator (icon or decorator) 024 */ 025public interface SitemapTreeIndicator extends Prioritizable 026{ 027 /** 028 * Get the indicator's id 029 * @return the id 030 */ 031 public String getId(); 032 033 /** 034 * The indicator's label 035 * @return the label. Can be null 036 */ 037 public I18nizableText getLabel(); 038 039 /** 040 * The icon path 041 * @return The icon path. Can be null. 042 */ 043 public String getIcon(); 044 045 /** 046 * The icon glyph 047 * @return The icon glyph. Can be null. 048 */ 049 public String getIconGlyph(); 050 051 /** 052 * The icon decorator 053 * @return The icon decorator 054 */ 055 public String getIconDecorator(); 056 057 /** 058 * Check if the sitemap element matches the indicator's conditions 059 * @param sitemapElement the sitemap element to check 060 * @return true if the element matches the indicator 061 */ 062 public boolean matches(SitemapElement sitemapElement); 063}