You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by at...@apache.org on 2008/05/03 04:11:52 UTC
svn commit: r652965 - in /portals/pluto/branches/2.0-spi-refactoring:
pluto-container-api/src/main/java/org/apache/pluto/om/portlet/PortletApp.java
pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java
Author: ate
Date: Fri May 2 19:11:51 2008
New Revision: 652965
URL: http://svn.apache.org/viewvc?rev=652965&view=rev
Log:
Replacing PortletApp.contextPath with more genericly named property id.
Pluto internally uses the contextPath as applicationId, but that's an implementation detail.
Modified:
portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/PortletApp.java
portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java
Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/PortletApp.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/PortletApp.java?rev=652965&r1=652964&r2=652965&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/PortletApp.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container-api/src/main/java/org/apache/pluto/om/portlet/PortletApp.java Fri May 2 19:11:51 2008
@@ -21,10 +21,8 @@
public interface PortletApp {
/**
- * The name of the Portlet Application (web application context name)
+ * The name of the Portlet Application
* <br/>
- * Note: this equals to the context name of the corresponding Web Application
- * and is also the unique identifier of the application (within the container)
*/
public String getName();
@@ -35,16 +33,28 @@
public void setName(String name);
/**
- * The contextPath of the Portlet Application
+ * The id the Portlet Application
+ * <br/>
+ * Note: for the Pluto container default descriptor implementation this equals
+ * to the contextPath of the Web Applications
+ * @return
+ */
+ public String getId();
+
+ /**
+ * Set the id the Portlet Application
+ * <br/>
+ * Note: for the Pluto container default descriptor implementation this equals
+ * to the contextPath of the Web Applications
* @return
*/
- public String getContextPath();
+ public void setId(String id);
/**
* Retrieve the portlets which exist within this application.
* @return
*/
- public abstract List getPortlets();
+ public abstract List<Portlet> getPortlets();
/**
* Set the portlets that exist within this application.
Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java?rev=652965&r1=652964&r2=652965&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java Fri May 2 19:11:51 2008
@@ -23,6 +23,7 @@
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.apache.pluto.om.portlet.ContainerRuntimeOption;
@@ -92,8 +93,12 @@
})
public class PortletAppDD implements PortletApp {
+ @XmlTransient
private String name;
+ @XmlTransient
+ private String id;
+
/** The defined portlets within the system. */
@XmlElement(name = "portlet", type=PortletDD.class, namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd")
private List<Portlet> portlets = null;
@@ -185,15 +190,23 @@
/* (non-Javadoc)
* @see org.apache.pluto.om.portlet.PortletApp#getContextPath()
*/
- public String getContextPath()
+ public String getId()
+ {
+ return id;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.om.portlet.PortletApp#setId(java.lang.String)
+ */
+ public void setId(String id)
{
- return "/" + (name != null ? name : "");
+ this.id = id;
}
/* (non-Javadoc)
* @see org.apache.pluto.descriptors.portlet.PortletApp#getPortlets()
*/
- public List getPortlets() {
+ public List<Portlet> getPortlets() {
if (portlets != null)
return portlets;