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.core.ui.widgets.richtext; 017 018import java.util.Set; 019 020/** 021 * An attribute configuration for a {@link RichTextConfigurationTag} 022 */ 023public interface RichTextConfigurationAttribute 024{ 025 /** 026 * Get the attribute name 027 * @return a non null and non empty value 028 */ 029 public String getName(); 030 031 /** 032 * Get the default value for this attribute. An attribute with a default value will always be present in the code. 033 * @return Can be null if there is no default value. 034 */ 035 public String getDefaultValue(); 036 037 /** 038 * Get the values that can be used on this attribute. 039 * @return A non null set of possible values. 040 */ 041 public Set<String> getAuthorizedValues(); 042 043 /** 044 * Only applyable to the "class" attribute.<br> 045 * Between the authorized values, some are "technical" values (by opposition to "style" values). Theses values should not be removed if the style of the tag change.<br> 046 * For example when going from a "bordered" image to a "large bordered" image... the image should stay "float to the right". 047 * @return A non null set of values. 048 */ 049 public Set<String> getTechnicalValues(); 050}