Class ProxyCleanupFilter

  • All Implemented Interfaces:
    ome.util.Filter

    public class ProxyCleanupFilter
    extends ome.util.ContextFilter
    removes all proxies from a return graph to prevent ClassCastExceptions and Session Closed exceptions. You need to be careful with printing. Calling toString() on an unitialized object will break before filtering is complete. Note: we aren't setting the filtered collections here because it's "either null/unloaded or filtered". We will definitiely filter here, so it would just increase bandwidth. As of 4.4.0, this class is also responsible for various security-based modifications to returned Details objects.
    Since:
    1.0
    See Also:
    Trac ticket #8277
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ProxyCleanupFilter.Interceptor
      wraps a filter for each invocation
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doFilter​(java.lang.String arg0, java.lang.Object arg1)  
      java.util.Collection filter​(java.lang.String fieldId, java.util.Collection c)  
      java.util.Map filter​(java.lang.String fieldId, java.util.Map m)  
      ome.util.Filterable filter​(java.lang.String fieldId, ome.util.Filterable f)  
      • Methods inherited from class ome.util.ContextFilter

        addSeen, afterFilter, beforeFilter, currentContext, doFilter, doFilter, enter, exit, filter, filter, hasntSeen, pop, previousContext, push
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • unloadedObjectCache

        protected java.util.Map unloadedObjectCache
    • Constructor Detail

      • ProxyCleanupFilter

        public ProxyCleanupFilter​(ACLVoter acl,
                                  CurrentDetails current)
        Construct a proxy cleanup filter that checks the security restrictions on certain objects.
        Parameters:
        acl - the ACL voter
        current - the current thread's security context
    • Method Detail

      • filter

        public ome.util.Filterable filter​(java.lang.String fieldId,
                                          ome.util.Filterable f)
        Specified by:
        filter in interface ome.util.Filter
        Overrides:
        filter in class ome.util.ContextFilter
      • filter

        public java.util.Collection filter​(java.lang.String fieldId,
                                           java.util.Collection c)
        Specified by:
        filter in interface ome.util.Filter
        Overrides:
        filter in class ome.util.ContextFilter
      • filter

        public java.util.Map filter​(java.lang.String fieldId,
                                    java.util.Map m)
        Specified by:
        filter in interface ome.util.Filter
        Overrides:
        filter in class ome.util.ContextFilter
      • doFilter

        protected void doFilter​(java.lang.String arg0,
                                java.lang.Object arg1)
        Overrides:
        doFilter in class ome.util.ContextFilter