You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2001/07/30 07:47:58 UTC
cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls VelocityPortletSetControl.java
taylor 01/07/29 22:47:58
Modified: src/java/org/apache/jetspeed/portal BasePortletSet.java
Portlet.java
src/java/org/apache/jetspeed/portal/controls
VelocityPortletSetControl.java
Log:
- added getAttribute( String attrName, String attrDefValue, RunData rundata ) to the Portlet interface
- added "_menustate" parameter to velocity based tabbed portlets so that portlets can be shown normally yet hidden in their corresponding menu
see the security portlets for example
Revision Changes Path
1.12 +15 -1 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/BasePortletSet.java
Index: BasePortletSet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/BasePortletSet.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- BasePortletSet.java 2001/07/22 20:29:59 1.11
+++ BasePortletSet.java 2001/07/30 05:47:58 1.12
@@ -80,7 +80,7 @@
*
* @author <a href="mailto:raphael@apache.org">Rapha�l Luta</a>
* @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
- * @version $Id: BasePortletSet.java,v 1.11 2001/07/22 20:29:59 raphael Exp $
+ * @version $Id: BasePortletSet.java,v 1.12 2001/07/30 05:47:58 taylor Exp $
*/
public class BasePortletSet implements PortletSet, Portlet, PortletState
{
@@ -567,6 +567,20 @@
public void setMinimized( boolean minimize, RunData rundata )
{
// empty
+ }
+
+ /**
+ Retrieve a portlet attribute from persistent storage
+
+ @param attrName The attribute to retrieve
+ @parm attrDefValue The value if the attr doesn't exists
+ @param rundata A RunData object
+ @return The attribute value
+ */
+ public String getAttribute( String attrName, String attrDefValue, RunData rundata )
+ {
+ // TODO: figure out if we can get an attribute for a portlet set...
+ return attrDefValue;
}
}
1.40 +12 -2 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/Portlet.java
Index: Portlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/Portlet.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- Portlet.java 2001/05/07 20:48:20 1.39
+++ Portlet.java 2001/07/30 05:47:58 1.40
@@ -64,7 +64,7 @@
extensible so that 3rd parties implement their own Portlets.
@author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
-@version $Id: Portlet.java,v 1.39 2001/05/07 20:48:20 raphael Exp $
+@version $Id: Portlet.java,v 1.40 2001/07/30 05:47:58 taylor Exp $
*/
public interface Portlet
{
@@ -190,6 +190,16 @@
Returns true portlet is able to output content for given mimetype
*/
public boolean supportsType( MimeType mimeType );
-
+
+ /**
+ Retrieve a portlet attribute from persistent storage
+
+ @param attrName The attribute to retrieve
+ @parm attrDefValue The value if the attr doesn't exists
+ @param rundata A RunData object
+ @return The attribute value
+ */
+ public String getAttribute( String attrName, String attrDefValue, RunData rundata );
+
}
1.4 +4 -0 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletSetControl.java
Index: VelocityPortletSetControl.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletSetControl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- VelocityPortletSetControl.java 2001/07/02 07:38:09 1.3
+++ VelocityPortletSetControl.java 2001/07/30 05:47:58 1.4
@@ -127,6 +127,10 @@
continue;
}
+ String mstate = p.getAttribute( "_menustate", "open", rundata );
+ if (mstate.equals("closed"))
+ continue;
+
PortletTab tab = new PortletTab();
tab.setTitle( (p.getTitle()!=null)?p.getTitle():p.getName() );
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org