@Override public Set<Map.Entry<String, String>> entrySet() { completeMap(); return super.entrySet(); }
/** * Returns a string representation of the properties in the Map<String,String>. * Format: name=value\nname2=value2\n etc. * @return the string representation. */ @Override public String toString() { StringBuilder sb = new StringBuilder(); Set<String> keys = props.keySet(); for (String key : keys) { sb.append(key).append("=").append(props.get(key)).append('\n'); } return sb.toString(); }
@Override public String get(Object k) { String v = super.get(k); if (v != null) return v; if (k.equals(HOST_NAME_PROPERTY)) { v = getHostname(); put(HOST_NAME_PROPERTY, v); } else if (k.equals(JAVA_ROOT_PROPERTY)) { v = getJavaRoot(super.get(JAVA_ROOT_PROPERTY_ASENV)); put(JAVA_ROOT_PROPERTY, v); } return v; }
put(systemPropertyName, rhs);
put(key, f.getPath());
if (isValidJavaRoot(javaRootName)) return javaRootName; // we are already done! if (isValidJavaRoot(javaRootName)) if (isValidJavaRoot(javaRootName)) if (isValidJavaRoot(javaRootName))
put(key, f.getPath());
put(systemPropertyName, rhs);
put(systemPropertyName, rhs);
if (isValidJavaRoot(javaRootName)) return javaRootName; // we are already done! if (isValidJavaRoot(javaRootName)) if (isValidJavaRoot(javaRootName)) if (isValidJavaRoot(javaRootName))
if (isValidJavaRoot(javaRootName)) return javaRootName; // we are already done! if (isValidJavaRoot(javaRootName)) if (isValidJavaRoot(javaRootName)) if (isValidJavaRoot(javaRootName))
put(key, f.getPath());
/** * Read and process the information in asenv.[bat|conf] * This constructor should normally not be called. It is designed for * unit test classes that are not running from an official installation. * @param installDir The Glassfish installation directory */ public ASenvPropertyReader(File installDir) { synchronized (propsMap) { try { installDir = SmartFile.sanitize(installDir); props = propsMap.get(installDir); if (props == null) { props = new ASenvMap(installDir); propsMap.put(installDir, props); } } catch(Exception e) { // ignore -- this is universal utility code there isn't much we can // do. } } }
/** * Read and process the information in asenv.[bat|conf] * This constructor should normally not be called. It is designed for * unit test classes that are not running from an official installation. * @param installDir The Glassfish installation directory */ public ASenvPropertyReader(File installDir) { synchronized (propsMap) { try { installDir = SmartFile.sanitize(installDir); props = propsMap.get(installDir); if (props == null) { props = new ASenvMap(installDir); propsMap.put(installDir, props); } } catch(Exception e) { // ignore -- this is universal utility code there isn't much we can // do. } } }
/** * Read and process the information in asenv.[bat|conf] * This constructor should normally not be called. It is designed for * unit test classes that are not running from an official installation. * @param installDir The Glassfish installation directory */ public ASenvPropertyReader(File installDir) { synchronized (propsMap) { try { installDir = SmartFile.sanitize(installDir); props = propsMap.get(installDir); if (props == null) { props = new ASenvMap(installDir); propsMap.put(installDir, props); } } catch(Exception e) { // ignore -- this is universal utility code there isn't much we can // do. } } }
/** * Returns a string representation of the properties in the Map<String,String>. * Format: name=value\nname2=value2\n etc. * @return the string representation. */ @Override public String toString() { StringBuilder sb = new StringBuilder(); Set<String> keys = props.keySet(); for (String key : keys) { sb.append(key).append("=").append(props.get(key)).append('\n'); } return sb.toString(); }
/** * Returns a string representation of the properties in the Map<String,String>. * Format: name=value\nname2=value2\n etc. * @return the string representation. */ @Override public String toString() { StringBuilder sb = new StringBuilder(); Set<String> keys = props.keySet(); for (String key : keys) { sb.append(key).append("=").append(props.get(key)).append('\n'); } return sb.toString(); }
@Override public String get(Object k) { String v = super.get(k); if (v != null) return v; if (k.equals(HOST_NAME_PROPERTY)) { v = getHostname(); put(HOST_NAME_PROPERTY, v); } else if (k.equals(JAVA_ROOT_PROPERTY)) { v = getJavaRoot(super.get(JAVA_ROOT_PROPERTY_ASENV)); put(JAVA_ROOT_PROPERTY, v); } return v; }
@Override public Set<String> keySet() { completeMap(); return super.keySet(); }