org.talend.esb.servicelocator.client
Class SLPropertiesMatcher

java.lang.Object
  extended by org.talend.esb.servicelocator.client.SLPropertiesMatcher

public class SLPropertiesMatcher
extends Object

Checks whether a SLProperties has the specified values with specific values.


Field Summary
static SLPropertiesMatcher ALL_MATCHER
           
 
Constructor Summary
SLPropertiesMatcher()
           
 
Method Summary
 void addAssertion(String name, String value)
          Add an assertion to this matcher where a SLProperties must have a property with the given name which at least contains the given value.
 boolean isMatching(SLProperties properties)
          Checks if the given SLProperties fulfills all assertions specified for this matcher.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL_MATCHER

public static final SLPropertiesMatcher ALL_MATCHER
Constructor Detail

SLPropertiesMatcher

public SLPropertiesMatcher()
Method Detail

addAssertion

public void addAssertion(String name,
                         String value)
Add an assertion to this matcher where a SLProperties must have a property with the given name which at least contains the given value. Name and value are trimmed before matching is done.

Parameters:
name - the name of the property which must be present, must not be null
value - the value the property must at least contain, must not be null

isMatching

public boolean isMatching(SLProperties properties)
Checks if the given SLProperties fulfills all assertions specified for this matcher.

Parameters:
properties - the properties to be checked
Returns:
true iff if all assertions are fulfilled

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011-2013 Talend Inc.. All Rights Reserved.