OSDN Git Service

Ver8.5.2.0
[opengion/opengionV8.git] / uap / webapps / gf / src / org / opengion / plugin / column / Editor_HIDDEN.java
1 /*
2  * Copyright (c) 2009 The openGion Project.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific language
14  * governing permissions and limitations under the License.
15  */
16 package org.opengion.plugin.column;
17
18 import org.opengion.hayabusa.db.AbstractEditor;
19 import org.opengion.hayabusa.db.CellEditor;
20 import org.opengion.hayabusa.db.DBColumn;
21 import org.opengion.fukurou.util.XHTMLTag;
22 import org.opengion.fukurou.util.Attributes;
23
24 /**
25  * カラムのデータをHIDDENで編集する場合に使用するエディタークラスです。
26  *
27  * つまり、編集して欲しくないが、データは、飛ばしたい場合に使用します。
28  *
29  * カラムの表示に必要な属性は、DBColumn オブジェクト より取り出します。
30  * このクラスは、DBColumn オブジェクト毎に1つ作成されます。
31  *
32  * @og.rev 3.3.3.3 (2003/08/06) 新規作成
33  * @og.group データ編集
34  *
35  * @version  4.0
36  * @author   Kazuhiko Hasegawa
37  * @since    JDK5.0,
38  */
39 public class Editor_HIDDEN extends AbstractEditor {
40         /** このプログラムのVERSION文字列を設定します。       {@value} */
41         private static final String VERSION = "6.4.4.2 (2016/04/01)" ;
42
43         /**
44          * デフォルトコンストラクター。
45          * このコンストラクターで、基本オブジェクトを作成します。
46          *
47          */
48         public Editor_HIDDEN() { super(); }             // これも、自動的に呼ばれるが、空のメソッドを作成すると警告されるので、明示的にしておきます。
49
50         /**
51          * DBColumnオブジェクトを指定したprivateコンストラクター。
52          *
53          * @og.rev 3.5.5.7 (2004/05/17) attributes.clear() を追加
54          * @og.rev 3.5.6.0 (2004/06/18) XHTMLTag の 内部配列 INPUT_KEY を隠蔽します。
55          * @og.rev 4.3.6.0 (2009/04/01) eventColumn対応
56          * @og.rev 5.1.7.0 (2010/06/01) 動的プルダウン実装見直し
57          * @og.rev 6.4.4.2 (2016/04/01) nameのfinal化
58          *
59          * @param       clm     DBColumnオブジェクト
60          */
61         private Editor_HIDDEN( final DBColumn clm ) {
62         //      super();                // 6.4.1.1 (2016/01/16) PMD refactoring. It is a good practice to call super() in a constructor
63                 super( clm );   // 6.4.4.2 (2016/04/01) nameのfinal化
64         //      name  = clm.getName();
65
66                 // 6.1.1.0 (2015/01/17) Attributesの連結記述
67                 attributes = new Attributes()
68                         .set( "type" ,"hidden" );
69
70                 tagBuffer.add( XHTMLTag.inputAttri( attributes ) );
71         }
72
73         /**
74          * 各オブジェクトから自分のインスタンスを返します。
75          * 自分自身をキャッシュするのか、新たに作成するのかは、各サブクラスの実装に
76          * まかされます。
77          *
78          * @param       clm     DBColumnオブジェクト
79          *
80          * @return      CellEditorオブジェクト
81          * @og.rtnNotNull
82          */
83         public CellEditor newInstance( final DBColumn clm ) {
84                 return new Editor_HIDDEN( clm );
85         }
86 }