Examples of ValidationException


Examples of net.datacrow.core.objects.ValidationException

    protected void beforeSave() throws ValidationException {
        Container parent = getParentContainer();
        String ID = getID();
       
        if (parent != null && parent.getID().equals(ID)) {
            throw new ValidationException(DcResources.getText("msgCannotSetItemAsParent"));
        } else  {
            while (parent != null) {
                if (ID.equals(parent.getID()))
                    throw new ValidationException(DcResources.getText("msgCannotSetItemAsParentLoop"));       

                parent = parent.getParentContainer();
            }
        }
        super.beforeSave();
View Full Code Here

Examples of net.fqsc.inscriptions.commun.ValidationException

    inscription.setCategorie(categorie);

    try
    {
      if (!inscriptions.add(inscription))
        throw new ValidationException("La validation de dmLite a échoué. ");
    }
    catch (ActionException e)
    {
      throw new SystemeException(e);
    }
View Full Code Here

Examples of net.hydromatic.optiq.tools.ValidationException

        break;
      case "system":
        context.getOptions().getSystemManager().setOption(name, (SqlLiteral) value);
        break;
      default:
        throw new ValidationException("Invalid OPTION scope.  Scope must be SESSION or SYSTEM.");
      }

    }else{
      throw new ValidationException("Sql options can only be literals.");
    }

    return DirectPlan.createDirectPlan(context, true, String.format("%s updated.", name));

  }
View Full Code Here

Examples of net.rim.tumbler.exception.ValidationException

                else if (entry.isDirectory()) {
                    // Check for reservedDirs
                    for (String reserved : RESERVED_DIRS) {
                        // The dir entry name has a trailing / like "dir/"
                        if (entryName.equals(reserved + "/")) {
                            throw new ValidationException("EXCEPTION_ARCHIVE_RESERVED_DIR");
                        }
                    }
                }
                // Validate the resource name
                Pattern patternEntryName = Pattern.compile("[a-zA-Z-_0-9][a-zA-Z-_0-9\\.]*");;
                String entity;
                String fullEntryName = entryName;
                boolean noMoreEntity = false;
               
                while (!noMoreEntity) {
                    if (entryName.charAt(entryName.length() - 1) == '/') {
                      entryName = entryName.substring(0, entryName.length() - 1); // Remove the ending '/'
                    }
                 
                  if (entryName.lastIndexOf('/') >= 0) {
                    entity = entryName.substring(entryName.lastIndexOf('/') + 1);
                    entryName = entryName.substring(0, entryName.lastIndexOf('/'));
                  } else {
                    entity = entryName;
                    noMoreEntity = true;
                  }
                 
                    if (!patternEntryName.matcher(entity).matches()) {
                        throw new ValidationException("EXCEPTION_INVALID_RESOURCE_NAME", fullEntryName);                           
                    }
                }
            }
           
            if (_configXML.length == 0) {
View Full Code Here

Examples of net.sf.saxon.type.ValidationException

            // test whether the value actually conforms to the given type
            try {
                ValidationFailure err = schemaType.validateContent(
                        value, DummyNamespaceResolver.getInstance(), context.getConfiguration().getNameChecker());
                if (err != null) {
                    ValidationException ve = new ValidationException(
                            "Attribute value " + Err.wrap(value, Err.VALUE) +
                                               " does not match the required type " +
                                               schemaType.getDescription() + ". " +
                                               err.getMessage());
                    ve.setErrorCode("XTTE1540");
                    throw ve;
                }
            } catch (UnresolvedReferenceException ure) {
                throw new ValidationException(ure);
            }
        } else if (validationAction== Validation.STRICT ||
                validationAction==Validation.LAX) {
            try {
                ann = context.getConfiguration().validateAttribute(nameCode, value, validationAction);
View Full Code Here

Examples of net.sf.validatedattrib.ValidationException

     * @see net.sf.validatedattrib.constraint.Constraint#validate(java.lang.Object)
     */
    public void validate(Object newValue) throws ValidationException {
        Double d = (Double) newValue;
        if (d.doubleValue() > max) {
            throw new ValidationException(">" + max + "!");
        }
        if (d.doubleValue() < min) {
            throw new ValidationException("<" + min + "!");
        }
    }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.fw.persist.ValidationException

    throws ValidationException
  {
    String data = getString(value);
    if (data.length() == 0)
    {
      throw new ValidationException(s_stringMgr.getString("AliasGroup.error.blankname"));
    }
    if (!_name.equals(data))
    {
      final String oldValue = _name;
      _name = data;
View Full Code Here

Examples of nexj.core.runtime.ValidationException

      eventList.add(address);
      eventList.add(address);

      m_response.addEvent(eventList);

      ValidationException e = new ValidationException("err.validation.requiredAttributes", new Object[]{"Contact"});

      e.addException(new MetadataValidationException("err.meta.x", new Object[]{"a", "b"}));
      e.addException(new QueryTimeoutException());
      e.setClassName("Contact");
      e.setOIDHolder(contact);
      e.setOrdinal(1);
      e.addException("firstName", new ValidationException("err.validation.requiredAttribute", new Object[]{"firstName", "Contact"}));

      m_exception = e;
      m_writer = new StringWriter();
   }
View Full Code Here

Examples of oracle.toplink.exceptions.ValidationException

    public MockSingleSessionBroker() {
    }

    public SessionBroker acquireClientSessionBroker() {
      throw new ValidationException();
    }
View Full Code Here

Examples of org.activiti.designer.integration.servicetask.validator.ValidationException

    if (control instanceof Composite) {
      parent = (Composite) control;
    }

    if (parent == null) {
      throw new ValidationException(
              "Unable to validate control because it is not a radio's parent composite. This probably means the process node was incorrectly configured");
    }

    boolean selectionApplied = false;

    for (final Control currentControl : parent.getChildren()) {
      if (currentControl instanceof Button) {
        if (((Button) currentControl).getSelection()) {
          selectionApplied = true;
          break;
        }
      }
    }

    if (!selectionApplied) {
      throw new ValidationException("This field is required");
    }
  }
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.