ValidationResult isRestrictedEventName ( String name ) { ValidationResult error = new ValidationResult ( ) ; if ( name == null ) { error . setErrorCode ( 510 ) ; error . setErrorDesc ( "Event Name is null" ) ; return error ; } for ( String x : restrictedNames ) if ( name . equalsIgnoreCase ( x ) ) { // The event name is restricted error . setErrorCode ( 513 ) ; error . setErrorDesc ( name + " is a restricted event name. Last event aborted." ) ; Logger . v ( name + " is a restricted system event name. Last event aborted." ) ; return error ; } return error ; }
Checks whether the specified event name is restricted . If it is then create a pending error and abort .