@Override public RabbitBrokerImpl getEntity() { return (RabbitBrokerImpl) super.getEntity(); }
@Override public PostgreSqlNodeImpl getEntity() { return (PostgreSqlNodeImpl) super.getEntity(); }
@Override public BindDnsServerImpl getEntity() { return (BindDnsServerImpl) super.getEntity(); }
@Override public NginxControllerImpl getEntity() { return (NginxControllerImpl) super.getEntity(); }
public MariaDbNodeImpl getEntity() { return (MariaDbNodeImpl) super.getEntity(); } public int getPort() { return getEntity().getPort(); }
public MySqlNodeImpl getEntity() { return (MySqlNodeImpl) super.getEntity(); } public int getPort() { return getEntity().getPort(); }
/** * Name to be used in the local repo, when looking for the download file. * If null, will */ public String getDownloadFilename() { return getEntity().getEntityType().getSimpleName().toLowerCase() + "-"+getVersion() + ".tar.gz"; }
public String getVersion() { return elvis(getEntity().getConfig(SoftwareProcess.SUGGESTED_VERSION), getDefaultVersion()); }
/** 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; }