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

How to use
NameDescription
in
net.nemerosa.ontrack.model.structure

Best Java code snippets using net.nemerosa.ontrack.model.structure.NameDescription (Showing top 20 results out of 315)

origin: net.nemerosa.ontrack/ontrack-model

  public NameDescription asNameDescription() {
    return NameDescription.nd(name, description);
  }
}
origin: net.nemerosa.ontrack/ontrack-model

/**
 * Simple builder
 */
public static NameDescription nd(String name, String description) {
  return new NameDescription(name, description);
}
origin: net.nemerosa.ontrack/ontrack-model

  public PromotionLevel update(NameDescription nameDescription) {
    return new PromotionLevel(
        id,
        nameDescription.getName(),
        nameDescription.getDescription(),
        branch,
        image,
        signature
    );
  }
}
origin: net.nemerosa.ontrack/ontrack-service

protected Branch createBranchForTemplateInstance(Branch templateBranch, String branchName) {
  return structureService.newBranch(
      Branch.of(
          templateBranch.getProject(),
          NameDescription.nd(
              NameDescription.escapeName(branchName),
              ""
          )
      )
  );
}
origin: net.nemerosa.ontrack/ontrack-service

  @Override
  public List<ApplicationInfo> getApplicationInfoList() {
    if (securityService.isGlobalFunctionGranted(ApplicationManagement.class)) {
      return logService.getLogEntries(
          new ApplicationLogEntryFilter().withLevel(ApplicationLogEntryLevel.FATAL),
          new Page(0, configProperties.getApplicationLogInfoMax())
      )
          .stream()
          .map(lge -> ApplicationInfo.error(
              lge.getType().getDescription()
          ))
          .collect(Collectors.toList());
    } else {
      return Collections.emptyList();
    }
  }
}
origin: net.nemerosa.ontrack/ontrack-model

public NameDescriptionState asState() {
  return asState(false);
}
origin: net.nemerosa.ontrack/ontrack-model

public static Branch of(Project project, NameDescription nameDescription) {
  return of(project, nameDescription.asState());
}
origin: net.nemerosa.ontrack/ontrack-model

public List<NameDescription> getDetailList() {
  return details.entrySet().stream()
      .map(entry -> NameDescription.nd(entry.getKey(), entry.getValue()))
      .collect(Collectors.toList());
}
origin: net.nemerosa.ontrack/ontrack-model

  public PredefinedPromotionLevel update(NameDescription nameDescription) {
    return new PredefinedPromotionLevel(
        id,
        nameDescription.getName(),
        nameDescription.getDescription(),
        image
    );
  }
}
origin: net.nemerosa.ontrack/ontrack-model

  public NameDescription asNameDescription() {
    return new NameDescription(name, description);
  }
}
origin: net.nemerosa.ontrack/ontrack-it-utils

public ValidationRun doValidateBuild(Build build, String vsName, ValidationRunStatusID statusId) throws Exception {
  ValidationStamp vs = doCreateValidationStamp(build.getBranch(), NameDescription.nd(vsName, ""));
  return doValidateBuild(build, vs, statusId);
}
origin: net.nemerosa.ontrack/ontrack-model

  public Build update(NameDescription nameDescription) {
    return new Build(
        id,
        nameDescription.getName(),
        nameDescription.getDescription(),
        signature,
        branch
    );
  }
}
origin: net.nemerosa.ontrack/ontrack-it-utils

public static NameDescription nameDescription() {
  String uid = uid("");
  return new NameDescription(
      uid,
      String.format("%s description", uid)
  );
}
origin: net.nemerosa.ontrack/ontrack-ui-support

  @Override
  public <T extends ProjectEntity> List<LinkDefinition<T>> getLinkDefinitions(ProjectEntityType projectEntityType) {
    List<LinkDefinition<T>> definitions = new ArrayList<>();
    contributors.forEach(contributor -> {
      if (contributor.applyTo(projectEntityType)) {
        try {
          @SuppressWarnings("unchecked")
          ResourceDecorationContributor<T> tResourceDecorationContributor = (ResourceDecorationContributor<T>) contributor;
          definitions.addAll(tResourceDecorationContributor.getLinkDefinitions());
        } catch (Exception ex) {
          // Logging
          logService.log(
              ApplicationLogEntry.fatal(
                  ex,
                  NameDescription.nd(
                      "ui-resource-decoration",
                      "Issue when collecting UI resource decoration"
                  ),
                  contributor.getClass().getName()
              )
                  .withDetail("ui-resource-type", projectEntityType.name())
                  .withDetail("ui-resource-decorator", contributor.getClass().getName())
          );
        }
      }
    });
    return definitions;
  }
}
origin: net.nemerosa.ontrack/ontrack-model

  public PredefinedValidationStamp update(NameDescription nameDescription) {
    return new PredefinedValidationStamp(
        id,
        nameDescription.getName(),
        nameDescription.getDescription(),
        image,
        dataType
    );
  }
}
origin: net.nemerosa.ontrack/ontrack-repository-impl

  protected PredefinedPromotionLevel toPredefinedPromotionLevel(ResultSet rs) throws SQLException {
    return PredefinedPromotionLevel.of(
        new NameDescription(
            rs.getString("name"),
            rs.getString("description")
        )
    ).withId(id(rs)).withImage(StringUtils.isNotBlank(rs.getString("imagetype")));
  }
}
origin: net.nemerosa.ontrack/ontrack-service

@Override
public void createTargetItem(PromotionLevel sourcePromotionLevel) {
  PromotionLevel targetPromotionLevel = structureService.newPromotionLevel(
      PromotionLevel.of(
          targetBranch,
          NameDescription.nd(
              sourcePromotionLevel.getName(),
              replacementFn.apply(sourcePromotionLevel.getDescription())
          )
      )
  );
  copyPromotionLevelContent(sourcePromotionLevel, targetPromotionLevel);
}
origin: net.nemerosa.ontrack/ontrack-model

public static Build of(Branch branch, NameDescription nameDescription, Signature signature) {
  return new Build(
      ID.NONE,
      nameDescription.getName(),
      nameDescription.getDescription(),
      signature,
      branch
  );
}
origin: net.nemerosa.ontrack/ontrack-repository-impl

  protected PredefinedValidationStamp toPredefinedValidationStamp(ResultSet rs) throws SQLException {
    return PredefinedValidationStamp.of(
        new NameDescription(
            rs.getString("name"),
            rs.getString("description")
        )
    )
        .withId(id(rs))
        .withDataType(validationDataTypeConfigRepository.readValidationDataTypeConfig(rs))
        .withImage(StringUtils.isNotBlank(rs.getString("imagetype")));
  }
}
origin: net.nemerosa.ontrack/ontrack-service

@Override
public void createTargetItem(ValidationStamp sourceValidationStamp) {
  ValidationStamp targetValidationStamp = structureService.newValidationStamp(
      ValidationStamp.of(
          targetBranch,
          NameDescription.nd(
              sourceValidationStamp.getName(),
              replacementFn.apply(sourceValidationStamp.getDescription())
          )
      )
  );
  copyValidationStampContent(sourceValidationStamp, targetValidationStamp);
}
net.nemerosa.ontrack.model.structureNameDescription

Most used methods

  • nd
    Simple builder
  • <init>
  • getDescription
  • getName
  • asState
  • escapeName
    Makes sure the given name is escaped properly before being used as a valid name.

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Option (scala)
  • CodeWhisperer alternatives
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