1 16 17 package org.apache.xerces.util; 18 19 37 public final class SecurityManager { 38 39 43 44 private final static int DEFAULT_ENTITY_EXPANSION_LIMIT = 100000; 45 46 47 private final static int DEFAULT_MAX_OCCUR_NODE_LIMIT = 3000; 48 49 53 54 private int entityExpansionLimit; 55 56 57 private int maxOccurLimit; 58 59 63 public SecurityManager() { 64 entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; 65 maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT ; 66 } 67 68 75 public void setEntityExpansionLimit(int limit) { 76 entityExpansionLimit = limit; 77 } 78 79 86 public int getEntityExpansionLimit() { 87 return entityExpansionLimit; 88 } 89 90 99 public void setMaxOccurNodeLimit(int limit){ 100 maxOccurLimit = limit; 101 } 102 103 112 public int getMaxOccurNodeLimit(){ 113 return maxOccurLimit; 114 } 115 116 } 118 | Popular Tags |