congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
StringConfigMap.getConfig
Code IndexAdd Tabnine to your IDE (free)

How to use
getConfig
method
in
brooklyn.config.StringConfigMap

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

origin: io.brooklyn/brooklyn-launcher

public boolean getHttpsEnabled() {
  if (httpsEnabled!=null) return httpsEnabled;
  httpsEnabled = managementContext.getConfig().getConfig(BrooklynWebConfig.HTTPS_REQUIRED);
  return httpsEnabled;
}

origin: io.brooklyn/brooklyn-rest

public LdapSecurityProvider(ManagementContext mgmt) {
  StringConfigMap properties = mgmt.getConfig();
  ldapUrl = properties.getConfig(BrooklynWebConfig.LDAP_URL);
  Strings.checkNonEmpty(ldapUrl, "LDAP security provider configuration missing required property "+BrooklynWebConfig.LDAP_URL);
  ldapRealm = properties.getConfig(BrooklynWebConfig.LDAP_REALM);
  Strings.checkNonEmpty(ldapRealm, "LDAP security provider configuration missing required property "+BrooklynWebConfig.LDAP_REALM);
}
origin: io.brooklyn/brooklyn-launcher

/**
 * accepts flags:  port,
 * war (url of war file which is the root),
 * wars (map of context-prefix to url),
 * attrs (map of attribute-name : object pairs passed to the servlet)
 */
public BrooklynWebServer(Map flags, ManagementContext managementContext) {
  this.managementContext = managementContext;
  Map leftovers = FlagUtils.setFieldsFromFlags(flags, this);
  if (!leftovers.isEmpty())
    log.warn("Ignoring unknown flags " + leftovers);
  
  String brooklynDataDir = checkNotNull(managementContext.getConfig().getConfig(BrooklynConfigKeys.BROOKLYN_DATA_DIR));
  this.webappTempDir = new File(brooklynDataDir, "jetty");
}
origin: io.brooklyn/brooklyn-rest-server

public LdapSecurityProvider(ManagementContext mgmt) {
  StringConfigMap properties = mgmt.getConfig();
  ldapUrl = properties.getConfig(BrooklynWebConfig.LDAP_URL);
  Strings.checkNonEmpty(ldapUrl, "LDAP security provider configuration missing required property "+BrooklynWebConfig.LDAP_URL);
  ldapRealm = properties.getConfig(BrooklynWebConfig.LDAP_REALM);
  Strings.checkNonEmpty(ldapRealm, "LDAP security provider configuration missing required property "+BrooklynWebConfig.LDAP_REALM);
}
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-rest-server

@SuppressWarnings("deprecation")
private synchronized void initialize() {
  if (allowedUsers!=null) return;
  StringConfigMap properties = mgmt.getConfig();
  allowedUsers = new LinkedHashSet<String>();
  String users = properties.getConfig(BrooklynWebConfig.USERS);
  if (users==null) {
    users = properties.getConfig(BrooklynWebConfig.SECURITY_PROVIDER_EXPLICIT__USERS);
    if (users!=null) 
      LOG.warn("Using deprecated config key "+BrooklynWebConfig.SECURITY_PROVIDER_EXPLICIT__USERS.getName()+"; " +
        "use "+BrooklynWebConfig.USERS.getName()+" instead");
  }
  if (users==null) {
    LOG.warn("Web console has no users configured; no one will be able to log in!");
  } else if ("*".equals(users)) {
    LOG.info("Web console allowing any user (so long as valid password is set)");
    allowAnyUserWithValidPass = true;
  } else {
    StringTokenizer t = new StringTokenizer(users, ",");
    while (t.hasMoreElements()) {
      allowedUsers.add((""+t.nextElement()).trim());
    }
    LOG.info("Web console allowing users: "+allowedUsers);
  }       
}

origin: io.brooklyn/brooklyn-rest-server

