Package eu.planets_project.ifr.core.services.migration.genericwrapper2.exceptions

Examples of eu.planets_project.ifr.core.services.migration.genericwrapper2.exceptions.MigrationPathConfigException


    }
      }
      this.log.info("Leaving getInstance");
      return migrationPaths;
  } catch (Exception e) {
      throw new MigrationPathConfigException(
        "Failed parsing migration path configuration document.", e);
  }

    }
View Full Code Here


    } else if (Constants.TOOL_PRESETS_ELEMENT
      .equals(currentSubNodeName)) {
        pathTemplate = configureToolPresets(currentSubNode,
          pathTemplate);
    } else {
        throw new MigrationPathConfigException(
          "Did not find any of the expected child elements "
            + "in this element: " + currentSubNodeName);
    }
      }
  }

  if (outputformatURI == null) {
      throw new MigrationPathConfigException(
        "The path element did not have a destination format URI.");
  }

  if (inputformatURIs.isEmpty()) {
      throw new MigrationPathConfigException(
        "The path element did not have any source format URIs.");
  }

  List<MigrationPath> result = createCliMigrationPathInstances(
    pathTemplate, inputformatURIs, outputformatURI);
View Full Code Here

  for (URI sourceFormatUri : sourceFomatURIs) {
      MigrationPath newPath;
      try {
    newPath = (MigrationPath) pathTemplate.clone();
      } catch (CloneNotSupportedException e) {
    throw new MigrationPathConfigException(
      "Failed copying path template when instantiating CliMigrationPath for migration path: "
        + sourceFomatURIs
        + " -> "
        + destinationFormatURI);
      }
View Full Code Here

        // Verify that all identifiers in commandLineIdentifiers are associated
        // with a value in identifierMap
        if (!identifierMap.keySet().containsAll(commandLineIdentifiers)) {
            commandLineIdentifiers.removeAll(identifierMap.keySet());
            throw new ConfigurationException("Cannot build the command line. "
                    + "Missing values for these identifiers: "
                    + commandLineIdentifiers);
        }

        // Replace the identifiers in the command line fragments with their
View Full Code Here

                        presetCategoryID = parameter.getName();
                        final Preset preset = toolPresets
                                .getPreset(presetCategoryID);
                        presetSetting = preset.getSetting(parameter.getValue());
                        if (presetSetting == null) {
                            throw new ConfigurationException(String.format(
                                    "The preset '%s = %s' has not been defined"
                                            + " in the configuration.",
                                    parameter.getName(), parameter.getValue()));
                        }
                    } else {
                        throw new ConfigurationException(String.format(
                                "More than one preset was specified in the "
                                        + "parameters. Found '%s"
                                        + " = %s' and '%s = %s'.",
                                presetCategoryID, presetSetting.getName(),
                                parameter.getName(), parameter.getValue()));
View Full Code Here

            builder.properties(serviceProperties);

            return builder.build();

        } catch (XPathExpressionException xPathExpressionException) {
            throw new ConfigurationException(String.format(
                    "Failed parsing the '%s' element in the '%s' element.",
                    ConfigurationFileTagsV1.SERVICE_DESCRIPTION_ELEMENT_XPATH,
                    this.configuration.getNodeName()), xPathExpressionException);
        } catch (NullPointerException nullPointerException) {
            throw new ConfigurationException(String.format(
                    "Failed parsing the '%s' element in the '%s' element.",
                    ConfigurationFileTagsV1.SERVICE_DESCRIPTION_ELEMENT_XPATH,
                    this.configuration.getNodeName()), nullPointerException);
        }
    }
View Full Code Here

            return elementNode.getTextContent().trim();

        } catch (Exception exception) {
            // This is a mandatory element, thus no exceptions are tolerated.
            throw new ConfigurationException(String.format(
                    "Failed parsing the '%s' element in the '%s' element.",
                    elementName, nodeWithMandatoryElement.getNodeName()),
                    exception);
        }
    }
View Full Code Here

        } catch (XPathExpressionException xpee) {
            // The URI element is optional, thus ignore exceptions.
        } catch (NullPointerException npe) {
            // The URI element is optional, thus ignore exceptions.
        } catch (URISyntaxException uriSyntalException) {
            throw new ConfigurationException(String.format(
                    "Failed parsing the '%s' element and creating a URI, in "
                            + "the '%s' element.", elementName,
                    nodeWithOptionalURIElement.getNodeName()),
                    uriSyntalException);
        }
View Full Code Here

        } catch (XPathExpressionException xpee) {
            // The URI element is optional, thus ignore exceptions.
        } catch (NullPointerException npe) {
            // The URI element is optional, thus ignore exceptions.
        } catch (MalformedURLException malformedURLException) {
            throw new ConfigurationException(String.format(
                    "Failed parsing the '%s' element and creating a URL, in "
                            + "the '%s' element.", elementName,
                    nodeWithOptionalURLElement.getNodeName()),
                    malformedURLException);
        }
View Full Code Here

                properties.add(propertyBuilder.build());
            }
            return properties.toArray(new Property[properties.size()]);
        } catch (Exception exception) {
            throw new ConfigurationException(String.format(
                    "Failed parsing the '%s' element of the configuration"
                            + " document.", serviceDescriptionNode
                            .getNodeName()), exception);
        }
    }
View Full Code Here

TOP

Related Classes of eu.planets_project.ifr.core.services.migration.genericwrapper2.exceptions.MigrationPathConfigException

Copyright © 2018 www.massapicom. 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.