1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.portal.portlets.admin;
18
19
20 import org.apache.ecs.html.*;
21 import org.apache.ecs.ElementContainer;
22
23
24 import org.apache.jetspeed.portal.portlets.AbstractPortlet;
25 import org.apache.jetspeed.portal.PortletException;
26 import org.apache.jetspeed.services.resources.JetspeedResources;
27
28
29 import org.apache.turbine.util.RunData;
30
31
32 import java.util.Iterator;
33
34 /***
35 Handles enumerating Portlets that are also applications
36
37 @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
38 @version $Id: JetspeedPropertiesPortlet.java,v 1.21 2004/02/23 03:26:19 jford Exp $
39 */
40 public class JetspeedPropertiesPortlet extends AbstractPortlet {
41
42 public static final String INPUT_SIZE = "70";
43
44 /***
45 */
46 public void init() throws PortletException {
47
48 this.setTitle("Properties");
49 this.setDescription("Jetspeed Properties");
50
51
52 ElementContainer root = new ElementContainer();
53 Table table = new Table().setWidth("100%");
54
55 Iterator i = JetspeedResources.getKeys();
56
57 root.addElement( new B( "Jetspeed properties: " ) );
58
59 while ( i.hasNext() ) {
60 String key = (String)i.next();
61 try {
62 Object value = JetspeedResources.getString(key);
63 TR row = new TR();
64 row.addElement( new TD().addElement( key ) );
65
66 if (value == null) {
67 value = "";
68 }
69 row.addElement( new TD()
70 .addElement( new Input( "text",
71 "nothing",
72 value.toString() )
73 .setSize( INPUT_SIZE ) ) );
74
75 table.addElement( row );
76 } catch (Throwable t) {
77
78 }
79
80 }
81
82 root.addElement( new Center( table ) );
83
84
85
86 this.setContent( new Form( root ) );
87
88 }
89
90 /***
91 */
92 public boolean getAllowEdit( RunData rundata ) {
93 return false;
94 }
95
96 /***
97 */
98 public boolean getAllowMaximize( RunData rundata ) {
99 return false;
100 }
101
102
103 }