fr.cnes.sitools.dataset.filter.business
Class FilterChained

java.lang.Object
  extended by org.restlet.engine.Helper
      extended by fr.cnes.sitools.common.model.ExtensionModel<E>
          extended by fr.cnes.sitools.common.business.AbstractExtension<FilterParameter>
              extended by fr.cnes.sitools.dataset.filter.business.AbstractFilter
                  extended by fr.cnes.sitools.dataset.filter.business.FilterChained
All Implemented Interfaces:
IResource, Validable

public final class FilterChained
extends AbstractFilter

A chain of filters

Author:
AKKA

Constructor Summary
FilterChained()
          Constructor
FilterChained(java.lang.String n, java.lang.String d)
          Constructor.
 
Method Summary
 void addFilter(AbstractFilter ac)
          Add a filter in the model.
 java.util.List<Predicat> createPredicats(org.restlet.Request request, java.util.List<Predicat> predicats)
          Method to process conversion, Must be overridden
 void deleteFilter(java.lang.String filtername)
          Delete a filter from the model.
 java.util.List<AbstractFilter> getFilters()
          Returns the list of filters.
 java.lang.String getModelName()
          Get the model name.
 Validator<AbstractFilter> getValidator()
          Gets the validator for this Filter
 
Methods inherited from class fr.cnes.sitools.dataset.filter.business.AbstractFilter
addParam, convert, getDefaultFilter, getDictionaryFromName, getInternParam, getRequestParamsDescription, setDefaultFilter, setRequestParamsDescription
 
Methods inherited from class fr.cnes.sitools.common.business.AbstractExtension
getContext, setContext
 
Methods inherited from class fr.cnes.sitools.common.model.ExtensionModel
getClassAuthor, getClassName, getClassOwner, getClassVersion, getDescription, getDescriptionAction, getId, getName, getParametersMap, setClassAuthor, setClassName, setClassOwner, setClassVersion, setDescription, setDescriptionAction, setId, setName, setParametersMap
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterChained

public FilterChained(java.lang.String n,
                     java.lang.String d)
Constructor.

Parameters:
n - the name of the model
d - the description of the model

FilterChained

public FilterChained()
Constructor

Method Detail

getModelName

public java.lang.String getModelName()
Get the model name.

Returns:
the model name

getFilters

public java.util.List<AbstractFilter> getFilters()
Returns the list of filters.

Returns:
the list of filters

addFilter

public void addFilter(AbstractFilter ac)
Add a filter in the model.

Parameters:
ac - the filter to add

deleteFilter

public void deleteFilter(java.lang.String filtername)
                  throws java.lang.Exception
Delete a filter from the model.

Parameters:
filtername - the name of the filter to delete
Throws:
java.lang.Exception - when filter to remove is not found

createPredicats

public java.util.List<Predicat> createPredicats(org.restlet.Request request,
                                                java.util.List<Predicat> predicats)
                                         throws java.lang.Exception
Description copied from class: AbstractFilter
Method to process conversion, Must be overridden

Specified by:
createPredicats in class AbstractFilter
Parameters:
request - the request to be processed
predicats - the ArrayList to be processed
Returns:
the ArrayList processed
Throws:
java.lang.Exception - TODO EVOLUTION - Possibilité de passer des paramètres d'un filtre à l'autre autrement que par les predicats Voir si besoin.

getValidator

public Validator<AbstractFilter> getValidator()
Gets the validator for this Filter

Returns:
the validator for the filter


Copyright © 2010-2013 CNES. All Rights Reserved.