de.janrufmonitor.repository.filter
Class AbstractFilterSerializer

java.lang.Object
  extended by de.janrufmonitor.repository.filter.AbstractFilterSerializer

public abstract class AbstractFilterSerializer
extends Object

This class is an abstract implementation of a filter serializer. It has to be implemented by a concrete class.

Author:
Thilo Brandt

Constructor Summary
AbstractFilterSerializer()
           
 
Method Summary
 IFilter getFilterFromString(String fstring)
          Transforms a String representation of a filter into an IFilter object.
 IFilter[] getFiltersFromString(String s)
          Transforms a String representation of a list of filters into an IFilter[] object.
 String getFiltersToString(IFilter[] filters)
          Transforms a IFilter[] object into a string representation
 String getFilterToString(IFilter f)
          Transforms a IFilter object into a string representation
protected abstract  IRuntime getRuntime()
          Returns the current IRuntime, this implementation is using.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFilterSerializer

public AbstractFilterSerializer()
Method Detail

getFilterFromString

public IFilter getFilterFromString(String fstring)
Transforms a String representation of a filter into an IFilter object.

Parameters:
fstring - string representation of the filter
Returns:
a valid IFilter object or null, if string is invalid.

getFiltersFromString

public IFilter[] getFiltersFromString(String s)
Transforms a String representation of a list of filters into an IFilter[] object.

Parameters:
s - string representation of a filter list
Returns:
a valid IFilter[] object or null, if string is invalid.

getFilterToString

public String getFilterToString(IFilter f)
Transforms a IFilter object into a string representation

Parameters:
f - a valid IFilter object, should not be null
Returns:
a string representation of the filter.

getFiltersToString

public String getFiltersToString(IFilter[] filters)
Transforms a IFilter[] object into a string representation

Parameters:
filters - a valid IFilter[] object, should not be null
Returns:
a string representation of a list of filters.

getRuntime

protected abstract IRuntime getRuntime()
Returns the current IRuntime, this implementation is using. In standard case this should return PIMRuntime.getInstance().

Returns:
a valid IRuntime instance


Copyright © 2010 by Thilo Brandt. All Rights Reserved.