congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top PhpStorm plugins
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