taylor 2004/07/06 09:15:13
Modified: jetspeed-api/src/java/org/apache/jetspeed/om/common/portlet
MutablePortletApplication.java
Added: jetspeed-api/src/java/org/apache/jetspeed/om/common/portlet
PortletApplication.java
Log:
refactoring MutablePortletApplication into 2 interfaces, removing none-mutable
methods from Mutable interface, refining a more robust api for copy-mutable patterns
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.4 +23 -52
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/portlet/MutablePortletApplication.java
Index: MutablePortletApplication.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/portlet/MutablePortletApplication.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MutablePortletApplication.java 18 Jun 2004 20:46:21 -0000 1.3
+++ MutablePortletApplication.java 6 Jul 2004 16:15:13 -0000 1.4
@@ -21,7 +21,6 @@
import org.apache.jetspeed.om.common.GenericMetadata;
import org.apache.jetspeed.om.common.UserAttribute;
import org.apache.jetspeed.om.common.UserAttributeRef;
-import org.apache.pluto.om.portlet.PortletApplicationDefinition;
import org.apache.pluto.om.portlet.PortletDefinition;
import org.apache.pluto.om.portlet.PortletDefinitionList;
import org.apache.pluto.om.servlet.WebApplicationDefinition;
@@ -29,42 +28,46 @@
/**
* MutablePortletApplication
*
- * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
- * @version $Id$
- */
-/**
- *
- * MutablePortletApplication
- *
* Extends the <code>org.apache.pluto.om.portlet.PortletApplicationDefinition</code>
* interface adding mutator methods for those attributes that do not have them
* so as to make manipulating the portlet OM easier.
- * It has additional methods to make it easier to use within Jetspeed.
*
+ * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id$
*
*/
-public interface MutablePortletApplication extends PortletApplicationDefinition,
Serializable
+public interface MutablePortletApplication extends PortletApplication, Serializable
{
public static final String PREFS_ROOT ="portlet_application";
-
- public GenericMetadata getMetadata();
-
+
+ /**
+ * Sets the metadata from the extended jetspeed-portlet.xml
+ *
+ * @param metadata
+ */
public void setMetadata(GenericMetadata metadata);
+ /**
+ * Associates the web application definition with this portlet application
defintion.
+ *
+ * @param wad
+ */
void setWebApplicationDefinition(WebApplicationDefinition wad);
+ /**
+ * @param name
+ */
void setName(String name);
- String getName();
-
+ /**
+ * @param pd
+ */
void addPortletDefinition(PortletDefinition pd);
- Collection getPortletDefinitions();
-
- PortletDefinition getPortletDefinitionByName(String name);
-
+ /**
+ * @param portlets
+ */
void setPortletDefinitionList(PortletDefinitionList portlets);
/**
@@ -80,12 +83,6 @@
void setUserAttributeRefs(Collection userAttributeRefs);
/**
- * <p>Gets the collection of user attribute refs associated
- * with this portlet application.</p>
- */
- Collection getUserAttributeRefs();
-
- /**
* <p>Adds a user attribute ref to the user attribute ref set.</p>
* @param userAttributeRef The user attribute ref.
*/
@@ -97,21 +94,8 @@
*/
void setUserAttributes(Collection userAttributes);
- /**
- * <p>Gets the collection of user attributes associated
- * with this portlet application.</p>
- */
- Collection getUserAttributes();
-
void setApplicationIdentifier(String applicationIndentifier);
- String getApplicationIdentifier();
-
- /**
- * @return
- */
- String getDescription();
-
/**
* @param string
*/
@@ -140,19 +124,6 @@
* @param type The type of portlet application.
*/
void setApplicationType(int type);
-
- /**
- * Gets the Portlet Application type.
- * Valid values are:
- * <p>
- * [EMAIL PROTECTED] MutablePortletApplication#WEBAPP} - A standard web
application, stored in the web application
- * server's web application space.
- * <p>
- * [EMAIL PROTECTED] MutablePortletApplication#LOCAL} - A local portlet
application stored within Jetspeed's web application.
- * <p>
- * @return The type of portlet application.
- */
- int getApplicationType();
/**
* Marks this application as a standard web application,
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/portlet/PortletApplication.java
Index: PortletApplication.java
===================================================================
/*
* Copyright 2000-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.om.common.portlet;
import java.util.Collection;
import org.apache.jetspeed.om.common.GenericMetadata;
import org.apache.pluto.om.portlet.PortletApplicationDefinition;
import org.apache.pluto.om.portlet.PortletDefinition;
/**
* PortletApplication
*
* Extends the <code>org.apache.pluto.om.portlet.PortletApplicationDefinition</code>
* interface adding methods for those attributes that do not have them
* so as to make manipulating the portlet OM easier.
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
* @version $Id: PortletApplication.java,v 1.1 2004/07/06 16:15:13 taylor Exp $
*/
public interface PortletApplication extends PortletApplicationDefinition
{
/**
* Returns the metadata from the extended jetspeed-portlet.xml
*
* @return Jetspeed specific metadata
*/
public GenericMetadata getMetadata();
/**
* Gets the name of the Portlet Application.
*
* @return Name of the application
*/
String getName();
/**
* @return
*/
Collection getPortletDefinitions();
/**
* Finds a portlet by portlet name, searching this portlet application's
collection.
*
* @param name The portlet name.
* @return A Portlet Definition
*/
PortletDefinition getPortletDefinitionByName(String name);
/**
* <p>Gets the collection of user attribute refs associated
* with this portlet application.</p>
*/
Collection getUserAttributeRefs();
/**
* <p>Gets the collection of user attributes associated
* with this portlet application.</p>
*/
Collection getUserAttributes();
String getApplicationIdentifier();
/**
* @return
*/
String getDescription();
/**
* Gets the Portlet Application type.
* Valid values are:
* <p>
* [EMAIL PROTECTED] MutablePortletApplication#WEBAPP} - A standard web
application, stored in the web application
* server's web application space.
* <p>
* [EMAIL PROTECTED] MutablePortletApplication#LOCAL} - A local portlet
application stored within Jetspeed's web application.
* <p>
* @return The type of portlet application.
*/
int getApplicationType();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]