Examples of addError()


Examples of com.yourpackagename.framework.validation.Validity.addError()

        EntityValidator<User> entityValidator = new EntityValidator<User>();
        Validity validity = entityValidator.validate(user, User.class);

        // Check for username and email uniqueness
        if (isUsernameExists(user.getUserName())) {
            validity.addError(msg.userExists);
        }

        if (isEmailExists(user.getEmail())) {
            validity.addError(msg.emailExists);
        }
View Full Code Here

Examples of de.iritgo.aktera.comm.ModelResponseMessage.addError()

    {
      res = req.execute();
    }
    catch (ModelException me)
    {
      resMessage.addError("model", me);

      if (getLogger().isDebugEnabled())
      {
        getLogger().debug("Error from model execution:", me);
      }
View Full Code Here

Examples of de.iritgo.aktera.model.KeelResponse.addError()

        catch (ModelException me)
        {
          System.err.println("Exception running model:");
          me.printStackTrace(System.err);
          response = new ModelResponseMessage();
          response.addError("Error Running Model", me);
        }

        writer = new ObjectOutputStream(new BufferedOutputStream(socket.getOutputStream()));
        writer.writeObject(response);
        writer.flush();
View Full Code Here

Examples of de.iritgo.aktera.model.ModelResponse.addError()

    String domain = (String) req.getParameter("domain");

    String loginName = (String) req.getParameter("loginName");
    if (loginName.equals(""))
    {
      res.addError("GLOBAL_loginError", "$youNeedToProvideALoginName");
      return res.createCommand(Constants.PROMPT_LOGIN).execute(req, res);
    }

    PermissionManager permissionManager = (PermissionManager) SpringTools.getBean(PermissionManager.ID);
    if (! permissionManager.hasPermission(loginName, "de.iritgo.aktera.web.login"))
View Full Code Here

Examples of de.plushnikov.intellij.lombok.problem.ProblemNewBuilder.addError()

    PsiLocalVariable psiVariable = PsiTreeUtil.getParentOfType(psiAnnotation, PsiLocalVariable.class);
    if (null != psiVariable) {
      final String cleanupName = PsiAnnotationUtil.getAnnotationValue(psiAnnotation, "value", String.class);

      if (StringUtil.isEmptyOrSpaces(cleanupName)) {
        problemNewBuilder.addError("'@Cleanup': value cannot be the empty string");
      } else {
        validateCleanUpMethodExists(psiVariable, cleanupName, problemNewBuilder);
      }

      validateInitializerExist(problemNewBuilder, psiVariable);
View Full Code Here

Examples of de.plushnikov.intellij.plugin.problem.ProblemNewBuilder.addError()

    PsiLocalVariable psiVariable = PsiTreeUtil.getParentOfType(psiAnnotation, PsiLocalVariable.class);
    if (null != psiVariable) {
      final String cleanupName = PsiAnnotationUtil.getAnnotationValue(psiAnnotation, "value", String.class);

      if (StringUtil.isEmptyOrSpaces(cleanupName)) {
        problemNewBuilder.addError("'@Cleanup': value cannot be the empty string");
      } else {
        validateCleanUpMethodExists(psiVariable, cleanupName, problemNewBuilder);
      }

      validateInitializerExist(problemNewBuilder, psiVariable);
View Full Code Here

Examples of grails.validation.ValidationErrors.addError()

            for (Object error : bindingResult.getAllErrors()) {
                if (error instanceof FieldError) {
                    FieldError fieldError = (FieldError)error;
                    final boolean isBlank = BLANK.equals(fieldError.getRejectedValue());
                    if (!isBlank) {
                        newResult.addError(fieldError);
                    }
                    else if (domain.hasPersistentProperty(fieldError.getField())) {
                        final boolean isOptional = domain.getPropertyByName(fieldError.getField()).isOptional();
                        if (!isOptional) {
                            newResult.addError(fieldError);
View Full Code Here

Examples of it.eng.spago.error.EMFErrorHandler.addError()

        modifyObjMetadata(request, SpagoBIConstants.DETAIL_INS, response);
      } else if (message.trim().equalsIgnoreCase(SpagoBIConstants.DETAIL_DEL)) {
        deleteObjMetadata(request, SpagoBIConstants.DETAIL_DEL, response);
      }
    } catch (EMFUserError eex) {
      errorHandler.addError(eex);
      return;
    } catch (Exception ex) {
      EMFInternalError internalError = new EMFInternalError(EMFErrorSeverity.ERROR, ex);
      errorHandler.addError(internalError);
      return;
View Full Code Here

Examples of junit.framework.TestResult.addError()

                    AssertionFailedError afe = new AssertionFailedError(cause.toString());
                    // copy the original stack trace
                    afe.setStackTrace(cause.getStackTrace());
                    tr.addFailure(theClazz, afe);
                } else if (cause != null) {
                    tr.addError(theClazz, cause);
                } else {
                    tr.addError(theClazz, e);
                }
            } catch (IllegalAccessException e) {
                tr.addError(theClazz, e);
View Full Code Here

Examples of liquibase.exception.ValidationErrors.addError()

        ValidationErrors validationErrors = new ValidationErrors();
        validationErrors.checkRequiredField("procedureText", statement.getProcedureText());
        if (statement.getReplaceIfExists() != null) {
            if (database instanceof MSSQLDatabase) {
                if (statement.getReplaceIfExists() && statement.getProcedureName() == null) {
                    validationErrors.addError("procedureName is required if replaceIfExists = true");
                }
            } else {
                validationErrors.checkDisallowedField("replaceIfExists", statement.getReplaceIfExists(), null);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.