KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > ui > web > admin > configuration > EjbcaJSFLanguageResource


1 package org.ejbca.ui.web.admin.configuration;
2
3 import java.util.Collection JavaDoc;
4 import java.util.Map JavaDoc;
5 import java.util.Set JavaDoc;
6
7 import javax.ejb.EJBException JavaDoc;
8
9 import org.ejbca.util.HTMLTools;
10
11 /**
12  * Class used to retrieve EJBCA language resources in JSF views
13  *
14  * Implements a Map used for retrieving resources.
15  * @author Philip Vendil
16  * $id$
17  */

18 public class EjbcaJSFLanguageResource implements Map JavaDoc {
19
20     private EjbcaWebBean ejbcawebbean;
21     
22     public EjbcaJSFLanguageResource(EjbcaWebBean ejbcawebbean){
23         this.ejbcawebbean = ejbcawebbean;
24     }
25     
26     public void clear() {
27         throw new EJBException JavaDoc("Method clear not supported");
28     }
29
30     public boolean containsKey(Object JavaDoc arg0) {
31         
32         return ejbcawebbean.getText((String JavaDoc) arg0) != null;
33     }
34
35     public boolean containsValue(Object JavaDoc arg0) {
36         throw new EJBException JavaDoc("Method containsValue not supported");
37     }
38
39     public Set JavaDoc entrySet() {
40         throw new EJBException JavaDoc("Method entrySet not supported");
41     }
42
43     public Object JavaDoc get(Object JavaDoc arg0) {
44         String JavaDoc str = ejbcawebbean.getText((String JavaDoc) arg0);
45         return HTMLTools.htmlunescape(str);
46     }
47
48     public boolean isEmpty() {
49         throw new EJBException JavaDoc("Method isEmpty not supported");
50     }
51
52     public Set JavaDoc keySet() {
53         throw new EJBException JavaDoc("Method keySet not supported");
54     }
55
56     public Object JavaDoc put(Object JavaDoc arg0, Object JavaDoc arg1) {
57         throw new EJBException JavaDoc("Method put not supported");
58     }
59
60     public void putAll(Map JavaDoc arg0) {
61         throw new EJBException JavaDoc("Method putAll not supported");
62     }
63
64     public Object JavaDoc remove(Object JavaDoc arg0) {
65         throw new EJBException JavaDoc("Method remove not supported");
66     }
67
68     public int size() {
69         throw new EJBException JavaDoc("Method size not supported");
70     }
71
72     public Collection JavaDoc values() {
73         throw new EJBException JavaDoc("Method values not supported");
74     }
75
76 }
77
Popular Tags