protected void processProfileMappings() throws SetupException {
    List<String> filenames = this.getFilenames();
    ManagementBeanFactory factory = null;
    try {
      factory = this.getManagementBeanFactory();
      ModelBean modelBean = factory.createModelBean();
      ProfileMappingBean mappingBean = factory.createProfileMappingBean();

      // Import Profile Mappings
      for (String filename : filenames) {
        // Process the file, and import data into database.
        File file = new File(filename);
        if (!file.isAbsolute()) {
          file = new File(this.getSetup().getWorkDir(), filename);
        }

        this.getSetup()
            .getConsole()
            .println("         Loading file [ " + file.getAbsolutePath() + " ]");
        List<ManufacturerItem> items = this.loadManufacturerItems(file.getAbsolutePath());
        for (ManufacturerItem manufacturerItem : items) {
          List<ModelItem> modelItems = manufacturerItem.getModels();
          Manufacturer manufacturer =
              modelBean.getManufacturerByExternalID(manufacturerItem.getExternalID());
          for (ModelItem modelItem : modelItems) {
            // Copy information from family
            copyFromFamily(modelItem);

            Model model =
                modelBean.getModelByManufacturerModelID(manufacturer, modelItem.getExternalID());

            if (!modelItem.getProfileMappingFiles().isEmpty()) {
              this.getSetup()
                  .getConsole()
                  .println(
                      "         * Importings DM Mapping for [ "
                          + manufacturer.getExternalId()
                          + " "
                          + model.getManufacturerModelId()
                          + " ]");
            }
            for (String mappingFilename : modelItem.getProfileMappingFiles()) {
              File mappingFile = new File(mappingFilename);
              if (!mappingFile.isAbsolute()) {
                mappingFile = new File(this.getSetup().getWorkDir(), mappingFilename);
              }

              List<ProfileMapping> mappings =
                  mappingBean.importProfileMapping(
                      new FileInputStream(mappingFile),
                      manufacturer.getExternalId(),
                      model.getManufacturerModelId());
              factory.beginTransaction();
              for (ProfileMapping mapping : mappings) {
                modelBean.attachProfileMapping(model, mapping.getID());
              }
              factory.commit();
              this.getSetup()
                  .getConsole()
                  .println("           [ " + mappingFile.getAbsolutePath() + " ] imported!");
            }
          }
        }
      }
    } catch (Exception ex) {
      if (factory != null) {
        factory.rollback();
      }
      throw new SetupException("Error in import models.", ex);
    } finally {
      if (factory != null) {
        factory.release();
      }
    }
  }