org.dspace.app.xmlui.aspect.general
Class IfModifiedSinceSelector

java.lang.Object
  extended by org.dspace.app.xmlui.aspect.general.IfModifiedSinceSelector
All Implemented Interfaces:
org.apache.cocoon.selection.Selector

public class IfModifiedSinceSelector
extends java.lang.Object
implements org.apache.cocoon.selection.Selector

This simple selector looks for the If-Modified-Since header, and returns true if the Item in the request has not been modified since that date. The expression is ignored since the test is inherent in the request. Typical sitemap usage:

Author:
Larry Stone

Field Summary
 
Fields inherited from interface org.apache.cocoon.selection.Selector
ROLE
 
Constructor Summary
IfModifiedSinceSelector()
           
 
Method Summary
 boolean select(java.lang.String expression, java.util.Map objectModel, org.apache.avalon.framework.parameters.Parameters parameters)
          Check for If-Modified-Since header on request, and returns true if the Item should *not* be sent, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfModifiedSinceSelector

public IfModifiedSinceSelector()
Method Detail

select

public boolean select(java.lang.String expression,
                      java.util.Map objectModel,
                      org.apache.avalon.framework.parameters.Parameters parameters)
Check for If-Modified-Since header on request, and returns true if the Item should *not* be sent, i.e. if the response status should be 304 (HttpServletResponse.SC_NOT_MODIFIED).

Specified by:
select in interface org.apache.cocoon.selection.Selector
Parameters:
expression - is ignored
objectModel - environment passed through via cocoon
Returns:
null or map containing value of sitemap parameter 'pattern'


Copyright © 2010 DuraSpace. All Rights Reserved.