// Consistence check
if (text.trim().length() == 0 ||
(showonmain == null && showonmonitor == null)){
output = this.getForm("Invalid Parameters");
}else{
Alert obj = new Alert();
obj.setText(text);
obj.setTime(duration*1000);
obj.setShowOnMain(showonmain != null);
obj.setShowOnMonitor(showonmonitor != null);
obj.setMainTemplate(maintemplate);
obj.setMonitorTemplate(monitortemplate);
Alert.enqueue(obj);
output = this.getForm("Alert sent");
}