001// Licensed under the Apache License, Version 2.0 (the "License");
002// you may not use this file except in compliance with the License.
003// You may obtain a copy of the License at
004//
005//     http://www.apache.org/licenses/LICENSE-2.0
006//
007// Unless required by applicable law or agreed to in writing, software
008// distributed under the License is distributed on an "AS IS" BASIS,
009// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
010// See the License for the specific language governing permissions and
011// limitations under the License.package org.apache.tapestry5.internal.services;
012package org.apache.tapestry5.internal.services;
013
014import org.apache.tapestry5.internal.InternalSymbols;
015
016import java.util.Set;
017
018/**
019 * Service providing methods related to names that shouldn't be used as form control element
020 * names or ids.
021 *
022 * @see InternalSymbols#RESERVED_FORM_CONTROL_NAMES
023 */
024public interface FormControlNameManager
025{
026    /**
027     * Returns the set of reserved form names (ones that shouldn't be used as HTML elements
028     * client ids).
029     *
030     * @return a {@link Set} of {@link String}s.
031     */
032    Set<String> getReservedNames();
033
034    /**
035     * Tells whether a given name is reserved.
036     *
037     */
038    boolean isReserved(String name);
039
040}