Examples of InvalidAttributeException


Examples of codec.pkcs9.InvalidAttributeException

      if (attribute == null) {
    throw new NoSuchAttributeException(
      "ContentType attribute missing!");
      }
      if (attribute.valueCount() == 0) {
    throw new InvalidAttributeException(
      "ContentType attribute has no OID!");
      }
      if (!oid.equals(attribute.valueAt(0))) {
    throw new InvalidAttributeException(
      "ContentType attribute mismatch!");
      }
      attribute = info_.authenticatedAttributes().getAttribute(
        MESSAGE_DIGEST);

      if (attribute == null) {
    throw new NoSuchAttributeException(
      "MessageDigest attribute missing!");
      }
      if (attribute.valueCount() == 0) {
    throw new InvalidAttributeException(
      "MessageDigest attribute has no data!");
      }
      octets = (ASN1OctetString) attribute.valueAt(0);
      md_ = octets.getByteArray();
      mdalg = JCA.getName(JCA.getDigestOID(sigalg));
View Full Code Here

Examples of codec.pkcs9.InvalidAttributeException

    attribute = new Attribute((ASN1ObjectIdentifier) CONTENT_TYPE
      .clone(), (ASN1ObjectIdentifier) oid.clone());

    attributes.add(attribute);
      } else if (attribute.valueCount() < 1) {
    throw new InvalidAttributeException(
      "Content type attribute has no value!");
      } else if (!attribute.valueAt(0).equals(oid)) {
    throw new InvalidAttributeException(
      "Content type attribute has wrong value!");
      }
      attribute = info_.authenticatedAttributes().getAttribute(
        MESSAGE_DIGEST);
View Full Code Here

Examples of org.apache.aries.application.InvalidAttributeException

     if ((fs != null) && (!!!fs.isEmpty())) {
       for (String filter : fs) {
         try {
         filters.add(FrameworkUtil.createFilter(FilterUtils.removeMandatoryFilterToken(filter)));
         } catch (InvalidSyntaxException ise) {
           InvalidAttributeException iae = new InvalidAttributeException(ise);
           throw iae;
         }
       }
     }
     return filters;
View Full Code Here

Examples of org.apache.aries.application.InvalidAttributeException

    _filterString = ManifestHeaderProcessor.generateFilter(PACKAGE.toString(), _package, _attributes);
    try {
    _filter = FrameworkUtil.createFilter(FilterUtils.removeMandatoryFilterToken(_filterString));
    } catch (InvalidSyntaxException isx) {
      logger.debug(LOG_EXIT, "ImportedPackageImpl", new Object[] {isx});
      throw new InvalidAttributeException(isx);
    }
    logger.debug(LOG_EXIT, "ImportedPackageImpl");
  }
View Full Code Here

Examples of org.apache.aries.application.InvalidAttributeException

     
      return null;
    }
    Map<String, NameValueMap<String, String>> parsedFragHost = ManifestHeaderProcessor.parseImportString(fragmentHostHeader);
    if(parsedFragHost.size() != 1)
      throw new InvalidAttributeException(MessageUtil.getMessage("APPUTILS0001W",
          new Object[] {fragmentHostHeader},
          "An internal error occurred. A bundle fragment manifest must define exactly one Fragment-Host entry. The following entry was found" + fragmentHostHeader + "."));
   
    String hostName = parsedFragHost.keySet().iterator().next();
    Map<String, String> attribs = parsedFragHost.get(hostName);
View Full Code Here

Examples of org.apache.aries.application.InvalidAttributeException

    Map<String,NameValueMap<String, String>> map = ManifestHeaderProcessor.parseImportString(symbolicName);
   
    //This should have one entry, which is keyed on the symbolicName
   
    if(map.size() != 1) {
      InvalidAttributeException iax = new InvalidAttributeException (MessageUtil.getMessage(
          "TOO_MANY_SYM_NAMES", new Object[] {symbolicName}));
      logger.debug(LOG_EXIT, "ExportedBundleImpl", iax);
      throw iax;
    }
   
    Map.Entry<String, NameValueMap<String, String>> entry =  map.entrySet().iterator().next();
   
    symbolicName = entry.getKey();
   
    Map<String, String> bundleAttrs = entry.getValue();
   
    String displayName = attrs.getValue(Constants.BUNDLE_NAME);
    String version = attrs.getValue(Constants.BUNDLE_VERSION);
    if (version == null) {
      version = Version.emptyVersion.toString();
    }
    String bmVersion = attrs.getValue(Constants.BUNDLE_MANIFESTVERSION);
    if (symbolicName == null || bmVersion == null) {
      InvalidAttributeException iax = new InvalidAttributeException(MessageUtil.getMessage("INCORRECT_MANDATORY_HEADERS",
          new Object[] {symbolicName, bmVersion}));
      logger.debug(LOG_EXIT, "ExportedBundleImpl", iax);
      throw iax;
    }
View Full Code Here

Examples of org.apache.aries.application.InvalidAttributeException

    }
    _filterString = filterString;
    try {
      _filter = FrameworkUtil.createFilter(FilterUtils.removeMandatoryFilterToken(_filterString));
    } catch (InvalidSyntaxException isx) {
      InvalidAttributeException iax = new InvalidAttributeException(isx);
      logger.debug(LOG_EXIT, "ImportedBundleImpl", new Object[]{iax});
      throw iax;
    }
    logger.debug(LOG_EXIT, "ImportedBundleImpl");
  }
View Full Code Here

Examples of org.apache.aries.application.InvalidAttributeException

    _attributes.put (Constants.VERSION_ATTRIBUTE, versionRange);
    _filterString = ManifestHeaderProcessor.generateFilter(_attributes);
    try {
      _filter = FrameworkUtil.createFilter(FilterUtils.removeMandatoryFilterToken(_filterString));
    } catch (InvalidSyntaxException isx) {
      InvalidAttributeException iax = new InvalidAttributeException(isx);
      logger.debug(LOG_ENTRY, "ImportedBundleImpl", new Object[] {iax});
      throw iax;
    }
    logger.debug(LOG_EXIT, "ImportedBundleImpl");
  }
View Full Code Here

Examples of org.apache.aries.application.InvalidAttributeException

      if (! "".equals(_attribFilterString)) {
        result = FrameworkUtil.createFilter(FilterUtils.removeMandatoryFilterToken(_attribFilterString));
      }
    } catch (InvalidSyntaxException isx) {
     
      InvalidAttributeException iax = new InvalidAttributeException(isx);
      logger.debug(LOG_EXIT, "generateAttributeFilter", new Object[]{isx});
      throw iax;
    }
    logger.debug(LOG_EXIT, "generateAttributeFilter", new Object[]{result});
    return result;
View Full Code Here

Examples of org.apache.aries.application.InvalidAttributeException

    }
    type = thisResourceType;


    if (exportedBundles.size() == 0) {
      throw new InvalidAttributeException(MessageUtil.getMessage("NO_EXPORTED_BUNDLE", new Object[0]));
    } else if (exportedBundles.size() == 1) {
      exportedBundle = exportedBundles.get(0);
    } else
      throw new InvalidAttributeException(MessageUtil.getMessage("TOO_MANY_EXPORTED_BUNDLES",
          new Object[0]));
    }  

    packageCapabilities = new HashSet<ExportedPackage>();
    packageRequirements = new HashSet<ImportedPackage>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.