@HandlerInput(name="AddProps", type=Map.class),
@HandlerInput(name="RemoveProps", type=ArrayList.class)})
public static void saveServerLogGeneralSettings(HandlerContext handlerCtx) {
ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
try{
LogServiceConfig lc = config.getLogServiceConfig();
ArrayList removeProps = (ArrayList)handlerCtx.getInputValue("RemoveProps");
Map addProps = (Map)handlerCtx.getInputValue("AddProps");
String[] remove = (String[])removeProps.toArray(new String[ removeProps.size()]);
for(int i=0; i<remove.length; i++){
lc.removeProperty(remove[i]);
}
if(addProps != null ){
Iterator additer = addProps.keySet().iterator();
while(additer.hasNext()){
Object key = additer.next();
String addvalue = (String)addProps.get(key);
lc.setPropertyValue((String)key, addvalue);
}
}
lc.setFile((String)handlerCtx.getInputValue("LogFile"));
lc.setAlarms(((Boolean)handlerCtx.getInputValue("Alarms")).booleanValue());
lc.setUseSystemLogging(((Boolean)handlerCtx.getInputValue("SystemLog")).booleanValue());
lc.setLogHandler((String)handlerCtx.getInputValue("LogHandler"));
lc.setLogFilter((String)handlerCtx.getInputValue("LogFilter"));
lc.setLogRotationLimitInBytes((String)handlerCtx.getInputValue("RotationLimit"));
lc.setLogRotationTimeLimitInMinutes((String)handlerCtx.getInputValue("RotationTimeLimit"));
lc.setRetainErrorStatisticsForHours((String)handlerCtx.getInputValue("RetainErrorStats"));
}catch(Exception ex){
GuiUtil.handleException(handlerCtx, ex);
}
}