blob: 3cc046f10c3a03d342aabe201319c2c9b19ccf76 [file] [log] [blame]
Thomas Vachuska0af26912016-03-21 21:37:30 -07001/*
2 * Copyright 2016 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.ui;
18
19import com.fasterxml.jackson.databind.node.ObjectNode;
20
21import java.util.Map;
22import java.util.Set;
23
24/**
25 * Service for tracking user interface preferences.
26 */
27public interface UiPreferencesService {
28
29 /**
30 * Returns the list of user names that have user preferences available.
31 *
32 * @return list of user names
33 */
34 Set<String> getUserNames();
35
36 /**
37 * Returns an immutable copy of the preferences for the specified user.
38 *
39 * @param userName user name
40 * @return map of user preferences
41 */
42 Map<String, ObjectNode> getPreferences(String userName);
43
44 /**
45 * Sets the named preference for the specified user.
46 *
47 * @param userName user name
48 * @param preference name of the user preference
49 * @param value preference value
50 */
51 void setPreference(String userName, String preference, ObjectNode value);
52
53}