import com.google.common.base.Strings;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
+import javax.annotation.CheckForNull;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.batch.BatchSide;
return encryption;
}
+ @CheckForNull
public String getDefaultValue(String key) {
return definitions.getDefaultValue(key);
}
return StringUtils.isNotEmpty(getDefaultValue(key));
}
+ @CheckForNull
public String getString(String key) {
String value = getClearString(key);
if (value != null && encryption.isEncrypted(value)) {
/**
* Does not decrypt value.
*/
+ @CheckForNull
protected String getClearString(String key) {
doOnGetProperties(key);
String validKey = definitions.validKey(key);
return 0L;
}
+ @CheckForNull
public Date getDate(String key) {
String value = getString(key);
if (StringUtils.isNotEmpty(value)) {
return null;
}
+ @CheckForNull
public Date getDateTime(String key) {
String value = getString(key);
if (StringUtils.isNotEmpty(value)) {
return null;
}
+ @CheckForNull
public Float getFloat(String key) {
String value = getString(key);
if (StringUtils.isNotEmpty(value)) {
return null;
}
+ @CheckForNull
public Double getDouble(String key) {
String value = getString(key);
if (StringUtils.isNotEmpty(value)) {
}
/**
- * @return immutable properties
+ *
+ * @return immutable copy of properties. Encrypted values are kept and not decrypted.
*/
public Map<String, String> getProperties() {
return ImmutableMap.copyOf(properties);