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.develop;
017    
018    import java.util.Map;
019    import java.util.List;
020    
021    import org.opengion.fukurou.util.StringUtil;
022    import org.opengion.fukurou.xml.JspParserFilter;
023    
024    /**
025     * コンストラクタに引数で与えられた?スタ??タ??を?に、特定?JSPタグ??を生成する基底クラス?
026     * マスタ??タ??はGF92のNMSYORIカラ??種別毎にJspConvertEntityオブジェクトに事前に準備する?がある?
027     *
028     * ?
029     * JspConvertEntity e = new JspConvertEntity("RESULT");
030     * e.setTableName("GF92");
031     * e.setColumnName("NMSYORI");
032     *
033     *
034     * 継承先?クラスのexecuteメソ?では、引数のマスタ??タ??からJSPタグの??を生成する??実?ます?
035     *
036     * @author Takeshi.Takada
037     *
038     */
039    public final class JspCreateFactory {
040    
041            /** 作?するクラスのベ?スとなる文字?  {@value}     */
042            private static final String CLS_BASE = "org.opengion.plugin.develop.JspCreate_" ;
043    
044            /**
045             * プライベ???ォルトコンストラクタ
046             *
047             * こ?クラスはファクトリクラスであり、インスタンスの作?を禁止します?
048             */
049            private JspCreateFactory() {}
050    
051            /**
052             * コンストラクタ(メイン)
053             *
054             * 引数のキー??を使用して、新しい JspParserFilter オブジェクトを作?します?
055             * 基準文字?は?org.opengion.plugin.develop.JspCreate_" です?
056             *
057             * @param       key             JspCreate_****の****部?
058             * @param       master  マスタ??タ??のMap
059             *
060             * @return      新しく作?されたJspParserFilter
061             */
062            public static JspParserFilter newInstance( final String key , final Map<String,List<JspConvertEntity>> master ) {
063    
064                    AbstractJspCreate jspGen = (AbstractJspCreate)StringUtil.newInstance( CLS_BASE + key );
065    
066                    jspGen.init( master );
067    
068                    return jspGen ;
069            }
070    }