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.taglib;
017    
018    import org.opengion.hayabusa.html.ViewStackTableParam;
019    
020    import static org.opengion.fukurou.util.StringUtil.nval ;
021    
022    import java.io.ObjectOutputStream;
023    import java.io.ObjectInputStream;
024    import java.io.IOException;
025    
026    /**
027     * viewã‚¿ã‚°ã® viewFormType ã?HTMLGanttTable ã®å ´åˆã«ãƒ‘ラメータを設定ã—ã¾ã™ã?
028     *
029     * ガントãƒãƒ£ãƒ¼ãƒˆã‚’表示ã™ã‚‹ã€ViewForm_HTMLGanttTable クラスã«å¯¾ã—ã¦ã€å„種パラメータã‚?
030     * 設定ã—ã¾ã™ã?
031     * パラメータãŒè¨­å®šã•れã¦ã?ªã??åˆã?ã€ViewStackTableParam ã®åˆæœŸå€¤ã?
032     * 使用ã•れã¾ã™ã?
033     * (パラメータを使用ã™ã‚‹ã«ã¯ã€viewã‚¿ã‚°ã®useParam 属æ?ã‚’trueã«è¨­å®šã™ã‚‹å¿?¦ãŒã‚りã¾ã™ã?)
034     *
035     * @og.formSample
036     * â—å½¢å¼ï¼?lt;og:stackParam stackColumns="PRJCODE,RESOURCE_ID" />
037     * â—body?šãªã?
038     *
039     * â—Tag定義??
040     *   <og:stackParam
041     *       stackColumns       ã€TAG】ç©ä¸Šå˜ä½ã¨ã™ã‚‹ã‚«ãƒ©ãƒ?(カンマ区åˆ?‚Š)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?(å¿??)
042     *       costColumn         ã€TAG】å?部ç©ä¸Šã’ã™ã‚‹å ´åˆã?工数カラãƒ?‚’ã‚»ãƒ?ƒˆã—ã¾ã?
043     *       innerStack         ã€TAG】工数ã®å†?ƒ¨ç©ã¿ä¸Šã’ã‚’ã™ã‚‹ã‹ã©ã?‹[true/false]æŒ?®šã—ã¾ã?åˆæœŸå€¤:false)
044     *       debug              ã€TAG】デãƒãƒƒã‚°æƒ??ã‚’å?力ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false)
045     *   />
046     *
047     * @og.rev 5.5.7.0 (2012/10/01) æ–°è¦ä½œæ?
048     * @og.group ç”»é¢è¡¨ç¤º
049     *
050     * @version  5.0
051     * @author       Takahashi Masakazu
052     * @since    JDK5.0,
053     */
054    public class ViewStackParamTag extends ViewParamTag {
055            //* ã“ã?プログラãƒ??VERSIONæ–?­—å?を設定ã—ã¾ã™ã?       {@value} */
056            private static final String VERSION = "5.6.1.2 (2013/02/22)" ;
057    
058            private static final long serialVersionUID = 561220130222L ;
059    
060            /**
061             * ã€TAG】ç©ä¸Šå˜ä½ã¨ã™ã‚‹ã‚«ãƒ©ãƒ?(カンマ区åˆ?‚Š)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã?
062             *
063             * @og.tag
064             * 工数ç©ä¸Šã’ã®ã‚­ãƒ¼ã¨ãªã‚‹ã‚«ãƒ©ãƒ?を指定ã—ã¾ã™ã?
065             * 
066             * è¤?•°ã‚ã‚‹å ´åˆã?ã€ã‚«ãƒ³ãƒžåŒºåˆ?‚Šã§æŒ?®šã§ãã¾ã™ã?
067             * ãƒ??ブルモãƒ?ƒ«ã¯ç©ä¸Šå˜ä½ï¼‹ã‚¿ã‚¹ã‚¯å˜ä½ã§OrderByãŒã‹ã‹ã£ã¦ã?‚‹å¿?¦ãŒã‚りã¾ã™ã?
068             *
069             * @param       stackColumns タスク?ˆã‚¬ãƒ³ãƒˆï¼‰ã?カラãƒ?(カンマ区åˆ?‚Š)
070             */
071            public void setStackColumns( final String stackColumns ) {
072                    putParam( ViewStackTableParam.STACK_COLUMNS_KEY ,
073                                      nval( getRequestParameter( stackColumns ),null ) );
074            }
075            
076            /**
077             * ã€TAG】工数関係ã?カラãƒ?¼ˆå·¥æ•°,é–‹å§‹æ—¥,終äº?—¥?‰ã‚’æŒ?®šã—ã¾ã™ã?
078             *
079             * @og.tag
080             * 工数関係ã?カラãƒ?を指定ã—ã¾ã™ã?
081             * 工数(x.y)ã€?–‹å§‹æ—¥(yyyyMMdd)ã€çµ‚äº?—¥(yyyyMMdd)
082             * ã®?“ã¤ã®ã‚«ãƒ©ãƒ?‚’カンマ区åˆ?‚Šã§è¨­å®šã—ã¦ä¸‹ã•ã??
083             * エンジンå†?ƒ¨ã§å·¥æ•°ç©ä¸Šã’を行ã†å ´åˆã?å¿??ã§ã™ã?
084             * 
085             * ãƒ??ブルモãƒ?ƒ«ã¯ç©ä¸Šå˜ä½ï¼‹ã‚¿ã‚¹ã‚¯å˜ä½ã§OrderByãŒã‹ã‹ã£ã¦ã?‚‹å¿?¦ãŒã‚りã¾ã™ã?
086             *
087             * @og.rev 5.5.8.3 (2012/11/17)
088             *
089             * @param       costColumns 工数ã®ã‚«ãƒ©ãƒ?
090             */
091            public void setCostColumns( final String costColumns ) {
092                    putParam( ViewStackTableParam.COST_COLUMNS_KEY ,
093                                      nval( getRequestParameter( costColumns ),null ) );
094            }
095            
096            /**
097             * ã€TAG】エンジンå†?ƒ¨ã§ç©ä¸Šã’ã™ã‚‹ã‹ã©ã?‹ã‚’指定ã—ã¾ã™ã?
098             *
099             * @og.tag
100             * エンジンå†?ƒ¨ã§ç©ä¸Šã’を行ã†ã‹ã©ã?‹ã‚’指定ã—ã¾ã™ã?
101             * å†?ƒ¨ã§ç©ä¸Šã’を行ã£ãŸå?åˆã?ã€HTMLStackGanttTableã§ã¯ã‚¬ãƒ³ãƒˆè¡Œã?出力を行ã„ã¾ã›ã‚“ã€?
102             * åˆæœŸå€¤ã¯false?ˆç©ä¸Šã’ã—ãªã?¼‰ã§ã™ã?
103             *
104             * @og.rev 5.5.8.3 (2012/11/17)
105             *
106             * @param       flg å†?ƒ¨ç©ä¸Šã’ã‚’ã™ã‚‹ã‹ã©ã?‹[true/false]
107             */
108            public void setInnerStack( final String flg ) {
109                    putParam( ViewStackTableParam.INNER_STACK_KEY ,
110                                      nval( getRequestParameter( flg ),ViewStackTableParam.INNER_STACK_VALUE ) );
111            }
112            
113            /**
114             * ã€TAG】エンジンå†?ƒ¨ã§ç©ä¸Šã’ã™ã‚‹å ´åˆã«ä¼‘日もç©ä¸Šã’ã‚‹ã‹ã©ã?‹ã‚’指定ã—ã¾ã™ã?
115             *
116             * @og.tag
117             * エンジンå†?ƒ¨ã§ç©ä¸Šã’を行ã†å ´åˆã«ä¼‘日もç©ä¸Šã’ã‚‹ã‹ã©ã?‹ã‚’指定ã—ã¾ã™ã?
118             * zoomãŒDAYã®å ´åˆã?ã¿æœ‰åйã§ã™ã?
119             * åˆæœŸå€¤ã¯true?ˆç©ä¸Šã’ã™ã‚‹?‰ã§ã™ã?
120             *
121             * @og.rev 5.5.8.3 (2012/11/17)
122             *
123             * @param       flg 休日ç©ä¸Šã’ã‚’ã™ã‚‹ã‹ã©ã?‹[true/false]
124             */
125            public void setStackHoliday( final String flg ) {
126                    putParam( ViewStackTableParam.STACK_HOLIDAY_KEY ,
127                                      nval( getRequestParameter( flg ),ViewStackTableParam.STACK_HOLIDAY_VALUE ) );
128            }
129            
130            /**
131             * ã€TAG】ãã®è¡Œã?能力å?カラãƒ?‚’æŒ?®šã—ã¾ã™ã?
132             *
133             * @og.tag
134             * å†?ƒ¨ç©ä¸Šã’ã‚’ã™ã‚‹éš›ã€å„行ã?能力ã?カラãƒ?を指定ã—ã¾ã™ã?
135             * カラãƒ?‚’æŒ?®šã—ãªã??åˆã?1ã¨ãªã‚Šã¾ã™ã?
136             *
137             * @og.rev 5.6.1.2 (2013/02/22)
138             *
139             * @param       capColumn 能力å?ã®ã‚«ãƒ©ãƒ?
140             */
141            public void setCapacityColumn( final String capColumn ) {
142                    putParam( ViewStackTableParam.CAP_COLUMN_KEY ,
143                                      nval( getRequestParameter( capColumn ),ViewStackTableParam.CAP_COLUMN_VALUE  ) );
144            }
145            
146            /**
147             * ã‚¿ã‚°ã®åç§°ã‚’ã?è¿”ã—ã¾ã™ã?
148             * 自åˆ??身ã®ã‚¯ãƒ©ã‚¹åよりã?自動的ã«å–り出ã›ãªã?Ÿã‚ã?ã“ã?メソãƒ?ƒ‰ã‚’オーãƒã?ライドã—ã¾ã™ã?
149             *
150             *
151             * @return  ã‚¿ã‚°ã®åç§°
152             */
153            @Override
154            protected String getTagName() {
155    //              return "ganttParam" ;
156                    return "stackParam" ;
157            }
158    
159            /**
160             * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºæ›¸ãè¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰
161             *
162             * @serialData ä¸?ƒ¨ã®ã‚ªãƒ–ジェクトã?ã€ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れã¾ã›ã‚“ã€?
163             *
164             * @param       strm    ObjectOutputStreamオブジェク�
165             * @throws IOException  入出力エラーãŒç™ºç”Ÿã—ãŸå?å?
166             */
167            private void writeObject( final ObjectOutputStream strm ) throws IOException {
168                    strm.defaultWriteObject();
169            }
170    
171            /**
172             * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºèª­ã¿è¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰
173             *
174             * ã“ã“ã§ã¯ã€transient 宣è¨?•れãŸå†?ƒ¨å¤‰æ•°ã®å†??åˆæœŸåŒ–ãŒå¿?¦ãªãƒ•ィールドã?ã¿è¨­å®šã—ã¾ã™ã?
175             *
176             * @serialData ä¸?ƒ¨ã®ã‚ªãƒ–ジェクトã?ã€ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れã¾ã›ã‚“ã€?
177             *
178             * @param       strm    ObjectInputStreamオブジェク�
179             * @see #release2()
180             * @throws IOException  シリアライズã«é–¢ã™ã‚‹å…¥å‡ºåŠ›ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå?å?
181             * @throws ClassNotFoundException       クラスを見ã¤ã‘ã‚‹ã“ã¨ãŒã§ããªã‹ã£ãŸå?å?
182             */
183            private void readObject( final ObjectInputStream strm ) throws IOException , ClassNotFoundException {
184                    strm.defaultReadObject();
185            }
186    }