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

How to use
ModificationType
in
org.jboss.as.patching.metadata

Best Java code snippets using org.jboss.as.patching.metadata.ModificationType (Showing top 5 results out of 315)

origin: wildfly/wildfly-core

  final ContentModification mod) throws PatchingException {
final ModificationType type = mod.getType();
if(type.equals(ModificationType.REMOVE)) {
  return;
origin: org.wildfly.core/wildfly-patching

  final ContentModification mod) throws PatchingException {
final ModificationType type = mod.getType();
if(type.equals(ModificationType.REMOVE)) {
  return;
origin: org.wildfly.core/wildfly-patching

if (cp1Type.equals(ModificationType.ADD)) {
  if (cp2Type.equals(ModificationType.ADD)) {
    throw new PatchingException("Patch " + cp2.getPatchId() + " adds " + cp1Mod.getItem().getRelativePath()
        + " already added by patch " + cp1.getPatchId());
  if (cp2Type.equals(ModificationType.MODIFY)) {
    modType = ModificationType.ADD;
  } else { // remove cancels add
} else if (cp1Type.equals(ModificationType.REMOVE)) {
  if (cp2Type.equals(ModificationType.REMOVE)) {
    throw new PatchingException("Patch " + cp2.getPatchId() + " removes "
        + cp1Mod.getItem().getRelativePath() + " already removed by patch " + cp1.getPatchId());
  if (cp2Type.equals(ModificationType.ADD)) {
    throw new PatchingException("Patch " + cp2.getPatchId() + " adds " + cp1Mod.getItem().getRelativePath()
        + " modified by patch " + cp1.getPatchId());
  if (cp2Type.equals(ModificationType.REMOVE)) {
    modType = ModificationType.REMOVE;
  } else {
if (ModificationType.ADD.equals(modType)) {
  final ContentItem cp2Item = cp2Mod.getItem();
  if (cp2Item.getContentType().equals(ContentType.MODULE)) {
    final ModuleItem module = (ModuleItem) cp2Item;
    if(cp2Type.equals(ModificationType.REMOVE)) {
      try {
        elementBuilder.addModule(module.getName(), module.getSlot(), PatchUtils.getAbsentModuleContentHash(module));
origin: wildfly/wildfly-core

if (cp1Type.equals(ModificationType.ADD)) {
  if (cp2Type.equals(ModificationType.ADD)) {
    throw new PatchingException("Patch " + cp2.getPatchId() + " adds " + cp1Mod.getItem().getRelativePath()
        + " already added by patch " + cp1.getPatchId());
  if (cp2Type.equals(ModificationType.MODIFY)) {
    modType = ModificationType.ADD;
  } else { // remove cancels add
} else if (cp1Type.equals(ModificationType.REMOVE)) {
  if (cp2Type.equals(ModificationType.REMOVE)) {
    throw new PatchingException("Patch " + cp2.getPatchId() + " removes "
        + cp1Mod.getItem().getRelativePath() + " already removed by patch " + cp1.getPatchId());
  if (cp2Type.equals(ModificationType.ADD)) {
    throw new PatchingException("Patch " + cp2.getPatchId() + " adds " + cp1Mod.getItem().getRelativePath()
        + " modified by patch " + cp1.getPatchId());
  if (cp2Type.equals(ModificationType.REMOVE)) {
    modType = ModificationType.REMOVE;
  } else {
if (ModificationType.ADD.equals(modType)) {
  final ContentItem cp2Item = cp2Mod.getItem();
  if (cp2Item.getContentType().equals(ContentType.MODULE)) {
    final ModuleItem module = (ModuleItem) cp2Item;
    if(cp2Type.equals(ModificationType.REMOVE)) {
      try {
        elementBuilder.addModule(module.getName(), module.getSlot(), PatchUtils.getAbsentModuleContentHash(module));
origin: wildfly/wildfly-core

protected Patch generateCP(final String currentCP, final String nextCP, ModificationType type) {
  final PatchBuilder patchBuilder = PatchBuilder.create().setPatchId(nextCP).setDescription(nextCP + " description");
  patchBuilder.upgradeIdentity("identity", currentCP, nextCP);
  final PatchElementBuilder elementBuilder = patchBuilder.upgradeElement("base-" + nextCP, "base", false);
  if(ModificationType.ADD.equals(type)) {
    elementBuilder.addModule("org.jboss.test", "main", moduleHash(nextCP))
      .addBundle("org.jboss.test", "main", bundleHash(nextCP))
      .addFile("test.txt", Arrays.asList(new String[]{"org","jboss","test"}), miscHash(nextCP), false);
  } else if(ModificationType.MODIFY.equals(type)) {
    elementBuilder.modifyModule("org.jboss.test", "main", moduleHash(currentCP), moduleHash(nextCP))
      .modifyBundle("org.jboss.test", "main", bundleHash(currentCP), bundleHash(nextCP))
      .modifyFile("test.txt", Arrays.asList(new String[]{"org","jboss","test"}), miscHash(currentCP), miscHash(nextCP), false);
  } else {
    elementBuilder.removeModule("org.jboss.test", "main", moduleHash(currentCP))
      .removeBundle("org.jboss.test", "main", bundleHash(currentCP))
      .removeFile("test.txt", Arrays.asList(new String[] { "org", "jboss", "test" }), miscHash(currentCP), false);
  }
  return patchBuilder.build();
}
org.jboss.as.patching.metadataModificationType

Most used methods

  • equals

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top 12 Jupyter Notebook extensions
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