Changeset 4849
- Timestamp:
- Mar 26, 2009, 10:50:52 AM (15 years ago)
- Location:
- branches/2.11-stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.11-stable/src/core/net/sf/basedb/util/overview/validator/BasicItemNodeValidatorFactory.java
r4764 r4849 48 48 private final Map<Object, Class<? extends NodeValidator<? extends BasicItem>>> validators; 49 49 private boolean useNullValidator; 50 private boolean disabled; 50 51 51 52 /** … … 56 57 validators = new HashMap<Object, Class<? extends NodeValidator<? extends BasicItem>>>(); 57 58 this.useNullValidator = true; 59 this.disabled = false; 58 60 registerDefaultNodeValidators(); 59 61 } … … 63 65 --------------------------------------- 64 66 */ 67 68 69 @Override 70 public boolean isDisabled() 71 { 72 return disabled; 73 } 74 75 @Override 76 public void setDisabled(boolean disabled) 77 { 78 this.disabled = disabled; 79 } 80 65 81 /** 66 82 Create a new node validator that can validate nodes with items of … … 78 94 { 79 95 NodeValidator<? extends BasicItem> validator = null; 80 Class<? extends NodeValidator<? extends BasicItem>> validatorClass = validators.get(key); 96 Class<? extends NodeValidator<? extends BasicItem>> validatorClass = 97 disabled ? null : validators.get(key); 81 98 if (validatorClass == null) 82 99 { 83 if (useNullValidator )100 if (useNullValidator || disabled) 84 101 { 85 102 validator = new NullNodeValidator<BasicItem>(); -
branches/2.11-stable/src/core/net/sf/basedb/util/overview/validator/NodeValidatorFactory.java
r4768 r4849 39 39 40 40 /** 41 Disable/enabled node validation programmatically. When a 42 node validator factory is disabled the {@link #createNodeValidator(Object)} 43 should return null or a {@link NullNodeValidator} for all 44 requests. 45 @param disabled TRUE to disable node validation 46 @since 2.11 47 */ 48 public void setDisabled(boolean disabled); 49 50 /** 51 Check if node validation has been disabled. 52 @return TRUE if validation has been disabled 53 @since 2.11 54 */ 55 public boolean isDisabled(); 56 57 /** 41 58 Create a node validator that knows how to validate nodes for items 42 59 that are specified by the given key. The key can be almost anything. -
branches/2.11-stable/www/common/overview/index.jsp
r4840 r4849 65 65 null : Project.getById(dc, sc.getActiveProjectId()); 66 66 GenericOverview overview = OverviewUtil.getNewOrCurrentOverview(dc, item, project); 67 overview.getNodeValidatorFactory().setDisabled(true); 67 68 overview.expand(dc, overview.getRootNode(), false); 68 overview.updateFailureCountOnNodes();69 69 dc.close(); 70 70 redirect = "frameset.jsp?ID="+ID+"&show_failures="+false;
Note: See TracChangeset
for help on using the changeset viewer.