diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-11-19 12:18:32 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-12-08 22:33:29 +0100 |
commit | f0b10324caf1637d8ad5a9ed94dfed084f65407d (patch) | |
tree | 8ec82ea934049d1552e5a0b0a095c508fbfffeb7 /lib/public/iconfig.php | |
parent | f164161f6925b5b52da6ad897463d91486b6fc4f (diff) | |
download | nextcloud-server-f0b10324caf1637d8ad5a9ed94dfed084f65407d.tar.gz nextcloud-server-f0b10324caf1637d8ad5a9ed94dfed084f65407d.zip |
Refactoring of OC_Preferences to AllConfig
* keep old static methods - mapped to new ones and deprecated
* removed deleteApp, getUsers, getApps because they are unused
* make AllConfig unit tests more robust against not cleaned up environments
Diffstat (limited to 'lib/public/iconfig.php')
-rw-r--r-- | lib/public/iconfig.php | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/lib/public/iconfig.php b/lib/public/iconfig.php index fe155cc61b0..1d3502ffb4c 100644 --- a/lib/public/iconfig.php +++ b/lib/public/iconfig.php @@ -109,7 +109,6 @@ interface IConfig { * @param string $appName the appName that we want to store the value under * @param string $key the key under which the value is being stored * @param string $value the value that you want to store - * @return void */ public function setUserValue($userId, $appName, $key, $value); @@ -125,6 +124,16 @@ interface IConfig { public function getUserValue($userId, $appName, $key, $default = ''); /** + * Fetches a mapped list of userId -> value, for a specified app and key and a list of user IDs. + * + * @param $appName app to get the value for + * @param $key the key to get the value for + * @param $userIds the user IDs to fetch the values for + * @return array Mapped values: userId => value + */ + public function getUserValueForUsers($appName, $key, $userIds); + + /** * Get the keys of all stored by an app for the user * * @param string $userId the userId of the user that we want to store the value under @@ -148,4 +157,21 @@ interface IConfig { * @param string $userId the userId of the user that we want to remove all values from */ public function deleteAllUserValues($userId); + + /** + * Delete all user related values of one app + * + * @param string $appName the appName of the app that we want to remove all values from + */ + public function deleteAppFromAllUsers($appName); + + /** + * Determines the users that have the given value set for a specific app-key-pair + * + * @param string $appName the app to get the user for + * @param string $key the key to get the user for + * @param string $value the value to get the user for + * @return array of user IDs + */ + public function getUsersForUserValue($appName, $key, $value); } |