KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > om > registry > PortletInfoEntry


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 at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * 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 and
14  * limitations under the License.
15  */

16
17 package org.apache.jetspeed.om.registry;
18
19 import java.util.Iterator JavaDoc;
20 import java.util.Map JavaDoc;
21
22 /**
23  * The PortletInfoEntry defines all the common description properties
24  * for all the portlet related entries.
25  *
26  * @author <a HREF="mailto:raphael@apache.org">Raphaël Luta</a>
27  * @version $Id: PortletInfoEntry.java,v 1.4 2004/02/23 03:11:39 jford Exp $
28  */

29 public interface PortletInfoEntry extends RegistryEntry
30 {
31
32     /** @return the classname associated to this entry */
33     public String JavaDoc getClassname();
34
35     /** Sets the classname for this entry. This classname is used for
36      * instanciating the associated element
37      *
38      * @param classname the classname used for instanciating the component
39      * associated with this entry
40      */

41     public void setClassname( String JavaDoc classname );
42
43     /** @return an enumeration of this entry parameter names */
44     public Iterator JavaDoc getParameterNames();
45
46     /** Returns a map of parameter values keyed on the parameter names
47      * @return the parameter values map
48      */

49     public Map JavaDoc getParameterMap();
50
51     /** Search for a named parameter and return the associated
52      * parameter object. The search is case sensitive.
53      *
54      * @return the parameter object for a given parameter name
55      * @param name the parameter name to look for
56      */

57     public Parameter getParameter( String JavaDoc name );
58
59     /** Adds a new parameter for this entry
60      * @param name the new parameter name
61      * @param value the new parameter value
62      */

63     public void addParameter( String JavaDoc name, String JavaDoc value );
64
65     /** Adds a new parameter for this entry
66      * @param parameter the new parameter to add
67      */

68     public void addParameter( Parameter parameter );
69
70     /** Removes all parameter values associated with the
71      * name
72      *
73      * @param name the parameter name to remove
74      */

75     public void removeParameter( String JavaDoc name );
76
77     /**
78      * Returns a list of the supported media type names
79      *
80      * @return an iterator on the supported media type names
81      */

82     public Iterator JavaDoc listMediaTypes();
83
84     /**
85      * Test if a given media type is supported by this entry.
86      *
87      * @param name the media type name to test for.
88      * @return true is the media type is supported, false otherwise
89      */

90     public boolean hasMediaType(String JavaDoc name);
91
92     /**
93      * Add a new supported media type
94      *
95      * @param name the media type name to add.
96      */

97     public void addMediaType(String JavaDoc name);
98
99     /**
100      * Remove support for a given media type
101      *
102      * @param name the media type name to remove.
103      */

104     public void removeMediaType(String JavaDoc name);
105
106     /** @return an enumeration of this entry tool names */
107     public Iterator JavaDoc getToolNames();
108
109     /** Returns a map of tool descriptors keyed on the tool names
110      * @return the tool descriptor map
111      */

112     public Map JavaDoc getToolMap();
113
114     /** Search for a named tool and return the associated
115      * ToolDescriptor. The search is case sensitive.
116      *
117      * @return the ToolDescriptor for a given name
118      * @param name the tool name to look for
119      */

120     public ToolDescriptor getTool( String JavaDoc name );
121
122     /** Adds a new tool to this entry
123      * @param tool the new tool to add
124      */

125     public void addTool( ToolDescriptor tool );
126
127     /** Removes the tool associated with the
128      * name
129      *
130      * @param name the name of the tool to remove
131      */

132     public void removeTool( String JavaDoc name );
133
134 }
Popular Tags