Codota Logo
ConfigKey.defaultValue
Code IndexAdd Codota to your IDE (free)

How to use
defaultValue
method
in
org.apache.cloudstack.framework.config.ConfigKey

Best Java code snippets using org.apache.cloudstack.framework.config.ConfigKey.defaultValue (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: apache/cloudstack

public T value() {
  if (_value == null || isDynamic()) {
    ConfigurationVO vo = s_depot != null ? s_depot.global().findById(key()) : null;
    final String value = (vo != null && vo.getValue() != null) ? vo.getValue() : defaultValue();
    _value = ((value == null) ? (T)defaultValue() : valueOf(value));
  }
  return _value;
}
origin: apache/cloudstack

public ConfigurationVO(String component, ConfigKey<?> key) {
  this(key.category(), "DEFAULT", component, key.key(), key.defaultValue(), key.description());
  defaultValue = key.defaultValue();
  dynamic = key.isDynamic();
  scope = key.scope() != null ? key.scope().toString() : null;
}
origin: apache/cloudstack

private void createOrupdateConfigObject(Date date, String componentName, ConfigKey<?> key, String value) {
  ConfigurationVO vo = _configDao.findById(key.key());
  if (vo == null) {
    vo = new ConfigurationVO(componentName, key);
    vo.setUpdated(date);
    if (value != null) {
      vo.setValue(value);
    }
    _configDao.persist(vo);
  } else {
    if (vo.isDynamic() != key.isDynamic() || !ObjectUtils.equals(vo.getDescription(), key.description()) || !ObjectUtils.equals(vo.getDefaultValue(), key.defaultValue()) ||
      !ObjectUtils.equals(vo.getScope(), key.scope().toString()) ||
      !ObjectUtils.equals(vo.getComponent(), componentName)) {
      vo.setDynamic(key.isDynamic());
      vo.setDescription(key.description());
      vo.setDefaultValue(key.defaultValue());
      vo.setScope(key.scope().toString());
      vo.setComponent(componentName);
      vo.setUpdated(date);
      _configDao.persist(vo);
    }
  }
}
org.apache.cloudstack.framework.configConfigKeydefaultValue

Popular methods of ConfigKey

  • value
  • valueIn
  • key
  • category
  • description
  • toString
  • type
  • <init>
  • equals
  • init
  • isDynamic
  • multiplier
  • isDynamic,
  • multiplier,
  • scope,
  • valueOf

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • orElseThrow (Optional)
  • startActivity (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
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