org.milyn.delivery
Class ContentHandlerConfigMapTable<T extends ContentHandler>

java.lang.Object
  extended by org.milyn.delivery.ContentHandlerConfigMapTable<T>

public class ContentHandlerConfigMapTable<T extends ContentHandler>
extends Object

Simple table for storing ContentHandlerConfigMap lists against a selector string.

Author:
tom.fennelly@gmail.com

Constructor Summary
ContentHandlerConfigMapTable()
           
 
Method Summary
 void addMapping(String selector, SmooksResourceConfiguration resourceConfig, T deliveryUnit)
          Add a delivery unit mapping for the specified selector.
 int getCount()
          Get the total number of mappings on this table.
 List<ContentHandlerConfigMap<T>> getMappings(String selector)
          Get the ContentHandlerConfigMap list for the supplied selector string.
 List<ContentHandlerConfigMap<T>> getMappings(String[] selectors)
          Get the combined ContentHandlerConfigMap list for the supplied list of selector strings.
 Map<String,List<ContentHandlerConfigMap<T>>> getTable()
           
 boolean isEmpty()
          Is the table empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentHandlerConfigMapTable

public ContentHandlerConfigMapTable()
Method Detail

addMapping

public void addMapping(String selector,
                       SmooksResourceConfiguration resourceConfig,
                       T deliveryUnit)
Add a delivery unit mapping for the specified selector.

Parameters:
selector - The resource/delivery-unit selector.
resourceConfig - Resource configuration.
deliveryUnit - The delivery unit.

getTable

public Map<String,List<ContentHandlerConfigMap<T>>> getTable()

getMappings

public List<ContentHandlerConfigMap<T>> getMappings(String selector)
Get the ContentHandlerConfigMap list for the supplied selector string.

Parameters:
selector - The lookup selector.
Returns:
It's list of ContentHandlerConfigMap instances, or null if there are none.

getMappings

public List<ContentHandlerConfigMap<T>> getMappings(String[] selectors)
Get the combined ContentHandlerConfigMap list for the supplied list of selector strings.

Parameters:
selectors - The lookup selectors.
Returns:
The combined ContentHandlerConfigMap list for the supplied list of selector strings, or an empty list if there are none.

isEmpty

public boolean isEmpty()
Is the table empty.

Returns:
True if the table is empty, otherwise false.

getCount

public int getCount()
Get the total number of mappings on this table.

Returns:
The total number of mappings on this table.


Copyright © 2008. All Rights Reserved.