Re: PortletDD & getExpirationCache

Eric Dalquist <[email protected]> Tue, 20 Nov 2007 09:03:12 -0600
Newsgroups gmane.comp.jakarta.pluto.user
Organization UW DoIT
Message-ID <[email protected]>
I was thinking the same thing. The most obvious way would be to change 
the field to an Integer instead of an int and then a null check could be 
made. That would change the public API of the Pluto object model though 
and likely wouldn't be desirable.

I would thinking declaring the constant EXPIRATION_CACHE_UNSET = 
Integer.MIN_VALUE in the PortletDD object and initializing the 
expirationCache to that would be good. I'll find some time today or 
tomorrow to create a Jira issue and attach a patch for 1.1.4

-Eric

[email protected] wrote:
> Thanks, Eric, for your heads up on this issue. Can you create a Jira issue?
> A patch would also be very helpful.
>
> Off the top of my head. I suggest that we initialize the
> PortletDD.expirationCache field to some non-valid value (< -1), rather than
> its current initial value of zero. It's probably best to make this value a
> public constant. (called EXPIRATION_CACHE_UNSET), and put it in the
> org.apache.pluto.Constants class in the pluto-container module. Do you --
> or anyone else -- have any other ideas?
>
> BTW, -- for those who don't know -- Pluto does not implement expiration
> caching as it is an optional service.
>
> TIA
> /Craig
>
>
>
>                                                                            
>              Eric Dalquist                                                 
>              <eric.dalquist@do                                             
>              it.wisc.edu>                                               To 
>                                        [email protected]       
>              11/18/2007 06:44                                           cc 
>              PM                                                            
>                                                                    Subject 
>                                        PortletDD & getExpirationCache      
>              Please respond to                                             
>              pluto-user@portal                                             
>                s.apache.org                                                
>                                                                            
>                                                                            
>                                                                            
>
>
>
>
> I'm working on updating the uPortal trunk to use Pluto 1.1 and have a
> question about PortletDD.getExpirationCache()
>
> At PLT.18.1 line 23 the spec says that if a portlet does not set an
> expiration cache value in portlet.xml the corresponding request property
> should be ignored. Since PortletDD.getExpirationCache() retuns an int
> how can I tell if it was set or not?
>
> Thanks,
> -Eric
>
>
smime.p7s (application/x-pkcs7-signature, 3.3 KB) - not displayed