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

How to use
StringUtils
in
com.axway.ats.core.utils

Best Java code snippets using com.axway.ats.core.utils.StringUtils (Showing top 20 results out of 315)

origin: com.axway.ats.framework/ats-core

public String getStatusCommandStdOutSearchToken() {
  if (StringUtils.isNullOrEmpty(statusCommandInfo.stdoutSearchToken)) {
    return null;
  } else {
    return statusCommandInfo.stdoutSearchToken;
  }
}
origin: com.axway.ats.framework/ats-core

/**
 * Get the MD5 sum of a content passed as String
 *
 * @param data
 * @return the MD5 sum
 */
public static String md5sum( String data ) {
  byte[] defaultBytes = data.getBytes();
  try {
    MessageDigest algorithm = MessageDigest.getInstance("MD5");
    algorithm.reset();
    algorithm.update(defaultBytes);
    byte messageDigest[] = algorithm.digest();
    return byteArray2Hex(messageDigest);
  } catch (NoSuchAlgorithmException nsae) {
    throw new RuntimeException(nsae);
  }
}
origin: com.axway.ats.framework/ats-actionlibrary

/**
 * Set the authentication username and password used for HTTP Basic, HTTP Digest,
 * or SPNEGO authentication.
 *
 * @param username The username
 * @param password The password
 */
@PublicAtsApi
public void setAuthorization( String username, String password ) {
  if (!StringUtils.equals(this.username, username) || !StringUtils.equals(this.password, password)) {
    this.username = username;
    this.password = password;
    invalidateInternalClient();
  }
}
origin: com.axway.ats.framework/ats-core

if (columnDescription.getType() != null && (columnDescription.isTypeBinary())) {
  recordValueString = "md5:" + StringUtils.md5sum(recordValueString);
origin: com.axway.ats.framework/ats-uiengine

  /**
   * Verify the specified value is NOT selected
   *
   * @param notExpectedValue
   * @throws VerificationException if the element doesn't exist
   * @throws VerifyNotEqualityException if the verification fails
   */
  @Override
  @PublicAtsApi
  public void verifyNotValue( String notExpectedValue ) {

    new SwingElementState(this).waitToBecomeExisting();

    JListFixture listFixture = ((JListFixture) SwingElementLocator.findFixture(this));
    String selectedValue = (String) listFixture.component().getSelectedValue();

    if ( (notExpectedValue == null && selectedValue == null)
       || (StringUtils.isNotNullAndEquals(selectedValue, notExpectedValue))) {

      throw new VerifyNotEqualityException(notExpectedValue, this);
    }
  }
}
origin: com.axway.ats.framework/ats-core

public String getStopCommandStdOutSearchToken() {
  if (StringUtils.isNullOrEmpty(stopCommandInfo.stdoutSearchToken)) {
    return null;
  } else {
    return stopCommandInfo.stdoutSearchToken;
  }
}
origin: com.axway.ats.framework/ats-actionlibrary

/**
 * Set the authentication username and password used for HTTP Basic, HTTP Digest,
 * or SPNEGO authentication.
 *
 * @param username The username
 * @param password The password
 * @param authType Set to 'always' if the HTTP Basic Authorization header should
 *                 be sent preemptively, i.e. without waiting for the server challenge.
 */
@PublicAtsApi
public void setAuthorization( String username, String password, AuthType authType ) {
  if (!StringUtils.equals(this.username, username) || !StringUtils.equals(this.password, password)
    || this.authType != authType) {
    this.username = username;
    this.password = password;
    this.authType = authType;
    invalidateInternalClient();
  }
}
origin: com.axway.ats.framework/ats-core

return StringUtils.byteArray2Hex(digest.digest());
origin: com.axway.ats.framework/ats-core

public String getJavaExecutableToken() {
  String javaExeToken = "";
  if (!StringUtils.isNullOrEmpty(javaExecutable)) {
    javaExeToken = " -java_exec \"" + javaExecutable + "\"";
  }
  return javaExeToken;
}
origin: com.axway.ats.framework/ats-core

