org.krakenapps.filter.impl
Class FilterConfig

java.lang.Object
  extended by org.krakenapps.filter.impl.FilterConfig

public class FilterConfig
extends java.lang.Object

Loads and saves filter states.

Since:
1.0.0
Author:
xeraph

Constructor Summary
FilterConfig()
          Creates a filter config instance and prepare tables.
 
Method Summary
 boolean addFilterInstance(java.lang.String filterId, java.lang.String filterClassName, int filterType)
          Save filter instance information to data store.
 void bindFilter(java.lang.String fromFilterId, java.lang.String toFilterId)
          Save the bind state to data store.
 java.util.Properties getFilterProperties(java.lang.String filterId)
          Returns the properties of the filter.
 java.util.List<java.lang.String> getInputFilters(java.lang.String filterId)
          Returns a List of bound source filters.
 java.util.List<java.lang.String> getOutputFilters(java.lang.String filterId)
          Returns a List of destination filters.
 java.util.List<FilterInstance> loadFilterInstances()
          Returns a List of all loaded filter instance informations.
 java.util.List<FilterInstance> loadFilterInstances(java.lang.String className)
          Returns a List of loaded filter instance informations for specific filter class name.
 void removeFilterInstance(java.lang.String filterId)
          Remove the filter instance information from data store.
 void resetFilterProperties(java.lang.String filterId)
          Remove all properties of the filter from data store.
 void setFilterProperty(java.lang.String filterId, java.lang.String name, java.lang.String value)
          Save the property of the filter instance to data store.
 void unbindFilter(java.lang.String fromFilterId, java.lang.String toFilterId)
          Remove the bind state from data store.
 void unsetFilterProperty(java.lang.String filterId, java.lang.String name)
          Remove the property of the filter instance from data store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterConfig

public FilterConfig()
Creates a filter config instance and prepare tables.

Method Detail

loadFilterInstances

public java.util.List<FilterInstance> loadFilterInstances(java.lang.String className)
Returns a List of loaded filter instance informations for specific filter class name.

Parameters:
className - the filter class name
Returns:
a List of loaded filter instance informations

loadFilterInstances

public java.util.List<FilterInstance> loadFilterInstances()
Returns a List of all loaded filter instance informations.


addFilterInstance

public boolean addFilterInstance(java.lang.String filterId,
                                 java.lang.String filterClassName,
                                 int filterType)
Save filter instance information to data store.

Parameters:
filterId - the filter id
filterClassName - the filter class name
filterType - active filter or not
Returns:
true if saved successfully

removeFilterInstance

public void removeFilterInstance(java.lang.String filterId)
Remove the filter instance information from data store.

Parameters:
filterId - the filter id

getFilterProperties

public java.util.Properties getFilterProperties(java.lang.String filterId)
Returns the properties of the filter.

Parameters:
filterId - the filter id
Returns:
the properties of the filter. null if error occurred.

setFilterProperty

public void setFilterProperty(java.lang.String filterId,
                              java.lang.String name,
                              java.lang.String value)
Save the property of the filter instance to data store.

Parameters:
filterId - the filter id
name - the name of the property
value - the value of the property

resetFilterProperties

public void resetFilterProperties(java.lang.String filterId)
Remove all properties of the filter from data store.

Parameters:
filterId - the filter id

unsetFilterProperty

public void unsetFilterProperty(java.lang.String filterId,
                                java.lang.String name)
Remove the property of the filter instance from data store.

Parameters:
filterId - the filter id
name - the name of the filter

bindFilter

public void bindFilter(java.lang.String fromFilterId,
                       java.lang.String toFilterId)
Save the bind state to data store.

Parameters:
fromFilterId - the source filter id
toFilterId - the destination filter id

unbindFilter

public void unbindFilter(java.lang.String fromFilterId,
                         java.lang.String toFilterId)
Remove the bind state from data store.

Parameters:
fromFilterId - the source filter id
toFilterId - the destination filter id

getInputFilters

public java.util.List<java.lang.String> getInputFilters(java.lang.String filterId)
Returns a List of bound source filters.

Parameters:
filterId - the filter id
Returns:
a List of filter id of bound source filters

getOutputFilters

public java.util.List<java.lang.String> getOutputFilters(java.lang.String filterId)
Returns a List of destination filters.

Parameters:
filterId - the filter id
Returns:
a List of filter id of bound destination filters


Copyright © 2008-2009 Kraken Project. All Rights Reserved.