チェンジセット 230
- コミット日時:
- 2008/04/15 13:55:32 (14 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
trunk/im-jssp/src/main/java/org/intra_mart/jssp/util/JavaScriptUtility.java
r227 r230 17 17 18 18 import org.intra_mart.common.platform.log.Logger; 19 import org.intra_mart.jssp.exception.IllegalConversionException; 19 20 import org.intra_mart.jssp.script.ScriptScope; 20 21 import org.intra_mart.jssp.script.provider.ScriptScopeBuilder; … … 39 40 } 40 41 42 /** 43 * @param pagePath 44 * @param functionName 45 * @param args 46 * @throws IllegalConversionException 47 */ 41 48 public static void executeVoidFunction(final String pagePath, 42 49 final String functionName, 43 final Object... args) { 50 final Object... args) 51 throws IllegalConversionException { 44 52 executeFunction(pagePath, functionName, void.class, args); 45 53 } 46 54 47 55 56 /** 57 * @param pagePath 58 * @param functionName 59 * @param returnType 60 * @param args 61 * @return 62 * @throws IllegalConversionException 63 */ 48 64 public static Object executeFunction(final String pagePath, 49 65 final String functionName, 50 66 final Class<?> returnType, 51 final Object... args) { 52 67 final Object... args) 68 throws IllegalConversionException { 69 70 // ===================== 53 71 // JavaからJSへ変換 72 // ===================== 54 73 Object[] args4JS = null; 55 74 try { … … 60 79 } 61 80 catch (Exception e) { 62 // TODO 例外整理(JSから呼ばれることが主目的のクラスではないのにContext.throwAsScriptRuntimeEx(e)は間違え)63 throw Context.throwAsScriptRuntimeEx(e);64 }65 81 throw new IllegalConversionException(e); 82 } 83 84 // ===================== 66 85 // JS実行 86 // ===================== 67 87 Object jsResult = null; 68 88 try{ … … 77 97 } 78 98 catch (Exception e) { 79 // TODO 例外整理(JSから呼ばれることが主目的のクラスではないのにContext.throwAsScriptRuntimeEx(e)は間違え) 80 throw Context.throwAsScriptRuntimeEx(e); 99 throw new IllegalStateException(e); 81 100 } 82 101 finally{ … … 84 103 } 85 104 105 // ===================== 86 106 // JSからJavaへ変換 107 // ===================== 87 108 try { 88 109 if(returnType == null || returnType.equals(void.class)){ … … 95 116 } 96 117 catch (Exception e) { 97 // TODO 例外整理(JSから呼ばれることが主目的のクラスではないのにContext.throwAsScriptRuntimeEx(e)は間違え) 98 throw Context.throwAsScriptRuntimeEx(e); 118 throw new IllegalConversionException(e); 99 119 } 100 120 } … … 104 124 // PLAN List対応 105 125 106 // TODO メソッド名変更107 108 126 /** 109 127 * @param bean