Tabnine Logo
PatchableTarget.loadTargetInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
loadTargetInfo
method
in
org.jboss.as.patching.installation.PatchableTarget

Best Java code snippets using org.jboss.as.patching.installation.PatchableTarget.loadTargetInfo (Showing top 11 results out of 315)

origin: wildfly/wildfly-core

@Override
public TargetInfo loadTargetInfo() throws IOException {
  return identity.loadTargetInfo();
}
origin: org.wildfly.core/wildfly-patching

@Override
public TargetInfo loadTargetInfo() throws IOException {
  return identity.loadTargetInfo();
}
origin: org.wildfly.core/wildfly-patching

protected void putPatchableTarget(final String name, final PatchableTarget target, Map<String, MutableTargetImpl> map) throws IOException {
  final PatchableTarget.TargetInfo info = target.loadTargetInfo();
  map.put(name, new MutableTargetImpl(info));
}
origin: wildfly/wildfly-core

protected void putPatchableTarget(final String name, final PatchableTarget target, Map<String, MutableTargetImpl> map) throws IOException {
  final PatchableTarget.TargetInfo info = target.loadTargetInfo();
  map.put(name, new MutableTargetImpl(info));
}
origin: wildfly/wildfly-core

public static File[] getModuleRoot(final PatchableTarget target) {
  try {
    return PatchUtils.getModulePath(target.getDirectoryStructure(), target.loadTargetInfo());
  } catch (IOException e) {
    throw new RuntimeException(e);
  }
}
origin: wildfly/wildfly-core

static void writeTargetInfo(final XMLExtendedStreamWriter writer, final Element element, final PatchableTarget target) throws XMLStreamException {
  try {
    final PatchableTarget.TargetInfo info = target.loadTargetInfo();
    //
    writer.writeEmptyElement(element.name);
    writer.writeAttribute(Attribute.NAME.name, target.getName());
    writer.writeAttribute(Attribute.RELEASE_ID.name, info.getCumulativePatchID());
    if (! info.getPatchIDs().isEmpty()) {
      writer.writeAttribute(Attribute.PATCHES.name, PatchUtils.asString(info.getPatchIDs()));
    }
  } catch (IOException e) {
    throw new XMLStreamException(e);
  }
}
origin: org.wildfly.core/wildfly-patching

static void writeTargetInfo(final XMLExtendedStreamWriter writer, final Element element, final PatchableTarget target) throws XMLStreamException {
  try {
    final PatchableTarget.TargetInfo info = target.loadTargetInfo();
    //
    writer.writeEmptyElement(element.name);
    writer.writeAttribute(Attribute.NAME.name, target.getName());
    writer.writeAttribute(Attribute.RELEASE_ID.name, info.getCumulativePatchID());
    if (! info.getPatchIDs().isEmpty()) {
      writer.writeAttribute(Attribute.PATCHES.name, PatchUtils.asString(info.getPatchIDs()));
    }
  } catch (IOException e) {
    throw new XMLStreamException(e);
  }
}
origin: wildfly/wildfly-core

File getModuleResource(final String layer, final String patchID, final String moduleName) throws IOException {
  final PatchableTarget.TargetInfo info = getLayer(layer).loadTargetInfo();
  final File root = info.getDirectoryStructure().getModulePatchDirectory(patchID);
  final File moduleRoot = TestUtils.getModuleRoot(root, moduleName);
  return new File(moduleRoot, RESOURCE);
}
origin: wildfly/wildfly-core

File getModuleResource(final String layer, final String patchID, final String moduleName) throws IOException {
  final PatchableTarget.TargetInfo info = getLayer(layer).loadTargetInfo();
  final File root = info.getDirectoryStructure().getModulePatchDirectory(patchID);
  final File moduleRoot = TestUtils.getModuleRoot(root, moduleName);
  return new File(moduleRoot, RESOURCE);
}
origin: wildfly/wildfly-core

static void assertApplied(final Patch patch, InstallationManager manager) throws IOException {
  final String patchID = patch.getPatchId();
  InstalledIdentity installedIdentity = null;
  try {
    installedIdentity = manager.getInstalledIdentity(patch.getIdentity().getName(), null);
  } catch (PatchingException e) {
    Assert.fail(e.getLocalizedMessage());
  }
  final PatchableTarget target = installedIdentity.getIdentity();
  final PatchableTarget.TargetInfo identity = target.loadTargetInfo();
  assertIsApplied(patch.getIdentity().getPatchType(), patchID, identity);
  assertExists(identity.getDirectoryStructure().getInstalledImage().getPatchHistoryDir(patchID));
  assertContentItems(patchID, target, patch.getModifications());
  for (final PatchElement element : patch.getElements()) {
    final PatchElementProvider provider = element.getProvider();
    final PatchableTarget targetElement = provider.isAddOn() ? installedIdentity.getAddOn(provider.getName()) : installedIdentity.getLayer(provider.getName());
    assertIsApplied(provider.getPatchType(), element.getId(), targetElement.loadTargetInfo());
    assertContentItems(element.getId(), targetElement, element.getModifications());
  }
}
origin: wildfly/wildfly-core

static void assertNotApplied(final Patch patch, InstallationManager manager) throws IOException {
  InstalledIdentity installedIdentity = null;
  try {
    installedIdentity = manager.getInstalledIdentity(patch.getIdentity().getName(), patch.getIdentity().getVersion());
  } catch (PatchingException e) {
    Assert.fail(e.getLocalizedMessage());
  }
  final PatchableTarget.TargetInfo identity = installedIdentity.getIdentity().loadTargetInfo();
  assertNotApplied(patch.getIdentity().getPatchType(), patch.getPatchId(), identity);
  assertDoesNotExists(identity.getDirectoryStructure().getInstalledImage().getPatchHistoryDir(patch.getPatchId()));
  for (final PatchElement element : patch.getElements()) {
    final PatchElementProvider provider = element.getProvider();
    final PatchableTarget target = provider.isAddOn() ? installedIdentity.getAddOn(provider.getName()) : installedIdentity.getLayer(provider.getName());
    Assert.assertNotNull(target);
    assertNotApplied(provider.getPatchType(), element.getId(), target.loadTargetInfo());
  }
}
org.jboss.as.patching.installationPatchableTargetloadTargetInfo

Javadoc

Load the target info.

Popular methods of PatchableTarget

  • getDirectoryStructure
    The directory structure for this target.
  • getName
    The name of the target.

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ImageIO (javax.imageio)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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