Tabnine Logo
Branch.isDisabled
Code IndexAdd Tabnine to your IDE (free)

How to use
isDisabled
method
in
net.nemerosa.ontrack.model.structure.Branch

Best Java code snippets using net.nemerosa.ontrack.model.structure.Branch.isDisabled (Showing top 4 results out of 315)

origin: net.nemerosa.ontrack/ontrack-model

@Override
public boolean isDisabled() {
  return branch.isDisabled() || branch.getProject().isDisabled();
}
origin: net.nemerosa.ontrack/ontrack-service

protected BranchTemplateSyncResult applyMissingPolicy(Branch branch, TemplateSynchronisationAbsencePolicy absencePolicy) {
  if (branch.isDisabled()) {
    return BranchTemplateSyncResult.ignored(branch.getName());
  } else {
    switch (absencePolicy) {
      case DELETE:
        structureService.deleteBranch(branch.getId());
        return BranchTemplateSyncResult.deleted(branch.getName());
      case DISABLE:
      default:
        structureService.saveBranch(branch.withDisabled(true));
        return BranchTemplateSyncResult.disabled(branch.getName());
    }
  }
}
origin: net.nemerosa.ontrack/ontrack-repository-impl

@Override
public void saveBranch(Branch branch) {
  // Update
  try {
    getNamedParameterJdbcTemplate().update(
        "UPDATE BRANCHES SET NAME = :name, DESCRIPTION = :description, DISABLED = :disabled WHERE ID = :id",
        params("name", branch.getName())
            .addValue("description", branch.getDescription())
            .addValue("disabled", branch.isDisabled())
            .addValue("id", branch.id())
    );
  } catch (DuplicateKeyException ex) {
    throw new BranchNameAlreadyDefinedException(branch.getName());
  }
}
origin: net.nemerosa.ontrack/ontrack-repository-impl

@Override
public Branch newBranch(Branch branch) {
  // Creation
  try {
    int id = dbCreate(
        "INSERT INTO BRANCHES(PROJECTID, NAME, DESCRIPTION, DISABLED, CREATION, CREATOR) VALUES (:projectId, :name, :description, :disabled, :creation, :creator)",
        params("name", branch.getName())
            .addValue("description", branch.getDescription())
            .addValue("disabled", branch.isDisabled())
            .addValue("projectId", branch.getProject().id())
            .addValue("creation", dateTimeForDB(branch.getSignature().getTime()))
            .addValue("creator", branch.getSignature().getUser().getName())
    );
    // Returns with ID
    return branch.withId(id(id));
  } catch (DuplicateKeyException ex) {
    throw new BranchNameAlreadyDefinedException(branch.getName());
  }
}
net.nemerosa.ontrack.model.structureBranchisDisabled

Popular methods of Branch

  • getProject
  • getName
  • getId
  • getType
  • id
  • of
  • projectId
  • withDisabled
  • getDescription
  • getSignature
  • withId
  • <init>
  • withId,
  • <init>,
  • form,
  • withDescription,
  • withSignature,
  • withType

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Permission (java.security)
    Legacy security code; do not use.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Top plugins for WebStorm
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