congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ProvisioningPlan
Code IndexAdd Tabnine to your IDE (free)

How to use
ProvisioningPlan
in
org.jboss.galleon.layout

Best Java code snippets using org.jboss.galleon.layout.ProvisioningPlan (Showing top 10 results out of 315)

origin: org.jboss.galleon/galleon-core

public static ProvisioningPlan builder() {
  return new ProvisioningPlan();
}
origin: org.jboss.galleon/galleon-core

  @Override
  public String toString() {
    final StringBuilder buf = new StringBuilder();
    buf.append('[');
    if(!install.isEmpty()) {
      buf.append("install ");
      StringUtils.append(buf, getInstall());
      buf.append(';');
    }
    if(!uninstall.isEmpty()) {
      if(buf.length() > 1) {
        buf.append(' ');
      }
      buf.append("uninstall ");
      StringUtils.append(buf, uninstall);
      buf.append(';');
    }
    if(!updates.isEmpty()) {
      if(buf.length() > 1) {
        buf.append(' ');
      }
      buf.append("update ");
      StringUtils.append(buf, updates.values());
      buf.append(';');
    }
    return buf.toString();
  }
}
origin: org.jboss.galleon/galleon-core

public void apply(ProvisioningPlan plan, Map<String, String> pluginOptions) throws ProvisioningException {
  if(plan.isEmpty()) {
    return;
  if(plan.hasUpdates()) {
    Map<ProducerSpec, FeaturePackUpdatePlan> updates = plan.getUpdateMap();
    Set<ProducerSpec> processed = new HashSet<>(updates.size());
    for(FeaturePackConfig fpConfig : config.getFeaturePackDeps()) {
  if(plan.hasInstall()) {
    for(FeaturePackConfig fpConfig : plan.getInstall()) {
      install(fpConfig, configBuilder);
  if(plan.hasUninstall()) {
    for(ProducerSpec producer : plan.getUninstall()) {
      uninstall(producer.getLocation().getFPID(), configBuilder);
  initPluginOptions(pluginOptions, plan.hasUninstall());
origin: org.jboss.galleon/galleon-cli

    plan = mgr.getUpdates(resolved.toArray(arr));
  } else {
    plan = ProvisioningPlan.builder();
if (plan.isEmpty()) {
  return updates;
for (FeaturePackUpdatePlan p : plan.getUpdates()) {
  if (p.hasNewPatches()) {
    hasPatches = true;
updates.t = new Table(headers);
for (FeaturePackUpdatePlan p : plan.getUpdates()) {
  FeaturePackLocation loc = p.getInstalledLocation();
  String update = p.hasNewLocation() ? p.getNewLocation().getBuild() : NONE;
origin: org.jboss.galleon/galleon-core

private ProvisioningPlan getUpdatesInternal(Collection<ProducerSpec> producers) throws ProvisioningException {
  final ProvisioningPlan plan = ProvisioningPlan.builder();
  updatesTracker = getUpdatesTracker();
  updatesTracker.starting(producers.size());
  for(ProducerSpec producer : producers) {
    updatesTracker.processing(producer);
    final FeaturePackUpdatePlan fpPlan = getFeaturePackUpdate(producer);
    if(!fpPlan.isEmpty()) {
      plan.update(fpPlan);
    }
    updatesTracker.processed(producer);
  }
  updatesTracker.complete();
  return plan;
}
origin: org.jboss.galleon/galleon-cli

@Override
protected void runCommand(PmCommandInvocation session) throws CommandExecutionException {
  try {
    ProvisioningManager mgr = getManager(session.getPmSession());
    Updates updates = getUpdatesTable(mgr, session, includeAll, fp);
    if (updates.plan.isEmpty()) {
      session.println(UP_TO_DATE);
    } else {
      session.println(UPDATES_AVAILABLE);
      session.println(updates.t.build());
    }
  } catch (ProvisioningException ex) {
    throw new CommandExecutionException(session.getPmSession(),
        CliErrors.checkForUpdatesFailed(), ex);
  }
}
origin: org.jboss.galleon/galleon-core

/**
 * Query for available updates and patches for feature-packs in this layout.
 *
 * @param includeTransitive  whether to include transitive dependencies into the result
 * @return  available updates
 * @throws ProvisioningException in case of a failure
 */
public ProvisioningPlan getUpdates(boolean includeTransitive) throws ProvisioningException {
  final ProvisioningConfig config = getProvisioningConfig();
  ProvisioningPlan plan;
  if (config == null) {
    plan = ProvisioningPlan.builder();
  } else {
    try (ProvisioningLayout<?> layout = getLayoutFactory().newConfigLayout(config)) {
      plan = layout.getUpdates(includeTransitive);
    }
  }
  return plan;
}
origin: org.jboss.galleon/galleon-cli

private static void addCustomUpdates(ProvisioningPlan plan, List<FeaturePackLocation> custom, ProvisioningManager mgr) throws ProvisioningException {
  try (ProvisioningLayout<?> layout = mgr.getLayoutFactory().newConfigLayout(mgr.getProvisioningConfig())) {
    for (FeaturePackLocation loc : custom) {
      FeaturePackLayout fpl = layout.getFeaturePack(loc.getProducer());
      FeaturePackLocation current = fpl.getFPID().getLocation();
      FeaturePackUpdatePlan fpPlan = FeaturePackUpdatePlan.request(current, fpl.isTransitiveDep()).setNewLocation(loc).buildPlan();
      if (fpPlan.hasNewLocation()) {
        plan.update(fpPlan);
      }
    }
  }
}
origin: org.jboss.galleon/galleon-cli

ProvisioningManager mgr = getManager(session);
Updates updates = CheckUpdatesCommand.getUpdatesTable(mgr, session, allDependencies(), getFP());
if (updates.plan.isEmpty()) {
  session.println(UP_TO_DATE);
} else {
origin: org.jboss.galleon/galleon-core

/**
 * Query for available updates and patches for specific producers.
 * If no producer is passed as an argument, the method will return
 * the update plan for only the feature-packs installed directly by the user.
 *
 * @param producers  producers to include into the update plan
 * @return  update plan
 * @throws ProvisioningException in case of a failure
 */
public ProvisioningPlan getUpdates(ProducerSpec... producers) throws ProvisioningException {
  final ProvisioningConfig config = getProvisioningConfig();
  ProvisioningPlan plan;
  if (config == null) {
    plan = ProvisioningPlan.builder();
  } else {
    try (ProvisioningLayout<?> layout = getLayoutFactory().newConfigLayout(config)) {
      plan = layout.getUpdates(producers);
    }
  }
  return plan;
}
org.jboss.galleon.layoutProvisioningPlan

Javadoc

A set of changes that can be applied to a provisioned state.

Most used methods

  • builder
  • isEmpty
  • update
  • <init>
  • getInstall
  • getUninstall
  • getUpdateMap
  • getUpdates
  • hasInstall
  • hasUninstall
  • hasUpdates
  • install
  • hasUpdates,
  • install

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Join (org.hibernate.mapping)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now