1 16 package org.apache.cocoon.acting; 17 18 import org.apache.avalon.framework.configuration.Configurable; 19 import org.apache.avalon.framework.configuration.Configuration; 20 import org.apache.avalon.framework.configuration.ConfigurationException; 21 import org.apache.avalon.framework.parameters.Parameters; 22 23 import org.apache.cocoon.Constants; 24 import org.apache.cocoon.ProcessingException; 25 import org.apache.cocoon.environment.SourceResolver; 26 import org.apache.cocoon.environment.ObjectModelHelper; 27 import org.apache.cocoon.environment.Redirector; 28 import org.apache.cocoon.sitemap.SitemapParameters; 29 import org.apache.commons.lang.BooleanUtils; 30 import org.apache.commons.lang.StringUtils; 31 32 import org.apache.regexp.RE; 33 import org.apache.regexp.RESyntaxException; 34 35 import java.util.Collection ; 36 import java.util.HashMap ; 37 import java.util.HashSet ; 38 import java.util.Iterator ; 39 import java.util.Map ; 40 import java.util.Set ; 41 import java.util.Vector ; 42 43 192 public abstract class AbstractValidatorAction 193 extends AbstractComplementaryConfigurableAction 194 implements Configurable { 195 196 205 abstract protected HashMap createMapOfParameters(Map objectModel, Collection set); 206 207 211 abstract boolean isStringEncoded(); 212 213 216 public Map act(Redirector redirector, 217 SourceResolver resolver, 218 Map objectModel, 219 String src, 220 Parameters parameters) throws Exception { 221 222 Configuration conf = this.getDescriptor(resolver, objectModel, parameters); 223 if (conf == null) 224 return null; 225 226 String valStr = 227 parameters.getParameter("validate", (String )settings.get("validate", "")).trim(); 228 String valSetStr = 229 parameters.getParameter("validate-set", (String )settings.get("validate-set", "")).trim(); 230 String constraintSetStr = 231 parameters.getParameter("constraint-set", (String )settings.get("constraint-set", "")).trim(); 232 if (!"".equals(valSetStr)) { 233 if (getLogger().isInfoEnabled()) { 234 getLogger().info("Using sitemap parameter 'validate-set' for specifying " 235 + "the constraint-set for the ValidatorActions is deprecated in " 236 + "favor of 'constraint-set' due to consistency in the naming."); 237 } 238 if ("".equals(constraintSetStr)) { 239 constraintSetStr = valSetStr; 240 } 241 } 242 Map desc = this.indexConfiguration(conf.getChildren("parameter")); 243 244 Map actionMap = new HashMap (); 245 Map resultMap = new HashMap (); 246 Collection params = null; 247 boolean allOK = false; 248 249 if (!"".equals(valStr)) { 250 if (getLogger().isDebugEnabled()) { 251 getLogger().debug("Validating parameters as specified via 'validate' parameter"); 252 } 253 params = this.getSetOfParameterNamesFromSitemap(valStr, desc); 254 } else if (!"".equals(constraintSetStr)) { 255 if (getLogger().isDebugEnabled()) { 256 getLogger().debug("Validating parameters from given constraint-set " + constraintSetStr); 257 } 258 Map csets = this.indexConfiguration(conf.getChildren("constraint-set")); 259 params = this.resolveConstraints(constraintSetStr, csets); 260 } 261 262 if (params == null) { 263 throw new ProcessingException("Neither a constraint-set nor parameters in the sitemap " 264 + "were specified for validating at " 265 + SitemapParameters.getStatementLocation(parameters)); 266 } 267 HashMap values = this.createMapOfParameters(objectModel, params); 268 allOK = this.validateSetOfParameters(desc, actionMap, resultMap, params, values, this.isStringEncoded()); 269 270 return this.setResult(objectModel, actionMap, resultMap, allOK); 271 } 272 273 287 public ValidatorActionHelper validateParameter( 288 String name, 289 Configuration constraints, 290 Map conf, 291 Map params, 292 boolean isString) { 293 294 return validateParameter(name, name, constraints, conf, params, isString); 295 } 296 297 313 public ValidatorActionHelper validateParameter( 314 String name, 315 String rule, 316 Configuration constraints, 317 Map conf, 318 Map params, 319 boolean isString) { 320 String type = null; 321 322 if (getLogger().isDebugEnabled()) 323 getLogger().debug("Validating parameter: " + name + " using rule: " + rule); 324 325 326 try { 327 Configuration theConf = (Configuration) conf.get(rule); 328 type = theConf.getAttribute("type"); 329 330 return validateValue(name, constraints, theConf, params, isString, type); 331 332 } catch (Exception e) { 333 if (getLogger().isDebugEnabled()) 334 getLogger().debug("No type specified for parameter " + name); 335 return null; 336 } 337 } 338 339 350 protected ValidatorActionHelper validateValue( 351 String name, 352 Configuration constraints, 353 Configuration conf, 354 Map params, 355 boolean isString, 356 String type) { 357 Object value = params.get(name); 358 359 if (value != null && value.getClass().isArray()) { 360 Object [] values = (Object []) value; 361 ValidatorActionHelper vaH = null; 362 ValidatorActionResult vaR = ValidatorActionResult.OK; 363 for (int j = 0; j < values.length; j++) { 364 value = values[j]; 365 if ("string".equals(type)) { 366 vaH = validateString(name, constraints, conf, params, value); 367 } else if ("long".equals(type)) { 368 vaH = validateLong(name, constraints, conf, params, isString, value); 369 } else if ("double".equals(type)) { 370 vaH = validateDouble(name, constraints, conf, params, isString, value); 371 } else { 372 if (getLogger().isDebugEnabled()) 373 getLogger().debug( 374 "Unknown type " + type + " specified for parameter " + name); 375 return null; 376 } 377 vaR = (vaR.getPos() < vaH.getResult().getPos() ? vaH.getResult() : vaR); 378 } 379 return new ValidatorActionHelper(vaH.getObject(), vaR); 380 } else { 381 if ("string".equals(type)) { 382 return validateString(name, constraints, conf, params, value); 383 } else if ("long".equals(type)) { 384 return validateLong(name, constraints, conf, params, isString, value); 385 } else if ("double".equals(type)) { 386 return validateDouble(name, constraints, conf, params, isString, value); 387 } else { 388 if (getLogger().isDebugEnabled()) 389 getLogger().debug("Unknown type " + type + " specified for parameter " + name); 390 } 391 return null; 392 } 393 } 394 395 399 private ValidatorActionHelper validateString( 400 String name, 401 Configuration constraints, 402 Configuration conf, 403 Map params, 404 Object param) { 405 406 String value = null; 407 String dflt = getDefault(conf, constraints); 408 boolean nullable = getNullable(conf, constraints); 409 410 if (getLogger().isDebugEnabled()) 411 getLogger().debug("Validating string parameter " + name); 412 try { 413 value = getStringValue(param); 414 } catch (Exception e) { 415 return new ValidatorActionHelper(value, ValidatorActionResult.ERROR); 417 } 418 if (value == null) { 419 if (getLogger().isDebugEnabled()) 420 getLogger().debug("String parameter " + name + " is null"); 421 if (!nullable) { 422 return new ValidatorActionHelper(value, ValidatorActionResult.ISNULL); 423 } else { 424 return new ValidatorActionHelper(dflt); 425 } 426 } 427 if (constraints != null) { 428 String eq = constraints.getAttribute("equals-to", ""); 429 eq = conf.getAttribute("equals-to", eq); 430 431 String eqp = constraints.getAttribute("equals-to-param", ""); 432 eqp = conf.getAttribute("equals-to-param", eqp); 433 434 String regex = conf.getAttribute("matches-regex", ""); 435 regex = constraints.getAttribute("matches-regex", regex); 436 437 String oneOf = conf.getAttribute("one-of", ""); 438 oneOf = constraints.getAttribute("one-of", oneOf); 439 440 Long minlen = getAttributeAsLong(conf, "min-len", null); 441 minlen = getAttributeAsLong(constraints, "min-len", minlen); 442 443 Long maxlen = getAttributeAsLong(conf, "max-len", null); 444 maxlen = getAttributeAsLong(constraints, "max-len", maxlen); 445 446 if (!"".equals(eq)) { 448 if (getLogger().isDebugEnabled()) 449 getLogger().debug("String parameter " + name + " should be equal to " + eq); 450 if (!value.equals(eq)) { 451 if (getLogger().isDebugEnabled()) 452 getLogger().debug("and it is not"); 453 return new ValidatorActionHelper(value, ValidatorActionResult.NOMATCH); 454 } 455 } 456 457 if (!"".equals(eqp)) { 461 if (getLogger().isDebugEnabled()) 462 getLogger().debug( 463 "String parameter " + name + " should be equal to " + params.get(eqp)); 464 if (!value.equals(params.get(eqp))) { 465 if (getLogger().isDebugEnabled()) 466 getLogger().debug("and it is not"); 467 return new ValidatorActionHelper(value, ValidatorActionResult.NOMATCH); 468 } 469 } 470 471 if (minlen != null) { 473 if (getLogger().isDebugEnabled()) 474 getLogger().debug( 475 "String parameter " 476 + name 477 + " should be at least " 478 + minlen 479 + " characters long"); 480 if (value.length() < minlen.longValue()) { 481 if (getLogger().isDebugEnabled()) 482 getLogger().debug("and it is shorter (" + value.length() + ")"); 483 return new ValidatorActionHelper(value, ValidatorActionResult.TOOSMALL); 484 } 485 } 486 487 if (maxlen != null) { 489 if (getLogger().isDebugEnabled()) 490 getLogger().debug( 491 "String parameter " 492 + name 493 + " should be at most " 494 + maxlen 495 + " characters long"); 496 497 if (value.length() > maxlen.longValue()) { 498 if (getLogger().isDebugEnabled()) 499 getLogger().debug("and it is longer (" + value.length() + ")"); 500 return new ValidatorActionHelper(value, ValidatorActionResult.TOOLARGE); 501 } 502 } 503 504 if (!"".equals(regex)) { 506 if (getLogger().isDebugEnabled()) 507 getLogger().debug( 508 "String parameter " + name + " should match regexp \"" + regex + "\""); 509 try { 510 RE r = new RE(regex); 511 if (!r.match(value)) { 512 if (getLogger().isDebugEnabled()) 513 getLogger().debug("and it does not match"); 514 return new ValidatorActionHelper(value, ValidatorActionResult.NOMATCH); 515 } 516 } catch (RESyntaxException rese) { 517 if (getLogger().isDebugEnabled()) 518 getLogger().error("String parameter " + name + " regex error ", rese); 519 return new ValidatorActionHelper(value, ValidatorActionResult.NOMATCH); 520 } 521 } 522 523 if (!"".equals(oneOf)) { 525 if (getLogger().isDebugEnabled()) 526 getLogger().debug( 527 "String parameter " + name + " should be one of \"" + oneOf + "\""); 528 if (!oneOf.startsWith("|")) 529 oneOf = "|" + oneOf; 530 if (!oneOf.endsWith("|")) 531 oneOf = oneOf + "|"; 532 if (value.indexOf("|") != -1) { 533 if (getLogger().isDebugEnabled()) 534 getLogger().debug( 535 "String parameter " + name + "contains \"|\" - can't validate that."); 536 return new ValidatorActionHelper(value, ValidatorActionResult.ERROR); 537 } 538 if (oneOf.indexOf("|" + value + "|") == -1) { 539 if (getLogger().isDebugEnabled()) 540 getLogger().debug("and it is not"); 541 return new ValidatorActionHelper(value, ValidatorActionResult.NOMATCH); 542 } 543 return new ValidatorActionHelper(value, ValidatorActionResult.OK); 544 545 } 546 547 } 548 return new ValidatorActionHelper(value); 549 } 550 551 555 private ValidatorActionHelper validateLong( 556 String name, 557 Configuration constraints, 558 Configuration conf, 559 Map params, 560 boolean is_string, 561 Object param) { 562 563 boolean nullable = getNullable(conf, constraints); 564 Long value = null; 565 Long dflt = getLongValue(getDefault(conf, constraints), true); 566 567 if (getLogger().isDebugEnabled()) 568 getLogger().debug( 569 "Validating long parameter " + name + " (encoded in a string: " + is_string + ")"); 570 try { 571 value = getLongValue(param, is_string); 572 } catch (Exception e) { 573 return new ValidatorActionHelper(value, ValidatorActionResult.ERROR); 575 } 576 if (value == null) { 577 if (getLogger().isDebugEnabled()) 578 getLogger().debug("Long parameter " + name + " is null"); 579 if (!nullable) { 580 return new ValidatorActionHelper(value, ValidatorActionResult.ISNULL); 581 } else { 582 return new ValidatorActionHelper(dflt); 583 } 584 } 585 if (constraints != null) { 586 Long eq = getAttributeAsLong(constraints, "equals-to", null); 587 String eqp = constraints.getAttribute("equals-to-param", ""); 588 589 Long min = getAttributeAsLong(conf, "min", null); 590 min = getAttributeAsLong(constraints, "min", min); 591 592 Long max = getAttributeAsLong(conf, "max", null); 593 max = getAttributeAsLong(constraints, "max", max); 594 595 if (eq != null) { 597 if (getLogger().isDebugEnabled()) 598 getLogger().debug("Long parameter " + name + " should be equal to " + eq); 599 600 if (!value.equals(eq)) { 601 if (getLogger().isDebugEnabled()) 602 getLogger().debug("and it is not"); 603 return new ValidatorActionHelper(value, ValidatorActionResult.NOMATCH); 604 } 605 } 606 607 if (!"".equals(eqp)) { 611 if (getLogger().isDebugEnabled()) 612 getLogger().debug( 613 "Long parameter " + name + " should be equal to " + params.get(eqp)); 614 try { 617 Long _eqp = new Long (Long.parseLong((String ) params.get(eqp))); 618 if (!value.equals(_eqp)) { 619 if (getLogger().isDebugEnabled()) 620 getLogger().debug("and it is not"); 621 return new ValidatorActionHelper(value, ValidatorActionResult.NOMATCH); 622 } 623 } catch (NumberFormatException nfe) { 624 if (getLogger().isDebugEnabled()) 625 getLogger().debug( 626 "Long parameter " + name + ": " + eqp + " is no long", 627 nfe); 628 return new ValidatorActionHelper(value, ValidatorActionResult.NOMATCH); 629 } 630 } 631 632 if (min != null) { 634 if (getLogger().isDebugEnabled()) 635 getLogger().debug("Long parameter " + name + " should be at least " + min); 636 637 if (min.compareTo(value) > 0) { 638 if (getLogger().isDebugEnabled()) 639 getLogger().debug("and it is not"); 640 return new ValidatorActionHelper(value, ValidatorActionResult.TOOSMALL); 641 } 642 } 643 644 if (max != null) { 646 if (getLogger().isDebugEnabled()) 647 getLogger().debug("Long parameter " + name + " should be at most " + max); 648 if (max.compareTo(value) < 0) { 649 if (getLogger().isDebugEnabled()) 650 getLogger().debug("and it is not"); 651 return new ValidatorActionHelper(value, ValidatorActionResult.TOOLARGE); 652 } 653 } 654 } 655 return new ValidatorActionHelper(value); 656 } 657 658 662 private ValidatorActionHelper validateDouble( 663 String name, 664 Configuration constraints, 665 Configuration conf, 666 Map params, 667 boolean is_string, 668 Object param) { 669 670 boolean nullable = getNullable(conf, constraints); 671 Double value = null; 672 Double dflt = getDoubleValue(getDefault(conf, constraints), true); 673 674 if (getLogger().isDebugEnabled()) 675 getLogger().debug( 676 "Validating double parameter " 677 + name 678 + " (encoded in a string: " 679 + is_string 680 + ")"); 681 try { 682 value = getDoubleValue(param, is_string); 683 } catch (Exception e) { 684 return new ValidatorActionHelper(value, ValidatorActionResult.ERROR); 686 } 687 if (value == null) { 688 if (getLogger().isDebugEnabled()) 689 getLogger().debug("double parameter " + name + " is null"); 690 if (!nullable) { 691 return new ValidatorActionHelper(value, ValidatorActionResult.ISNULL); 692 } else { 693 return new ValidatorActionHelper(dflt); 694 } 695 } 696 if (constraints != null) { 697 Double eq = getAttributeAsDouble(constraints, "equals-to", null); 698 String eqp = constraints.getAttribute("equals-to-param", ""); 699 700 Double min = getAttributeAsDouble(conf, "min", null); 701 min = getAttributeAsDouble(constraints, "min", min); 702 703 Double max = getAttributeAsDouble(conf, "max", null); 704 max = getAttributeAsDouble(constraints, "max", max); 705 706 if (eq != null) { 708 if (getLogger().isDebugEnabled()) 709 getLogger().debug("Double parameter " + name + " should be equal to " + eq); 710 711 if (!value.equals(eq)) { 712 if (getLogger().isDebugEnabled()) 713 getLogger().debug("and it is not"); 714 return new ValidatorActionHelper(value, ValidatorActionResult.NOMATCH); 715 } 716 } 717 718 if (!"".equals(eqp)) { 722 if (getLogger().isDebugEnabled()) 723 getLogger().debug( 724 "Double parameter " + name + " should be equal to " + params.get(eqp)); 725 try { 728 Double _eqp = new Double (Double.parseDouble((String ) params.get(eqp))); 729 if (!value.equals(_eqp)) { 730 if (getLogger().isDebugEnabled()) 731 getLogger().debug("and it is not"); 732 return new ValidatorActionHelper(value, ValidatorActionResult.NOMATCH); 733 } 734 } catch (NumberFormatException nfe) { 735 if (getLogger().isDebugEnabled()) 736 getLogger().debug( 737 "Double parameter " + name + ": " + eqp + " is no double", 738 nfe); 739 return new ValidatorActionHelper(value, ValidatorActionResult.NOMATCH); 740 } 741 } 742 743 if (min != null) { 745 if (getLogger().isDebugEnabled()) 746 getLogger().debug("Double parameter " + name + " should be at least " + min); 747 if (0 > value.compareTo(min)) { 748 if (getLogger().isDebugEnabled()) 749 getLogger().debug("and it is not"); 750 return new ValidatorActionHelper(value, ValidatorActionResult.TOOSMALL); 751 } 752 } 753 754 if (max != null) { 756 if (getLogger().isDebugEnabled()) 757 getLogger().debug("Double parameter " + name + " should be at most " + max); 758 if (0 < value.compareTo(max)) { 759 if (getLogger().isDebugEnabled()) 760 getLogger().debug("and it is not"); 761 return new ValidatorActionHelper(value, ValidatorActionResult.TOOLARGE); 762 } 763 } 764 } 765 return new ValidatorActionHelper(value); 766 } 767 768 771 private Double getDoubleValue(Object param, boolean is_string) 772 throws ClassCastException , NumberFormatException { 773 774 775 if (is_string) { 776 String tmp = getStringValue(param); 777 if (tmp == null) { 778 return null; 779 } 780 return new Double (tmp); 781 } else { 782 return (Double ) param; 783 } 784 } 785 786 789 private Long getLongValue(Object param, boolean is_string) 790 throws ClassCastException , NumberFormatException { 791 792 793 if (is_string) { 794 String tmp = getStringValue(param); 795 if (tmp == null) { 796 return null; 797 } 798 return Long.decode(tmp); 799 } else { 800 return (Long ) param; 801 } 802 } 803 804 808 private String getStringValue(Object param) throws ClassCastException { 809 810 811 String value = (String ) param; 812 if (value != null && "".equals(value.trim())) { 813 value = null; 814 } 815 return value; 816 } 817 818 823 private boolean getNullable(Configuration conf, Configuration cons) { 824 825 try { 826 String tmp = cons.getAttribute("nullable"); 827 return BooleanUtils.toBoolean(tmp); 828 } catch (Exception e) { 829 String tmp = "no"; 830 if (conf != null) { 831 tmp = conf.getAttribute("nullable", "no"); 832 } 833 return BooleanUtils.toBoolean(tmp); 834 } 835 } 836 837 842 private String getDefault(Configuration conf, Configuration cons) { 843 String dflt = ""; 844 try { 845 dflt = cons.getAttribute("default"); 846 } catch (Exception e) { 847 if (conf != null) 848 dflt = conf.getAttribute("default", ""); 849 } 850 if ("".equals(dflt.trim())) { 851 dflt = null; 852 } 853 return dflt; 854 } 855 856 870 private Long getAttributeAsLong(Configuration conf, String name, Long dflt) 871 throws NumberFormatException { 872 try { 873 return new Long (conf.getAttribute(name)); 874 } catch (ConfigurationException e) { 875 return dflt; 876 } 877 } 878 879 891 private Double getAttributeAsDouble(Configuration conf, String name, Double dflt) 892 throws NumberFormatException { 893 try { 894 return new Double (conf.getAttribute(name)); 895 } catch (ConfigurationException e) { 896 return dflt; 897 } 898 } 899 900 907 protected Map indexConfiguration(Configuration[] descriptor) { 908 if (descriptor == null) 909 return new HashMap (); 910 Map result = new HashMap ((descriptor.length > 0) ? descriptor.length * 2 : 5); 911 for (int i = descriptor.length - 1; i >= 0; i--) { 912 String name = descriptor[i].getAttribute("name", ""); 913 result.put(name, descriptor[i]); 914 } 915 return result; 916 } 917 918 926 protected Collection resolveConstraints(String valsetstr, Map consets) { 927 928 Vector rules = new Vector (); 929 Configuration[] set = ((Configuration) consets.get(valsetstr)).getChildren("validate"); 930 for (int j = 0; j < set.length; j++) { 931 rules.add(set[j]); 932 } 933 set = ((Configuration) consets.get(valsetstr)).getChildren("include"); 934 for (int j = 0; j < set.length; j++) { 935 Collection tmp = resolveConstraints(set[j].getAttribute("name", ""), consets); 936 rules.addAll(tmp); 937 } 938 return rules; 939 } 940 941 945 protected boolean isDescriptorReloadable() { 946 boolean reloadable = Constants.DESCRIPTOR_RELOADABLE_DEFAULT; 948 if (this.settings.containsKey("reloadable")) { 949 reloadable = Boolean.valueOf((String ) this.settings.get("reloadable")).booleanValue(); 950 } 951 return reloadable; 952 } 953 954 959 protected Collection getSetOfParameterNamesFromSitemap(String valstr, Map desc) { 960 String [] rparams = null; 961 Set set = new HashSet (20); 962 if (!"*".equals(valstr.trim())) { 963 rparams = StringUtils.split(valstr, ","); 964 if (rparams != null) { 965 for (int i = rparams.length - 1; i >= 0; i--) { 966 set.add(desc.get(rparams[i])); 967 } 968 } 969 } else { 970 set = desc.entrySet(); 972 } 973 return set; 974 } 975 976 989 protected boolean validateSetOfParameters( 990 Map desc, 991 Map actionMap, 992 Map resultMap, 993 Collection set, 994 Map params, 995 boolean isString) { 996 997 boolean allOK = true; 998 ValidatorActionHelper result; 999 String name; 1000 String rule = null; 1001 for (Iterator i = set.iterator(); i.hasNext();) { 1002 Configuration constr = (Configuration) i.next(); 1003 name = constr.getAttribute("name", null); 1004 rule = constr.getAttribute("rule", name); 1005 result = validateParameter(name, rule, constr, desc, params, isString); 1006 if (!result.isOK()) { 1007 if (getLogger().isDebugEnabled()) 1008 getLogger().debug("Validation failed for parameter " + name); 1009 allOK = false; 1010 } 1011 actionMap.put(name, result.getObject()); 1012 resultMap.put(name, result.getResult()); 1013 } 1014 return allOK; 1015 } 1016 1017 1027 protected Map setResult(Map objectModel, Map actionMap, Map resultMap, boolean allOK) { 1028 if (!allOK) { 1029 actionMap = null; 1031 resultMap.put("*", ValidatorActionResult.ERROR); 1032 if (getLogger().isDebugEnabled()) 1033 getLogger().debug("All form params validated. An error occurred."); 1034 } else { 1035 resultMap.put("*", ValidatorActionResult.OK); 1036 if (getLogger().isDebugEnabled()) 1037 getLogger().debug("All form params successfully validated"); 1038 } 1039 ObjectModelHelper.getRequest(objectModel).setAttribute( 1041 Constants.XSP_FORMVALIDATOR_PATH, 1042 resultMap); 1043 return actionMap; 1045 } 1046 1047 1053 protected Configuration getDescriptor( 1054 SourceResolver resolver, 1055 Map objectModel, 1056 Parameters parameters) { 1057 Configuration conf = null; 1058 try { 1059 conf = 1060 this.getConfiguration( 1061 parameters.getParameter("descriptor", (String ) this.settings.get("descriptor")), 1062 resolver, 1063 parameters.getParameterAsBoolean("reloadable", isDescriptorReloadable())); 1064 } catch (ConfigurationException e) { 1065 if (this.getLogger().isWarnEnabled()) 1066 this.getLogger().warn("Exception reading descriptor: ", e); 1067 } 1068 return conf; 1069 } 1070 1071} 1072 | Popular Tags |