Package org.apache.aries.application

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


    _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

     
      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

    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

    }
    _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

    _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

      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

    }
    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

     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

    }
    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

Related Classes of org.apache.aries.application.InvalidAttributeException

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.