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.db; 017 018/** 019 * データのコード情報を取り扱う共通インターフェースです。 020 * 021 * コードのキーとラベルの情報から、HTMLのメニューやリストを作成するための オプション 022 * タグを作成したり、与えられたキーをもとに、チェック済みのオプションタグを作成したり 023 * します。 024 * 025 * @og.group 選択データ制御 026 * 027 * @version 4.0 028 * @author Kazuhiko Hasegawa 029 * @since JDK5.0, 030 */ 031public interface Selection { 032 String NO_VALUE_OPTION = "<option value=\"\" ></option>" ; // 3.5.5.7 (2004/05/10) 033 034 /** 035 * 初期値が選択済みの 選択肢(オプション)を返します。 036 * このオプションは、引数の値を初期値とするオプションタグを返します。 037 * このメソッドでは、ラベル(短)が設定されている場合でも、これを使用せずに必ずラベル(長)を使用します。 038 * 039 * @og.rev 3.6.0.6 (2004/10/22) シーケンスアクセス機能を指定する seqFlag を導入 040 * 041 * @param selectValue 選択されている値 042 * @param seqFlag シーケンスアクセス機能 [true:ON/false:OFF] 043 * 044 * @return オプションタグ 045 */ 046 String getOption( String selectValue,boolean seqFlag ) ; 047 048 /** 049 * 初期値が選択済みの 選択肢(オプション)を返します。 050 * このオプションは、引数の値を初期値とするオプションタグを返します。 051 * このメソッドでは、引数のuseShortLabelがtrueに指定された場合に、ラベル(短)をベースとした 052 * ツールチップ表示を行います。 053 * 054 * @og.rev 5.1.3.0 (2010/02/01) 追加 055 * 056 * @param selectValue 選択されている値 057 * @param seqFlag シーケンスアクセス機能 [true:ON/false:OFF] 058 * @param useShortLabel ラベル(短)をベースとしたオプション表示を行うかどうか。 059 * 060 * @return オプションタグ 061 */ 062 String getOption( String selectValue,boolean seqFlag, boolean useShortLabel ) ; 063 064 /** 065 * 選択肢(value)に対するラベルを返します。 066 * 選択肢(value)が、存在しなかった場合は、選択肢そのものを返します。 067 * getValueLabel( XX ) は、getValueLabel( XX,false ) と同じです。 068 * 069 * @param selectValue 選択肢の値 070 * 071 * @return 選択肢のラベル 072 * @see #getValueLabel( String,boolean ) 073 */ 074 String getValueLabel( String selectValue ) ; 075 076 /** 077 * 選択肢(value)に対するラベルを返します。 078 * 選択肢(value)が、存在しなかった場合は、選択肢そのものを返します。 079 * このメソッドでは、短縮ラベルを返すかどうかを指定するフラグを指定します。 080 * getValueLabel( XX,false ) は、getValueLabel( XX ) と同じです。 081 * 082 * @og.rev 4.0.0.0 (2005/11/30) を追加 083 * 084 * @param selectValue 選択肢の値 085 * @param flag 短縮ラベル使用有無 [true:使用する/false:しない] 086 * 087 * @return 選択肢のラベル 088 * @see #getValueLabel( String ) 089 */ 090 String getValueLabel( String selectValue,boolean flag ) ; 091 092 /** 093 * 初期値が選択済みの 選択肢(ラジオボタン)を返します。 094 * このラジオボタンは、引数の値を初期値とするラジオボタンタグを返します。 095 * 096 * @og.rev 3.5.1.0 (2003/10/03) 新規作成 097 * @og.rev 3.8.6.0 (2006/09/29) useLabel 属性 追加 098 * 099 * @param name name属性になるキー文字列 100 * @param selectValue 選択されている値 101 * @param useLabel ラベル表示の有無 [true:有/false:無] 102 * 103 * @return ラジオボタンタグ 104 */ 105 String getRadio( String name, String selectValue, boolean useLabel ) ; 106 107 /** 108 * 選択肢(value)に対するラベルを返します。 109 * 選択肢(value)が、存在しなかった場合は、選択肢そのものを返します。 110 * 111 * @og.rev 3.8.6.0 (2006/09/29) 新規作成 112 * 113 * @param selectValue 選択肢の値 114 * 115 * @return 選択肢のラベル 116 */ 117 String getRadioLabel( String selectValue ) ; 118 119 /** 120 * マルチ・キーセレクトを使用するかどうかを返します。 121 * true:使用する。false:使用しない です。 122 * ただし、実際に使用するかどうかは、HTML出力時に決めることが出来ます。 123 * ここでは、USE_MULTI_KEY_SELECT が true で、USE_SIZE(=20)以上の場合に 124 * true を返します。 125 * 126 * @og.rev 3.5.5.7 (2004/05/10) 新規作成 127 * 128 * @return 選択リストで、マルチ・キーセレクトを使用するかどうか(true:使用する) 129 */ 130 boolean useMultiSelect() ; 131 132 /** 133 * オブジェクトのキャッシュが時間切れかどうかを返します。 134 * キャッシュが時間切れ(無効)であれば、true を、有効であれば、 135 * false を返します。 136 * 137 * @og.rev 4.0.0.0 (2005/01/31) 新規作成 138 * 139 * @return キャッシュが時間切れなら true 140 */ 141 boolean isTimeOver() ; 142}