class AttributesParserManifest implements AttributesParser {

  @Override
  public P2Attributes getAttributesFromBlob(final TempBlob tempBlob, final String extension)
      throws IOException, AttributeParsingException
  {
    Builder p2AttributesBuilder = P2Attributes.builder();
    Optional<Manifest> manifestJarEntity =
        manifestJarExtractor.getSpecificEntity(tempBlob, extension, MANIFEST_FILE_PREFIX);
    if (manifestJarEntity.isPresent()) {
      Attributes mainManifestAttributes = manifestJarEntity.get().getMainAttributes();
      String bundleLocalizationValue = mainManifestAttributes.getValue("Bundle-Localization");
      Optional<PropertyResourceBundle> propertiesOpt =
          propertyParser.getBundleProperties(tempBlob, extension,
              bundleLocalizationValue == null ? BUNDLE_PROPERTIES : bundleLocalizationValue);

      p2AttributesBuilder
          .componentName(normalizeName(propertyParser
              .extractValueFromProperty(mainManifestAttributes.getValue("Bundle-SymbolicName"), propertiesOpt)))
          .pluginName(
              propertyParser.extractValueFromProperty(mainManifestAttributes.getValue("Bundle-Name"), propertiesOpt))
          .componentVersion(
              propertyParser
                  .extractValueFromProperty(mainManifestAttributes.getValue("Bundle-Version"), propertiesOpt));
    }

    return p2AttributesBuilder.build();
  }

  @Inject public  AttributesParserManifest(final TempBlobConverter tempBlobConverter, final PropertyParser propertyParser);

}