This method adds dynamic attributes to the given {@code manifest}.

@param manifest is the {@link Manifest} to modify.
@param url is the {@link URL} with the source of the manifest.
436142
private static void completeManifest(Manifest manifest, URL url) {

    String path = url.getPath();
    int start = 0;
    int end = path.length();
    if (path.endsWith(JAR_SUFFIX)) {
      // 4 for ".jar"
      end = end - JAR_SUFFIX.length() + 4;
      start = path.lastIndexOf('/', end) + 1;
    }
    String source = path.substring(start, end);
    manifest.getMainAttributes().put(MANIFEST_SOURCE, source);
  }
429202
public static void loadPropertiesFromURL(URL url) {
        if (url == null) {
            return;
        }
        InputStream in = null;
        try {
            in = url.openStream();
            properties.load(in);
        } catch (IOException e) {
            AnalysisContext.logError("Unable to load properties from " + url, e);
        } finally {
            IO.close(in);
        }
    }
1088998
public static void addParameter(IUrlBuilder urlBuilder, String name, String value) {
        urlBuilder.addParameter(name, value);
    }
155249
@Override
    public T setApplicationXML(Asset resource) throws IllegalArgumentException {
        Validate.notNull(resource, "Resource must be specified");
        return addAsApplicationResource(resource, "application.xml");
    }
296194
public GenericTemplateElementBuilder addLoginButton(String url) {
		Button button = ButtonFactory.createLoginButton(url);
		this.element.addButton(button);
		return this;
	}
360008
private void loadManifest()
  {
    if (_isManifestRead)
      return;
    
    synchronized (this) {
      if (_isManifestRead)
        return;

      try {
        _manifest = _jarPath.getManifest();
        if (_manifest == null)
          return;

        Attributes attr = _manifest.getMainAttributes();
        if (attr != null)
          addManifestPackage("", attr);

        Map<String,Attributes> entries = _manifest.getEntries();

        for (Map.Entry<String,Attributes> entry : entries.entrySet()) {
          String pkg = entry.getKey();

          attr = entry.getValue();
          if (attr == null)
            continue;

          addManifestPackage(pkg, attr);
        }
      } catch (IOException e) {
        log.log(Level.WARNING, e.toString(), e);
      } finally {
        _isManifestRead = true;
      }
    }
  }
31429
private Map<Object, Object> getClassPathManifestAttributes() {
		Map<Object, Object> manifestAttributes = null;
		try {
		    LOGGER.debug("Using Manifest file:{}", getClass().getClassLoader().getResource(MANIFEST).getPath());
		    
		    Manifest manifest = new Manifest(getClass().getClassLoader().getResourceAsStream(MANIFEST));
		    manifestAttributes = manifest.getMainAttributes();
		} catch (IOException e) {
			LOGGER.warn("Unable to read the manifest from the classpath");
			LOGGER.debug("Unable to read the manifest from the classpath", e);
		}
		return manifestAttributes;
	}
223981
public void setRevocationURL(final String url) {
        license.add(Feature.Create.stringFeature(REVOCATION_URL, url));
    }
971944
protected void updateAppAttributes(Map<String, Object> attributes) {

        m_rootLayout.setMainHeightFull(Boolean.TRUE.equals(attributes.get(ATTR_MAIN_HEIGHT_FULL)));

        Object infoComponentObj = attributes.get(ATTR_INFO_COMPONENT);
        if (m_infoComponent != null) {
            m_infoLayout.removeComponent(m_infoComponent);
        }
        if (infoComponentObj instanceof Component) {
            m_infoComponent = (Component)infoComponentObj;
            m_infoLayout.addComponent(m_infoComponent);
        }
    }
1353983
@Override
    public T setApplicationXML(File resource) throws IllegalArgumentException {
        Validate.notNull(resource, "Resource must be specified");
        return setApplicationXML(new FileAsset(resource));
    }
