Examples of InvalidValueException


Examples of org.apache.juddi.v3.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

Examples of org.apache.juddi.v3.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

Examples of org.apache.juddi.v3.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

Examples of org.apache.juddi.v3.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

Examples of org.apache.juddi.v3.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

Examples of org.apache.tuscany.spi.loader.InvalidValueException

        if (name == null) {
            // allow "class" as well as seems to be a common mistake
            name = reader.getAttributeValue(null, "class");
        }
        if (name == null) {
            throw new InvalidValueException("interface name not supplied");
        }
        Class<?> interfaceClass = LoaderUtil.loadClass(name, deploymentContext.getClassLoader());

        name = reader.getAttributeValue(null, "callbackInterface");
        Class<?> callbackClass = (name != null) ? LoaderUtil.loadClass(name, deploymentContext.getClassLoader()) : null;
View Full Code Here

Examples of org.apache.tuscany.spi.loader.InvalidValueException

                         DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
        assert DATA_BINDING.equals(reader.getName());
        String name = reader.getAttributeValue(null, "name");
        LoaderUtil.skipToEndElement(reader);
        if (name == null) {
            throw new InvalidValueException("The 'name' attrbiute is required");
        }
        DataType dataType = new DataType<Class>(name, Object.class, Object.class);
        return dataType;
    }
View Full Code Here

Examples of org.apache.tuscany.spi.loader.InvalidValueException

            DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
        assert INTERFACE_WSDL.equals(reader.getName());

        String interfaceURI = reader.getAttributeValue(null, "interface");
        if (interfaceURI == null) {
            throw new InvalidValueException("interface");
        }

        String callbackURI = reader.getAttributeValue(null, "callbackInterface");
        String wsdlLocation = reader.getAttributeValue(WSDLI, WSDLI_LOCATION);
       
View Full Code Here

Examples of org.apache.tuscany.spi.loader.InvalidValueException

                    }
                    if (source.charAt(0) == '$') {
                        String name = source.substring(1, index);
                        Property<?> compositeProp = parent.getProperties().get(name);
                        if (compositeProp == null) {
                            InvalidValueException ex =
                                new InvalidValueException(
                                                          "The 'source' cannot be resolved to a composite property");
                            ex.addContextName(source);
                            throw ex;
                        }
                        Document document = compositeProp.getDefaultValue();
                        // Adding /value because the document root is "value"
                        String path = source.substring(index);
                        String xpath = null;
                        if ("/".equals(path)) {
                            // trailing / is not legal for xpath
                            xpath = "/value";
                        } else {
                            xpath = "/value" + path;
                        }

                        // FIXME: How to deal with namespaces?
                        node = evaluate(null, document, xpath);
                        propValue.setValue(node);
                        Property<?> prop =
                            (Property<?>)componentDefinition.getImplementation().getComponentType()
                                .getProperties().get(propValue.getName());
                        propValue
                            .setValueFactory(new SimplePropertyObjectFactory(prop, propValue.getValue()));
                    } else {
                        InvalidValueException ex =
                            new InvalidValueException("The 'source' has an invalid value");
                        ex.addContextName(source);
                        throw ex;
                    }
                } catch (Exception e) {
                    throw new LoaderException(e);
                }
View Full Code Here

Examples of org.apache.tuscany.spi.loader.InvalidValueException

        impl.setName(name);
        if (scdlLocation != null) {
            try {
                impl.setScdlLocation(new URL(deploymentContext.getScdlLocation(), scdlLocation));
            } catch (MalformedURLException e) {
                InvalidValueException ive = new InvalidValueException(scdlLocation, e);
                ive.setIdentifier(name);
                throw ive;
            }
            impl.setClassLoader(deploymentContext.getClassLoader());
        } else if (jarLocation != null) {
            URL jarUrl;
            try {
                jarUrl = new URL(deploymentContext.getScdlLocation(), jarLocation);
            } catch (MalformedURLException e) {
                InvalidValueException ive = new InvalidValueException(jarLocation, e);
                ive.setIdentifier(name);
                throw ive;
            }
            try {
                impl.setScdlLocation(new URL("jar:" + jarUrl.toExternalForm() + "!/META-INF/sca/default.scdl"));
            } catch (MalformedURLException 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.