minor
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IPreferenceService.java
1 /**
2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.cdm.api.service;
10
11 import eu.etaxonomy.cdm.model.metadata.CdmPreference;
12
13 /**
14 * @author a.mueller
15 * @created 2013-09-09
16 */
17 public interface IPreferenceService {
18
19 /**
20 * Retrieve the best matching value for the given preference key.
21 * @param key
22 * @return
23 */
24 public CdmPreference get(CdmPreference.PrefKey key);
25
26 /**
27 * Write the value for the preference's key
28 * @param preference
29 */
30 public void set(CdmPreference preference);
31
32 /**
33 * Return the number of all existing cdm preferences
34 * @return
35 */
36 public int count();
37
38 }