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 */ 016 package org.opengion.hayabusa.html; 017 018 import org.opengion.hayabusa.common.HybsSystem; 019 020 /** 021 * VViewForm オブジェクトを取得する為に使用する?ファクトリクラスです? 022 * 023 * ViewForm オブジェク?の識別ID を?に、ViewFormFactory.newInstance( String id ) 024 * メソ?で?ViewForm オブジェクトを取得します? 025 * ViewFormFactory.close( ViewForm viewForm ) メソ?で??部? ViewFormFactory に 026 * オブジェクトを戻す事によって,ViewForm オブジェクト?プ?リングを行なって?す? 027 * 028 * 実?マッピングの関係か?識別ID は、ViewFormFactory で static 定義しま? 029 * 大前提として、ユーザー共通で使用することを?えており,ユーザー個別にプ?ル 030 * する?があるなら?, HttpSession オブジェクトに登録すべきです? 031 * 032 * @og.group 画面表示 033 * 034 * @version 4.0 035 * @author Kazuhiko Hasegawa 036 * @since JDK5.0, 037 */ 038 public final class ViewFormFactory { 039 /** newInstance() 時??ォルトクラス {@value} */ 040 public static final String DEFAULT = "HTMLTable" ; 041 042 /** 043 * ?ォルトコンストラクターをprivateにして? 044 * オブジェクト?生?をさせな??する? 045 * 046 */ 047 private ViewFormFactory() { 048 } 049 050 /** 051 * ViewForm オブジェクトを取得します? 052 * ?初期化を行な?により,実際に?となるまで ViewForm オブジェクト? 053 * 作?しません? 054 * 055 * @og.rev 3.5.4.2 (2003/12/15) ViewForm のサブクラス名変更? 056 * @og.rev 3.5.6.0 (2004/06/18) ?プラグイン関連付け設定を、シス?パラメータ に記述します? 057 * @og.rev 3.5.6.2 (2004/07/05) setID メソ?名がまぎらわし?、変更します? 058 * @og.rev 4.0.0.0 (2005/01/31) キーの?を、ViewForm. から、ViewForm_ に変更します? 059 * 060 * @param id 接続?ID 061 * 062 * @return ViewFormオブジェク? 063 */ 064 public static ViewForm newInstance( final String id ) { 065 String type = ( id == null ) ? DEFAULT : id ; 066 String cls = HybsSystem.sys( "ViewForm_" + type ) ; // 4.0.0 (2005/01/31) 067 ViewForm vf = (ViewForm)HybsSystem.newInstance( cls ); // 3.5.5.3 (2004/04/09) 068 vf.setId( type ); // 3.5.6.2 (2004/07/05) 069 070 return vf; 071 } 072 }