public IdentityRequirementBuilder(String symbolicName, String range) { this(symbolicName, range != null ? new VersionRange(range) : null, null, null); }
public static VersionRange getVersionRange(Requirement req, String attr) { Object value = req.getAttribute(attr); return (value instanceof String) ? new VersionRange((String) value) : (VersionRange) value; }
public ManifestBuilder addIdentityRequirement(String symbolicName, String version) { return addIdentityRequirement(symbolicName, new VersionRange(version), null, null); }
@Override public Requirement addIdentityRequirement(String symbolicName, String range) { IllegalArgumentAssertion.assertNotNull(symbolicName, "symbolicName"); return addIdentityRequirement(symbolicName, range != null ? new VersionRange(range) : null, null, null); }
protected void validate() { Object attval = getAttribute(IdentityNamespace.CAPABILITY_VERSION_ATTRIBUTE); if (attval != null && !(attval instanceof VersionRange)) { getAttributes().put(IdentityNamespace.CAPABILITY_VERSION_ATTRIBUTE, new VersionRange(attval.toString())); } String resdir = getDirective(Namespace.REQUIREMENT_RESOLUTION_DIRECTIVE); optional = Namespace.RESOLUTION_OPTIONAL.equals(resdir); canonicalName = toString(); }
return new VersionRange(closedLeft ? LEFT_CLOSED : LEFT_OPEN, endpointLeft, endpointRight, closedRight ? RIGHT_CLOSED : RIGHT_OPEN);
List<VersionRange> list = new ArrayList<>(); for (String val : split(valstr)) { list.add(new VersionRange(val.trim())); value = new VersionRange(valstr);
icapE.getAttributes().put(ContentNamespace.CAPABILITY_RUNTIME_NAME_ATTRIBUTE, RESOURCE_E + ".war"); builderE.addContentCapability(deployer.getDeployment(RESOURCE_E)); builderE.addIdentityRequirement("org.apache.camel.core", new VersionRange("[2.11,3.0)")); Resource res = builderE.getResource();