raphael 2002/11/03 07:07:08
Modified: src/java/org/apache/jetspeed/om/registry
PortletInfoEntry.java
Added: src/java/org/apache/jetspeed/om/registry ToolDescriptor.java
Log:
Add PortletTool support to Registry
Revision Changes Path
1.3 +48 -20
jakarta-jetspeed/src/java/org/apache/jetspeed/om/registry/PortletInfoEntry.java
Index: PortletInfoEntry.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/registry/PortletInfoEntry.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PortletInfoEntry.java 26 Mar 2002 09:06:53 -0000 1.2
+++ PortletInfoEntry.java 3 Nov 2002 15:07:08 -0000 1.3
@@ -58,9 +58,9 @@
import java.util.Map;
/**
- * The PortletInfoEntry defines all the common description properties
+ * The PortletInfoEntry defines all the common description properties
* for all the portlet related entries.
- *
+ *
* @author <a href="mailto:raphael@;apache.org">Rapha�l Luta</a>
* @version $Id$
*/
@@ -70,18 +70,18 @@
/** @return the classname associated to this entry */
public String getClassname();
- /** Sets the classname for this entry. This classname is used for
+ /** Sets the classname for this entry. This classname is used for
* instanciating the associated element
*
- * @param classname the classname used for instanciating the component
+ * @param classname the classname used for instanciating the component
* associated with this entry
*/
public void setClassname( String classname );
-
+
/** @return an enumeration of this entry parameter names */
public Iterator getParameterNames();
-
- /** Returns a map of parameter values keyed on the parameter names
+
+ /** Returns a map of parameter values keyed on the parameter names
* @return the parameter values map
*/
public Map getParameterMap();
@@ -93,7 +93,7 @@
* @param name the parameter name to look for
*/
public Parameter getParameter( String name );
-
+
/** Adds a new parameter for this entry
* @param name the new parameter name
* @param value the new parameter value
@@ -111,34 +111,62 @@
* @param name the parameter name to remove
*/
public void removeParameter( String name );
-
- /**
+
+ /**
* Returns a list of the supported media type names
*
* @return an iterator on the supported media type names
*/
public Iterator listMediaTypes();
- /**
+ /**
* Test if a given media type is supported by this entry.
*
- * @param name the media type name to test for.
+ * @param name the media type name to test for.
* @return true is the media type is supported, false otherwise
*/
public boolean hasMediaType(String name);
-
- /**
+
+ /**
* Add a new supported media type
*
- * @param name the media type name to add.
+ * @param name the media type name to add.
*/
public void addMediaType(String name);
-
- /**
+
+ /**
* Remove support for a given media type
*
- * @param name the media type name to remove.
+ * @param name the media type name to remove.
*/
public void removeMediaType(String name);
-
+
+ /** @return an enumeration of this entry tool names */
+ public Iterator getToolNames();
+
+ /** Returns a map of tool descriptors keyed on the tool names
+ * @return the tool descriptor map
+ */
+ public Map getToolMap();
+
+ /** Search for a named tool and return the associated
+ * ToolDescriptor. The search is case sensitive.
+ *
+ * @return the ToolDescriptor for a given name
+ * @param name the tool name to look for
+ */
+ public ToolDescriptor getTool( String name );
+
+ /** Adds a new tool to this entry
+ * @param tool the new tool to add
+ */
+ public void addTool( ToolDescriptor tool );
+
+ /** Removes the tool associated with the
+ * name
+ *
+ * @param name the name of the tool to remove
+ */
+ public void removeTool( String name );
+
}
1.1
jakarta-jetspeed/src/java/org/apache/jetspeed/om/registry/ToolDescriptor.java
Index: ToolDescriptor.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Jetspeed" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache" or
* "Apache Jetspeed", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.jetspeed.om.registry;
/**
* Interface for storing tool information for a portlet, control or controller
*
* @author <a href="mailto:raphael@;apache.org">Rapha�l Luta</a>
* @version $Id: ToolDescriptor.java,v 1.1 2002/11/03 15:07:08 raphael Exp $
*/
public interface ToolDescriptor
{
/** @return the name of the tool */
public String getName();
/** Sets the name for this tool
* @param title the new name of the tool
*/
public void setName( String name );
/** @return the scope of this tool */
public String getScope();
/** Sets the scope of this tool.
* The currently recognized scope are "request", "session", "persistent",
"global"
* @param scope the new scope of this tool
*/
public void setScope( String scope );
/** @return the clasname of this tool */
public String getClassname();
/** Sets the classname of this tool
* @param classname the new classname of this tool
*/
public void setClassname( String classname );
}
--
To unsubscribe, e-mail: <mailto:jetspeed-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@;jakarta.apache.org>