Codota Logo
StringUtils.ok
Code IndexAdd Codota to your IDE (free)

How to use
ok
method
in
com.sun.enterprise.util.StringUtils

Best Java code snippets using com.sun.enterprise.util.StringUtils.ok (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.glassfish.cluster/cluster-admin

  private void setDefaults() {
    if (!StringUtils.ok(sshport)) {
      sshport = NodeUtils.NODE_DEFAULT_SSH_PORT;
    }
    if (!StringUtils.ok(sshuser)) {
      sshuser = NodeUtils.NODE_DEFAULT_SSH_USER;
    }
    if (!StringUtils.ok(installdir)) {
      installdir = NodeUtils.NODE_DEFAULT_INSTALLDIR;
    }
  }
}
origin: org.glassfish.main.core/kernel

  private String filterForbidden(String key, String value) {
    if(StringUtils.ok(key) && key.startsWith("javax.net.ssl.") && key.indexOf("password") >= 0)
      return "********";
    else
      return value;
  }
}
origin: org.glassfish.main.common/common-util

private static boolean needsQuoting(String path) {
  return ok(path)
      && (path.indexOf(' ') >= 0 || path.indexOf('\t') >= 0);
}
origin: org.glassfish.main.common/common-util

/**
 * Gets the GlassFish installation root (using property com.sun.aas.installRoot),
 *
 * @return path of GlassFish install root
 * @throws CommandException if the GlassFish install root is not found
 */
protected String getInstallRootPath() throws IOException {
  String installRootPath = System.getProperty(
      SystemPropertyConstants.INSTALL_ROOT_PROPERTY);
  if (!StringUtils.ok(installRootPath))
    throw new IOException("noInstallDirPath");
  return installRootPath;
}
origin: org.glassfish.common/common-util

/**
 * Gets the GlassFish installation root (using property com.sun.aas.installRoot),
 *
 * @return path of GlassFish install root
 * @throws CommandException if the GlassFish install root is not found
 */
protected String getInstallRootPath() throws IOException {
  String installRootPath = System.getProperty(
      SystemPropertyConstants.INSTALL_ROOT_PROPERTY);
  if (!StringUtils.ok(installRootPath))
    throw new IOException("noInstallDirPath");
  return installRootPath;
}
origin: org.glassfish.main.admin/launcher

private void setOsgiPort() {
  String s = sysProps.get("osgi.shell.telnet.port");
  // not configured
  if (!ok(s))
    return;
  try {
    osgiPort = Integer.parseInt(s);
  }
  catch (Exception e) {
    // already handled -- it is already set to -1
  }
}
Map<String, String> sysProps = new HashMap<String, String>();
origin: org.glassfish.main.core/kernel

private String simpleGetOutputData() {
  StringBuilder out = new StringBuilder();
  String tm = topMessage.getMessage();
  String body = sb.toString();
  if (ok(tm) && !ok(body))
    body = tm;
  if (ok(body)) {
    out.append(body);
  }
  return out.toString();
}
origin: org.glassfish.main.core/kernel

private void stripOperandFromArgs() {
  // remove the domain-name operand
  // it may not be here!
  if (args.length < 2 || !StringUtils.ok(serverName))
    return;
  int newlen = args.length - 1;
  if (serverName.equals(args[newlen])) {
    String[] newargs = new String[newlen];
    System.arraycopy(args, 0, newargs, 0, newlen);
    args = newargs;
  }
}
origin: org.glassfish.main.common/common-util

private boolean isJps(String id) {
  if (!ok(id)) {
    return false;
  }
  if (id.equals(getClass().getName())) {
    return true;
  }
  if (id.equals("sun.tools.jps.Jps")) {
    return true;
  }
  return false;
}
origin: org.glassfish.admin/config-api

private boolean skipToStartButNotPast(String startName, String stopName) throws XMLStreamException {
  if (!StringUtils.ok(startName) || !StringUtils.ok(stopName))
    throw new IllegalArgumentException();
  while (reader.hasNext()) {
    reader.next();
    // getLocalName() will throw an exception in many states.  Be careful!!
    if (reader.isStartElement() && startName.equals(reader.getLocalName()))
      return true;
    if (reader.isEndElement() && stopName.equals(reader.getLocalName()))
      return false;
  }
  return false;
}
origin: org.glassfish.main.core/kernel

private String notSoSimpleGetOutputData() {
  StringBuilder out = new StringBuilder();
  if (ok(actionDescription)) {
    out.append("Description: ").append(actionDescription);
  }
  write("", topMessage, out);
  return out.toString();
}
origin: org.glassfish.main.admin/admin-util

