001/* 002 * Copyright (c) 2009 The openGion Project. 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, 013 * either express or implied. See the License for the specific language 014 * governing permissions and limitations under the License. 015 */ 016package org.opengion.hayabusa.taglib; 017 018/** 019 * プルダウンメニューやデータリストを作成する場合の共通インターフェースです。 020 * 021 * これは、BODY部の optionタグからの情報を、取得する為に、SelectTag と DatalistTag の 022 * 共通インターフェースとして定義します。 023 * 024 * @og.rev 5.7.1.0 (2013/12/06) 新規追加 025 * @version 4.0 026 * @author Kazuhiko Hasegawa 027 * @since JDK5.0, 028 */ 029public interface OptionAncestorIF { 030 031 /** 032 * メニュー項目の選択項目を追加します。 033 * 034 * select タグのBODY要素の OptionTag よりアクセスされます。 035 * 036 * @param opt オプションタグ文字列 037 */ 038 void addOption( final String opt ) ; 039 040 /** 041 * メニュー項目の最後の項目を削除します。 042 * 043 * select タグのBODY要素の OptionTag よりアクセスされます。 044 * 045 * @og.rev 6.8.0.0 (2017/06/02) メニュー項目の最後の項目を削除。 046 */ 047 void removeLast() ; 048 049 /** 050 * 値を外部から取り出します。 051 * 052 * OptionTag で、value を取り出して、内部の値と同じ場合は、選択状態にします。 053 * 054 * @return 内部に設定された値 055 */ 056 String getValue(); 057 058 /** 059 * 複数選択可能時に全選択を設定するかどうかを返します。 060 * 061 * これは、上位入れ子のタグの OptionTag で、multipleAll を取り出して、 062 * true であれば、全選択に設定します。 063 * 064 * @return 全選択:true / 通常:false 065 */ 066 boolean isMultipleAll(); 067 068 /** 069 * パラメーター変換({@XXXX}の置き換えをしない状態のパラメーターをセットします。 070 * 071 * @param param パラメーター 072 */ 073 void setRawParam( final String param ); 074 075 /** 076 * セレクトメニューの場合、キー:ラベル形式で表示するかどうか[true/false/null]を返します。 077 * 078 * これは、上位入れ子のタグの OptionTag で、addKeyLabel を取り出して、 079 * true であれば、キー:ラベル形式 のオプションを、#addOption( String ) で 080 * 登録させます。 081 * 082 * @og.rev 6.0.4.0 (2014/11/28) キー:ラベル形式で表示するかどうか。新規追加 083 * 084 * @return true:キー:ラベル形式/false:ラベルのみ/null:指定通り 085 * @see #addOption( String ) 086 */ 087 String getAddKeyLabel(); 088}