super.validateElement(valCtx);
// this is temporaty code which should be removed after
// "deep" childs validation will be implemented for add/set operations
if( (valCtx.isADD() || valCtx.isSET()) &&
valCtx.value instanceof ManagementRule)
{
try {
Event event = ((ManagementRule)valCtx.value).getEvent();
//eventtypes
if(!EVENT_TYPES.contains(event.getType()))
valCtx.result.failed(smh.getLocalString(getClass().getName(),
valCtx.smh.getLocalString(getClass().getName() + ".wrongEventType",
"Value {0} is not allowed for Event type", new Object[] {event.getType()})));
//log-levels
if(!LOG_LEVELS.contains(event.getLevel()))
valCtx.result.failed(smh.getLocalString(getClass().getName(),
valCtx.smh.getLocalString(getClass().getName() + ".wrongEventLevel",
"Value {0} is not allowed for Event log level", new Object[] {event.getLevel()})));
} catch (Exception e) {}
}