Tabnine Logo
StringConfigMap.getFirst
Code IndexAdd Tabnine to your IDE (free)

How to use
getFirst
method
in
brooklyn.config.StringConfigMap

Best Java code snippets using brooklyn.config.StringConfigMap.getFirst (Showing top 3 results out of 315)

origin: io.brooklyn/brooklyn-rest

private synchronized void initialize() {
  if (allowedUsers!=null) return;
  StringConfigMap properties = mgmt.getConfig();
  allowedUsers = new LinkedHashSet<String>();
  String users = properties.getConfig(BrooklynWebConfig.SECURITY_PROVIDER_EXPLICIT__USERS);
  if (users==null) {
    LOG.info("Web console allowing default user (admin)");
    allowDefaultUsers = true;
  } else if ("*".equals(users)) {
    LOG.info("Web console allowing any users");
    allowAnyUserWithValidPass = true;
  } else {
    LOG.info("Web console allowing users "+users);
    StringTokenizer t = new StringTokenizer(users, ",");
    while (t.hasMoreElements()) {
      allowedUsers.add((""+t.nextElement()).trim());
    }
  }       
  if (properties.getFirst(BrooklynServiceAttributes.BROOKLYN_AUTOLOGIN_USERNAME)!=null) {
    LOG.warn("Use of legacy AUTOLOGIN; replace with setting BrooklynSystemProperties.SECURITY_PROVIDER to "+AnyoneSecurityProvider.class.getCanonicalName());
    allowAnyUser = true;
  }
}

origin: io.brooklyn/brooklyn-software-base

public String getInstallDir() {
  // Cache it; evaluate lazily (and late) to ensure managementContext.config is accessible and completed its setup
  // Caching has the benefit that the driver is usable, even if the entity is unmanaged (useful in some tests!)
  if (installDir == null) {
    String installBasedir = ((EntityInternal)entity).getManagementContext().getConfig().getFirst("brooklyn.dirs.install");
    if (installBasedir == null) installBasedir = DEFAULT_INSTALL_BASEDIR;
    if (installBasedir.endsWith(File.separator)) installBasedir.substring(0, installBasedir.length()-1);
    
    installDir = elvis(entity.getConfig(SoftwareProcess.SUGGESTED_INSTALL_DIR),
        installBasedir+"/"+getEntityVersionLabel("/"));
  }
  return installDir;
}

origin: io.brooklyn/brooklyn-software-base

public String getRunDir() {
  if (runDir == null) {
    String runBasedir = ((EntityInternal)entity).getManagementContext().getConfig().getFirst("brooklyn.dirs.run");
    if (runBasedir == null) runBasedir = DEFAULT_RUN_BASEDIR;
    if (runBasedir.endsWith(File.separator)) runBasedir.substring(0, runBasedir.length()-1);
    
    runDir = elvis(entity.getConfig(SoftwareProcess.SUGGESTED_RUN_DIR), 
        runBasedir+"/"+entity.getApplication().getId()+"/"+"entities"+"/"+
        getEntityVersionLabel()+"_"+entity.getId());
  }
  return runDir;
}
brooklyn.configStringConfigMapgetFirst

Javadoc

returns the value of the first key which is defined

takes the following flags: 'warnIfNone' or 'failIfNone' (both taking a boolean (to use default message) or a string (which is the message)); and 'defaultIfNone' (a default value to return if there is no such property); defaults to no warning and null default value

Popular methods of StringConfigMap

  • getConfig
  • asMapWithStringKeys
  • getRawConfig
  • getAllConfig
  • submap

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JComboBox (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • From CI to AI: The AI layer in your organization
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