@@ -138,7 +138,33 @@ private static NweConfig get()
138138
139139 private static NweConfig defaults ()
140140 {
141- return new NweConfig (new HashMap <>(), "mearvk" , "n21admin" );
141+ return new NweConfig (new HashMap <>(), "mearvk" , "n21admin" , "daily" , "." );
142+ }
143+
144+ /** Extract <schedule> from the ANTIVIRUS server block, default "daily". */
145+ private static String antivirusSchedule (final Document DOC )
146+ {
147+ NodeList servers = DOC .getElementsByTagName ("server" );
148+ for (int i = 0 ; i < servers .getLength (); i ++)
149+ {
150+ Element el = (Element ) servers .item (i );
151+ if ("ANTIVIRUS" .equals (el .getAttribute ("id" )))
152+ return text (el , "schedule" , "daily" );
153+ }
154+ return "daily" ;
155+ }
156+
157+ /** Extract <scan-path> from the ANTIVIRUS server block, default ".". */
158+ private static String antivirusScanPath (final Document DOC )
159+ {
160+ NodeList servers = DOC .getElementsByTagName ("server" );
161+ for (int i = 0 ; i < servers .getLength (); i ++)
162+ {
163+ Element el = (Element ) servers .item (i );
164+ if ("ANTIVIRUS" .equals (el .getAttribute ("id" )))
165+ return text (el , "scan-path" , "." );
166+ }
167+ return "." ;
142168 }
143169
144170 private static String text (final Element EL , final String TAG , final String DEF )
0 commit comments