1 34 35 36 package com.micronova.jsp.tag; 37 38 import java.lang.reflect.*; 39 import java.util.*; 40 import java.util.regex.*; 41 import java.beans.*; 42 import java.io.*; 43 import java.net.*; 44 import javax.servlet.*; 45 import javax.servlet.http.*; 46 import javax.servlet.jsp.*; 47 import javax.servlet.jsp.tagext.*; 48 import javax.servlet.jsp.jstl.core.Config; 49 import org.apache.taglibs.standard.tag.common.core.Util; 50 import com.micronova.util.*; 51 import com.micronova.util.servlet.*; 52 53 import javax.xml.parsers.*; 54 import javax.xml.transform.*; 55 import javax.xml.transform.dom.*; 56 import javax.xml.transform.stream.*; 57 import org.w3c.dom.*; 58 59 64 65 public class YuzuTag extends YuzuRoot implements TryCatchFinally 66 { 67 68 69 public static final String DEFAULT = "default"; 70 71 72 73 public static final String CALLSTACK = "com.micronova.jsp.tag.YuzuTag.callStack"; 74 75 76 77 public static final String TAG = "tag"; 78 public static final String PAGECONTEXT = "pageContext"; 79 public static final String HIDDEN = "hidden"; 80 81 82 83 public static final String ROOTPAGECONTEXT = "com.micronova.jsp.tag.YuzuTag.rootPageContext"; 84 85 86 87 public static final String CLASSNAME = "com.micronova.jsp.tag.YuzuTag"; 88 89 90 91 public static final String VALUEVAR = "_"; 92 93 94 95 public static final String RETURNTARGET = "return"; 96 97 98 99 protected Object _value; 100 101 102 103 protected Object _defaultValue; 104 105 106 107 protected String _test; 108 109 110 111 protected String _var; 112 113 114 115 protected Object _target; 116 117 118 119 protected String _attribute; 120 121 122 123 protected String _property; 124 125 126 127 protected int _scope; 128 129 130 131 protected String _className; 132 133 134 135 protected String _exportCodec; 136 137 138 139 protected String _importCodec; 140 141 142 143 protected String _processCodec; 144 145 146 147 protected String _prepareCodec; 148 149 150 151 protected String _cleanupCodec; 152 153 154 155 protected String _assign; 156 157 158 159 protected String _assignCodec; 160 161 162 163 protected String _export; 164 165 166 167 protected String _doesExport; 168 169 170 171 protected String _local; 172 173 174 175 protected Map _localMap; 176 177 178 179 protected boolean _isInBody; 180 181 182 183 protected Object _valueVarSaved; 184 185 186 187 protected boolean _hasBody; 188 189 190 191 protected boolean _isAssigned; 192 193 194 195 protected Object getConfiguration(String configName, Object defaultConfiguration) 196 { 197 Object configuration = Config.find(pageContext, configName); 198 199 if (configuration == null) 200 { 201 configuration = defaultConfiguration; 202 } 203 204 return configuration; 205 } 206 207 208 209 public void rethrow(Throwable e) throws JspException 210 { 211 if (e instanceof JspException) 212 { 213 throw (JspException)e; 214 } 215 else 216 { 217 throw new JspException(e); 218 } 219 } 220 221 222 223 public YuzuTag() 224 { 225 super(); 226 227 init(); 228 } 229 230 231 232 protected void init() 233 { 234 _value = null; 235 _defaultValue = null; 236 _test = null; 237 _var = null; 238 _target = null; 239 _property = null; 240 _scope = PageContext.PAGE_SCOPE; 241 _attribute = null; 242 _className = null; 243 244 _local = null; 245 _localMap = null; 246 _valueVarSaved = null; 247 248 _export = DEFAULT; 249 _assign = DEFAULT; 250 _doesExport = DEFAULT; 251 252 _assignCodec = null; 253 _exportCodec = null; 254 _importCodec = null; 255 _processCodec = null; 256 _prepareCodec = null; 257 _cleanupCodec = null; 258 259 _isInBody = false; 260 _hasBody = false; 261 _isAssigned = false; 262 } 263 264 265 266 protected void cleanup() 267 { 268 String cleanupCodec = _cleanupCodec; 269 270 if (cleanupCodec != null) 271 { 272 try 273 { 274 applyCodec(cleanupCodec, _value); 275 } 276 catch (Exception e) 277 { 278 } 280 } 281 } 282 283 284 285 protected Object applyCodec(String codecs, Object object) throws Exception 286 { 287 return EL.applyCodec(pageContext, codecs, object); 288 } 289 290 291 292 protected void setPageAttribute(String name, Object value) 293 { 294 EL.setPageAttribute(pageContext, name, value); 295 } 296 297 298 299 protected Object getPageAttribute(String name) 300 { 301 return EL.getPageAttribute(pageContext, name); 302 } 303 304 public static Object getRequestAttribute(PageContext pageContext, String name) 305 { 306 return pageContext.getRequest().getAttribute(name); 307 } 308 309 310 311 public static void setScopedAttribute(PageContext pageContext, String name, Object value, int scope) 312 { 313 if (scope == PageContext.SESSION_SCOPE) 314 { 315 HttpSession session = ((HttpServletRequest)pageContext.getRequest()).getSession(); 316 317 if (value == null) 318 { 319 session.removeAttribute(name); 320 } 321 else 322 { 323 session.setAttribute(name, value); 324 } 325 } 326 else 327 { 328 if (value == null) 329 { 330 pageContext.removeAttribute(name, scope); 331 } 332 else 333 { 334 pageContext.setAttribute(name, value, scope); 335 } 336 } 337 } 338 339 340 341 protected void saveLocal() throws Exception 342 { 343 _valueVarSaved = getPageAttribute(VALUEVAR); 344 345 String local = _local; 346 347 if (local != null) 348 { 349 Map localMap = new HashMap(); 350 String [] localArray = local.split("[ ,\t\r\n]+"); 351 352 for (int i = 0; i < localArray.length; i ++) 353 { 354 String key = localArray[i]; 355 356 Object value = getPageAttribute(key); 357 358 if (value != null) 359 { 360 localMap.put(key, getPageAttribute(key)); 361 } 362 } 363 364 _localMap = localMap; 365 } 366 } 367 368 369 370 protected void restoreLocal() 371 { 372 try 373 { 374 setPageAttribute(VALUEVAR, _valueVarSaved); 375 376 Map localMap = _localMap; 377 378 if (localMap != null) 379 { 380 Iterator iterator = localMap.entrySet().iterator(); 381 382 while (iterator.hasNext()) 383 { 384 Map.Entry entry = (Map.Entry)iterator.next(); 385 386 setPageAttribute(entry.getKey().toString(), entry.getValue()); 387 } 388 } 389 } 390 catch (Exception e) 391 { 392 } 393 } 394 395 396 397 protected Object instantiateValue(String className) throws Exception 398 { 399 if (className.indexOf(':') < 0) 400 { 401 Class c = TypeUtil.forName(className); 402 403 return c.newInstance(); 404 } 405 else 406 { 407 List partList = StringUtil.split(className, ':'); 408 className = partList.get(0).toString(); 409 int argCount = partList.size() - 1; 410 Object [] args = new Object [argCount]; 411 for (int i = 0; i < argCount; i ++) 412 { 413 args[i] = evaluateExpression("constructorArgument", partList.get(i + 1).toString(), Object .class); 414 } 415 416 Class c = TypeUtil.forName(className); 417 418 return TypeUtil.newInstance(c, args); 419 } 420 } 421 422 423 424 protected Object prepareValue(Object tagValue) throws Exception 425 { 426 if (tagValue == null) 427 { 428 String className = _className; 429 430 if (className != null) 431 { 432 tagValue = instantiateValue(className); 433 } 434 } 435 436 String prepareCodec = _prepareCodec; 437 438 if (prepareCodec != null) 439 { 440 tagValue = applyCodec(prepareCodec, tagValue); 441 } 442 443 return tagValue; 444 } 445 446 447 448 public static List getStack(PageContext pageContext, String name) 449 { 450 List list = (List)getRequestAttribute(pageContext, name); 451 452 if (list == null) 453 { 454 list = new ArrayList(); 455 456 NestedMap rootEntry = new NestedMap(); 457 rootEntry.put(PAGECONTEXT, getRequestAttribute(pageContext, ROOTPAGECONTEXT)); 458 459 list.add(rootEntry); 460 461 setScopedAttribute(pageContext, name, list, PageContext.REQUEST_SCOPE); 462 } 463 464 return list; 465 } 466 467 468 469 public static List pushStack(PageContext pageContext, String name, Object object) 470 { 471 List list = getStack(pageContext, name); 472 list.add(object); 473 return list; 474 } 475 476 477 478 public static Object popStack(PageContext pageContext, String name) 479 { 480 Object object = null; 481 482 List list = getStack(pageContext, name); 483 484 if (!(list.isEmpty())) 485 { 486 object = list.remove(list.size() - 1); 487 } 488 489 return object; 490 } 491 492 493 494 public static List getCallStack(PageContext pageContext) 495 { 496 return getStack(pageContext, CALLSTACK); 497 } 498 499 500 501 public List pushCallStack() 502 { 503 NestedMap stackEntry = new NestedMap(); 504 505 stackEntry.put(TAG, this); 506 stackEntry.put(PAGECONTEXT, pageContext); 507 508 return pushStack(pageContext, CALLSTACK, stackEntry); 509 } 510 511 512 513 public NestedMap popCallStack() 514 { 515 return (NestedMap)popStack(pageContext, CALLSTACK); 516 } 517 518 519 520 protected void initBody() throws Exception 521 { 522 _isInBody = true; 523 524 pushCallStack(); 525 } 526 527 528 529 protected void afterBody() throws Exception 530 { 531 popCallStack(); 532 533 _isInBody = false; 534 _hasBody = true; 535 } 536 537 public void doInitBody() throws JspException 538 { 539 try 540 { 541 super.doInitBody(); 542 543 initBody(); 544 } 545 catch (Exception e) 546 { 547 rethrow(e); 548 } 549 } 550 551 public int doAfterBody() throws JspException 552 { 553 try 554 { 555 afterBody(); 556 557 return super.doAfterBody(); 558 } 559 catch (Exception e) 560 { 561 rethrow(e); 562 } 563 564 566 return 0; 567 } 568 569 public int doStartTag() throws JspException 570 { 571 try 572 { 573 doPrepare(); 574 575 saveLocal(); 576 577 setPageAttribute(VALUEVAR, _value); 578 } 579 catch (Exception e) 580 { 581 rethrow(e); 582 } 583 584 return EVAL_BODY_BUFFERED; 585 } 586 587 public int doEndTag() throws JspException 588 { 589 try 590 { 591 Object importedValue = doImport(_value); 592 593 594 595 Object processValue = doDefault(importedValue, _defaultValue, _test); 596 597 598 599 Object processedValue = doProcess(processValue); 600 601 602 603 boolean isAssigned = doAssign(processedValue); 604 605 _isAssigned = isAssigned; 606 607 608 609 if (doesExport(processedValue, isAssigned)) 610 { 611 doExport(processedValue); 612 } 613 } 614 catch (Throwable e) 615 { 616 rethrow(e); 617 } 618 619 return EVAL_PAGE; 620 } 621 622 623 624 protected boolean doesImport(Object value) 625 { 626 return (value == null); 627 } 628 629 630 631 632 protected Object importBody(Object value) throws Exception 633 { 634 if (doesImport(value)) 635 { 636 String bodyString = bodyContent.getString(); 637 638 if (!isEmptyString(bodyString)) 639 { 640 String importCodec = _importCodec; 641 642 if (importCodec != null) 643 { 644 return applyCodec(importCodec, bodyString); 645 } 646 else 647 { 648 return bodyString; 649 } 650 } 651 } 652 653 return value; 654 } 655 656 657 658 protected void doPrepare() throws Exception 659 { 660 _value = prepareValue(_value); 661 } 662 663 664 665 protected Object doDefault(Object value, Object defaultValue, String test) throws Exception 666 { 667 if (test == null) 668 { 669 if (isEmptyString(value)) 670 { 671 value = defaultValue; 672 } 673 } 674 else 675 { 676 setPageAttribute(VALUEVAR, value); 677 678 if (!TypeUtil.isTrue(EL.applyCodec(pageContext, test, value))) 679 { 680 value = defaultValue; 681 } 682 } 683 684 return value; 685 } 686 687 688 689 protected Object doImport(Object tagValue) throws Exception 690 { 691 Object importedValue = tagValue; 692 693 if (_hasBody) 694 { 695 importedValue = importBody(tagValue); 696 } 697 698 return importedValue; 699 } 700 701 702 703 protected boolean doesExport(Object tagValue, boolean isAssigned) 704 { 705 return (("always".equals(_doesExport)) || (!isAssigned)); 706 } 707 708 709 710 protected void exportValue(Object tagValue) throws Exception 711 { 712 if (tagValue instanceof Node) 713 { 714 Node node = (Node)tagValue; 715 716 Transformer transformer = TransformerFactory.newInstance().newTransformer(); 717 transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); 718 719 StringWriter writer = new StringWriter(); 720 721 Source source = new DOMSource(node); 722 Result result = new StreamResult(writer); 723 724 transformer.transform(source, result); 725 726 pageContext.getOut().print(writer.toString()); 727 } 728 else if (tagValue instanceof Reader) 729 { 730 IOUtil.copy((Reader)tagValue, pageContext.getOut()); 731 } 732 else 733 { 734 pageContext.getOut().print(tagValue); 735 } 736 } 737 738 739 740 protected Object getExportValue(Object tagValue) throws Exception 741 { 742 String export = _export; 743 744 if ((export == null) || (export.length() == 0)) 745 { 746 return null; 747 } 748 749 if ("_assign".equals(export)) 750 { 751 export = _assign; 752 } 753 754 if (export != DEFAULT) 755 { 756 tagValue = evaluateExpression("export", export, Object .class); 757 } 758 759 if (tagValue != null) 760 { 761 String exportCodec = _exportCodec; 762 763 if (exportCodec != null) 764 { 765 tagValue = applyCodec(exportCodec, tagValue); 766 } 767 } 768 769 return tagValue; 770 } 771 772 773 774 protected void doExport(Object tagValue) throws Exception 775 { 776 setPageAttribute(VALUEVAR, tagValue); 777 778 Object exportObject = getExportValue(tagValue); 779 780 if (exportObject != null) 781 { 782 exportValue(exportObject); 783 } 784 } 785 786 787 788 protected Object getAncestorTag(String className) 789 { 790 try 791 { 792 Class c = Class.forName(className); 793 Class yuzuClass = Class.forName(CLASSNAME); 794 795 if (yuzuClass.isAssignableFrom(c)) 796 { 797 List callStack = getCallStack(pageContext); 798 799 for (int i = callStack.size(); --i >=0 ;) 800 { 801 NestedMap entry = (NestedMap)callStack.get(i); 802 803 YuzuTag parent = (YuzuTag)entry.get(TAG); 804 boolean isHidden = TypeUtil.isTrue(entry.get(HIDDEN)); 805 806 if ((c.isInstance(parent)) && (!isHidden)) 807 { 808 return parent; 809 } 810 } 811 } 812 else 813 { 814 Tag parent = this; 815 816 while ((parent = parent.getParent()) != null) 817 { 818 if (c.isInstance(parent)) 819 { 820 return parent; 821 } 822 } 823 } 824 } 825 catch (Exception e) 826 { 827 } 829 830 return null; 831 } 832 833 834 835 protected boolean setTargetProperty(Object targetObject, String targetProperty, Object assignValue) throws Exception 836 { 837 if (!isEmptyString(targetProperty)) 838 { 839 BeanUtil.setProperty(targetObject, targetProperty, assignValue); 840 return true; 841 } 842 else 843 { 844 return false; 845 } 846 } 847 848 849 850 protected boolean doAssign(Object assignValue) throws Exception 851 { 852 setPageAttribute(VALUEVAR, assignValue); 853 854 String assign = _assign; 855 856 if ("_export".equals(assign)) 857 { 858 assign = _export; 859 } 860 861 if (assign != DEFAULT) 862 { 863 assignValue = evaluateExpression("assign", assign, Object .class); 864 } 865 866 String assignCodec = _assignCodec; 867 868 if (assignCodec != null) 869 { 870 assignValue = applyCodec(assignCodec, assignValue); 871 } 872 873 boolean isAssigned = false; 874 875 String attribute = _attribute; 876 877 if (attribute != null) 878 { 879 Object ancestorTag = getAncestorTag(CLASSNAME); 880 881 if (ancestorTag != null) 882 { 883 isAssigned = isAssigned || setTargetProperty(ancestorTag, attribute, assignValue); 884 885 if ("value".equals(attribute)) 886 { 887 _valueVarSaved = assignValue; 888 } 889 } 890 } 891 892 Object targetObject = _target; 893 String property = _property; 894 895 if (RETURNTARGET.equals(targetObject)) 896 { 897 HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); 898 899 if (request instanceof DispatchHttpServletRequest) 900 { 901 Object dispatchObject = ((DispatchHttpServletRequest)request).getDispatchObject(); 902 targetObject = TypeUtil.isNestedMap(dispatchObject); 903 property = "@_return.value"; 904 905 if (assignValue == null) 906 { 907 assignValue = ""; 908 } 909 } 910 else 911 { 912 targetObject = null; 913 property = null; 914 } 915 } 916 917 if (targetObject instanceof String ) 918 { 919 targetObject = evaluateExpression("target", EL.replaceEvalEscape(targetObject.toString()), Object .class); 920 } 921 922 String targetProperty = null; 923 924 List assignValueList = null; 925 926 if (property != null) 927 { 928 targetProperty = property; 929 930 if (targetObject == null) 931 { 932 targetObject = getAncestorTag(CLASSNAME); 933 934 if (targetObject != null) 935 { 936 targetObject = ((YuzuTag)targetObject)._value; 937 } 938 } 939 940 if (targetObject != null) 941 { 942 List targetPropertyList = null; 943 944 if (!targetProperty.startsWith("#")) 945 { 946 targetPropertyList = StringUtil.split(targetProperty, ','); 947 } 948 949 if ((targetPropertyList != null) && (targetPropertyList.size() > 1)) 950 { 951 Iterator targetPropertyIterator = targetPropertyList.iterator(); 952 953 assignValueList = TypeUtil.isList(assignValue); 954 955 if (assignValueList != null) 956 { 957 Iterator assignValueIterator = assignValueList.iterator(); 958 959 while (targetPropertyIterator.hasNext()) 960 { 961 String subTargetProperty = (String )targetPropertyIterator.next(); 962 Object subAssignValue = null; 963 964 if (assignValueIterator.hasNext()) 965 { 966 subAssignValue = assignValueIterator.next(); 967 } 968 969 if (!"".equals(subTargetProperty)) 970 { 971 isAssigned = isAssigned || setTargetProperty(targetObject, subTargetProperty, subAssignValue); 972 } 973 } 974 } 975 else 976 { 977 while (targetPropertyIterator.hasNext()) 978 { 979 String subTargetProperty = (String )targetPropertyIterator.next(); 980 if (!("".equals(subTargetProperty))) 981 { 982 isAssigned = isAssigned || setTargetProperty(targetObject, subTargetProperty, assignValue); 983 } 984 } 985 986 } 987 } 988 else 989 { 990 isAssigned = isAssigned || setTargetProperty(targetObject, targetProperty, assignValue); 991 } 992 } 993 } 994 995 String var = _var; 996 int scope = _scope; 997 998 if (!isEmptyString(var)) 999 { 1000 List varList = StringUtil.split(var, ','); 1001 1002 if (varList.size() > 1) 1003 { 1004 Iterator varListIterator = varList.iterator(); 1005 1006 if (assignValueList == null) 1007 { 1008 assignValueList = TypeUtil.isList(assignValue); 1009 } 1010 1011 if (assignValueList != null) 1012 { 1013 Iterator assignValueIterator = assignValueList.iterator(); 1014 1015 while (varListIterator.hasNext()) 1016 { 1017 String subVar = (String )varListIterator.next(); 1018 1019 Object subAssignValue = null; 1020 1021 if (assignValueIterator.hasNext()) 1022 { 1023 subAssignValue = assignValueIterator.next(); 1024 } 1025 1026 if (!("".equals(subVar))) 1027 { 1028 setScopedAttribute(pageContext, subVar, subAssignValue, scope); 1029 isAssigned = true; 1030 } 1031 } 1032 } 1033 else 1034 { 1035 while (varListIterator.hasNext()) 1036 { 1037 String subVar = (String )varListIterator.next(); 1038 1039 if (!("".equals(subVar))) 1040 { 1041 setScopedAttribute(pageContext, subVar, assignValue, scope); 1042 isAssigned = true; 1043 } 1044 } 1045 } 1046 } 1047 else 1048 { 1049 setScopedAttribute(pageContext, var, assignValue, scope); 1050 isAssigned = true; 1051 } 1052 } 1053 1054 return isAssigned; 1055 } 1056 1057 1058 1059 protected Object processValue(Object tagValue) throws Exception 1060 { 1061 return tagValue; 1062 } 1063 1064 1065 1066 protected Object doProcess(Object processValue) throws Exception 1067 { 1068 Object object = processValue(processValue); 1069 1070 String processCodec = _processCodec; 1071 1072 if (processCodec != null) 1073 { 1074 object = applyCodec(processCodec, object); 1075 } 1076 1077 return object; 1078 } 1079 1080 public void doCatch(Throwable t) throws Throwable 1081 { 1082 if (_isInBody) 1083 { 1084 popCallStack(); 1085 } 1086 1087 throw t; 1088 } 1089 1090 public void doFinally() 1091 { 1092 cleanup(); 1093 1094 restoreLocal(); 1095 1096 init(); 1097 } 1098 1099 1100 1101 public static boolean isEmpty(Object object) 1102 { 1103 return TypeUtil.isEmpty(object); 1104 } 1105 1106 1107 1108 public static boolean isEmptyString(Object object) 1109 { 1110 return TypeUtil.isEmptyString(object); 1111 } 1112 1113 1116 1117 protected Object evaluateAttribute(String name, Object expression, Class valueClass) throws Exception 1118 { 1119 if (_isInBody) 1120 { 1121 return expression; 1122 } 1123 else if (expression != null) 1124 { 1125 return evaluateAttributeExpression(name, expression, valueClass); 1126 } 1127 else 1128 { 1129 return null; 1130 } 1131 } 1132 1133 public void setVar(Object expression) throws Exception 1134 { 1135 _var = (String )evaluateAttribute("var", expression, String .class); 1136 } 1137 1138 public void setScope(Object expression) throws Exception 1139 { 1140 _scope = Util.getScope((String )evaluateAttribute("scope", expression, String .class)); 1141 } 1142 1143 public void setTarget(Object expression) throws Exception 1144 { 1145 _target = evaluateAttribute("target", expression, Object .class); 1146 } 1147 1148 public void setProperty(Object expression) throws Exception 1149 { 1150 _property = (String )evaluateAttribute("property", expression, String .class); 1151 } 1152 1153 public void setValue(Object expression) throws Exception 1154 { 1155 _value = evaluateAttribute("value", expression, Object .class); 1156 } 1157 1158 public Object getValue() 1159 { 1160 return _value; 1161 } 1162 1163 public void setDefault(Object expression) throws Exception 1164 { 1165 _defaultValue = evaluateAttribute("default", expression, Object .class); 1166 } 1167 1168 public void setDefaultValue(Object expression) throws Exception 1169 { 1170 setDefault(expression); 1171 } 1172 1173 public void setClassName(Object expression) throws Exception 1174 { 1175 _className = (String )evaluateAttribute("className", expression, EL.class); 1176 } 1177 1178 public void setTest(Object expression) throws Exception 1179 { 1180 _test = (String )evaluateAttribute("test", expression, EL.class); 1181 } 1182 1183 public void setAttribute(Object expression) throws Exception 1184 { 1185 _attribute = (String )evaluateAttribute("attribute", expression, String .class); 1186 } 1187 1188 public void setLocal(Object expression) throws Exception 1189 { 1190 _local = (String )evaluateAttribute("local", expression, String .class); 1191 } 1192 1193 public void setExport(Object expression) throws Exception 1194 { 1195 _export = (String )evaluateAttribute("export", expression, EL.class); 1196 } 1197 1198 public void setAssign(Object expression) throws Exception 1199 { 1200 _assign = (String )evaluateAttribute("assign", expression, EL.class); 1201 } 1202 1203 public void setExportCodec(Object expression) throws Exception 1204 { 1205 _exportCodec = (String )evaluateAttribute("exportCodec", expression, EL.class); 1206 } 1207 1208 public void setAssignCodec(Object expression) throws Exception 1209 { 1210 _assignCodec = (String )evaluateAttribute("assignCodec", expression, EL.class); 1211 } 1212 1213 public void setImportCodec(Object expression) throws Exception 1214 { 1215 _importCodec = (String )evaluateAttribute("importCodec", expression, EL.class); 1216 } 1217 1218 public void setProcessCodec(Object expression) throws Exception 1219 { 1220 _processCodec = (String )evaluateAttribute("processCodec", expression, EL.class); 1221 } 1222 1223 public void setCodec(Object expression) throws Exception 1224 { 1225 setProcessCodec(expression); 1226 } 1227 1228 public void setPrepareCodec(Object expression) throws Exception 1229 { 1230 _prepareCodec = (String )evaluateAttribute("prepareCodec", expression, EL.class); 1231 } 1232 1233 public void setCleanupCodec(Object expression) throws Exception 1234 { 1235 _cleanupCodec = (String )evaluateAttribute("cleanupCodec", expression, EL.class); 1236 } 1237 1238 public void setDoesExport(Object expression) throws Exception 1239 { 1240 _doesExport = (String )evaluateAttribute("doesExport", expression, String .class); 1241 } 1242} 1243 | Popular Tags |