Examples of InvalidPropertyException


Examples of javax.resource.spi.InvalidPropertyException

            b.append("Invalid settings:");
            for (Iterator<String> iter = errorMessages.iterator(); iter.hasNext();) {
                b.append(" ");
                b.append(iter.next());
            }
            InvalidPropertyException e = new InvalidPropertyException(b.toString());
            final PropertyDescriptor[] descriptors = propsNotSet.toArray(new PropertyDescriptor[propsNotSet.size()]);
            e.setInvalidPropertyDescriptors(descriptors);
            throw e;
        }
    }
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

     @param delimiter - the delimiter to tokenize.
     */
    public CustomTokenizer(String stringToken, String delimiter)
    throws InvalidPropertyException {
        if (!checkForMatchingQuotes(stringToken))
            throw new InvalidPropertyException("UnclosedString");
       
        if (stringToken != null && delimiter != null)
            tokenIterator = populateList(stringToken, delimiter);
        else
            throw new InvalidPropertyException("CouldNotCreateCliTokenizer");
    }
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

        }
        size = tokenList.size();
        try {
            return tokenList.listIterator();
        } catch (java.lang.IndexOutOfBoundsException ioe) {
            throw new InvalidPropertyException(ioe);
        }
    }
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

                (quoteBeginIndex < hasDelimiter)) {
            //get index of the end quote in the string token
            final int quoteEndIndex = strToken.indexOf(QUOTE_STRING, quoteBeginIndex+1);
           
            if (quoteEndIndex == -1)
                throw new InvalidPropertyException("UnclosedString");
            if (quoteEndIndex != (strToken.length()-1)) {
                return getStringDelimiterIndex(strToken, delimiter, quoteEndIndex + 1);
            } else {
                return -1;
            }
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

         HornetQRALogger.LOGGER.trace("validate()");
      }

      if (destination == null || destination.trim().equals(""))
      {
         throw new InvalidPropertyException("Destination is mandatory");
      }
   }
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

         HornetQActivationSpec.log.trace("validate()");
      }

      if (destination == null || destination.trim().equals(""))
      {
         throw new InvalidPropertyException("Destination is mandatory");
      }
   }
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

    public void setCronExpression(String s) {
        try {
            trigger.setCronExpression(s);
        } catch (ParseException e) {
            invalidProperty = new InvalidPropertyException("Invalid cron expression " + s, e);
        }
    }
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

        for (String format : formats) {
            SimpleDateFormat dateFormat = new SimpleDateFormat(format);
            try {
                return dateFormat.parse(value);
            } catch (ParseException e) {
                invalidProperty = new InvalidPropertyException("Invalid time format " + value, e);
            }

        }

        return null;
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

        try {
            detail.validate();
            trigger.validate();
        } catch (SchedulerException e) {
            throw new InvalidPropertyException(e);
        }
    }
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

    */
   public void validate() throws InvalidPropertyException
   {
      /** An int between 1-10 */
      if( anInt <= 0 || anInt > 10 )
         throw new InvalidPropertyException("anInt is not between 1-10");
      /** An int between 50-100 */
      if( anInteger.intValue() <= 49 || anInteger.intValue() > 100 )
         throw new InvalidPropertyException("anInt is not between 50-100");
      /** The 127.0.0.1 address */
      if( localhost.getHostAddress().equals("127.0.0.1") == false )
         throw new InvalidPropertyException("localhost is not 127.0.0.1");        
      /** Properties of the key1=*;key2=*;... */
      if( props.size() == 0 )
         throw new InvalidPropertyException("props has no values");        
   }
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.