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

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

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

origin: wildfly/wildfly-core

  @Override
  public DirectoryStructure getDirectoryStructure() {
    return identity.getDirectoryStructure();
  }
}, Collections.<String>emptyList(), structure == null ? null : structure.getInstalledImage());
origin: wildfly/wildfly-core

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

@Override
public String getName() {
  return identity.getName();
}
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: 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

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

  @Override
  public DirectoryStructure getDirectoryStructure() {
    return identity.getDirectoryStructure();
  }
}, Collections.<String>emptyList(), structure == null ? null : structure.getInstalledImage());
origin: org.wildfly.core/wildfly-patching

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

@Override
public String getName() {
  return identity.getName();
}
origin: org.wildfly.core/wildfly-patching

public DirectoryStructure getStructure() {
  return target.getDirectoryStructure();
}
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: org.wildfly.core/wildfly-patching

  @Override
  public Set<String> children() {
    final InstallationManager manager = getInstallationManager();
    if (manager == null) {
      return Collections.emptySet();
    }
    final Collection<? extends PatchableTarget> targets = getChildTargets(manager.getDefaultIdentity());
    if (targets.isEmpty()) {
      return Collections.emptySet();
    }
    if (targets.size() == 1) {
      final PatchableTarget target = targets.iterator().next();
      return Collections.singleton(target.getName());
    }
    final Set<String> names = new HashSet<String>(targets.size());
    for (PatchableTarget target : targets) {
      names.add(target.getName());
    }
    return names;
  }
}
origin: wildfly/wildfly-core

public DirectoryStructure getStructure() {
  return target.getDirectoryStructure();
}
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

  @Override
  public Set<String> children() {
    final InstallationManager manager = getInstallationManager();
    if (manager == null) {
      return Collections.emptySet();
    }
    final Collection<? extends PatchableTarget> targets = getChildTargets(manager.getDefaultIdentity());
    if (targets.isEmpty()) {
      return Collections.emptySet();
    }
    if (targets.size() == 1) {
      final PatchableTarget target = targets.iterator().next();
      return Collections.singleton(target.getName());
    }
    final Set<String> names = new HashSet<String>(targets.size());
    for (PatchableTarget target : targets) {
      names.add(target.getName());
    }
    return names;
  }
}
origin: wildfly/wildfly-core

private static boolean isAgedOut(InstalledIdentity installedIdentity, final Patch metadata) {
  for (PatchElement pe : metadata.getElements()) {
    final PatchElementProvider peProvider = pe.getProvider();
    final PatchableTarget layer = peProvider.isAddOn() ? installedIdentity.getAddOn(peProvider.getName())
        : installedIdentity.getLayer(peProvider.getName());
    if (layer == null) {
      // if an identity is missing a layer that means either it was re-configured and the layer
      // was removed
      // or the layer in the patch is optional and may be missing on the disk
      // we haven't had this case yet, not sure how critical this is to terminate the process of
      // cleaning up
      throw new IllegalStateException(PatchLogger.ROOT_LOGGER.layerNotFound(peProvider.getName()));
    }
    final File patchDir = layer.getDirectoryStructure().getModulePatchDirectory(pe.getId());
    if (!patchDir.exists()) {
      return true;
    }
  }
  return false;
}
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: org.wildfly.core/wildfly-patching

private static boolean isAgedOut(InstalledIdentity installedIdentity, final Patch metadata) {
  for (PatchElement pe : metadata.getElements()) {
    final PatchElementProvider peProvider = pe.getProvider();
    final PatchableTarget layer = peProvider.isAddOn() ? installedIdentity.getAddOn(peProvider.getName())
        : installedIdentity.getLayer(peProvider.getName());
    if (layer == null) {
      // if an identity is missing a layer that means either it was re-configured and the layer
      // was removed
      // or the layer in the patch is optional and may be missing on the disk
      // we haven't had this case yet, not sure how critical this is to terminate the process of
      // cleaning up
      throw new IllegalStateException(PatchLogger.ROOT_LOGGER.layerNotFound(peProvider.getName()));
    }
    final File patchDir = layer.getDirectoryStructure().getModulePatchDirectory(pe.getId());
    if (!patchDir.exists()) {
      return true;
    }
  }
  return false;
}
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 assertModule(final String patchID, final PatchableTarget target, final ModuleItem item) {
  final File[] mp = TestUtils.getModuleRoot(target);
  final File currentPatch = target.getDirectoryStructure().getModulePatchDirectory(patchID);
  final File module = PatchContentLoader.getModulePath(currentPatch, item);
  assertModulePath(mp, item, module);
}
org.jboss.as.patching.installationPatchableTarget

Javadoc

A patchable target.

Most used methods

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • getExternalFilesDir (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JPanel (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Best plugins for Eclipse
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