org.hd.d.pg2k.webSvr.exhibit
Class FilterBean

java.lang.Object
  extended by org.hd.d.pg2k.webSvr.exhibit.AbstractFilterBean
      extended by org.hd.d.pg2k.webSvr.exhibit.FilterBean
All Implemented Interfaces:
java.io.Serializable

public class FilterBean
extends AbstractFilterBean

Version of the filter/sorter (cache) JavaBean that returns selected/sorted items as a List. Other classes may find the simple select() methods useful and thus this is not final.

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
          Unique Serialisation class ID generated by http://random.hd.org/.
 
Fields inherited from class org.hd.d.pg2k.webSvr.exhibit.AbstractFilterBean
BUILD_TIME_LIVE_RATIO, BUILD_TIME_LIVE_RATIO_MEM_STRESS, MAX_STRONG_RETENTION_MS
 
Constructor Summary
FilterBean()
           
 
Method Summary
 java.util.List<Name.ExhibitFull> peek(javax.servlet.ServletContext ctxt)
          Returns the (immutable) exhibit list result of select() if the underlying data seems to be computed and cached and still valid, else null.
 java.util.List<Name.ExhibitFull> peek(javax.servlet.ServletContext ctxt, java.util.List<Name.ExhibitFull> inputSet)
          Returns the (immutable) exhibit list result of select() if the underlying data seems to be computed and cached and still valid, else null.
 java.util.List<Name.ExhibitFull> select(javax.servlet.ServletContext ctxt)
          Get the results of applying this to the whole exhibit set given the context (the data source is found automagically); never null.
 java.util.List<Name.ExhibitFull> select(javax.servlet.ServletContext ctxt, java.util.List<Name.ExhibitFull> inputSet)
          Get the results of applying this to the given exhibit set given the context (the data source is found automagically); never null.
 
Methods inherited from class org.hd.d.pg2k.webSvr.exhibit.AbstractFilterBean
_isValid, _retainCacheRef, _select, clearCache, getExpiryInterval, getExpr, getMemorySensitiveCache, getName, invalidate, setExpiryInterval, setExpr, setExpr, setMemorySensitiveCache, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Unique Serialisation class ID generated by http://random.hd.org/.

See Also:
Constant Field Values
Constructor Detail

FilterBean

public FilterBean()
Method Detail

select

public java.util.List<Name.ExhibitFull> select(javax.servlet.ServletContext ctxt)
                                        throws java.io.IOException,
                                               java.lang.IllegalStateException
Get the results of applying this to the whole exhibit set given the context (the data source is found automagically); never null. The data source must already have been initialised for this to work.

The result is a set of full exhibit names as a private unsorted array.

This will only (re)compute its results if:

This never returns null.

Throws:
java.lang.IllegalStateException - if the filter has not been set
java.io.IOException

select

public java.util.List<Name.ExhibitFull> select(javax.servlet.ServletContext ctxt,
                                               java.util.List<Name.ExhibitFull> inputSet)
                                        throws java.io.IOException,
                                               java.lang.IllegalStateException
Get the results of applying this to the given exhibit set given the context (the data source is found automagically); never null. The data source must already have been initialised for this to work.

The result is a set of full exhibit names as an immutable RandomAccess List of Name.ExhibitFull values.

If the inputSet argument is null then the whole set of exhibits is used, else the supplied set is used.

This will only (re)compute its results if:

This never returns null.

Null names and names that do not represent items currently in the exhibit set are silently dropped.

Parameters:
inputSet - null, or a list of full exhibit names
Throws:
java.lang.IllegalStateException - if the filter has not been set
java.io.IOException

peek

public java.util.List<Name.ExhibitFull> peek(javax.servlet.ServletContext ctxt,
                                             java.util.List<Name.ExhibitFull> inputSet)
                                      throws java.io.IOException,
                                             java.lang.IllegalStateException
Returns the (immutable) exhibit list result of select() if the underlying data seems to be computed and cached and still valid, else null. Matches select(ctxt, inputSet) and filters from the provided exhibit set.

Does not force recomputation.

Throws:
java.io.IOException
java.lang.IllegalStateException

peek

public java.util.List<Name.ExhibitFull> peek(javax.servlet.ServletContext ctxt)
                                      throws java.io.IOException,
                                             java.lang.IllegalStateException
Returns the (immutable) exhibit list result of select() if the underlying data seems to be computed and cached and still valid, else null. Matches select(ctxt) and works on the entire exhibit set.

Does not force recomputation.

Throws:
java.io.IOException
java.lang.IllegalStateException

DHD Multimedia Gallery V1.57.21

Copyright (c) 1996-2011, Damon Hart-Davis. All rights reserved.