1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.icon

File IconSetCache.java

 

Code metrics

0
0
0
1
107
17
0
-
-
0
-

Classes

Class Line # Actions
IconSetCache 32 0 - 0 0
-1.0 -
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.icon;
21   
22    import org.xwiki.component.annotation.Role;
23    import org.xwiki.model.reference.DocumentReference;
24   
25    /**
26    * A cache to store the already loaded icon sets.
27    *
28    * @since 6.2M1
29    * @version $Id: 026f309c58d5ea5e99f7c0ae467125b8710c2fc3 $
30    */
31    @Role
 
32    public interface IconSetCache
33    {
34    /**
35    * Get an icon set, from its name.
36    * @param name name of the icon set to get
37    * @return the icon set corresponding to the given name
38    */
39    IconSet get(String name);
40   
41    /**
42    * Get an icon set, from its name and the icon where it is located.
43    * @param name name of the icon set to get
44    * @param wikiId id of the wiki
45    * @return the icon set corresponding to the given name
46    *
47    * @since 6.3RC1
48    */
49    IconSet get(String name, String wikiId);
50   
51    /**
52    * Get the icon set corresponding to a document on the wiki.
53    * @param documentReference reference of the document
54    * @return the icon set corresponding to the given document reference
55    */
56    IconSet get(DocumentReference documentReference);
57   
58    /**
59    * Put an iconset into this cache.
60    * @param name name of the icon set to cache
61    * @param iconSet the icon set to cache
62    */
63    void put(String name, IconSet iconSet);
64   
65    /**
66    * Put an iconset into this cache.
67    * @param name name of the icon set to cache
68    * @param wikiId id of the wiki
69    * @param iconSet the icon set to cache
70    *
71    * @since 6.3RC1
72    */
73    void put(String name, String wikiId, IconSet iconSet);
74   
75    /**
76    * Put an iconset into this cache.
77    * @param documentReference reference to the document containing the icon set
78    * @param iconSet the icon set to cache
79    */
80    void put(DocumentReference documentReference, IconSet iconSet);
81   
82    /**
83    * Clear all the cache.
84    */
85    void clear();
86   
87    /**
88    * Remove from the cache an icon set corresponding to a document in the wiki.
89    * @param documentReference reference of the document
90    */
91    void clear(DocumentReference documentReference);
92   
93    /**
94    * Remove from the cache an icon set corresponding to a given name.
95    * @param name the name of the icon set
96    */
97    void clear(String name);
98   
99    /**
100    * Remove from the cache an icon set corresponding to a given name.
101    * @param name the name of the icon set
102    * @param wikiId id of the wiki where the icon theme is stored
103    *
104    * @since 6.3RC1
105    */
106    void clear(String name, String wikiId);
107    }