String className = brooklynProperties.getConfig(BrooklynWebConfig.SECURITY_PROVIDER_CLASSNAME);
log.info("Web console using security provider "+className);
origin: io.brooklyn/brooklyn-rest

String className = brooklynProperties.getConfig(BrooklynWebConfig.SECURITY_PROVIDER_CLASSNAME);
log.info("Web console using security provider "+className);
origin: io.brooklyn/brooklyn-core

  public DownloadTargets apply(DownloadRequirement req) {
    Boolean enabled = config.getConfig(LOCAL_REPO_ENABLED);
    String path = config.getConfig(LOCAL_REPO_PATH);
    String url = String.format(LOCAL_REPO_URL_PATTERN, path);
    
    if (enabled) {
      Map<String, ?> subs = DownloadSubstituters.getBasicSubstitutions(req);
      String result = DownloadSubstituters.substitute(url, subs);
      return BasicDownloadTargets.builder().addPrimary(result).build();
      
    } else {
      return BasicDownloadTargets.empty();
    }
  }
}
origin: io.brooklyn/brooklyn-core

  public DownloadTargets apply(DownloadRequirement req) {
    Boolean enabled = config.getConfig(CLOUDSOFT_REPO_ENABLED);
    String baseUrl = config.getConfig(CLOUDSOFT_REPO_URL);
    String url = String.format(CLOUDSOFT_REPO_URL_PATTERN, baseUrl);
    
    if (enabled) {
      Map<String, ?> subs = DownloadSubstituters.getBasicSubstitutions(req);
      String result = DownloadSubstituters.substitute(url, subs);
      return BasicDownloadTargets.builder().addPrimary(result).build();
      
    } else {
      return BasicDownloadTargets.empty();
    }
  }
}
origin: io.brooklyn/brooklyn-core

String catalogUrl = getConfig().getConfig(BROOKLYN_CATALOG_URL);
origin: io.brooklyn/brooklyn-software-base

/** extracts the values for the main brooklyn.ssh.config.* config keys (i.e. those declared in ConfigKeys) 
 * as declared on the entity, and inserts them in a map using the unprefixed state, for ssh. */
/* currently this is computed for each call, which may be wasteful, but it is reliable in the face of config changes. 
 * we could cache the Map.  note that we do _not_ cache (or even own) the SshTool; 
 * the SshTool is created or re-used by the SshMachineLocation making use of these properties */
protected Map<String, Object> getSshFlags() {
  Map<String, Object> result = Maps.newLinkedHashMap();
  StringConfigMap globalConfig = ((EntityInternal)getEntity()).getManagementContext().getConfig();
  Map<ConfigKey<?>, Object> mgmtConfig = globalConfig.getAllConfig();
  Map<ConfigKey<?>, Object> entityConfig = ((EntityInternal)getEntity()).getAllConfig();
  Map<ConfigKey<?>, Object> allConfig = MutableMap.<ConfigKey<?>, Object>builder().putAll(mgmtConfig).putAll(entityConfig).build();
  
  for (ConfigKey<?> key : allConfig.keySet()) {
    if (key.getName().startsWith(SshTool.BROOKLYN_CONFIG_KEY_PREFIX)) {
      // have to use raw config to test whether the config is set
      Object val = ((EntityInternal)getEntity()).getConfigMap().getRawConfig(key);
      if (val!=null) {
        val = getEntity().getConfig(key);
      } else {
        val = globalConfig.getRawConfig(key);
        if (val!=null) val = globalConfig.getConfig(key);
      }
      if (val!=null) {
        result.put(ConfigUtils.unprefixedKey(SshTool.BROOKLYN_CONFIG_KEY_PREFIX, key).getName(), val);
      }
    }
  }
  return result;
}
brooklyn.configStringConfigMapgetConfig

Popular methods of StringConfigMap

  • asMapWithStringKeys
  • getFirst
  • getRawConfig
  • getAllConfig
  • submap

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now