Examples of InvalidPropertyException


Examples of javax.resource.spi.InvalidPropertyException

        {
            this.endpointURI = new MuleEndpointURI(endpoint, resourceAdapter.muleContext);
        }
        catch (EndpointException e)
        {
            throw new InvalidPropertyException(e);
        }

        if (propertiesMap != null)
        {
            propertiesMap.putAll(this.endpointURI.getParams());
        }
        else
        {
            propertiesMap = this.endpointURI.getParams();
        }
        if (endpoint == null)
        {
            throw new InvalidPropertyException("endpoint is null");
        }

        if (endpointURI == null)
        {
            throw new InvalidPropertyException("endpointURI is null");
        }
    }
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

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

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

    }

    @Override
    public void validate() throws InvalidPropertyException {
        if (beanClassName == null)
            throw new InvalidPropertyException("beanClass is null");

        final Class<?> beanClass = beanClass();
        // Set Prompt
        final Prompt prompt = (Prompt) beanClass.getAnnotation(Prompt.class);
        if (prompt != null) {
            this.prompt = prompt.value();
        }

        // Get Commands
        final Method[] methods = beanClass.getMethods();
        for (Method method : methods) {
            if (method.isAnnotationPresent(Command.class)) {
                final Command command = method.getAnnotation(Command.class);
                cmds.add(new Cmd(command.value(), method));
            }
        }

        // Validate
        if (this.prompt == null || this.prompt.length() == 0) {
            this.prompt = "prompt>";
        }
        if (this.cmds.size() == 0) {
            throw new InvalidPropertyException("No @Command methods");
        }
    }
View Full Code Here

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

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

        }

        return null;
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

        trigger = tb.withSchedule(csb).build();

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

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

         _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

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

      if (destination == null || destination.trim().equals(""))
      {
         throw new InvalidPropertyException("Destination is mandatory");
      }
   }
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.