1/*2 * Copyright 2000-2001,2004 The Apache Software Foundation.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 at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * 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 and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.portal.portlets.admin;
1819//Element Construction Set20import org.apache.ecs.html.*;
21import org.apache.ecs.ElementContainer;
2223//Jetspeed stuff24import org.apache.jetspeed.portal.portlets.AbstractPortlet;
25import org.apache.jetspeed.portal.PortletException;
26import org.apache.jetspeed.services.resources.JetspeedResources;
2728//turbine29import org.apache.turbine.util.RunData;
3031//standard java stuff32import java.util.Iterator;
3334/***35Handles enumerating Portlets that are also applications3637@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*/40publicclassJetspeedPropertiesPortletextendsAbstractPortlet {
4142publicstaticfinal String INPUT_SIZE = "70";
4344/***45 */46publicvoid init() throws PortletException {
4748this.setTitle("Properties");
49this.setDescription("Jetspeed Properties");
505152 ElementContainer root = new ElementContainer();
53 Table table = new Table().setWidth("100%");
5455 Iterator i = JetspeedResources.getKeys();
5657 root.addElement( new B( "Jetspeed properties: " ) );
5859while ( i.hasNext() ) {
60 String key = (String)i.next();
61try {
62 Object value = JetspeedResources.getString(key);
63 TR row = new TR();
64 row.addElement( new TD().addElement( key ) );
6566if (value == null) {
67 value = "";
68 }
69 row.addElement( new TD()
70 .addElement( new Input( "text",
71"nothing",
72 value.toString() )
73 .setSize( INPUT_SIZE ) ) );
7475 table.addElement( row );
76 } catch (Throwable t) {
7778 }
7980 }
8182 root.addElement( new Center( table ) );
8384//wrap it in a basic form so Netscape is smart enough to render the 85//width.86this.setContent( new Form( root ) );
8788 }
8990/***91 */92publicboolean getAllowEdit( RunData rundata ) {
93return false;
94 }
9596/***97 */98publicboolean getAllowMaximize( RunData rundata ) {
99return false;
100 }
101102103 }