net.refractions.udig.project.interceptor
Class ShowViewInterceptor

java.lang.Object
  extended by net.refractions.udig.project.interceptor.ShowViewInterceptor
All Implemented Interfaces:
IResourceInterceptor<FeatureSource>

public class ShowViewInterceptor
extends java.lang.Object
implements IResourceInterceptor<FeatureSource>

If a filter or a query is in the layer style blackboard under the key: the KEY then this interceptor will return the "view" see DataStore#getView(Query).

The style content class ensures that the view will be returned each time the map is reloaded.

Since:
1.1.0
Author:
Jesse

Nested Class Summary
static class ShowViewInterceptor.ViewStyleContent
          Persists Query and Filters saved on the style blackboard.
 
Field Summary
static java.lang.String KEY
          The key that is checked to see if a filter is on the Map Blackboard or the Layer Properties.
 
Constructor Summary
ShowViewInterceptor()
           
 
Method Summary
 FeatureSource run(ILayer layer, FeatureSource resource, java.lang.Class<? super FeatureSource> requestedType)
          Modifies the resource that is returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY

public static final java.lang.String KEY
The key that is checked to see if a filter is on the Map Blackboard or the Layer Properties.

See Also:
Constant Field Values
Constructor Detail

ShowViewInterceptor

public ShowViewInterceptor()
Method Detail

run

public FeatureSource run(ILayer layer,
                         FeatureSource resource,
                         java.lang.Class<? super FeatureSource> requestedType)
Description copied from interface: IResourceInterceptor
Modifies the resource that is returned. The returned value is not necessarily the value passed in as a parameter

Specified by:
run in interface IResourceInterceptor<FeatureSource>
Parameters:
layer - the layer that the resources is being obtained from.
resource - The resource obtained from the IGeoResource.
requestedType - the type that the caller requested.
Returns:
the resource to return to the caller. May be a new instance or the same instance.