Class DefaultSecureStore
- java.lang.Object
-
- com.google.gerrit.server.securestore.SecureStore
-
- com.google.gerrit.server.securestore.DefaultSecureStore
-
public class DefaultSecureStore extends SecureStore
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gerrit.server.securestore.SecureStore
SecureStore.EntryKey
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getList(String section, String subsection, String name)
Extract list of values from SecureStore and decrypt every value in that list ornull
when property was not found.String[]
getListForPlugin(String pluginName, String section, String subsection, String name)
Extract list of plugin config values from SecureStore and decrypt every value in that list, ornull
when property was not found.boolean
isOutdated()
Returnstrue
if currently loaded values are outdatedIterable<SecureStore.EntryKey>
list()
Returns list of stored entries.void
reload()
Reload the valuesvoid
setList(String section, String subsection, String name, List<String> values)
Store list of values in SecureStore.void
unset(String section, String subsection, String name)
Remove value for givensection
,subsection
andname
from SecureStore.-
Methods inherited from class com.google.gerrit.server.securestore.SecureStore
get, getForPlugin, set
-
-
-
-
Method Detail
-
getList
public String[] getList(String section, String subsection, String name)
Description copied from class:SecureStore
Extract list of values from SecureStore and decrypt every value in that list ornull
when property was not found.- Specified by:
getList
in classSecureStore
- Returns:
- decrypted list of string values or
null
-
getListForPlugin
public String[] getListForPlugin(String pluginName, String section, String subsection, String name)
Description copied from class:SecureStore
Extract list of plugin config values from SecureStore and decrypt every value in that list, ornull
when property was not found.- Specified by:
getListForPlugin
in classSecureStore
- Returns:
- decrypted list of string values or
null
-
setList
public void setList(String section, String subsection, String name, List<String> values)
Description copied from class:SecureStore
Store list of values in SecureStore.This method is responsible for encrypting all values in the list and storing them.
- Specified by:
setList
in classSecureStore
values
- list of plain text values
-
unset
public void unset(String section, String subsection, String name)
Description copied from class:SecureStore
Remove value for givensection
,subsection
andname
from SecureStore.- Specified by:
unset
in classSecureStore
-
list
public Iterable<SecureStore.EntryKey> list()
Description copied from class:SecureStore
Returns list of stored entries.- Specified by:
list
in classSecureStore
-
isOutdated
public boolean isOutdated()
Description copied from class:SecureStore
Returnstrue
if currently loaded values are outdated- Specified by:
isOutdated
in classSecureStore
-
reload
public void reload()
Description copied from class:SecureStore
Reload the values- Specified by:
reload
in classSecureStore
-
-