boolean pushGroup(FeatureGroupSupport fg) throws ProvisioningException { if(!lastConfig.push(fg)) { return false; } newFgScope(); return true; }
public boolean resolveElement(String elem, boolean isStatic) throws ProvisioningException { if(isStatic) { add(elem); return true; } this.currentElem = elem; return feature.spec.resolveCapabilityElement(feature, elem, this); }
void popGroup() throws ProvisioningException { mergeFgScope(); lastConfig.pop(); }
private ProvisioningRuntime getRuntimeInternal(ProvisioningLayout<FeaturePackRuntimeBuilder> layout, FsDiff fsDiff) throws ProvisioningException { return ProvisioningRuntimeBuilder.newInstance(log) .initRtLayout(layout) .setEncoding(encoding) .setFsDiff(fsDiff) .build(); }
private void addToSpecFeatures(final ResolvedFeature feature) { getSpecFeatures(feature.spec).add(feature); }
@Override public boolean equals(Object other) { if (!(other instanceof FeatureSpecInfo)) { return false; } FeatureSpecInfo ofs = (FeatureSpecInfo) other; return specId.equals(ofs.specId); }
ConfigModelStack(ConfigId configId, ProvisioningRuntimeBuilder rt) throws ProvisioningException { this.id = configId; this.rt = rt; lastConfig = new ConfigScope(null); configs.add(lastConfig); newFgScope(); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((configParams == null) ? 0 : configParams.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((specId == null) ? 0 : specId.hashCode()); return result; }
boolean isFilteredOut(ProducerSpec producer, ConfigId configId, boolean fromPrevLevel) { int i = levels.size() - (fromPrevLevel ? 2 : 1); while(i >= 0) { if(levels.get(i--).isFilteredOut(producer, configId)) { return true; } } return isFilteredOut(config, configId); }
@Override public FeaturePackRuntime transform(FeaturePackRuntimeBuilder other) throws ProvisioningException { return other.build(builder); } });
DefaultBranchedConfigArranger(ConfigModelStack configStack) { this.configStack = configStack; this.specFeatures = configStack.specFeatures; this.features = configStack.features; branchPerSpec = getBooleanProp(configStack.props, ConfigModel.BRANCH_PER_SPEC, false); orderReferencedSpec = branchPerSpec; branchIsBatch = getBooleanProp(configStack.props, ConfigModel.BRANCH_IS_BATCH, false); isolateCircularDeps = getBooleanProp(configStack.props, ConfigModel.ISOLATE_CIRCULAR_DEPS, false); mergeIndependentBranches = getBooleanProp(configStack.props, ConfigModel.MERGE_INDEPENDENT_BRANCHES, false); }
@Override public boolean resolveCapabilityElement(CapabilityResolver capResolver, Object o) throws ProvisioningException { capResolver.add(o); return true; } }
public boolean resolve(CapabilityResolver resolver) throws ProvisioningException { for(int i = 0; i < elems.length; ++i) { if(!resolver.resolveElement(elems[i], isElemStatic[i])) { return false; } } return true; }
boolean hasNext() { if(lastPushed == null) { return false; } return lastPushed.hasNext(); }
ConfigScope(ConfigModel config) throws ProvisioningException { this.config = config; if(config != null) { pushedFgScope = push(config); if(pushedFgScope) { newFgScope(); } } else { pushedFgScope = false; } }
FeaturePackRuntime build(ProvisioningRuntimeBuilder rt) throws ProvisioningException { return new FeaturePackRuntime(this, rt); } }
PackageRuntime build(FeaturePackRuntime fp) { return new PackageRuntime(this, fp); } }
List<ResolvedFeatureId> resolveRefId(final ResolvedFeature feature, final FeatureReferenceSpec refSpec, final ResolvedFeatureSpec targetSpec) throws ProvisioningException { return resolveRefId(feature, refSpec, targetSpec, true); }