Codota Logo
CommandModel$ParamModel.getParam
Code IndexAdd Codota to your IDE (free)

How to use
getParam
method
in
org.glassfish.api.admin.CommandModel$ParamModel

Best Java code snippets using org.glassfish.api.admin.CommandModel$ParamModel.getParam (Showing top 20 results out of 315)

  • Common ways to obtain CommandModel$ParamModel
private void myMethod () {
CommandModel$ParamModel c =
  • Codota IconCommandModel model;String paramName;model.getModelFor(paramName)
  • Smart code suggestions by Codota
}
origin: org.glassfish.main.admin/admin-cli

/**
 * Get ParamModel for short option name.
 */
private ParamModel lookupShortOption(char c) {
  // XXX - for now, fake it if no options
  if (options == null)
    return null;
  String sc = Character.toString(c);
  for (ParamModel od : options) {
    if (od.getParam().shortName().equals(sc))
      return od;
  }
  return null;
}
origin: org.glassfish.admin/admin-cli

/**
 * Get ParamModel for short option name.
 */
private ParamModel lookupShortOption(char c) {
  // XXX - for now, fake it if no options
  if (options == null)
    return null;
  String sc = Character.toString(c);
  for (ParamModel od : options) {
    if (od.getParam().shortName().equals(sc))
      return od;
  }
  return null;
}
origin: org.glassfish.main.common/glassfish-api

public boolean isParamId(String key) {
  if (getParam().primary()) {
    return "DEFAULT".equals(key) || getName().equalsIgnoreCase(key);
  }
  
  return getName().equalsIgnoreCase(key) ||
  getParam().shortName().equals(key) ||
  getParam().alias().equalsIgnoreCase(key);
}
origin: org.glassfish.common/common-util

@Override
public boolean isOptional(AnnotatedElement element, Param annotation) {
  String name = CommandModel.getParamName(annotation, element);
  CommandModel.ParamModel param = model.getModelFor(name);
  return param.getParam().optional();
}
origin: org.glassfish.main.common/common-util

@Override
public boolean isOptional(AnnotatedElement element, Param annotation) {
  String name = CommandModel.getParamName(annotation, element);
  CommandModel.ParamModel param = model.getModelFor(name);
  return param.getParam().optional();
}
origin: org.glassfish.main.admin/admin-util

/**
 * Get the ParamModel that corresponds to the operand
 * (primary parameter).  Return null if none.
 */
private ParamModel getOperandModel() {
  for (ParamModel pm : commandModel.getParameters()) {
    if (pm.getParam().primary())
      return pm;
  }
  return null;
}
origin: org.glassfish.main.admin/admin-cli

/**
 * Get the ParamModel that corresponds to the operand
 * (primary parameter).  Return null if none.
 */
protected ParamModel getOperandModel() {
  for (ParamModel pm : commandModel.getParameters()) {
    if (pm.getParam().primary())
      return pm;
  }
  return null;
}
origin: org.glassfish.main.core/kernel

@Override
public boolean isOptional(AnnotatedElement element, Param annotation) {
  String name = CommandModel.getParamName(annotation, element);
  CommandModel.ParamModel param = model.getModelFor(name);
  return param.getParam().optional();
}
origin: eclipse-ee4j/glassfish

public boolean isParamId(String key) {
  if (getParam().primary()) {
    return "DEFAULT".equals(key) || getName().equalsIgnoreCase(key);
  }
  
  return getName().equalsIgnoreCase(key) ||
  getParam().shortName().equals(key) ||
  getParam().alias().equalsIgnoreCase(key);
}
origin: fujitsu/launcher

@Override
public boolean isOptional(AnnotatedElement element, Param annotation) {
  String name = CommandModel.getParamName(annotation, element);
  CommandModel.ParamModel param = model.getModelFor(name);
  return param.getParam().optional();
}
origin: org.glassfish.admin/admin-util

/**
 * Get an option value, that might come from the command line
 * or from the environment.  Return the default value for the
 * option if not otherwise specified.
 */
private String getOption(String name) {
  String val = options.getOne(name);
  if (val == null)
    val = getFromEnvironment(name);
  if (val == null) {
    // no value, find the default
    ParamModel opt = commandModel.getModelFor(name);
    // if no value was specified and there's a default value, return it
    if (opt != null) {
      String def = opt.getParam().defaultValue();
      if (ok(def))
        val = def;
    }
  }
  return val;
}
origin: org.glassfish.main.admin/admin-util

