Examples of ValidationException


Examples of com.dotmarketing.business.query.ValidationException

    }

    public List<Map<String, Serializable>> DBSearch(Query query, User user,boolean respectFrontendRoles) throws ValidationException,DotDataException {
        List<Field> fields = FieldsCache.getFieldsByStructureVariableName(query.getFromClause());
        if(fields == null || fields.size() < 1){
            throw new ValidationException("No Fields found for Content");
        }
//      return conFac.DBSearch(query, fields, fields.get(0).getStructureInode());
        Map<String, String> dbColToObjectAttribute = new HashMap<String, String>();
        for (Field field : fields) {
            dbColToObjectAttribute.put(field.getFieldContentlet(), field.getVelocityVarName());
View Full Code Here

Examples of com.dottydingo.hyperion.exception.ValidationException

        ID oldId = existing.getId();

        translator.copyClient(item, existing,context);

        if(oldId != null && !oldId.equals(existing.getId()))
            throw new ValidationException("Id in URI does not match the Id in the payload.");

        return translator.convertPersistent(jpaRepository.save(existing), context);

    }
View Full Code Here

Examples of com.dtolabs.rundeck.core.plugins.configuration.ValidationException

                    public boolean isValid(String s) throws ValidationException {
                        try {
                            final int i = Integer.parseInt(s);
                            if (i <= 0 || i >= 6) {
                                //throw ValidationException to indicate a problem, with a reason
                                throw new ValidationException("Must be between 1 and 5");
                            }
                        } catch (NumberFormatException e) {
                            throw new ValidationException("Not a valid integer");
                        }
                        return true;
                    }

                })
View Full Code Here

Examples of com.dubture.composer.ui.wizard.ValidationException

    if (fileLocation.toPortableString().length() > 0) {
      final IFileHandle directory = environment.getFile(fileLocation);
      IPath futurepath = directory.getPath().append(firstPage.nameGroup.getName());
      File futureFile = futurepath.toFile();
      if ((futureFile.exists() && futureFile.isFile()) || (futureFile.exists() && futureFile.isDirectory() && futureFile.list().length > 0)) {
        throw new ValidationException("The target directory is not empty. Unable to run \"create-project\" with a target directory containing files.", Severity.ERROR);
      }
    }
  }
View Full Code Here

Examples of com.dyuproject.web.rest.ValidationException

            {
                Object value = props.get(vs.getPropertyName());
                if(value==null)
                {
                    if(vs.isRequired())
                        throw new ValidationException(vs.getErrorMsg(), vs.getPropertyName(), obj);
                   
                    continue;
                }
                try
                {
                    vs.invoke(obj, value);
                    count++;
                }
                catch(ValidationException e)
                {
                    // need as its a subclass of IllegalArgumentException
                    throw e;
                }
                catch (IllegalArgumentException e)
                {                   
                    throw new ValidationException(vs.getErrorMsg(), vs.getPropertyName(), obj);
                }
                catch (IllegalAccessException e)
                {                   
                    throw new RuntimeException(e);
                }
                catch (InvocationTargetException e)
                {                   
                    throw new ValidationException(vs.getErrorMsg(), vs.getPropertyName(), obj);
                }               
            }           
            return count;
        }
View Full Code Here

Examples of com.emc.vipr.client.exceptions.ValidationException

    public ClientResponse handle(ClientRequest request) throws ClientHandlerException {
        ClientResponse response = getNext().handle(request);
        int status = response.getStatus();
        if (supportsPortalValidation(request) && status == 400) {
            List<ValidationError> errorsList = ApiListUtils.getEntityList(config, new GenericType<List<ValidationError>>() {}, response);
            ValidationException exception = new ValidationException(response.getStatus(), errorsList);
            log.error(exception.getMessage());
            throw exception;
        }
        return response;
    }
View Full Code Here

Examples of com.esri.gpt.catalog.schema.ValidationException

        msg = Val.chkStr(exception.toString());
      }
      this.exceptions.add(msg);
      if (msgBroker != null) {
        if (exception instanceof ValidationException) {
          ValidationException ve = (ValidationException)exception;
          ve.getValidationErrors().buildMessages(msgBroker,this.exceptions,true);
        }
      }
    }
  }
View Full Code Here

Examples of com.github.jmkgreen.morphia.query.ValidationException

                }

                Key<?> k = (value instanceof Key) ? (Key<?>) value : getKey(value);
                mappedValue = keyToRef(k);
                if (mappedValue == value) {
                    throw new ValidationException("cannot map to @Reference/Key<T>/DBRef field: " + value);
                }
                return mappedValue;
            } catch (Exception e) {
                log.error("Error converting value(" + value + ") to reference.", e);
                return toMongoObject(value, false);
View Full Code Here

Examples of com.github.joschi.jadconfig.ValidationException

    }

    @ValidatorMethod
    public void validate() throws ValidationException {
        if (isMongoUseAuth() && (isNullOrEmpty(getMongoUser()) || isNullOrEmpty(getMongoPassword()))) {
            throw new ValidationException("mongodb_user and mongodb_password have to be set if mongodb_useauth is true");
        }
    }
View Full Code Here

Examples of com.google.api.ads.common.lib.exception.ValidationException

     */
    private void validate() throws ValidationException {
      // Check for at least one authentication mechanism.
      if (this.clientLoginToken == null
          && this.oAuth2Credential == null) {
        throw new ValidationException(
            "Either ClientLogin or OAuth2 authentication must be used.", "");
      }

      // Check that application name is not empty or the default.
      if (Strings.isNullOrEmpty(applicationName)
          || applicationName.contains(DEFAULT_APPLICATION_NAME)) {
        throw new ValidationException(String.format(
            "Application name must be set and not be the default [%s]", DEFAULT_APPLICATION_NAME),
            "applicationName");
      }


      // Make sure they specify a valid endpoint.
      try {
        new URL(this.endpoint);
      } catch (MalformedURLException e) {
        throw new ValidationException(String.format("Endpoint [%s] not recognized as a valid URL.",
            this.endpoint), "endpoint", e);
      }
    }
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.