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 static org.opengion.fukurou.util.StringUtil.nval;
019
020 import java.io.File;
021 import java.io.IOException;
022 import java.io.ObjectInputStream;
023 import java.io.ObjectOutputStream;
024 import java.util.Locale;
025 import java.util.Map;
026 import java.util.Map.Entry;
027 import java.util.Arrays;
028
029 import org.opengion.fukurou.business.ArrayTableModel;
030 import org.opengion.fukurou.business.BizLogicHelper;
031 import org.opengion.fukurou.db.Transaction;
032 import org.opengion.fukurou.db.TransactionReal;
033 import org.opengion.fukurou.util.ErrMsg;
034 import org.opengion.fukurou.util.ErrorMessage;
035 import org.opengion.fukurou.util.HybsLoader;
036 import org.opengion.fukurou.util.HybsLoaderConfig;
037 import org.opengion.fukurou.util.HybsLoaderFactory;
038 import org.opengion.fukurou.util.StringUtil;
039 import org.opengion.hayabusa.common.HybsSystem;
040 import org.opengion.hayabusa.common.HybsSystemException;
041 import org.opengion.hayabusa.db.DBTableModel;
042
043 /**
044 * æ¥å‹™ãƒã‚¸ãƒ?‚¯ã‚’呼ã³å‡ºã™ãŸã‚ã?ã‚¿ã‚°ã§ã™ã?
045 *
046 * logics属æ?ã«å‘¼ã³å‡ºã™æ¥å‹™ãƒã‚¸ãƒ?‚¯ã®ã‚¯ãƒ©ã‚¹åを記述ã—ã¾ã™ã?
047 * ã“ã?ã‚¿ã‚°ã§ã¯ã€è¤?•°ã®æ¥å‹™ãƒã‚¸ãƒ?‚¯ã‚?度ã«å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã?
048 * DB接続ã?commit,rollbackã¯ä¸?•ªæœ?¾Œã«ã€?度ã®ã¿å®Ÿè¡Œã•れã¾ã™ã?
049 * å?¥å‹™ãƒã‚¸ãƒ?‚¯ã¯ã€è¨˜è¿°ã—ãŸé ?•ªã«å‘¼ã³å‡ºã•れã¾ã™ã?
050 *
051 * æ¥å‹™ãƒã‚¸ãƒ?‚¯ã¯ã€{@link org.opengion.fukurou.business.BizLogicHelper}ã®
052 * 実è£?‚¯ãƒ©ã‚¹ã€ã¾ãŸã?ã€ã“ã®å®Ÿè£?‚¯ãƒ©ã‚¹ã‚’継承ã—ãŸã‚µãƒ–クラスã§ã‚ã‚‹å¿?¦ãŒã‚りã¾ã™ã?
053 *
054 * æ¥å‹™ãƒã‚¸ãƒ?‚¯ã‚¯ãƒ©ã‚¹ã«ã¤ã?¦ã¯ã€ã?ãƒ?ƒˆãƒ??ãƒã‚¤æ©Ÿè?ã«ã‚ˆã‚Šã€å‹•çš?‚³ãƒ³ãƒ‘イルã€ã‚¯ãƒ©ã‚¹ãƒãƒ¼ãƒ‰ãŒ
055 * 行ã‚れã¾ã™ã?
056 *
057 * æ¥å‹™ãƒã‚¸ãƒ?‚¯ã®ã‚½ãƒ¼ã‚¹ãƒ?‚£ãƒ¬ã‚¯ãƒˆãƒªã¯ã€ã‚·ã‚¹ãƒ?ƒ リソース㮠BIZLOGIC_SRC_PATH ã§å®šç¾©ã•れã¾ã™ã?
058 * ã¾ãŸã?åŒæ§˜ã«ã‚¯ãƒ©ã‚¹ãƒ?‚£ãƒ¬ã‚¯ãƒˆãƒªã¯ã€ã‚·ã‚¹ãƒ?ƒ リソース㮠BIZLOGIC_CLASS_PATH ã§å®šç¾©ã•れã¾ã™ã?
059 * ã•らã«ã€ã‚·ã‚¹ãƒ?ƒ リソース㮠BIZLOGIC_HOTDEPLOY ã‚?false ã«è¨å®šã™ã‚‹ã“ã¨ã§ã€å‹•çš?‚³ãƒ³ãƒ‘イル
060 * ã€ã‚¯ãƒ©ã‚¹ãƒãƒ¼ãƒ‰ã‚’行ã‚ãªãã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã?
061 * ã“ã?å ´åˆã?予ã‚コンパイルã•れãŸã‚¯ãƒ©ã‚¹ã‚’ã?åˆå›žå‘¼ã³å‡ºã—時ã«1回ã?ã¿ãƒãƒ¼ãƒ‰ã•れã¾ã™ã?
062 *
063 * SystemData ã® USE_SQL_INJECTION_CHECK ã?true ã‹ã?quotCheck 属æ?ã?true ã®å ´åˆã?ã€?
064 * ?³?±?¬ã‚¤ãƒ³ã‚¸ã‚§ã‚¯ã‚·ãƒ§ãƒ³å¯¾ç–用ã®ã‚¯ã‚©ãƒ¼ãƒ?‚£ã‚·ãƒ§ãƒ³ãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?リクエスト引数ã«
065 * クォーãƒ?‚£ã‚·ãƒ§ãƒ³(')ãŒå«ã¾ã‚Œã‚‹ã¨ã€ã‚¨ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™ã?
066 * åŒæ§˜ã«USE_XSS_CHECKãŒtrueã‹ã?xssCheck属æ?ãŒtrueã®å ´åˆã?ã€?
067 * クãƒã‚¹ã‚µã‚¤ãƒˆã‚¹ã‚¹ã‚¯ãƒªãƒ—ティング(XSS)対ç–ã?ãŸã‚less/greater than signã®ãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?
068 *
069 * ※ ã“ã?ã‚¿ã‚°ã¯ã€Transaction ã‚¿ã‚°ã®å¯¾è±¡ã§ã™ã?
070 *
071 * @og.formSample
072 * â—å½¢å¼ï¼?
073 * ・<og:bizLog
074 * logics = "æ¥å‹™ãƒã‚¸ãƒ?‚¯ã®ã‚¯ãƒ©ã‚¹å?
075 * command = "ENTRY"
076 * scope = "session"
077 * dbid = "DEFAULT"
078 * tableId = "DEFAULT"
079 * selectedAll = "false"
080 * modifyType = "A"
081 * keys = "SYSTEM_ID"
082 * vals = "{@SYSTEM_ID}"
083 * stopError = "true"
084 * quotCheck = "true"
085 * xssCheck = "true"
086 * debug = "false"
087 * />
088 * â—body?šãªã?
089 *
090 * â—Tag定義??
091 * <og:bizLogic
092 * logics â—‹ã?TAG】実行ã™ã‚‹æ¥å‹™ãƒã‚¸ãƒ?‚¯åã‚’æŒ?®šã—ã¾ã?å¿??)ã€?
093 * command ã€TAG】コマンドをセãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:ENTRY)
094 * scope ã€TAG】ã‚ャãƒ?‚·ãƒ¥ã™ã‚‹å ´åˆã?スコープ[request/page/session/applicaton]を指定ã—ã¾ã?åˆæœŸå€¤:session)
095 * dbid ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)Queryオブジェクトを作æ?ã™ã‚‹æ™‚ã?DB接続IDを指定ã—ã¾ã?
096 * tableId ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)çµæžœã®DBTableModelã‚’ã?sessionã«ç™»éŒ²ã™ã‚‹ã¨ãã?ã‚ーを指定ã—ã¾ã?
097 * selectedAll ã€TAG】データをå?ä»¶é¸æŠžæ¸ˆã¿ã¨ã—ã¦å‡¦ç?™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false)
098 * modifyType ã€TAG】DB検索時ã? モãƒ?‚£ãƒ•ァイタイプをæŒ?®šã—ã¾ã™[A:追åŠ?C:æ›´æ–°/D:削除]
099 * keys ã€TAGã€‘ãƒªãƒ³ã‚¯å…ˆã«æ¸¡ã™ã‚ーをCSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã?
100 * vals ã€TAGã€‘ãƒªãƒ³ã‚¯å…ˆã«æ¸¡ã™å?ã‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã?
101 * stopError ã€TAG】å?ç?‚¨ãƒ©ãƒ¼ã®æ™‚ã«å‡¦ç?‚’䏿¢ã™ã‚‹ã‹ã©ã?‹[true/false]ã‚’è¨å®šã—ã¾ã?åˆæœŸå€¤:true)
102 * quotCheck ã€TAGã€‘ãƒªã‚¯ã‚¨ã‚¹ãƒˆæƒ…å ±ã® ã‚¯ã‚©ãƒ¼ãƒ?‚£ã‚·ãƒ§ãƒ³(') å˜åœ¨ãƒã‚§ãƒ?‚¯ã‚’実施ã™ã‚‹ã‹ã©ã?‹[true/false]ã‚’è¨å®šã—ã¾ã?(åˆæœŸå€¤:USE_SQL_INJECTION_CHECK[=true])
103 * xssCheck ã€TAGã€‘ãƒªã‚¯ã‚¨ã‚¹ãƒˆæƒ…å ±ã® HTMLTagé–‹å§?終äº?–‡å?><) å˜åœ¨ãƒã‚§ãƒ?‚¯ã‚’実施ã™ã‚‹ã‹ã©ã?‹[true/false]ã‚’è¨å®šã—ã¾ã?(åˆæœŸå€¤:USE_XSS_CHECK[=true])
104 * multi ã€TAG】vals属æ?ã§ãƒ‘ラメーターをå–å¾—ã™ã‚‹éš›ã€è¤?•°ä»¶å˜åœ¨ã™ã‚‹å ´åˆã«ã€å?ã‚’é?çµã™ã‚‹ã‹ã©ã?‹ã‚’指定ã—ã¾ã?åˆæœŸå€¤:false)
105 * debug ã€TAG】デãƒãƒƒã‚°æƒ??ã‚’å?力ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false)
106 * />
107 *
108 * â—使用ä¾?
109 * <!-- æ¥å‹™ãƒã‚¸ãƒ?‚¯ã®å‘¼ã³å‡ºã—を行ã„ã¾ã?-->
110 * <og:bizLogic logics="org.opengion.logic.gf9110.BizLogic_0001" keys="SYSTEM_ID" vals="{@MEM.SYSTEM_ID}" />
111 *
112 * @og.rev 5.1.1.0 (2009/12/01) æ–°è¦ä½œæ?
113 * @og.group æ¥å‹™ãƒã‚¸ãƒ?‚¯
114 *
115 * @version 5.0
116 * @author Hiroki Nakamura
117 * @since JDK1.6,
118 */
119 public class BizLogicTag extends CommonTagSupport {
120 //* ã“ã?プãƒã‚°ãƒ©ãƒ??VERSIONæ–?—å?ã‚’è¨å®šã—ã¾ã™ã? {@value} */
121 private static final String VERSION = "567020130727" ;
122 private static final long serialVersionUID = 567020130727L ;
123
124 /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? エントリー {@value} */
125 // private static final String CMD_ENTRY = "ENTRY" ;
126 public static final String CMD_ENTRY = "ENTRY" ; // 5.1.9.0 (2010/08/01)
127 // private static final String COMMAND_LIST = CMD_ENTRY;
128 private static final String ERR_MSG_ID = HybsSystem.ERR_MSG_KEY;
129
130 private String command = CMD_ENTRY;
131 private String[] logics = null;
132 private String dbid = null ;
133 private transient DBTableModel table = null;
134 private String tableId = HybsSystem.TBL_MDL_KEY;
135 private boolean selectedAll = false;
136 private String modifyType = null;
137 private String[] keys = null;
138 private String[] vals = null;
139
140 private boolean stopError = true;
141 private boolean quotCheck = HybsSystem.sysBool( "USE_SQL_INJECTION_CHECK" ); // 4.0.0 (2005/08/31)
142 private boolean xssCheck = HybsSystem.sysBool( "USE_XSS_CHECK" ); // 5.0.0.2 (2009/09/15)
143
144 private transient ErrorMessage errMessage = null;
145 private int errCode = ErrorMessage.OK;
146 private int executeCount = -1;
147 // private Connection conn = null; // 5.1.9.0 (2010/08/01) Transaction 対�
148 private ArrayTableModel arrTable= null;
149 private HybsLoader loader = null;
150
151 private String srcDir = HybsSystem.sys( "REAL_PATH" ) + HybsSystem.sys( "BIZLOGIC_SRC_PATH" );
152 private String classDir = HybsSystem.sys( "REAL_PATH" ) + HybsSystem.sys( "BIZLOGIC_CLASS_PATH" );
153 private boolean isAutoCompile = HybsSystem.sysBool( "BIZLOGIC_AUTO_COMPILE" );
154 private boolean isHotDeploy = HybsSystem.sysBool( "BIZLOGIC_HOT_DEPLOY" );
155 private boolean isMulti = false; // 5.1.8.0 (2010/07/01) 追�
156
157 private static final String CLASS_PATH;
158
159 // HotDeploy機è?を使用ã™ã‚‹å ´åˆã«ã€Javaクラスをコンパイルã™ã‚‹ãŸã‚ã®ã‚¯ãƒ©ã‚¹ãƒ‘スをè¨å®šã—ã¾ã™ã?
160 // 対象ã¨ãªã‚‹ã‚¯ãƒ©ã‚¹ãƒ‘スã¯ã€WEB-INF/classes åŠã? WEB-INF/lib/*.jar ã§ã™ã?
161
162 static {
163 StringBuilder sb = new StringBuilder();
164 sb.append( '.' ).append( File.pathSeparatorChar );
165 File lib = new File( HybsSystem.sys( "REAL_PATH" ) + "WEB-INF" + File.separator + "lib" );
166 File[] libFiles = lib.listFiles();
167 for( int i=0; i<libFiles.length; i++ ) {
168 // 5.1.1.2 (2009/12/10) File.pathSeparatorCharを使用
169 // 5.1.8.0 (2010/07/01) libã®æ¤œç´¢ãƒ‘スã®ä¸å?åˆå¯¾å¿?
170 // sb.append( libFiles[i] ).append( ';' );
171 sb.append( libFiles[i].getAbsolutePath() ).append( File.pathSeparatorChar );
172 }
173 sb.append( HybsSystem.sys( "REAL_PATH" ) + "WEB-INF" + File.separator + "classes" ).append( File.pathSeparatorChar );
174 // 5.1.8.0 (2010/07/01) bizã®ä¸‹ã‚‚検索パスã«è¿½åŠ?
175 sb.append( HybsSystem.sys( "REAL_PATH" ) + HybsSystem.sys( "BIZLOGIC_CLASS_PATH" ) ).append( File.pathSeparatorChar );
176
177 CLASS_PATH = sb.toString();
178 }
179
180 /**
181 * Taglibã®é–‹å§‹ã‚¿ã‚°ãŒè¦‹ã¤ã‹ã£ãŸã¨ãã«å‡¦ç?™ã‚?doStartTag() ã‚?オーãƒã?ライドã—ã¾ã™ã?
182 *
183 * @og.rev 5.3.4.0 (2011/04/01) command=ENTRY以外ã§ã¯DBTableModelã®å‡¦ç?‚’行ã‚ãªã??
184 *
185 * @return 後続å?ç??æŒ?¤º(SKIP_BODY)
186 */
187 @Override
188 public int doStartTag() {
189 // 5.3.4.0 (2011/04/01)
190 // if( !check( command, COMMAND_LIST ) ) {
191 // return(SKIP_BODY);
192 // }
193
194 if( CMD_ENTRY.equals( command ) ) {
195 startQueryTransaction( tableId );
196 }
197
198 return( SKIP_BODY );
199 }
200
201 /**
202 * Taglibã®çµ‚äº?‚¿ã‚°ãŒè¦‹ã¤ã‹ã£ãŸã¨ãã«å‡¦ç?™ã‚?doEndTag() ã‚?オーãƒã?ライドã—ã¾ã™ã?
203 *
204 * @og.rev 5.1.8.0 (2010/07/01) isMulti対�
205 * @og.rev 5.3.4.0 (2011/04/01) command=ENTRY以外ã§ã¯DBTableModelã®å‡¦ç?‚’行ã‚ãªã??
206 *
207 * @return 後続å?ç??æŒ?¤º
208 */
209 @Override
210 public int doEndTag() {
211 debugPrint();
212
213 // 5.3.4.0 (2011/04/01)
214 // if( check( command, COMMAND_LIST ) ) {
215 useQuotCheck( quotCheck );
216 useXssCheck( xssCheck );
217
218 makeVals();
219 execute();
220
221 String err = TaglibUtil.makeHTMLErrorTable( errMessage,getResource() );
222 if( err != null && err.length() > 0 ) {
223 setSessionAttribute( ERR_MSG_ID,errMessage );
224 }
225
226 if( table != null && ! commitTableObject( tableId, table ) ) {
227 jspPrint( "BizLoicTag 処ç?Œå‰²ã‚Šè¾¼ã¾ã‚Œã¾ã—ãŸã€?BTableModel ã¯ç™»éŒ²ã—ã¾ã›ã‚“ã€? );
228 return (SKIP_PAGE);
229 }
230
231 jspPrint( err );
232 // }
233
234 if( errCode >= ErrorMessage.NG && stopError ) {
235 return SKIP_PAGE;
236 }
237 else {
238 return EVAL_PAGE;
239 }
240 }
241
242 /**
243 * タグリブオブジェクトをリリースã—ã¾ã™ã?
244 * ã‚ャãƒ?‚·ãƒ¥ã•れã¦å†åˆ©ç”¨ã•れるã?ã§ã€ãƒ•ィールドã?åˆæœŸè¨å®šã‚’行ã„ã¾ã™ã?
245 *
246 * @og.rev 5.1.8.0 (2010/07/01) isMultiを追�
247 * @og.rev 5.1.9.0 (2010/08/01) Transaction 対�
248 */
249 @Override
250 protected void release2() {
251 super.release2();
252 command = CMD_ENTRY;
253 logics = null;
254 dbid = null;
255 table = null;
256 tableId = HybsSystem.TBL_MDL_KEY;
257 selectedAll = false;
258 modifyType = null;
259 keys = null;
260 vals = null;
261 stopError = true;
262 quotCheck = HybsSystem.sysBool( "USE_SQL_INJECTION_CHECK" );
263 xssCheck = HybsSystem.sysBool( "USE_XSS_CHECK" );
264 errMessage = null;
265 errCode = ErrorMessage.OK;
266 executeCount = -1;
267 // conn = null; // 5.1.9.0 (2010/08/01) Transaction 対�
268 arrTable = null;
269 loader = null;
270 srcDir = HybsSystem.sys( "REAL_PATH" ) + HybsSystem.sys( "BIZLOGIC_SRC_PATH" );
271 classDir = HybsSystem.sys( "REAL_PATH" ) + HybsSystem.sys( "BIZLOGIC_CLASS_PATH" );
272 isAutoCompile = HybsSystem.sysBool( "BIZLOGIC_AUTO_COMPILE" );
273 isHotDeploy = HybsSystem.sysBool( "BIZLOGIC_HOT_DEPLOY" );
274 isMulti = false; // 5.1.8.0 (2010/07/01) 追�
275 }
276
277 /**
278 * æ¥å‹™ãƒã‚¸ãƒ?‚¯ã‚’実行ã—ã¾ã™ã?
279 *
280 * @og.rev 5.1.9.0 (2010/08/01) Transaction 対�
281 * @og.rev 5.3.4.0 (2011/04/01) command=ENTRY以外ã§ã¯DBTableModelã®å‡¦ç?‚’行ã‚ãªã??
282 * @og.rev 5.3.7.0 (2011/07/01) TransactionReal ã®å¼•数変更 ã€Transaction対応ã§ã€close処ç?‚’入れるã€?
283 * @og.rev 5.6.0.3 (2012/01/24) arrTable ã«å¤‰æ›´ã•れãŸå?ã‚’ã?table ã«æ›¸ã戻ã™å?ç?‚’追åŠ?
284 */
285 private void execute() {
286 int[] rowNos = new int[0];
287
288 // 5.3.4.0 (2011/04/01)
289 if( CMD_ENTRY.equals( command ) ) {
290 table = (DBTableModel)getObject( tableId );
291 }
292
293 if( table != null ) {
294 rowNos = getParameterRows();
295 String[][] tblVals = new String[rowNos.length][table.getColumnCount()];
296 String[] modTypes = new String[rowNos.length];
297 for( int i=0; i<rowNos.length; i++ ) {
298 tblVals[i] = table.getValues( rowNos[i] );
299 modTypes[i] = table.getModifyType( rowNos[i] );
300 }
301 arrTable = new ArrayTableModel( table.getNames(), tblVals, modTypes );
302 }
303
304 // 5.1.9.0 (2010/08/01) Transaction 対�
305 // final Transaction tran ;
306 Transaction tran = null;
307 // 5.3.7.0 (2011/07/01) Transaction対応ã§ã€close処ç?‚’入れるã€?
308 try {
309 TransactionTag tranTag = (TransactionTag)findAncestorWithClass( this,TransactionTag.class );
310 if( tranTag == null ) {
311 // tran = new TransactionReal( dbid,getApplicationInfo() );
312 tran = new TransactionReal( getApplicationInfo() ); // 5.3.7.0 (2011/07/01) 引数変更
313 }
314 else {
315 tran = tranTag.getTransaction();
316 }
317 // conn = ConnectionFactory.connection( dbid, null );
318 errMessage = new ErrorMessage();
319 loader = HybsLoaderFactory.getLoader(
320 new HybsLoaderConfig( srcDir, classDir, isAutoCompile, isHotDeploy, CLASS_PATH )
321 );
322
323 boolean rtn = false;
324 for( int i=0; i<logics.length; i++ ) {
325 // BizLogic logic = (BizLogic)loader.newInstance( logics[i] );
326 // rtn = call( logic );
327 // rtn = call( logics[i] );
328 rtn = call( logics[i] , tran ); // 5.1.9.0 (2010/08/01) Transaction 対�
329 if( !rtn ) { break; }
330 }
331
332 // 5.6.0.3 (2012/01/24) arrTable ã«å¤‰æ›´ã•れãŸå?ã‚’ã?table ã«æ›¸ã戻ã™å?ç?
333 if( arrTable != null ) {
334 Map<Integer,String[]> valMap = arrTable.getModifyVals();
335 if( valMap != null ) {
336 for( Map.Entry<Integer, String[]> entr : valMap.entrySet()) {
337 int seq = entr.getKey(); // intValue() ã¯çœç•¥ã§ãã‚‹ã€?
338 String[] vals = entr.getValue();
339 table.setValues( vals , rowNos[seq] ); // DBTableModel ã¸æ›¸ã戻ã—ã?å…??行番å·ã«å¤‰æ›ãŒå¿?¦ã?
340 }
341 }
342 }
343
344 executeCount = rowNos.length;
345 errCode = errMessage.getKekka();
346 setRequestAttribute( "DB.COUNT" , String.valueOf( executeCount ) );
347 setRequestAttribute( "DB.ERR_CODE", String.valueOf( errCode ) );
348
349 if( errCode < ErrorMessage.NG ) {
350 // Closer.commit( conn );
351 tran.commit(); // 5.1.9.0 (2010/08/01) Transaction 対�
352
353 if( table != null && rowNos.length > 0 ) {
354 for( int j=rowNos.length-1; j>=0; j-- ) {
355 int row = rowNos[j];
356 if( DBTableModel.DELETE_TYPE.equals( table.getModifyType( row ) ) ) {
357 table.removeValue( row );
358 }
359 else {
360 table.resetModify( row );
361 }
362 }
363 }
364 }
365 else {
366 // Closer.rollback( conn );
367 tran.rollback(); // 5.1.9.0 (2010/08/01) Transaction 対�
368 }
369 // ConnectionFactory.close( conn, dbid );
370 // tran.close(); // 5.1.9.0 (2010/08/01) Transaction 対�
371 }
372 finally {
373 if( tran != null ) { tran.close(); }
374 }
375
376 // エラーメãƒ?‚»ãƒ¼ã‚¸ã®è¡Œç•ªå·ã‚’å?ã®é¸æŠžè¡Œã«æˆ»ã—ã¾ã™ã?
377 ErrMsg[] errs = errMessage.toArray();
378 ErrorMessage errMsgTmp = new ErrorMessage();
379 for( int i=0; i<errs.length; i++ ) {
380 if( table != null && rowNos.length > 0 ) {
381 errMsgTmp.addMessage( errs[i].copy( rowNos[errs[i].getNo()] + 1 ) );
382 }
383 else {
384 errMsgTmp.addMessage( errs[i].copy( errs[i].getNo() + 1 ) );
385 }
386 }
387 errMessage = errMsgTmp;
388 }
389
390 /**
391 * æ¥å‹™ãƒã‚¸ãƒ?‚¯ã‚’Callã—ã¾ã™ã?
392 *
393 * @og.rev 5.1.9.0 (2010/08/01) Transaction 対�
394 * @og.rev 5.1.9.0 (2010/08/01) DBIDã‚’ã‚»ãƒ?ƒˆã€Connectonã§ã¯ãªãTransactionを渡ã™ã‚ˆã?«å¤‰æ›´
395 * @og.rev 5.6.7.0 (2013/07/27) Exception ã‚?throw ã™ã‚‹ã¨ãã?ä¸?—¦ã€errMsg 変数ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?
396 *
397 * @param logicName æ¥å‹™ãƒã‚¸ãƒ?‚¯å?
398 * @param tran Transactionトランザクションオブジェク�
399 *
400 * @return æ¥å‹™ãƒã‚¸ãƒ?‚¯ã®å‘¼ã³å‡ºã—ãŒæˆåŠŸã—ãŸã‹ã©ã?‹
401 */
402 // private boolean call( final BizLogic logic ) {
403 // private boolean call( final String logicName ) {
404 private boolean call( final String logicName , final Transaction tran ) {
405 BizLogicHelper logicHp = new BizLogicHelper( logicName, loader );
406
407 if( logicHp.isRequireTable() ) {
408 if( arrTable == null ) {
409 // 5.6.7.0 (2013/07/27) Exception ã‚?throw ã™ã‚‹ã¨ãã?ä¸?—¦ã€errMsg 変数ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?
410 // throw new HybsSystemException( "TableModelãŒå˜åœ¨ã—ã¾ã›ã‚“。logic=[" + logicName + "]" );
411 String errMsg = "TableModelãŒå˜åœ¨ã—ã¾ã›ã‚“。logic=[" + logicName + "]" ;
412 throw new HybsSystemException( errMsg );
413 }
414 else if( arrTable.getRowCount() == 0 ) { return true; } // 0ä»¶ã®ã¨ãã?呼ã³å‡ºã—ã—ãªã?
415 else { logicHp.setTable( arrTable ); }
416 }
417 // logicHp.setConnection( conn );
418 // logicHp.setConnection( tran.getConnection( dbid ) ); // 5.1.9.0 (2010/08/01) Transaction 対�
419 logicHp.setTransaction( tran );
420 logicHp.setDbid( dbid ); // 5.1.9.0 (2010/08/01) DBIDã‚’ã‚»ãƒ?ƒˆ
421 logicHp.setKeys( keys );
422 logicHp.setVals( vals );
423 logicHp.setUserId( getUser().getUserID() );
424 logicHp.setParentPgId( getGUIInfoAttri( "KEY" ) );
425 logicHp.setLoader( loader );
426 if( isDebug() ) { logicHp.setDebug(); }
427
428 boolean rtn = false;
429 try {
430 rtn = logicHp.exec();
431 }
432 catch ( Throwable th ) {
433 // Closer.rollback( conn );
434 // ConnectionFactory.remove( conn, dbid );
435 tran.rollback(); // 5.1.9.0 (2010/08/01) Transaction 対�
436 // 5.6.7.0 (2013/07/27) Exception ã‚?throw ã™ã‚‹ã¨ãã?ä¸?—¦ã€errMsg 変数ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?
437 // throw new HybsSystemException( "æ¥å‹™ãƒã‚¸ãƒ?‚¯ã®å‡¦ç?¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€?, th );
438 String errMsg = "æ¥å‹™ãƒã‚¸ãƒ?‚¯ã®å‡¦ç?¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€? + th.getMessage() ;
439 throw new HybsSystemException( errMsg,th );
440 }
441 errMessage.append( logicHp.getErrMsg() );
442
443 setRequestAttribute( logicHp.getClass().getSimpleName() + ".RETURN" , logicHp.getReturn() );
444 setRequestAttribute( "RETURN", logicHp.getReturn() );
445
446 if( isDebug() ) { jspPrint( logicHp.getDebugMsg() ); }
447
448 return rtn;
449 }
450
451 /**
452 * Valsã®é…å?を生æˆã—ã¾ã™ã?
453 *
454 * @og.rev 5.1.8.0 (2010/07/01) æ–°è¦ä½œæ?-
455 * @og.rev 5.6.7.0 (2013/07/27) Exception ã‚?throw ã™ã‚‹ã¨ãã?ä¸?—¦ã€errMsg 変数ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?
456 */
457 private void makeVals() {
458 if( keys != null && keys.length > 0 ) {
459 boolean isSetVal = ( vals == null || vals.length == 0 ) ? false : true;
460 if( isSetVal ) {
461 if( keys.length != vals.length ) {
462 // 5.6.7.0 (2013/07/27) Exception ã‚?throw ã™ã‚‹ã¨ãã?ä¸?—¦ã€errMsg 変数ã«ã‚»ãƒ?ƒˆã—ã¾ã™ã?
463 // throw new HybsSystemException( "keysã¨Valsã®å€‹æ•°ãŒç•°ãªã‚Šã¾ã™ã?" );
464 String errMsg = "keysã¨Valsã®å€‹æ•°ãŒç•°ãªã‚Šã¾ã™ã?" + HybsSystem.CR
465 + " keys=" + Arrays.toString( keys ) + HybsSystem.CR
466 + " vals=" + Arrays.toString( vals ) ;
467 throw new HybsSystemException( errMsg );
468 }
469 }
470 else {
471 vals = new String[keys.length];
472 }
473 for( int i=0; i<keys.length; i++ ) {
474 if( isSetVal ) {
475 if( isMulti ) { vals[i] = StringUtil.array2csv( getRequestParameterValues( vals[i] ) );}
476 else { vals[i] = getRequestParameter( vals[i] ); }
477 }
478 else {
479 if( isMulti ) { vals[i] = StringUtil.array2csv( getRequestValues( keys[i] ) );}
480 else { vals[i] = getRequestValue( keys[i] ); }
481 }
482 }
483 }
484 }
485
486 /**
487 * ã€TAG】コマンドをセãƒ?ƒˆã—ã¾ã?åˆæœŸå€¤:ENTRY)ã€?
488 *
489 * @og.tag
490 * command=ENTRY以外ã§ã¯DBTableModelã®å‡¦ç?‚’行ã„ã¾ã›ã‚“ã€?
491 * コマンドã?,HTMLã‹ã‚‰[get/post]æŒ?®šã•れã¾ã™ã?ã§,CMD_xxx ã§è¨å®šã•れる
492 * フィールド定数値ã®ã?¥ã‚Œã‹ã‚’ã?æŒ?®šã§ãã¾ã™ã?
493 *
494 * @param cmd コマンãƒ?public static final 宣è¨?•れã¦ã?‚‹æ–?—å?)
495 * @see <a href="../../../../constant-values.html#org.opengion.hayabusa.taglib.BizLogicTag.CMD_ENTRY">コマンド定数</a>
496 */
497 public void setCommand( final String cmd ) {
498 String cmd2 = getRequestParameter( cmd );
499 if( cmd2 != null && cmd2.length() >= 0 ) { command = cmd2.toUpperCase(Locale.JAPAN); }
500 }
501
502 /**
503 * ã€TAG】実行ã™ã‚‹æ¥å‹™ãƒã‚¸ãƒ?‚¯åã‚’æŒ?®šã—ã¾ã™ã?
504 *
505 * @og.tag
506 * 実行ã™ã‚‹æ¥å‹™ãƒã‚¸ãƒ?‚¯åã‚’æŒ?®šã—ã¾ã™ã?æ¥å‹™ãƒã‚¸ãƒ?‚¯åã?ã€ã‚¯ãƒ©ã‚¹åã‚’æŒ?®šã—ã¾ã™ã?
507 * クラスåã«ã¤ã?¦ã¯ã€ã‚¯ãƒ©ã‚¹è‡ªèº«ã®åç§°ã®ã¿ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã?
508 * (パッケージåã‚’å«ã‚ãŸå®Œå?ãªå½¢ã®ã‚¯ãƒ©ã‚¹åã‚’æŒ?®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã?
509 * ã¾ãŸã?カンマ区åˆ?‚Šã§ã€è¤?•°æŒ?®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã?
510 * ã“ã?å ´åˆã?æŒ?®šã—ãŸé?番ã«å‡¦ç?•れã¾ã™ã?
511 *
512 * @param lgs æ¥å‹™ãƒã‚¸ãƒ?‚¯å?
513 */
514 public void setLogics( final String lgs ) {
515 logics = getCSVParameter( lgs );
516 }
517
518 /**
519 * ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)Queryオブジェクトを作æ?ã™ã‚‹æ™‚ã?DB接続IDを指定ã—ã¾ã™ã?
520 *
521 * @og.tag
522 * Queryオブジェクトを作æ?ã™ã‚‹æ™‚ã?DB接続IDを指定ã—ã¾ã™ã?
523 * ã“れã¯ã€ã‚·ã‚¹ãƒ?ƒ リソースã§ã€DEFAULT_DB_URL ç‰ã§æŒ?®šã—ã¦ã?‚‹ ãƒ??タベã?ス接続å?
524 * æƒ??ã«ã€XX_DB_URL を定義ã™ã‚‹ã“ã¨ã§ã€?dbid="XX" ã¨ã™ã‚‹ã¨ã€ã“㮠接続å?を使用ã—ã¦
525 * ãƒ??タベã?スã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã?
526 *
527 * @param id ãƒ??タベã?ス接続ID
528 */
529 public void setDbid( final String id ) {
530 dbid = nval( getRequestParameter( id ),dbid );
531 }
532
533 /**
534 * ã€TAGã€?通常ã¯ä½¿ã?¾ã›ã‚“)çµæžœã®DBTableModelã‚’ã?sessionã«ç™»éŒ²ã™ã‚‹ã¨ãã?ã‚ーを指定ã—ã¾ã?
535 * (åˆæœŸå€¤:HybsSystem#TBL_MDL_KEY[={@og.value org.opengion.hayabusa.common.HybsSystem#TBL_MDL_KEY}])ã€?
536 *
537 * @og.tag
538 * æ¤œç´¢çµæžœã‚ˆã‚Šã€DBTableModelオブジェクトを作æ?ã—ã¾ã™ã?ã“れをã?下æµã?viewã‚¿ã‚°ç‰ã«
539 * 渡ã™å?åˆã«ã€??常ã¯ã€session を利用ã—ã¾ã™ã?ãã?å ´åˆã?登録ã‚ーã§ã™ã?
540 * query ã‚¿ã‚°ã‚’åŒæ™‚ã«å®Ÿè¡Œã—ã¦ã€çµæžœã‚’求ã‚ã‚‹å?åˆã?åŒä¸?ƒ¡ãƒ¢ãƒªã«é…ç½®ã•れる為ã€?
541 * ã“ã? tableId 属æ?を利用ã—ã¦ã€ãƒ¡ãƒ¢ãƒªç©ºé–“ã‚’åˆ?‘ã¾ã™ã?
542 * (åˆæœŸå€¤:HybsSystem#TBL_MDL_KEY[={@og.value org.opengion.hayabusa.common.HybsSystem#TBL_MDL_KEY}])ã€?
543 *
544 * @param id sessionã«ç™»éŒ²ã™ã‚‹æ™‚ã? ID
545 */
546 public void setTableId( final String id ) {
547 tableId = nval( getRequestParameter( id ),tableId );
548 }
549
550 /**
551 * ã€TAG】データをå?ä»¶é¸æŠžæ¸ˆã¿ã¨ã—ã¦å‡¦ç?™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false)ã€?
552 *
553 * @og.tag
554 * å…¨ã¦ã®ãƒ??ã‚¿ã‚’é¸æŠžæ¸ˆã¿ãƒ??ã‚¿ã¨ã—ã¦æ‰±ã£ã¦å‡¦ç?—ã¾ã™ã?
555 * 全件処ç?™ã‚‹å?åˆã«ã€?true/false)を指定ã—ã¾ã™ã?
556 * åˆæœŸå€¤ã¯ false ã§ã™ã?
557 *
558 * @param all ãƒ??ã‚¿ã‚’å?ä»¶é¸æŠžæ¸ˆã¿ [true:å…¨ä»¶é¸æŠžæ¸ˆã¿/false:通常]
559 */
560 public void setSelectedAll( final String all ) {
561 selectedAll = nval( getRequestParameter( all ),selectedAll );
562 }
563
564 /**
565 * ã€TAG】DB検索時ã? モãƒ?‚£ãƒ•ァイタイプをæŒ?®šã—ã¾ã™[A:追åŠ?C:æ›´æ–°/D:削除]ã€?
566 *
567 * @og.tag
568 * DB検索時ã«ã€ãã®ãƒ??ã‚¿ã‚’A(追åŠ?ã€C(æ›´æ–°)ã€D(削除)ã®ãƒ¢ãƒ?‚£ãƒ•ァイタイプを
569 * ã¤ã‘ãŸçŠ¶æ…‹ã«ã—ã¾ã™ã?
570 * ãã?状態ã§ã€ãã®ã¾ã¾ã€update ã™ã‚‹äº‹ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã?
571 *
572 * @param type DB検索時ã?モãƒ?‚£ãƒ•ァイタイãƒ?[A:追åŠ?C:æ›´æ–°/D:削除]
573 */
574 public void setModifyType( final String type ) {
575 modifyType = nval( getRequestParameter( type ),modifyType );
576 }
577
578 /**
579 * ã€TAGã€‘ãƒªãƒ³ã‚¯å…ˆã«æ¸¡ã™ã‚ーをCSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã™ã?
580 *
581 * @og.tag ãƒªãƒ³ã‚¯å…ˆã«æ¸¡ã™ã‚ーを指定ã—ã¾ã™ã?
582 * Keysã?‘を指定ã—ã¦ã€Valsを指定ã—ãªã??åˆã?Keysã§æŒ?®šã•れãŸé ?›®åã«å¯¾å¿œã™ã‚‹ãƒ‘ラメーターをå–å¾—ã—ã€?
583 * Valsã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã?
584 *
585 * @og.rev 3.5.6.2 (2004/07/05) CommonTagSupport#getCSVParameter を使用
586 *
587 * @param key ãƒªãƒ³ã‚¯å…ˆã«æ¸¡ã™ã‚ー(CSVå½¢å¼?
588 */
589 public void setKeys( final String key ) {
590 // keys = getCSVParameter( key );
591 keys = getCSVParameter( getRequestParameter( key ) );
592 }
593
594 /**
595 * ã€TAGã€‘ãƒªãƒ³ã‚¯å…ˆã«æ¸¡ã™å?ã‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã™ã?
596 *
597 * @og.tag ãƒªãƒ³ã‚¯å…ˆã«æ¸¡ã™å?を指定ã—ã¾ã™ã?
598 * Keysã?‘を指定ã—ã¦ã€Valsを指定ã—ãªã??åˆã?Keysã§æŒ?®šã•れãŸé ?›®åã«å¯¾å¿œã™ã‚‹ãƒ‘ラメーターをå–å¾—ã—ã€?
599 * Valsã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã?
600 * åˆ?§£æ–¹æ³•ã?ã€CSV変数をå?ã«åˆ?§£ã—ã¦ã‹ã‚‰ã€getRequestParameter ã§å€¤ã‚’å–å¾—ã—ã¾ã™ã?
601 * ã“ã†ã—ãªã?¨ãƒ??タ自身ã«ã‚«ãƒ³ãƒžã‚’æŒã£ã¦ã?‚‹å ´åˆã«åˆ?§£ã‚’ミスる為ã§ã™ã?
602 *
603 * @og.rev 3.5.6.2 (2004/07/05) CommonTagSupport#getCSVParameter を使用
604 * @og.rev 5.1.8.0 (2010/07/01) isMuitl対�
605 *
606 * @param val ãƒªãƒ³ã‚¯å…ˆã«æ¸¡ã™å?(CSVå½¢å¼?
607 */
608 public void setVals( final String val ) {
609 // vals = getCSVParameter( val );
610 vals = StringUtil.csv2Array( val );
611 }
612
613 /**
614 * ã€TAG】å?ç?‚¨ãƒ©ãƒ¼ã®æ™‚ã«å‡¦ç?‚’䏿¢ã™ã‚‹ã‹ã©ã?‹[true/false]ã‚’è¨å®šã—ã¾ã?åˆæœŸå€¤:true)ã€?
615 *
616 * @og.tag
617 * false(䏿¢ã—ãªã?ã«è¨å®šã™ã‚‹å?åˆã?後続å?ç?§ã¯ã€{@DB.ERR_CODE}ã®å€¤ã«ã‚ˆã‚Šã€?
618 * PLSQL/SQLã®ç•°å¸¸/æ£å¸¸çµ‚äº?«ã‚ˆã£ã¦åˆ?²å?ç??å¯èƒ½ã¨ãªã‚Šã¾ã™ã?
619 * åˆæœŸå€¤ã¯ã€true(䏿¢ã™ã‚‹)ã§ã™ã?
620 *
621 * @param flag [true:䏿¢ã™ã‚‹/false:䏿¢ã—ãªã„]
622 */
623 public void setStopError( final String flag ) {
624 stopError = nval( getRequestParameter( flag ),stopError );
625 }
626
627 /**
628 * ã€TAGã€‘ãƒªã‚¯ã‚¨ã‚¹ãƒˆæƒ…å ±ã® ã‚¯ã‚©ãƒ¼ãƒ?‚£ã‚·ãƒ§ãƒ³(') å˜åœ¨ãƒã‚§ãƒ?‚¯ã‚’実施ã™ã‚‹ã‹ã©ã?‹[true/false]ã‚’è¨å®šã—ã¾ã?
629 * (åˆæœŸå€¤:USE_SQL_INJECTION_CHECK[={@og.value org.opengion.hayabusa.common.SystemData#USE_SQL_INJECTION_CHECK}])ã€?
630 *
631 * @og.tag
632 * ?³?±?¬ã‚¤ãƒ³ã‚¸ã‚§ã‚¯ã‚·ãƒ§ãƒ³å¯¾ç–ã?ä¸?¤ã¨ã—ã¦ã€æš«å®šçš„ã§ã¯ã‚りã¾ã™ãŒã€SQLã®ãƒ‘ラメータã«
633 * æ¸¡ã™æ–‡å—å?ã«ã‚¯ã‚©ãƒ¼ãƒ?‚£ã‚·ãƒ§ãƒ³(') を許ã•ãªã?¨å®šã«ã™ã‚Œã°ã€ã‚る程度ã¯é˜²æ¢ã§ãã¾ã™ã?
634 * æ•°å—タイプã?引数ã«ã¯ã€?or 5=5 ãªã©ã®ã‚¯ã‚©ãƒ¼ãƒ?‚£ã‚·ãƒ§ãƒ³ã‚’使用ã—ãªã?‚³ãƒ¼ãƒ‰ã‚’埋ã‚ã¦ã‚‚ã?
635 * æ•°å—ãƒã‚§ãƒ?‚¯ã§æ¤œå?å¯èƒ½ã§ã™ã?æ–?—タイプã?å ´åˆã?ã€å¿?š (')ã‚’ã?ãšã—ã¦ã€?
636 * ' or 'A' like 'A ã®ã‚ˆã†ãªå½¢å¼ã«ãªã‚‹ç‚ºã€?')ãƒã‚§ãƒ?‚¯ã?‘ã§ã‚‚有効ã§ã™ã?
637 * (') ãŒå«ã¾ã‚Œã¦ã?Ÿã‚¨ãƒ©ãƒ¼ã«ã™ã‚‹(true)?ã‹ãƒŽã?ãƒã‚§ãƒ?‚¯ã?false)を指定ã—ã¾ã™ã?
638 * (åˆæœŸå€¤:シスãƒ?ƒ 定数ã®USE_SQL_INJECTION_CHECK[={@og.value org.opengion.hayabusa.common.SystemData#USE_SQL_INJECTION_CHECK}])ã€?
639 *
640 * @param flag クォーãƒ?‚£ã‚·ãƒ§ãƒ³ãƒã‚§ãƒ?‚¯ [true:ã™ã‚‹/ãれ以å¤?ã—ãªã„]
641 * @see org.opengion.hayabusa.common.SystemData#USE_SQL_INJECTION_CHECK
642 */
643 public void setQuotCheck( final String flag ) {
644 quotCheck = nval( getRequestParameter( flag ),quotCheck );
645 }
646
647 /**
648 * ã€TAGã€‘ãƒªã‚¯ã‚¨ã‚¹ãƒˆæƒ…å ±ã® HTMLTagé–‹å§?終äº?–‡å?><) å˜åœ¨ãƒã‚§ãƒ?‚¯ã‚’実施ã™ã‚‹ã‹ã©ã?‹[true/false]ã‚’è¨å®šã—ã¾ã?
649 * (åˆæœŸå€¤:USE_XSS_CHECK[={@og.value org.opengion.hayabusa.common.SystemData#USE_XSS_CHECK}])ã€?
650 *
651 * @og.tag
652 * クãƒã‚¹ã‚µã‚¤ãƒˆã‚¹ã‚¯ãƒªãƒ—ティング(XSS)対ç–ã?ä¸?’°ã¨ã—ã¦less/greater than signã«ã¤ã?¦ã®ãƒã‚§ãƒ?‚¯ã‚’行ã„ã¾ã™ã?
653 * (><) ãŒå«ã¾ã‚Œã¦ã?Ÿã‚¨ãƒ©ãƒ¼ã«ã™ã‚‹(true)?ã‹ãƒŽã?ãƒã‚§ãƒ?‚¯ã?false)を指定ã—ã¾ã™ã?
654 * (åˆæœŸå€¤:シスãƒ?ƒ 定数ã®USE_XSS_CHECK[={@og.value org.opengion.hayabusa.common.SystemData#USE_XSS_CHECK}])ã€?
655 *
656 * @param flag XSSãƒã‚§ãƒ?‚¯ã™ã‚‹ [true:ãƒã‚§ãƒ?‚¯ã™ã‚‹/false:ã—ãªã„]
657 * @see org.opengion.hayabusa.common.SystemData#USE_XSS_CHECK
658 */
659 public void setXssCheck( final String flag ) {
660 xssCheck = nval( getRequestParameter( flag ),xssCheck );
661 }
662
663 /**
664 * ã€TAG】vals属æ?ã§ãƒ‘ラメーターをå–å¾—ã™ã‚‹éš›ã€è¤?•°ä»¶å˜åœ¨ã™ã‚‹å ´åˆã«ã€å?ã‚’é?çµã™ã‚‹ã‹ã©ã?‹ã‚’指定ã—ã¾ã?åˆæœŸå€¤:false)ã€?
665 *
666 * @og.tag
667 * ã“ã?属æ?ãŒtrueã«æŒ?®šã•れãŸå ´åˆã?パラメーターãŒè¤?•°å˜åœ¨ã™ã‚‹å ´åˆã«ã€ã‚«ãƒ³ãƒžã§é€£çµã—ã¾ã™ã?
668 * åˆæœŸå€¤ã¯ã€false(連çµã—ãªã?ã§ã™ã?
669 *
670 * @og.rev 5.1.8.0 (2010/07/01) æ–°è¦ä½œæ?
671 *
672 * @param flag パラメーター連çµã™ã‚‹ã‹ã©ã?‹
673 */
674 public void setMulti( final String flag ) {
675 isMulti = nval( getRequestParameter( flag ),isMulti );
676 }
677
678 /**
679 * 表示ãƒ??ã‚¿ã® HybsSystem.ROW_SEL_KEY ã‚’å?ã«ã€?¸ã°ã‚ŒãŸ 行を処ç??対象ã¨ã—ã¾ã™ã?
680 *
681 * @return é¸æŠžè¡Œã?é…å?
682 */
683 @Override
684 protected int[] getParameterRows() {
685 final int[] rowNo ;
686 if( selectedAll ) {
687 int rowCnt = table.getRowCount();
688 rowNo = new int[ rowCnt ];
689 for( int i=0; i<rowCnt; i++ ) {
690 rowNo[i] = i;
691 }
692 } else {
693 rowNo = super.getParameterRows();
694 }
695 return rowNo ;
696 }
697
698 /**
699 * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºæ›¸ãè¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰
700 *
701 * @serialData ä¸?ƒ¨ã®ã‚ªãƒ–ジェクãƒ?DBTableModel,ErrorMessage)ã¯ã€ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れã¾ã›ã‚“ã€?
702 *
703 * @param strm ObjectOutputStreamオブジェク�
704 * @throws IOException 入出力エラーãŒç™ºç”Ÿã—ãŸå?å?
705 */
706 private void writeObject( final ObjectOutputStream strm ) throws IOException {
707 strm.defaultWriteObject();
708 }
709
710 /**
711 * シリアライズ用ã®ã‚«ã‚¹ã‚¿ãƒ?‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºèªã¿è¾¼ã¿ãƒ¡ã‚½ãƒ?ƒ‰
712 *
713 * ã“ã“ã§ã¯ã€transient 宣è¨?•れãŸå†?ƒ¨å¤‰æ•°ã®å†??åˆæœŸåŒ–ãŒå¿?¦ãªãƒ•ィールドã?ã¿è¨å®šã—ã¾ã™ã?
714 *
715 * @serialData ä¸?ƒ¨ã®ã‚ªãƒ–ジェクãƒ?DBTableModel,ErrorMessage)ã¯ã€èªã¿è¾¼ã¾ã‚Œã¾ã›ã‚“ã€?
716 *
717 * @param strm ObjectInputStreamオブジェク�
718 * @see #release2()
719 * @throws IOException シリアライズã«é–¢ã™ã‚‹å…¥å‡ºåŠ›ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå?å?
720 * @throws ClassNotFoundException クラスを見ã¤ã‘ã‚‹ã“ã¨ãŒã§ããªã‹ã£ãŸå?å?
721 */
722 private void readObject( final ObjectInputStream strm ) throws IOException , ClassNotFoundException {
723 strm.defaultReadObject();
724 }
725
726 /**
727 * ã“ã?オブジェクトã?æ–?—å?表ç¾ã‚’è¿”ã—ã¾ã™ã?
728 * 基本çš?«ãƒ?ƒãƒ?‚°ç›®çš?«ä½¿ç”¨ã—ã¾ã™ã?
729 *
730 * @return ã“ã?ã‚¯ãƒ©ã‚¹ã®æ–?—å?表ç¾
731 */
732 @Override
733 public String toString() {
734 return org.opengion.fukurou.util.ToString.title( this.getClass().getName() )
735 .println( "VERSION" ,VERSION )
736 .println( "command" ,command )
737 .println( "logics" ,logics )
738 .println( "dbid" ,dbid )
739 .println( "tableId" ,tableId )
740 .println( "selectedAll" ,selectedAll )
741 .println( "modifyType" ,modifyType )
742 .println( "keys" ,keys )
743 .println( "vals" ,vals )
744 .println( "stopError" ,stopError )
745 .println( "quotCheck" ,quotCheck )
746 .println( "xssCheck" ,xssCheck )
747 .println( "executeCount" ,executeCount )
748 .println( "errCode" ,errCode )
749 .println( "Other..." ,getAttributes().getAttribute() )
750 .fixForm().toString() ;
751 }
752 }