Package com.github.dynamicextensionsalfresco.osgi

Examples of com.github.dynamicextensionsalfresco.osgi.SystemPackageEditor


  /* Utility operations */

  protected Set<SystemPackage> createSystemPackages() throws IOException {
    final Set<SystemPackage> systemPackages = new LinkedHashSet<SystemPackage>();
    final SystemPackageEditor systemPackageEditor = new SystemPackageEditor();
    systemPackageEditor.setDefaultVersion(getDefaultVersion());
    for (final Resource configuration : resolveConfigurations()) {
      LineNumberReader in = null;
      try {
        in = new LineNumberReader(new InputStreamReader(configuration.getInputStream()));
        for (String line; (line = in.readLine()) != null;) {
          line = line.trim();
          if (line.isEmpty() || line.startsWith("#")) {
            // Skip empty lines and comments.
            continue;
          }
          try {
            systemPackageEditor.setAsText(line);
            final SystemPackage systemPackage = (SystemPackage) systemPackageEditor.getValue();
            systemPackages.add(systemPackage);
          } catch (final IllegalArgumentException e) {
            logger.warn("Could not parse SystemPackage configuration line: {}", e.getMessage());
          }
        }
View Full Code Here

TOP

Related Classes of com.github.dynamicextensionsalfresco.osgi.SystemPackageEditor

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.