/** * Override all the warnings * * @param authorisor - the supervisor id who has overriden the warning * @return true - if warning has been overridden */ public boolean overrideAllWarning(String authorisor) { // ensure there are message to be overridden if (functionMessages.getMessages().size() <= 0 || functionMessages.getMsgSev() != FunctionMessages.MSG_WARN) { return false; } // set the supervisor for (FunctionMessage fm : functionMessages.getMessages()) { fm.setAuthorisor(authorisor); } overWarnMessages.insertMessages(functionMessages); return true; }
/** * Override the first warning * * @param authorisor - the supervisor id who has overriden the warning * @return true - if warning has been overridden */ public boolean overrideFirstWarning(String authorisor) { // ensure there are message to be overridden if (functionMessages.getMessages().size() <= 0 || functionMessages.getMsgSev() != FunctionMessages.MSG_WARN) { return false; } FunctionMessage fm = functionMessages.getMessages().get(0); FunctionMessage fm2 = overWarnMessages.insertMessage( fm.getScreenSetId(), fm.getScrnNo(), fm.getFieldName(), fm.getSequence(), fm.getEqMessage(), fm.getFirstLevelText(), fm.getSecondLevelText()); fm2.setAuthorisor(authorisor); return true; }