public List<Element> getArtifacts() { Element artifacts = iuDom.getChild(ARTIFACTS); if (artifacts == null) return null; return artifacts.getChildren(ARTIFACT); }
public List<FeatureRef> getFeatures() throws ModelFileSyntaxException { Element featuresDom = dom.getChild("features"); if (featuresDom == null) { return Collections.emptyList(); } ArrayList<FeatureRef> features = new ArrayList<>(); for (Element featureDom : featuresDom.getChildren()) { features.add(parseFeature(featureDom)); } return Collections.unmodifiableList(features); }
public Launcher getLauncher() { Element domLauncher = dom.getChild("launcher"); if (domLauncher == null) { return null; } return new Launcher(domLauncher); }
public List<PluginRef> getPlugins() { Element pluginsDom = dom.getChild("plugins"); if (pluginsDom == null) { return Collections.emptyList(); } ArrayList<PluginRef> plugins = new ArrayList<>(); for (Element pluginDom : pluginsDom.getChildren("plugin")) { plugins.add(new PluginRef(pluginDom)); } return Collections.unmodifiableList(plugins); }
public String getDescription() { Element descElement = dom.getChild("description"); if (descElement != null) { return descElement.getText(); } return null; }
public List<PluginRef> getPlugins() { Element pluginsDom = dom.getChild("plugins"); if (pluginsDom == null) { return Collections.emptyList(); } ArrayList<PluginRef> plugins = new ArrayList<>(); for (Element pluginDom : pluginsDom.getChildren("plugin")) { plugins.add(new PluginRef(pluginDom)); } return Collections.unmodifiableList(plugins); }
private String getOsSpecificConfigIni(Element configIniElement, String os) { Element osElement = configIniElement.getChild(os); if (osElement != null) { String trimmedValue = osElement.getTrimmedText(); if (trimmedValue.length() > 0) { return trimmedValue; } } return null; }
public Map<String, BundleConfiguration> getPluginConfiguration() { Element configurationsDom = dom.getChild("configurations"); if (configurationsDom == null) { return null; } Map<String, BundleConfiguration> configs = new HashMap<>(); for (Element pluginDom : configurationsDom.getChildren("plugin")) { configs.put(pluginDom.getAttributeValue("id"), new BundleConfiguration(pluginDom)); } return Collections.unmodifiableMap(configs); }
public String getDescriptionURL() { Element descElement = dom.getChild("description"); if (descElement != null) { return descElement.getAttributeValue("url"); } return null; }
public String getCopyright() { Element copyrightElement = dom.getChild("copyright"); if (copyrightElement != null) { return copyrightElement.getText(); } return null; }
public String getLicense() { Element licenseElement = dom.getChild("license"); if (licenseElement != null) { return licenseElement.getText(); } return null; }
public String getLicenseURL() { Element licenseElement = dom.getChild("license"); if (licenseElement != null) { return licenseElement.getAttributeValue("url"); } return null; }
public void setCopyright(String description) { Element copyrightElement = dom.getChild("copyright"); if (copyrightElement == null) { copyrightElement = new Element("copyright"); dom.addNode(copyrightElement); } copyrightElement.setText(description); }
public void setCopyrightURL(String copyrightURL) { Element copyrightElement = dom.getChild("copyright"); if (copyrightElement == null) { copyrightElement = new Element("copyright"); dom.addNode(copyrightElement); } copyrightElement.setAttribute("url", copyrightURL); }
public void setLicense(String license) { Element licenseElement = dom.getChild("license"); if (licenseElement == null) { licenseElement = new Element("license"); dom.addNode(licenseElement); } licenseElement.setText(license); }
public void setCopyrightURL(String copyrightURL) { Element copyrightElement = dom.getChild("copyright"); if (copyrightElement == null) { copyrightElement = new Element("copyright"); dom.addNode(copyrightElement); } copyrightElement.setAttribute("url", copyrightURL); }
public void setDescriptionURL(String descriptionURL) { Element descElement = dom.getChild("description"); if (descElement == null) { descElement = new Element("description"); dom.addNode(descElement); } descElement.setAttribute("url", descriptionURL); }
public Map<String, String> getSolarisIcon() { Element solarisDom = dom.getChild("solaris"); if (solarisDom == null) { return Collections.emptyMap(); } Map<String, String> solaris = new HashMap<>(); putIfNotNull(solaris, ICON_SOLARIS_LARGE, solarisDom.getAttributeValue(ICON_SOLARIS_LARGE)); putIfNotNull(solaris, ICON_SOLARIS_MEDIUM, solarisDom.getAttributeValue(ICON_SOLARIS_MEDIUM)); putIfNotNull(solaris, ICON_SOLARIS_SMALL, solarisDom.getAttributeValue(ICON_SOLARIS_SMALL)); putIfNotNull(solaris, ICON_SOLARIS_TINY, solarisDom.getAttributeValue(ICON_SOLARIS_TINY)); return Collections.unmodifiableMap(solaris); }
public void addArtifact(String classifier, String id, String version) { Element artifacts = iuDom.getChild(ARTIFACTS); if (artifacts == null) { artifacts = new Element(ARTIFACTS); iuDom.addNode(artifacts); } Element newArtifact = new Element(ARTIFACT); newArtifact.addAttribute(CLASSIFIER, classifier); newArtifact.addAttribute(ID, id); newArtifact.addAttribute(VERSION, version); artifacts.addNode(newArtifact); }