1056654
public void setUrl(String url) {
        this.url = url;

        if (child != null) {
            child.destroy();
            child = null;
        }

        if (url.startsWith("http") || !url.endsWith(".fsp")) {
            child = new Iframe();
            ((Iframe) child).setSrc(url);
        } else {
            child = new Import();
            ((Import) child).setSrc(url);
        }

        fullSize(child);
        root.addChild(child);
    }
118636
public Package definePackage(String name, Manifest manifest, URL sealBase) throws IllegalArgumentException {
        Attributes mA = manifest.getMainAttributes();
        String specTitle = mA.getValue(Name.SPECIFICATION_TITLE);
        String specVersion = mA.getValue(Name.SPECIFICATION_VERSION);
        String specVendor = mA.getValue(Name.SPECIFICATION_VENDOR);
        String implTitle = mA.getValue(Name.IMPLEMENTATION_TITLE);
        String implVersion = mA.getValue(Name.IMPLEMENTATION_VERSION);
        String implVendor = mA.getValue(Name.IMPLEMENTATION_VENDOR);
        String sealedString = mA.getValue(Name.SEALED);
        Boolean sealed = (sealedString == null ? Boolean.FALSE : sealedString.equalsIgnoreCase("true"));

        //now overwrite global attributes with the specific attributes
        String unixName = name.replaceAll("\\.", "/") + "/"; //replace all dots with slash and add trailing slash
        mA = manifest.getAttributes(unixName);
        if (mA != null) {
            String s = mA.getValue(Name.SPECIFICATION_TITLE);
            if (s != null)
                specTitle = s;
            s = mA.getValue(Name.SPECIFICATION_VERSION);
            if (s != null)
                specVersion = s;
            s = mA.getValue(Name.SPECIFICATION_VENDOR);
            if (s != null)
                specVendor = s;
            s = mA.getValue(Name.IMPLEMENTATION_TITLE);
            if (s != null)
                implTitle = s;
            s = mA.getValue(Name.IMPLEMENTATION_VERSION);
            if (s != null)
                implVersion = s;
            s = mA.getValue(Name.IMPLEMENTATION_VENDOR);
            if (s != null)
                implVendor = s;
            s = mA.getValue(Name.SEALED);
            if (s != null)
                sealed = s.equalsIgnoreCase("true");
        }

        if (!sealed)
            sealBase = null;
        return definePackage(name, specTitle, specVersion, specVendor, implTitle, implVersion, implVendor, sealBase);
    }
56241
public void setUrl(final String url) {
		String currUrl = getUrl();

		if (!Objects.equals(url, currUrl)) {
			getOrCreateComponentModel().url = url;
		}
	}
1007939
public void setURL(String url) {
		try {
			this.value = (url != null) ? new URL(url) : null;
		} catch (Throwable exception) {
			this.value = null;
		}
		this.type = AttributeType.URL;
		this.assigned = this.value != null;
	}
406061
def _load_manifest_from_url(manifest, url, verify_certificate=True, username=None, password=None):
    
    try:
        if username and password:
            manifest_file_handler = StringIO(lib.authenticated_get(username, password, url,
                                                                   verify=verify_certificate).decode("utf-8"))
        else:
            manifest_file_handler = StringIO(lib.cleaned_request(
                'get', url, verify=verify_certificate
            ).text)
        manifest.readfp(manifest_file_handler)
    except requests.exceptions.RequestException:
        logger.debug("", exc_info=True)
        error_message = sys.exc_info()[1]
        raise ManifestException("There was an error retrieving {0}!\n {1}".format(url, str(error_message)))
566873
private Manifest addToList(Resource resource) {
        try {
            if (resource != null && resource.exists()) {
                Manifest manifest = new ManifestEx(resource);
                manifests.add(manifest);
                return manifest;
            }
        } catch (Exception e) {
            log.debug("Exception occurred reading manifest: " + resource);
        }

        return null;
    }
744138
public void onUrlAvailable(String url) {
        if (callback_ != null) {
            callback_.onLinkCreate(url, null);
        }
        updateShareEventToFabric(url);
    }