public ShellCommand( String alias, String command ) {
  if (!StringUtils.isNullOrEmpty(alias)) {
    this.alias = alias;
  }
  this.command = command;
}
origin: com.axway.ats.framework/ats-core

public String getPortToken() {
  String portToken = "";
  if (!StringUtils.isNullOrEmpty(port)) {
    portToken = " -port " + port;
  }
  return portToken;
}
origin: com.axway.ats.framework/ats-core

public String getStatusCommand() {
  if (StringUtils.isNullOrEmpty(statusCommandInfo.command)) {
    return null;
  } else {
    return statusCommandInfo.command;
  }
}
origin: com.axway.ats.framework/ats-core

public String getStartCommandStdOutSearchToken() {
  if (StringUtils.isNullOrEmpty(startCommandInfo.stdoutSearchToken)) {
    return null;
  } else {
    return startCommandInfo.stdoutSearchToken;
  }
}
origin: com.axway.ats.framework/ats-core

public String getStatusCommandUrl() {
  if (StringUtils.isNullOrEmpty(statusCommandInfo.url)) {
    return null;
  } else {
    return statusCommandInfo.url;
  }
}
origin: com.axway.ats.framework/ats-core

public String getStatusCommandUrlSearchToken() {
  if (StringUtils.isNullOrEmpty(statusCommandInfo.urlSearchToken)) {
    return null;
  } else {
    return statusCommandInfo.urlSearchToken;
  }
}
origin: com.axway.ats.framework/ats-core

public String getStopCommand() {
  if (StringUtils.isNullOrEmpty(stopCommandInfo.command)) {
    return null;
  } else {
    return stopCommandInfo.command;
  }
}
origin: com.axway.ats.framework/ats-core

public String getMemoryToken() {
  String memoryToken = "";
  if (!StringUtils.isNullOrEmpty(memory)) {
    memoryToken = " -memory " + memory;
  }
  return memoryToken;
}
origin: com.axway.ats.framework/ats-core

public String getStartCommand() {
  if (StringUtils.isNullOrEmpty(startCommandInfo.command)) {
    return null;
  } else {
    return startCommandInfo.command;
  }
}
origin: com.axway.ats.framework/ats-core

@Override
public void setName( String newName ) {
  /*
   * This method is called only when loading a snapshot from a file.
   * In such case, user can overwrite the snapshot name coming from the file.
   */
  if (StringUtils.isNullOrEmpty(name)) {
    // user wants to use the snapshot name as comes from the file
    return;
  } else {
    // user wants to overwrite the snapshot name coming from the file.
    this.name = newName;
  }
}
origin: com.axway.ats.framework/ats-log

public UpdateTestcaseEvent( String loggerFQCN, Logger logger, int testcaseId, String suiteFullName,
              String suiteSimpleName, String scenarioName, String inputArguments,
              String scenarioDescription, String userNote, int testcaseResult,
              long timestamp ) {
  super(loggerFQCN, logger,
     "Update testcase with id '" + testcaseId + "'",
     suiteFullName, suiteSimpleName, scenarioName, inputArguments, scenarioDescription,
     LoggingEventType.UPDATE_TEST_CASE);
  this.testcaseId = testcaseId;
  this.testcaseResult = testcaseResult;
  this.userNote = userNote;
  if (StringUtils.isNullOrEmpty(scenarioName) || StringUtils.isNullOrEmpty(inputArguments)) {
    this.testcaseName = null;
  }
}
com.axway.ats.core.utilsStringUtils

Javadoc

Some basic utility methods working with String

Most used methods

  • isNullOrEmpty
    Tests if a string is null or empty
  • byteArray2Hex
    Convert a byte array to a hex representation
  • equals
    Tests if 2 strings are equal. Works OK when null string is passed
  • isNotNullAndEquals
    Tests if 2 strings are equal, but given they are not null
  • md5sum
    Get the MD5 sum of a content passed as String
  • methodInputArgumentsToString
    Convert method's input arguments into a single String
  • parseCommandLineArguments
    Parsing command and its arguments
  • trimAndQuoteStringArgument
    Trim and add quotes to a string argument

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • 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