org.fcrepo.server.security.servletfilters
Class FilterRestApiFlash

java.lang.Object
  extended by org.fcrepo.server.security.servletfilters.FilterRestApiFlash
All Implemented Interfaces:
javax.servlet.Filter

public class FilterRestApiFlash
extends Object
implements javax.servlet.Filter

Determines if the client is a flash player (based on a query string value of 'flash' being set to true) and wraps the response to guarantee only 2xx range response codes. Responses which would normally return with a status outside of the 2xx range are updated such that the response code is set to 200 and the response body ends with the string "::ERROR(code)" where code is replaced by the actual response code.

Author:
Bill Branan

Constructor Summary
FilterRestApiFlash()
           
 
Method Summary
 void destroy()
          Required Filter method
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain)
          Perform flash client response filtering
 void init(javax.servlet.FilterConfig arg0)
          Required Filter method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterRestApiFlash

public FilterRestApiFlash()
Method Detail

init

public void init(javax.servlet.FilterConfig arg0)
          throws javax.servlet.ServletException
Required Filter method

Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain filterChain)
              throws IOException,
                     javax.servlet.ServletException
Perform flash client response filtering

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException

destroy

public void destroy()
Required Filter method

Specified by:
destroy in interface javax.servlet.Filter


Copyright © 2011 DuraSpace. All Rights Reserved.