Tabnine Logo
StringUtil.isEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
isEmpty
method
in
jetbrains.buildServer.util.StringUtil

Best Java code snippets using jetbrains.buildServer.util.StringUtil.isEmpty (Showing top 7 results out of 315)

origin: JetBrains/teamcity-s3-artifact-storage-plugin

public static String normalizeArtifactPath(final String path, final File file) {
 if (StringUtil.isEmpty(path)) {
  return file.getName();
 } else {
  return FileUtil.normalizeRelativePath(String.format("%s/%s", path, file.getName()));
 }
}
origin: JetBrains/teamcity-s3-artifact-storage-plugin

 @NotNull
 public static String writeS3ObjectKeys(@NotNull Collection<String> s3ObjectKeys) throws IOException {
  Element rootElement = new Element(S3_OBJECT_KEYS);
  for (String s3ObjectKey : s3ObjectKeys){
   if(StringUtil.isEmpty(s3ObjectKey)) continue;
   Element xmlElement = new Element(S3_OBJECT_KEY);
   xmlElement.addContent(s3ObjectKey);
   rootElement.addContent(xmlElement);
  }
  return JDOMUtil.writeDocument(new Document(rootElement), System.getProperty("line.separator"));
 }
}
origin: JetBrains/teamcity-s3-artifact-storage-plugin

final Map<String, String> settings = build.getArtifactStorageSettings();
final String bucketName = S3Util.getBucketName(settings);
if (StringUtil.isEmpty(bucketName)) {
 throw new IllegalArgumentException("S3 bucket name must not be empty");
origin: tcplugins/tcWebHooks

public ProjectWebhook findWebHookById(String projectExternalId, String webHookLocator, final @NotNull Fields fields, @NotNull final BeanContext beanContext) {
  if (StringUtil.isEmpty(webHookLocator)) {
    throw new BadRequestException("Empty webhook locator is not supported.");
  }
  final Locator locator = new Locator(webHookLocator, "id",
      Locator.LOCATOR_SINGLE_VALUE_UNUSED_NAME);
  if (locator.isSingleValue()) {
    // no dimensions found, assume it's a name or internal id or
    // external id
    @NotNull final String singleValue = locator.getSingleValue();		
    return getWebHookConfigById(projectExternalId, fields, beanContext, singleValue);
  } else if (locator.getSingleDimensionValue("id") != null){
    @NotNull final String webHookId = locator.getSingleDimensionValue("id");			
    return getWebHookConfigById(projectExternalId, fields, beanContext, webHookId);
  }
  
  throw new BadRequestException("Sorry: Searching for multiple template is not supported.");		
}
origin: tcplugins/tcWebHooks

public WebHookTemplateItemConfigWrapper findTemplateByIdAndTemplateContentById(String templateLocator, String templateContentLocator) {
  
  WebHookTemplateConfigWrapper templateConfigWrapper =  findTemplateById(templateLocator);
  
  if (StringUtil.isEmpty(templateLocator)) {
    throw new BadRequestException("Empty template locator is not supported.");
  }
  final Locator locator = new Locator(templateContentLocator, "id", "name",
      Locator.LOCATOR_SINGLE_VALUE_UNUSED_NAME);
  if (locator.isSingleValue()) {
    // no dimensions found, assume it's a name or id without "id:"
    @NotNull
    final String templateId = locator.getSingleValue();
    return buildWebHookTemplateItemConfigWrapper(templateConfigWrapper, templateId);
  } else if (locator.getSingleDimensionValue("id") != null){
    @NotNull
    final String templateId = locator.getSingleDimensionValue("id");
    return buildWebHookTemplateItemConfigWrapper(templateConfigWrapper, templateId);
  } else {
    throw new BadRequestException("Sorry: Searching for multiple templates is not supported.");
  }
  
}
origin: tcplugins/tcWebHooks

public WebHookTemplateConfigWrapper findTemplateById(String templateLocator) {
  if (StringUtil.isEmpty(templateLocator)) {
    throw new BadRequestException("Empty template locator is not supported.");
origin: PeteGoo/tcSlackBuildNotifier

public void getFromConfig(SlackNotification slackNotification, SlackNotificationConfig slackNotificationConfig){
  slackNotification.setChannel(StringUtil.isEmpty(slackNotificationConfig.getChannel()) ? myMainSettings.getDefaultChannel() : slackNotificationConfig.getChannel());
  slackNotification.setTeamName(myMainSettings.getTeamName());
  slackNotification.setToken(StringUtil.isEmpty(slackNotificationConfig.getToken()) ? myMainSettings.getToken() : slackNotificationConfig.getToken());
  slackNotification.setIconUrl(myMainSettings.getIconUrl());
  slackNotification.setBotName(myMainSettings.getBotName());
jetbrains.buildServer.utilStringUtilisEmpty

Popular methods of StringUtil

  • isNotEmpty
  • isEmptyOrSpaces
  • emptyIfNull
  • join
  • notEmpty
  • nullIfEmpty
  • pluralize

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • compareTo (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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