public final String getNode(final Server server) {
  if (server == null)
    return null;
  String node = server.getNodeRef();
  if (StringUtils.ok(node))
    return node;
  else
    return "no node";
}
origin: org.glassfish.admin/admin-util

public final String getNode(final Server server) {
  if (server == null)
    return null;
  String node = server.getNodeRef();
  if (StringUtils.ok(node))
    return node;
  else
    return "no node";
}
origin: org.glassfish.admin/config-api

/**
 * Note that dxpp.getClusterName() will definitely return null
 * for stand-alone instances.  This is normal.
 *
 * @return true if we want to filter out this cluster element
 */
private boolean handleCluster(XMLStreamReader reader) {
  String name = reader.getAttributeValue(null, NAME);
  String myCluster = dxpp.getClusterName();
  if (StringUtils.ok(myCluster) && myCluster.equals(name))
    return false;
  return true;
}
origin: org.glassfish.main.admin/config-api

/**
 * @return true if we want to filter out this server element
 */
private boolean handleServer(XMLStreamReader r) {
  String name = r.getAttributeValue(null, NAME);
  if (StringUtils.ok(name) && dxpp.getServerNames().contains(name))
    return false;
  return true;
}
origin: org.glassfish.main.admin/server-mgmt

private void setInstallRootDir() {
  String ir = System.getProperty(SystemPropertyConstants.INSTALL_ROOT_PROPERTY);
  if (!StringUtils.ok(ir))
    throw new RuntimeException(Strings.get("internal.error", "System Property not set: "
        + SystemPropertyConstants.INSTALL_ROOT_PROPERTY));
  installRootDir = SmartFile.sanitize(new File(ir));
  if (!installRootDir.isDirectory())
    throw new RuntimeException(Strings.get("internal.error",
        "Not a directory: " + installRootDir));
}
origin: org.glassfish.main.admin/server-mgmt

public void validate() {
  if (!StringUtils.ok(serviceName))
    serviceName = serverDirs.getServerName();
  date = new Date();
  setInstallRootDir();
  setLibDir();
  setAsadmin();
  osUser = System.getProperty("user.name");
  // used by SMF only
  fqsn = serverDirs.getServerName() + serverDirs.getServerParentDir().getPath().replace('/', '_');
  smfFullServiceName = SERVICE_NAME_PREFIX + serviceName;
}
origin: org.glassfish.main.cluster/cluster-admin

private String initializeInstance() {
  if (!StringUtils.ok(instanceName))
    return Strings.get("stop.instance.noInstanceName", cmdName);
  instance = helper.getServer(instanceName);
  if (instance == null)
    return Strings.get("stop.instance.noSuchInstance", instanceName);
  return null;
}
origin: org.glassfish.admin/config-api

ServerPorts(Domain domain, Server theServer) {
  Cluster cluster = null;
  Config config = null;
  if (theServer.isInstance())
    cluster = domain.getClusterForInstance(theServer.getName());
  String configName = theServer.getConfigRef();
  if (StringUtils.ok(configName))
    config = domain.getConfigNamed(configName);
  initialize(cluster, config, domain, theServer);
}
origin: org.glassfish.main.admin/config-api

ServerPorts(Domain domain, Server theServer) {
  Cluster cluster = null;
  Config config = null;
  if (theServer.isInstance())
    cluster = domain.getClusterForInstance(theServer.getName());
  String configName = theServer.getConfigRef();
  if (StringUtils.ok(configName))
    config = domain.getConfigNamed(configName);
  initialize(cluster, config, domain, theServer);
}
com.sun.enterprise.utilStringUtilsok

Popular methods of StringUtils

  • parseStringList
    Parses a string containing substrings separated from each other by the specified set of separator ch
  • cat
    Concatenate a list of strings, putting a separator in between each one. If the list is one string, t
  • quotePathIfNecessary
    Nightmares can result from using a path with a space in it! This method will enclose in the specifie
  • removeEnclosingQuotes
    Removes the quoting around a String.
  • replace
  • getStackTrace
  • isDoubleQuoted
  • isHex
  • isSingleQuoted
  • isToken
  • padLeft
  • padRight
  • padLeft,
  • padRight,
  • stripToken,
  • testHex,
  • testToLine,
  • toLines,
  • toShortClassName,
  • usage,
  • UpperCaseFirstLetter

Popular in Java

  • Start an intent from android
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • JTable (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now