public void remove(FeaturePackLocation.FPID fpid) throws ProvisioningException { IoUtils.recursiveDelete(LayoutUtils.getFeaturePackDir(home, fpid, false)); }
public ProvisionedConfig build() { props = CollectionUtils.unmodifiable(props); layers = CollectionUtils.unmodifiable(layers); features = CollectionUtils.unmodifiable(features); return this; }
@SuppressWarnings("unchecked") public B initConfigs(ConfigCustomizations clone) { inheritConfigs = clone.inheritConfigs; inheritModelOnlyConfigs = clone.inheritModelOnlyConfigs; includedModels = CollectionUtils.clone(clone.includedModels); includedConfigs = CollectionUtils.clone(clone.includedConfigs); excludedModels = CollectionUtils.clone(clone.excludedModels); excludedConfigs = CollectionUtils.clone(clone.excludedConfigs); definedConfigs = CollectionUtils.clone(clone.definedConfigs); hasModelOnlyConfigs = clone.hasModelOnlyConfigs; return (B) this; }
@Override public FeatureConfig addConfigItem(ConfigItem item) { items = CollectionUtils.add(items, item); return this; }
@SuppressWarnings("unchecked") public B addUniverse(String name, UniverseSpec universe) throws ProvisioningDescriptionException { if(name == null) { defaultUniverse = universe; return (B) this; } universeSpecs = CollectionUtils.put(universeSpecs, name, universe); return (B) this; }
@SuppressWarnings("unchecked") public B removeExcludedFeature(FeatureId featureId) throws ProvisioningDescriptionException { excludedFeatures = CollectionUtils.remove(excludedFeatures, featureId); return (B) this; }
/** * Checks whether the provisioning state history is not empty and can be used to undo * the last provisioning operation. * * @return true if the provisioning state history is not empty, otherwise false * @throws ProvisioningException in case of an error checking the history state */ public boolean isUndoAvailable() throws ProvisioningException { return StateHistoryUtils.isUndoAvailable(home, log); }
public Builder addDefaultPackage(String packageName) { assert packageName != null : "packageName is null"; defPackages = CollectionUtils.addLinked(defPackages, packageName); return this; }
/** * Returns the state history limit for the installation. * * @return state history limit * @throws ProvisioningException in case of a failure to read the value */ public int getStateHistoryLimit() throws ProvisioningException { return StateHistoryUtils.readStateHistoryLimit(home, log); }
/** * Sets the new state history limit to the specified value. * The value cannot be negative. * * @param limit new state history limit * @throws ProvisioningException in case of a failure */ public void setStateHistoryLimit(int limit) throws ProvisioningException { StateHistoryUtils.writeStateHistoryLimit(home, limit, log); }
/** * Clears the state history. * * @throws ProvisioningException in case of a failure */ public void clearStateHistory() throws ProvisioningException { StateHistoryUtils.clearStateHistory(home, log); }
public Builder addToValueSet(String... value) { if (value.length > 0) { for (String v : value) { this.valueSet = CollectionUtils.add(valueSet, v); } } return this; }
protected FeaturePackSpec(Builder builder) throws ProvisioningDescriptionException { super(builder); this.fpid = builder.fpid; this.defPackages = CollectionUtils.unmodifiable(builder.defPackages); this.patchFor = builder.patchFor; }
@SuppressWarnings("unchecked") public B removeUniverse(String name) throws ProvisioningDescriptionException { if(name == null) { defaultUniverse = null; return (B) this; } universeSpecs = CollectionUtils.remove(universeSpecs, name); return (B) this; }
@SuppressWarnings("unchecked") public B excludeDefaultConfig(ConfigId configId) { excludedConfigs = CollectionUtils.add(excludedConfigs, configId); return (B) this; }
public FeaturePackUpdatePlan buildPlan() { newPatches = CollectionUtils.unmodifiable(newPatches); return FeaturePackUpdatePlan.this; } }
@Override @SuppressWarnings("unchecked") public B addConfigItem(ConfigItem item) { items = CollectionUtils.add(items, item); return (B) this; }
protected ConfigCustomizations(ConfigCustomizationsBuilder<?> builder) { this.inheritConfigs = builder.inheritConfigs; this.inheritModelOnlyConfigs = builder.inheritModelOnlyConfigs; this.includedModels = CollectionUtils.unmodifiable(builder.includedModels); this.excludedModels = CollectionUtils.unmodifiable(builder.excludedModels); this.includedConfigs = CollectionUtils.unmodifiable(builder.includedConfigs); this.excludedConfigs = CollectionUtils.unmodifiable(builder.excludedConfigs); this.definedConfigs = CollectionUtils.unmodifiable(builder.definedConfigs); this.hasModelOnlyConfigs = builder.hasModelOnlyConfigs; }
private ProvisioningConfig(Builder builder) throws ProvisioningDescriptionException { super(builder); this.options = CollectionUtils.unmodifiable(builder.options); this.builder = builder; }
protected FeaturePackDepsConfig(FeaturePackDepsConfigBuilder<?> builder) throws ProvisioningDescriptionException { super(builder); this.fpDeps = CollectionUtils.unmodifiable(builder.fpDeps); this.fpDepsByOrigin = CollectionUtils.unmodifiable(builder.fpDepsByOrigin); this.producerOrigins = builder.producerOrigins; this.transitiveDeps = CollectionUtils.unmodifiable(builder.transitiveDeps); this.defaultUniverse = builder.defaultUniverse; this.universeSpecs = CollectionUtils.unmodifiable(builder.universeSpecs); }