121 *
122 * @return the maximum value for maxOccurs other
123 * than "unbounded"
124 */
125 public int getMaxOccurNodeLimit(){
126 return maxOccurLimit;
127 }
128
129 public int getElementAttrLimit(){
130 return fElementAttributeLimit;
131 }
132
133 public void setElementAttrLimit(int limit){
134 fElementAttributeLimit = limit;
135 }
136
137 private void readSystemProperties(){
138
139 try {
140 String value = System.getProperty(Constants.ENTITY_EXPANSION_LIMIT);
141 if(value != null && !value.equals("")){
142 entityExpansionLimit = Integer.parseInt(value);
143 if (entityExpansionLimit < 0)
144 entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT;
145 }
146 else
147 entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT;
148 }catch(Exception ex){}
149
150 try {
151 String value = System.getProperty(Constants.MAX_OCCUR_LIMIT);
152 if(value != null && !value.equals("")){
153 maxOccurLimit = Integer.parseInt(value);
154 if (maxOccurLimit < 0)
155 maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT;
156 }
157 else
158 maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT;
159 }catch(Exception ex){}
160
161 try {
162 String value = System.getProperty(Constants.ELEMENT_ATTRIBUTE_LIMIT);
163 if(value != null && !value.equals("")){
164 fElementAttributeLimit = Integer.parseInt(value);
165 if ( fElementAttributeLimit < 0)
166 fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT;
167 }
168 else
169 fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT;
170
171 }catch(Exception ex){}
172
173 }
174
175 } // class SecurityManager
|
121 *
122 * @return the maximum value for maxOccurs other
123 * than "unbounded"
124 */
125 public int getMaxOccurNodeLimit(){
126 return maxOccurLimit;
127 }
128
129 public int getElementAttrLimit(){
130 return fElementAttributeLimit;
131 }
132
133 public void setElementAttrLimit(int limit){
134 fElementAttributeLimit = limit;
135 }
136
137 private void readSystemProperties(){
138
139 try {
140 String value = System.getProperty(Constants.ENTITY_EXPANSION_LIMIT);
141 if(value != null && !value.isEmpty()){
142 entityExpansionLimit = Integer.parseInt(value);
143 if (entityExpansionLimit < 0)
144 entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT;
145 }
146 else
147 entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT;
148 }catch(Exception ex){}
149
150 try {
151 String value = System.getProperty(Constants.MAX_OCCUR_LIMIT);
152 if(value != null && !value.isEmpty()){
153 maxOccurLimit = Integer.parseInt(value);
154 if (maxOccurLimit < 0)
155 maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT;
156 }
157 else
158 maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT;
159 }catch(Exception ex){}
160
161 try {
162 String value = System.getProperty(Constants.ELEMENT_ATTRIBUTE_LIMIT);
163 if(value != null && !value.isEmpty()){
164 fElementAttributeLimit = Integer.parseInt(value);
165 if ( fElementAttributeLimit < 0)
166 fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT;
167 }
168 else
169 fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT;
170
171 }catch(Exception ex){}
172
173 }
174
175 } // class SecurityManager
|