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.fukurou.transfer; 017 018 import org.opengion.fukurou.db.Transaction; 019 import org.opengion.fukurou.util.ApplicationInfo; 020 021 /** 022 * ä¼é?è¦æ±‚ã«å¯¾ã™ã‚‹ã®èªå–方法を定義ã™ã‚‹ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースã§ã™ã? 023 * 024 * å?®Ÿè£?‚¯ãƒ©ã‚¹ã§ã¯ã€èªå–å?ç?@link #read(TransferConfig, Transaction)} 025 * ã€å®Œäº??ç?@link #complete(TransferConfig, Transaction)}ã€ã‚¨ãƒ©ãƒ¼å‡¦ç?@link #error(TransferConfig, ApplicationInfo)}を実è£?™ã‚‹å¿?¦ãŒã‚りã¾ã™ã? 026 * サブクラスå†?ƒ¨ã§ã€DB関連ã®å‡¦ç?‚’行ã†å ´åˆã?ã€å¼•æ•°ã®Transactionオブジェクトを利用ã—ã¦ä¸‹ã•ã?? 027 * ã¾ãŸã?接続ã«å¯¾ã™ã‚‹Commit/Rollbackã¯ã€å‘¼ã³å‡ºã—å?ã§è¡Œã„ã¾ã™ã?ã§ã€å®Ÿè¡Œå?ç??ä¸ã§ã¯è¡Œã‚ãªã?§ä¸‹ã•ã?? 028 * 029 * ã¾ãŸã?HTTP経由ã§ã®å®Ÿè¡Œãªã©ã§ã€èªå–å?ç?¨ãã?後ã?完äº?エラー処ç?§ã‚ªãƒ–ジェクトãŒåŒä¸??ãªã??åˆã«ã€? 030 * 外部ã‹ã‚‰èªå–ã‚ーã®å–å¾—åŠã³è¨å®šã‚’行ã†ã“ã¨ãŒã§ãã¾ã™ã? 031 * 具体的ã«ã¯ã€{@link #read(TransferConfig, Transaction)}を実行後ã?{@link #getKeys()}を呼ã³å‡ºã—ã™ã‚‹ã“ã¨ã§ 032 * 終äº??ç?§å‡¦ç?¯¾è±¡ã¨ãªã‚‹ã‚ーæƒ??ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã? 033 * ã“ã?ã‚ーæƒ??ã‚’ä¿æŒã—ã?{@link #setKeys(String[])}ã§åˆ¥ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã‚ーをè¨å®šã™ã‚‹ã“ã¨ã§ã€? 034 * 完äº??ç?@link #complete(TransferConfig, Transaction)}ã€ã‚¨ãƒ©ãƒ¼å‡¦ç?@link #error(TransferConfig, ApplicationInfo)} 035 * を呼ã³å‡ºã—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã? 036 * 037 * @og.group ä¼é?シスãƒ?ƒ 038 * 039 * @version 5.0 040 * @author Hiroki.Nakamura 041 * @since JDK1.6 042 */ 043 public interface TransferRead { 044 045 /** 046 * èªå–å?ç?‚’実行ã—ã€çµæžœã‚’テã‚ストデータã®é…å?ã¨ã—ã¦è¿”ã—ã¾ã™ã? 047 * 048 * @param config ä¼é?è¨å®šã‚ªãƒ–ジェクãƒ? 049 * @param tran トランザクションオブジェクãƒ? 050 * 051 * @return èªã¿å–りã—ãŸãƒ??ã‚¿(é…å?) 052 */ 053 public String[] read( final TransferConfig config, final Transaction tran ); 054 055 /** 056 * æ›´æ–°ã‚ー(é…å?)ã‚’è¿”ã—ã¾ã™ã? 057 * 058 * @return æ›´æ–°ã‚ー(é…å?) 059 */ 060 public String[] getKeys(); 061 062 /** 063 * æ›´æ–°ã‚ー(é…å?)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã? 064 * 065 * @param keys æ›´æ–°ã‚ー(é…å?) 066 */ 067 public void setKeys( final String[] keys ); 068 069 /** 070 * 完äº??ç?‚’実行ã—ã¾ã™ã? 071 * ã“ã?処ç??実行方法ã§å®šç¾©ã•れãŸå®Ÿè¡Œå?ç?Œæ£å¸¸çµ‚äº?—ãŸå?åˆã«å‘¼ã³å‡ºã—ã•れã¾ã™ã? 072 * 更新対象ã®ã‚ーã«ã¤ã?¦ã¯ã€{@link #setKeys(String[])}ã§å¤–部ã‹ã‚‰ã‚»ãƒ?ƒˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã? 073 * 074 * @param config ä¼é?è¨å®šã‚ªãƒ–ジェクãƒ? 075 * @param tran トランザクションオブジェクãƒ? 076 */ 077 public void complete( final TransferConfig config, final Transaction tran ); 078 079 /** 080 * エラー処ç?‚’実行ã—ã¾ã™ã? 081 * ã“ã?処ç??実行方法ã§å®šç¾©ã•れãŸå®Ÿè¡Œå?ç?Œä»¥ä¸Šçµ‚äº?—ãŸå?åˆã«å‘¼ã³å‡ºã—ã•れã¾ã™ã? 082 * 更新対象ã®ã‚ーã«ã¤ã?¦ã¯ã€{@link #setKeys(String[])}ã§å¤–部ã‹ã‚‰ã‚»ãƒ?ƒˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã? 083 * 084 * @param config ä¼é?è¨å®šã‚ªãƒ–ジェクãƒ? 085 * @param appInfo DBæŽ¥ç¶šæƒ…å ± 086 */ 087 public void error( final TransferConfig config, final ApplicationInfo appInfo ); 088 }