|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.sdklib.internal.repository.sources.SdkSourceProperties
public class SdkSourceProperties
Properties for individual sources which are persisted by a local settings file.
All instances ofSdkSourceProperties share the same singleton storage.
The persisted setting file is loaded as necessary, however callers must persist
it at some point by calling save().
| Field Summary | |
|---|---|
static java.lang.String |
KEY_DISABLED
A non-null string if the source is disabled. |
static java.lang.String |
KEY_NAME
The last known UI name of the source. |
| Constructor Summary | |
|---|---|
SdkSourceProperties()
|
|
| Method Summary | |
|---|---|
protected void |
clear()
Empty current property list. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String sourceUrl,
java.lang.String defaultValue)
Retrieves a property for the given source URL and the given key type. |
protected boolean |
loadProperties()
Load properties from default file. |
void |
save()
|
protected void |
saveLocked()
Save file to disk. |
void |
setProperty(java.lang.String key,
java.lang.String sourceUrl,
java.lang.String value)
Sets or remove a property for the given source URL and the given key type. |
java.lang.String |
toString()
Returns an internal string representation of the underlying Properties map, sorted by ascending keys. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String KEY_NAME
public static final java.lang.String KEY_DISABLED
| Constructor Detail |
|---|
public SdkSourceProperties()
| Method Detail |
|---|
public void save()
@Nullable
public java.lang.String getProperty(@NonNull
java.lang.String key,
@NonNull
java.lang.String sourceUrl,
@Nullable
java.lang.String defaultValue)
key - The kind of property to retrieve for that source URL.sourceUrl - The source URL.defaultValue - The default value to return, if the property isn't found. Can be null.
public void setProperty(java.lang.String key,
java.lang.String sourceUrl,
java.lang.String value)
save() method later.
key - The kind of property to retrieve for that source URL.sourceUrl - The source URL.value - The new value to set (if non null) or null to remove an existing property.public java.lang.String toString()
toString in class java.lang.Objectprotected boolean loadProperties()
protected void saveLocked()
save() instead.
protected void clear()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||