docs: @Override
      public EsaResourceWritable parseFileToResource(File assetFile, File metadataFile, String contentUrl) throws RepositoryException {
  
          ArtifactMetadata artifactMetadata = explodeArtifact(assetFile, metadataFile);
  
          // Read the meta data from the esa
          ProvisioningFeatureDefinition feature;
          try {
              feature = EsaSubsystemFeatureDefinitionImpl.constructInstance(assetFile);
          } catch (IOException e) {
              throw new RepositoryArchiveIOException(e.getMessage(), assetFile, e);
          }
  
          /*
           * First see if we already have this feature in MaaSive, note this means
           * we can only have one version of the asset in MaaSive at a time
           */
          EsaResourceWritable resource = WritableResourceFactory.createEsa(null);
          String symbolicName = feature.getSymbolicName();
          String version = feature.getVersion().toString();
  
          // Massive assets are always English, find the best name
          String subsystemName = feature.getHeader("Subsystem-Name",
                                                   Locale.ENGLISH);
          String shortName = feature.getIbmShortName();
          String metadataName = artifactMetadata != null ? artifactMetadata.getName() : null;
          final String name;
  
          /*
           * We want to be able to override the name in the built ESA with a value supplied in the metadata so use this in preference of what is in the ESA so that we can correct any
           * typos post-GM
           */
          if (metadataName != null && !metadataName.isEmpty()) {
              name = metadataName;
          } else if (subsystemName != null && !subsystemName.isEmpty()) {
              name = subsystemName;
          } else if (shortName != null && !shortName.isEmpty()) {
              name = shortName;
          } else {
              // symbolic name is always set
              name = symbolicName;
          }
  
          resource.setName(name);
          String shortDescription = null;
          String overriddenDisplayPolicy = null;
          if (artifactMetadata != null) {
              shortDescription = artifactMetadata.getShortDescription();
              resource.setDescription(artifactMetadata.getLongDescription());
              resource.setVanityURL(artifactMetadata.getProperty(PROP_VANITY_URL));
              overriddenDisplayPolicy = artifactMetadata.getProperty(PROP_DISPLAY_POLICY);
          }
          if (shortDescription == null) {
              shortDescription = feature.getHeader("Subsystem-Description", Locale.ENGLISH);
          }
          resource.setShortDescription(shortDescription);
          resource.setVersion(version);
  
          //Add icon files
          processIcons(assetFile, feature, resource);
  
          String provider = feature.getHeader("Subsystem-Vendor");
          if (provider != null && !provider.isEmpty()) {
              resource.setProviderName(provider);
              if ("IBM".equals(provider)) {
                  resource.setProviderUrl("http://www.ibm.com");
              }
          } else {
              // Massive breaks completely if the provider is not filled in so
              // make sure it is!
              throw new InvalidParameterException("Subsystem-Vendor must be set in the manifest headers");
          }
  
          // Add custom attributes for WLP
          resource.setProvideFeature(symbolicName);
  
          //Check for AppliesTo in metadata.zip else grab it from esa.
          if (artifactMetadata != null && artifactMetadata.getProperty("IBM-AppliesTo") != null) {
              resource.setAppliesTo(artifactMetadata.getProperty("IBM-AppliesTo"));
          } else {
              resource.setAppliesTo(feature.getHeader("IBM-AppliesTo"));
          }
          Visibility visibility;
  
          /*
           * Two things affect the display policy - the visibility and the install policy. If a private auto feature is set to manual install we need to make it visible so people
           * know that it exists and can be installed
           */
          DisplayPolicy displayPolicy;
          DisplayPolicy webDisplayPolicy;
          if (com.ibm.ws.kernel.feature.Visibility.PUBLIC.equals(feature.getVisibility())) {
              visibility = Visibility.PUBLIC;
              displayPolicy = DisplayPolicy.VISIBLE;
              webDisplayPolicy = DisplayPolicy.VISIBLE;
          } else if (com.ibm.ws.kernel.feature.Visibility.PROTECTED.equals(feature.getVisibility())) {
              visibility = Visibility.PROTECTED;
              displayPolicy = DisplayPolicy.HIDDEN;
              webDisplayPolicy = DisplayPolicy.HIDDEN;
          } else if (com.ibm.ws.kernel.feature.Visibility.INSTALL.equals(feature.getVisibility())) {
              // Always hide "install" visility from the website.  These are really addons so if we want them on the website we add a second asset just for that purpose.
              // Show them in WDT though as they are now supported.
              visibility = Visibility.INSTALL;
              displayPolicy = DisplayPolicy.VISIBLE;
              webDisplayPolicy = DisplayPolicy.HIDDEN;
          } else {
              visibility = Visibility.PRIVATE;
              displayPolicy = DisplayPolicy.HIDDEN;
              webDisplayPolicy = DisplayPolicy.HIDDEN;
          }
          resource.setVisibility(visibility);
  
          if (feature.isAutoFeature()) {
              resource.setProvisionCapability(feature.getHeader("IBM-Provision-Capability"));
              String IBMInstallPolicy = feature.getHeader("IBM-Install-Policy");
  
              // Default InstallPolicy is set to MANUAL
              InstallPolicy installPolicy;
              if (IBMInstallPolicy != null && ("when-satisfied".equals(IBMInstallPolicy))) {
                  installPolicy = InstallPolicy.WHEN_SATISFIED;
              } else {
                  installPolicy = InstallPolicy.MANUAL;
                  // As discussed above set the display policy to visible for any manual auto features
                  displayPolicy = DisplayPolicy.VISIBLE;
                  webDisplayPolicy = DisplayPolicy.VISIBLE;
              }
              resource.setInstallPolicy(installPolicy);
          }
  
          // if we are dealing with a beta feature hide it otherwise apply the
          // display policies from above
          if (isBeta(resource.getAppliesTo())) {
              resource.setWebDisplayPolicy(DisplayPolicy.HIDDEN);
          } else {
              resource.setWebDisplayPolicy(webDisplayPolicy);
          }
  
          // The side zip can override the display policy so if its been set then use it
          if (overriddenDisplayPolicy != null) {
              displayPolicy = DisplayPolicy.valueOf(overriddenDisplayPolicy);
          }
          // Always set displayPolicy
          resource.setDisplayPolicy(displayPolicy);
  
          // handle required iFixes
          String requiredFixes = feature.getHeader("IBM-Require-Fix");
          if (requiredFixes != null && !requiredFixes.isEmpty()) {
              String[] fixes = requiredFixes.split(",");
              for (String fix : fixes) {
                  fix = fix.trim();
                  if (!fix.isEmpty()) {
                      resource.addRequireFix(fix);
                  }
              }
          }
  
          resource.setShortName(shortName);
  
          // Calculate which features this relies on
  
          Collection<FeatureResource> requiredFeatures = feature.getConstituents(SubsystemContentType.FEATURE_TYPE);
          for (FeatureResource featureResource : requiredFeatures) {
              List<String> tolerates = featureResource.getTolerates();
              String requiredFeatureSymbolicName = featureResource.getSymbolicName();
              resource.addRequireFeatureWithTolerates(requiredFeatureSymbolicName, tolerates);
          }
  
          // feature.supersededBy is a comma-separated list of shortNames. Add
          // each of the elements to either supersededBy or supersededByOptional.
          String supersededBy = feature.getSupersededBy();
          if (supersededBy != null && !supersededBy.trim().isEmpty()) {
              String[] supersededByArray = supersededBy.split(",");
              for (String f : supersededByArray) {
                  // If one of the elements is surrounded by [square brackets] then we
                  // strip the brackets off and treat it as optional
                  if (f.startsWith("[")) {
                      f = f.substring(1, f.length() - 1);
                      resource.addSupersededByOptional(f);
                  } else {
                      resource.addSupersededBy(f);
                  }
              }
          }
  
          //resource.setLicenseType(getArtifactMedataLicenseType(artifactMetadata));
          if (artifactMetadata != null) {
              attachLicenseData(artifactMetadata, resource);
          }
  
          setJavaRequirements(assetFile, resource);
  
          String attachmentName = symbolicName + ".esa";
          addContent(resource, assetFile, attachmentName, artifactMetadata, contentUrl);
  
          // Now look for LI, LA files inside the .esa
          // We expect to find them in wlp/lafiles/LI_{Locale} or /LA_{Locale}
          try {
              processLAandLI(assetFile, resource, feature);
          } catch (IOException e) {
              throw new RepositoryArchiveIOException(e.getMessage(), assetFile, e);
          }
          resource.setLicenseId(feature.getHeader("Subsystem-License"));
  
          resource.setSingleton(Boolean.toString(feature.isSingleton()));
  
          resource.setIBMInstallTo(feature.getHeader("IBM-InstallTo"));
  
          return resource;
      }