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 sg...@apache.org on 2002/06/30 21:09:24 UTC
cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets CacheablePortletWrapper.java PortletWrapper.java StatefulPortletWrapper.java
sgala 2002/06/30 12:09:23
Modified: src/java/org/apache/jetspeed/portal/security/portlets Tag:
jetspeed_13a3 CacheablePortletWrapper.java
PortletWrapper.java StatefulPortletWrapper.java
Log:
Making most methods final to allow runtime optimizations
Revision Changes Path
No revision
No revision
1.2.4.1 +7 -7 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/CacheablePortletWrapper.java
Index: CacheablePortletWrapper.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/CacheablePortletWrapper.java,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -r1.2 -r1.2.4.1
--- CacheablePortletWrapper.java 5 Feb 2002 03:08:05 -0000 1.2
+++ CacheablePortletWrapper.java 30 Jun 2002 19:09:23 -0000 1.2.4.1
@@ -102,14 +102,14 @@
/**
*/
- public boolean isCacheable()
+ public final boolean isCacheable()
{
return wrappedCacheable.isCacheable();
}
/**
*/
- public void setCacheable(boolean cacheable)
+ public final void setCacheable(boolean cacheable)
{
wrappedCacheable.setCacheable( cacheable );
}
@@ -117,7 +117,7 @@
/**
*/
- public Expire getExpire()
+ public final Expire getExpire()
{
return wrappedCacheable.getExpire();
}
@@ -139,7 +139,7 @@
/**
@see Cacheable#getExpirationMillis
*/
- public Long getExpirationMillis()
+ public final Long getExpirationMillis()
{
return wrappedCacheable.getExpirationMillis();
}
@@ -148,7 +148,7 @@
/**
* @see Cacheable#setExpirationMillis
*/
- public void setExpirationMillis( long expirationMillis)
+ public final void setExpirationMillis( long expirationMillis)
{
wrappedCacheable.setExpirationMillis( expirationMillis );
}
@@ -160,7 +160,7 @@
*
* @param cachedObject Handle to the CachedObject
*/
- public void setCachedObject(CachedObject cachedObject)
+ public final void setCachedObject(CachedObject cachedObject)
{
wrappedCacheable.setCachedObject( cachedObject );
}
1.5.4.1 +19 -19 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/PortletWrapper.java
Index: PortletWrapper.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/PortletWrapper.java,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -r1.5 -r1.5.4.1
--- PortletWrapper.java 18 Apr 2002 00:10:21 -0000 1.5
+++ PortletWrapper.java 30 Jun 2002 19:09:23 -0000 1.5.4.1
@@ -130,7 +130,7 @@
/**
*/
- public ConcreteElement getContent( RunData rundata )
+ public final ConcreteElement getContent( RunData rundata )
{
if( checkPermission(rundata,
@@ -150,14 +150,14 @@
@return a null entry if the user hasn't defined anything
*/
- public String getDescription()
+ public final String getDescription()
{
return wrappedPortlet.getDescription();
}
/**
*/
- public void setDescription( String description )
+ public final void setDescription( String description )
{
wrappedPortlet.setDescription( description );
}
@@ -167,7 +167,7 @@
@return a null entry if the user hasn't defined anything
*/
- public String getTitle()
+ public final String getTitle()
{
/* FIXME, no rundata here if( !checkPermission(rundata,
JetspeedSecurity.PERMISSION_VIEW ) )
@@ -180,7 +180,7 @@
/**
Set the title for this Portlet
*/
- public void setTitle( String title )
+ public final void setTitle( String title )
{
/* FIXME, no rundata here if( !checkPermission(rundata,
JetspeedSecurity.PERMISSION_CUSTOMIZE ) )
@@ -192,7 +192,7 @@
/**
*/
- public boolean getAllowEdit( RunData rundata )
+ public final boolean getAllowEdit( RunData rundata )
{
return checkPermission( rundata,
JetspeedSecurity.PERMISSION_INFO );
@@ -200,7 +200,7 @@
/**
*/
- public boolean getAllowMaximize( RunData rundata )
+ public final boolean getAllowMaximize( RunData rundata )
{
return checkPermission( rundata,
JetspeedSecurity.PERMISSION_MAXIMIZE );
@@ -209,7 +209,7 @@
/**
By default don't provide any initialization
*/
- public void init( ) throws PortletException
+ public final void init( ) throws PortletException
{
/* FIXME, no rundata here if( !checkPermission(rundata,
JetspeedSecurity.PERMISSION_CUSTOMIZE) )
@@ -221,7 +221,7 @@
/**
@see Portlet#getCreationTime
*/
- public long getCreationTime() {
+ public final long getCreationTime() {
/* FIXME, no rundata here if( !checkPermission(rundata,
JetspeedSecurity.PERMISSION_VIEW) )
{ */
@@ -232,7 +232,7 @@
/**
@see Portlet#setCreationTime
*/
- public void setCreationTime( long creationTime )
+ public final void setCreationTime( long creationTime )
{
/* FIXME, no rundata here if( !checkPermission(rundata,
JetspeedSecurity.PERMISSION_CUSTOMIZE) )
@@ -243,7 +243,7 @@
/**
@see Portlet#supportsType
*/
- public boolean supportsType( MimeType mimeType )
+ public final boolean supportsType( MimeType mimeType )
{
/* FIXME, no rundata here if( !checkPermission(rundata,
JetspeedSecurity.PERMISSION_VIEW) )
@@ -258,7 +258,7 @@
* @param permissionName String the name of the Permission requested
* @return boolean is it granted?
*/
- protected boolean checkPermission( RunData rundata,
+ protected final boolean checkPermission( RunData rundata,
String permissionName )
{
/*
@@ -283,7 +283,7 @@
NOTE(FIXME) Not in Portlet interface. Called a la Bean from Velocity.
@param rundata A RunData object
*/
- public boolean isShowTitleBar(RunData rundata)
+ public final boolean isShowTitleBar(RunData rundata)
{
if (wrappedPortlet.getPortletConfig()!=null)
{
@@ -302,7 +302,7 @@
@param rundata A RunData object
@return The attribute value
*/
- public String getAttribute( String attrName, String attrDefValue, RunData rundata )
+ public final String getAttribute( String attrName, String attrDefValue, RunData rundata )
{
if( checkPermission( rundata,
JetspeedSecurity.PERMISSION_VIEW) )
@@ -325,7 +325,7 @@
* depending on the interfaces implemented by the portlet. :-(</p>
*
*/
- public static Portlet wrap( Portlet aPortlet) {
+ public final static Portlet wrap( Portlet aPortlet) {
//SGP Security test
if( aPortlet instanceof PortletState )
{
@@ -344,12 +344,12 @@
}
- public String getID()
+ public final String getID()
{
return wrappedPortlet.getID();
}
- public void setID(String id)
+ public final void setID(String id)
{
wrappedPortlet.setID(id);
}
@@ -357,7 +357,7 @@
/**
* @return true if the portlet does its own customization
*/
- public boolean providesCustomization()
+ public final boolean providesCustomization()
{
return wrappedPortlet.providesCustomization();
}
1.2.4.1 +5 -5 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/StatefulPortletWrapper.java
Index: StatefulPortletWrapper.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/StatefulPortletWrapper.java,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -r1.2 -r1.2.4.1
--- StatefulPortletWrapper.java 28 Jan 2002 11:20:19 -0000 1.2
+++ StatefulPortletWrapper.java 30 Jun 2002 19:09:23 -0000 1.2.4.1
@@ -171,7 +171,7 @@
*
* @param rundata the RunData object for the current request
*/
- public boolean allowMaximize( RunData rundata )
+ public final boolean allowMaximize( RunData rundata )
{
return checkPermission(rundata,
JetspeedSecurity.PERMISSION_MAXIMIZE );
@@ -183,7 +183,7 @@
*
* @param rundata the RunData object for the current request
*/
- public boolean allowMinimize( RunData rundata )
+ public final boolean allowMinimize( RunData rundata )
{
return checkPermission(rundata,
JetspeedSecurity.PERMISSION_MINIMIZE );
@@ -192,7 +192,7 @@
/**
* Returns true if this portlet is currently minimized
*/
- public boolean isMinimized(RunData rundata)
+ public final boolean isMinimized(RunData rundata)
{
if( checkPermission(rundata,
JetspeedSecurity.PERMISSION_VIEW ) )
@@ -213,7 +213,7 @@
@param minimize True if the portlet change to minimized
@param rundata A RunData object
*/
- public void setMinimized( boolean minimize, RunData rundata )
+ public final void setMinimized( boolean minimize, RunData rundata )
{
if( allowMinimize( rundata ) )
{
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>