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

Examples of eu.planets_project.ifr.core.services.migration.genericwrapper1.exceptions.MigrationException


            Map<String, String> identifierMap,
            Map<String, File> tempFileMappings) throws MigrationException {

        for (String tempFileLabel : tempFileMappings.keySet()) {
            if (identifierMap.containsKey(tempFileLabel)) {
                throw new MigrationException(String.format(
                        "The identifier map already contains an element with "
                                + "the key '%s'. Cannot add the temporay file "
                                + "mapping '%s = %s'.", tempFileLabel,
                        tempFileLabel, tempFileMappings.get(tempFileLabel)));
            }

            try {
                identifierMap.put(tempFileLabel, tempFileMappings.get(
                        tempFileLabel).getCanonicalPath());
            } catch (SecurityException se) {
                throw new MigrationException(
                        String.format(
                                "Failed accessing the canonical file path of the "
                                        + "temporary file labeled '%s'",
                                tempFileLabel), se);
            } catch (IOException ioe) {
                throw new MigrationException(
                        String.format(
                                "Failed accessing the canonical file path of the "
                                        + "temporary file labeled '%s'",
                                tempFileLabel), ioe);
            }
View Full Code Here


    temporaryFileMappings = createTemporaryFile(
      temporaryFileMappings, tempFileLabel, desiredFileName);
      }
  } catch (IOException ioe) {
      throw new MigrationException("Failed creating temporary files.",
        ioe);
  }
  return temporaryFileMappings;
    }
View Full Code Here

TOP

Related Classes of eu.planets_project.ifr.core.services.migration.genericwrapper1.exceptions.MigrationException

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.