Examples of InvalidValueException


Examples of com.vaadin.data.Validator.InvalidValueException

   
    // Set id field to be unique
    form.getField("id").addValidator(new Validator() {
      public void validate(Object value) throws InvalidValueException {
        if (!isValid(value)) {
          throw new InvalidValueException(i18nManager.getMessage(Messages.GROUP_ID_UNIQUE));
        }
      }
      public boolean isValid(Object value) {
        if (value != null) {
          return identityService.createGroupQuery().groupId(value.toString()).singleResult() == null;
View Full Code Here

Examples of com.vaadin.data.Validator.InvalidValueException

   
    // Set id field to be unique
    form.getField("id").addValidator(new Validator() {
      public void validate(Object value) throws InvalidValueException {
        if (!isValid(value)) {
          throw new InvalidValueException(i18nManager.getMessage(Messages.USER_ID_UNIQUE));
        }
      }
      public boolean isValid(Object value) {
        if (value != null) {
          return identityService.createUserQuery().userId(value.toString()).singleResult() == null;
View Full Code Here

Examples of net.datacrow.core.modules.InvalidValueException

    public static KeyStroke getKeyStroke(Element element, String tag) throws InvalidValueException {
        String s = getString(element, tag);
        try {
            return KeyStroke.getKeyStroke(s);
        } catch (Exception e) {
            throw new InvalidValueException(tag, s);
        }       
    } 
View Full Code Here

Examples of net.datacrow.core.modules.InvalidValueException

    public static ImageIcon getIcon(Element element, String tag) throws InvalidValueException {
        String s = getString(element, tag);
        try {
            return new ImageIcon(s);
        } catch (Exception e) {
            throw new InvalidValueException(tag, s);
        }       
    }    
View Full Code Here

Examples of net.datacrow.core.modules.InvalidValueException

    public static File getFile(Element element, String tag) throws InvalidValueException {
        String s = getString(element, tag);
        try {
            return new File(s);
        } catch (Exception e) {
            throw new InvalidValueException(tag, s);
        }       
    }   
View Full Code Here

Examples of net.datacrow.core.modules.InvalidValueException

    public static boolean getBoolean(Element element, String tag) throws InvalidValueException {
        String s = getString(element, tag);
        try {
            return Boolean.valueOf(s).booleanValue();
        } catch (NumberFormatException nfe) {
            throw new InvalidValueException(tag, s);
        }       
    }   
View Full Code Here

Examples of net.datacrow.core.modules.InvalidValueException

    public static int getInt(Element element, String tag) throws InvalidValueException {
        String s = getString(element, tag);
        try {
            return Integer.parseInt(s);
        } catch (NumberFormatException nfe) {
            throw new InvalidValueException(tag, s);
        }
    }
View Full Code Here

Examples of net.datacrow.core.modules.InvalidValueException

            Class cl = s != null && s.trim().length() > 0 ? Class.forName(s) : null;
            if (cl != null && !instantiationTest)
                cl.getConstructors()[0].newInstance(new Object[] {});
            return cl;
        } catch (ClassNotFoundException e) {
            throw new InvalidValueException(tag, s);
        } catch (InstantiationException e) {
            throw new InvalidValueException("Could not instantiate [" + s + "] for " + tag);
        } catch (IllegalAccessException e) {
            throw new InvalidValueException("Could not instantiate [" + s + "] for " + tag);
        } catch (IllegalArgumentException e) {
            throw new InvalidValueException("Could not instantiate [" + s + "] for " + tag);       
        } catch (SecurityException e) {
            throw new InvalidValueException("Could not instantiate [" + s + "] for " + tag);
        } catch (InvocationTargetException e) {
            throw new InvalidValueException("Could not instantiate [" + s + "] for " + tag);
        }
    }
View Full Code Here

Examples of objot.util.InvalidValueException

  }

  void checkIndex(int fi)
  {
    if (fi < 0 || fi >= fieldN)
      throw new InvalidValueException(fi);
  }
View Full Code Here

Examples of org.apache.juddi.error.InvalidValueException

      Integer chunkData = null;
      if (body.getChunkToken() != null && body.getChunkToken().length() > 0) {
        SubscriptionChunkToken chunkToken = em.find(SubscriptionChunkToken.class, body.getChunkToken());
       
        if (chunkToken == null)
          throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.InvalidChunkToken", body.getChunkToken()));
        if (!chunkToken.getSubscriptionKey().equals(chunkToken.getSubscriptionKey()))
          throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.NonMatchingChunkToken", body.getChunkToken()));
        if (chunkToken.getStartPoint() != null && chunkToken.getStartPoint().getTime() != startPointDate.getTime())
          throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.NonMatchingChunkToken", body.getChunkToken()));
        if (chunkToken.getEndPoint() != null && chunkToken.getEndPoint().getTime() != endPointDate.getTime())
          throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.NonMatchingChunkToken", body.getChunkToken()));
        if (chunkToken.getExpiresAfter().before(new Date()))
          throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.ExpiredChunkToken", body.getChunkToken()));
       
        chunkData = chunkToken.getData();
        // We've got the data from the chunk token, now it is no longer needed (once it's called, it's used up)
        em.remove(chunkToken);
      }
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.