/**
 * Get the ParamModel that corresponds to the operand
 * (primary parameter).  Return null if none.
 */
private ParamModel getOperandModel() {
  for (ParamModel pm : commandModel.getParameters()) {
    if (pm.getParam().primary())
      return pm;
  }
  return null;
}
origin: org.glassfish.main.admin/admin-cli

/**
 * Get ParamModel for long option name.
 */
private ParamModel lookupLongOption(String s) {
if (s == null || s.length() == 0)
  return null;
  // XXX - for now, fake it if no options
  if (options == null) {
    // no valid options specified so everything is valid
    return new ParamModelData(s, String.class, true, null);
  }
  for (ParamModel od : options) {
    if (od.getParam().primary())
  continue;
    if (s.equalsIgnoreCase(od.getName()))
      return od;
  if (s.equalsIgnoreCase(od.getParam().alias()))
      return od;
  }
  return null;
}
origin: org.glassfish.admin/cli-optional

public void validatePassword(String password, ParamModel pwdOpt)
    throws CommandValidationException {
  // XXX - hack alert!  the description is stored in the default value
  String description = pwdOpt.getParam().defaultValue();
  if (!ok(description))
    description = pwdOpt.getName();
  if (password == null)
    throw new CommandValidationException(
              strings.get("PasswordMissing", description));
}
origin: org.glassfish.admin/admin-cli

/**
 * Get an option value, that might come from the command line
 * or from the environment.  Return the default value for the
 * option if not otherwise specified.
 */
protected String getOption(String name) {
  String val = options.getOne(name);
  if (val == null)
    val = env.getStringOption(name);
  if (val == null) {
    // no value, find the default
    ParamModel opt = commandModel.getModelFor(name);
    // if no value was specified and there's a default value, return it
    if (opt != null) {
      String def = opt.getParam().defaultValue();
      if (ok(def))
        val = def;
    }
  }
  return val;
}
origin: org.glassfish.admin/admin-cli

/**
 * Get the ParamModel that corresponds to the operand
 * (primary parameter).  Return null if none.
 */
protected ParamModel getOperandModel() {
  for (ParamModel pm : commandModel.getParameters()) {
    if (pm.getParam().primary())
      return pm;
  }
  return null;
}
origin: org.glassfish.main.admin/admin-util

/**
 * Get an option value, that might come from the command line
 * or from the environment.  Return the default value for the
 * option if not otherwise specified.
 */
private String getOption(String name) {
  String val = options.getOne(name);
  if (val == null)
    val = getFromEnvironment(name);
  if (val == null) {
    // no value, find the default
    ParamModel opt = commandModel.getModelFor(name);
    // if no value was specified and there's a default value, return it
    if (opt != null) {
      String def = opt.getParam().defaultValue();
      if (ok(def))
        val = def;
    }
  }
  return val;
}
origin: org.glassfish.admin/admin-util

/**
 * Get the ParamModel that corresponds to the operand
 * (primary parameter).  Return null if none.
 */
private ParamModel getOperandModel() {
  for (ParamModel pm : commandModel.getParameters()) {
    if (pm.getParam().primary())
      return pm;
  }
  return null;
}
origin: org.glassfish.admin/admin-cli

/**
 * Get ParamModel for long option name.
 */
private ParamModel lookupLongOption(String s) {
if (s == null || s.length() == 0)
  return null;
  // XXX - for now, fake it if no options
  if (options == null) {
    // no valid options specified so everything is valid
    return new ParamModelData(s, String.class, true, null);
  }
  for (ParamModel od : options) {
    if (od.getParam().primary())
  continue;
    if (s.equalsIgnoreCase(od.getName()))
      return od;
  if (s.equalsIgnoreCase(od.getParam().alias()))
      return od;
  }
  return null;
}
origin: eclipse-ee4j/glassfish

@Override
public boolean isOptional(AnnotatedElement element, Param annotation) {
  String name = CommandModel.getParamName(annotation, element);
  CommandModel.ParamModel param = model.getModelFor(name);
  return param.getParam().optional();
}
org.glassfish.api.adminCommandModel$ParamModelgetParam

Javadoc

Returns the command @Param annotation values.

Popular methods of CommandModel$ParamModel

  • getName
    Returns the command parameter name.
  • getType
    Returns the parameter type.
  • isParamId
  • getLocalizedDescription
    Returns a localized description for this parameter

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Option (scala)
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