JBoss Metadata Common 7.2.2.Final

org.jboss.metadata.property
Class CompositePropertyResolver

java.lang.Object
  extended by org.jboss.metadata.property.CompositePropertyResolver
All Implemented Interfaces:
PropertyResolver, SimpleExpressionResolver

public class CompositePropertyResolver
extends Object
implements SimpleExpressionResolver, PropertyResolver

Resolves properties using a series of other PropertyResolvers. If any are implementations of SimpleExpressionResolver, then any default resolution they provide will not be returned unless no other resolver provides a non-default resolution. See https://issues.jboss.org/browse/JBMETA-371 for the problem this addresses.

Author:
John Bailey

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.metadata.property.SimpleExpressionResolver
SimpleExpressionResolver.ResolutionResult
 
Constructor Summary
CompositePropertyResolver(Collection<PropertyResolver> resolvers)
          Deprecated. 
CompositePropertyResolver(PropertyResolver... resolvers)
          Deprecated. 
CompositePropertyResolver(SimpleExpressionResolver... resolvers)
           
 
Method Summary
 String resolve(String propertyName)
          Deprecated. use SimpleExpressionResolver and resolveExpressionContent(String)
 SimpleExpressionResolver.ResolutionResult resolveExpressionContent(String expressionContent)
          Resolve the given expression content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositePropertyResolver

@Deprecated
public CompositePropertyResolver(Collection<PropertyResolver> resolvers)
Deprecated. 


CompositePropertyResolver

@Deprecated
public CompositePropertyResolver(PropertyResolver... resolvers)
Deprecated. 


CompositePropertyResolver

public CompositePropertyResolver(SimpleExpressionResolver... resolvers)
Method Detail

resolve

@Deprecated
public String resolve(String propertyName)
Deprecated. use SimpleExpressionResolver and resolveExpressionContent(String)

Treats propertyName as expression content and passes it to resolveExpressionContent(String). This method is retained for compatibility with legacy PropertyResolver usage.

Specified by:
resolve in interface PropertyResolver
Parameters:
propertyName - the expression The name to resolve.
Returns:
The resolved value or null if the property can not be resolved.

resolveExpressionContent

public SimpleExpressionResolver.ResolutionResult resolveExpressionContent(String expressionContent)
Description copied from interface: SimpleExpressionResolver
Resolve the given expression content. The following guarantees are made with regard to the content:
  1. The content is the entire string that was included between a leading "${" and a trailing "}".
  2. The content itself does not include the leading "${" and trailing "}".
  3. The content itself does not include any other "${" and trailing "}", i.e. there is no nested expression.

Specified by:
resolveExpressionContent in interface SimpleExpressionResolver
Parameters:
expressionContent - the string that was between the leading "${"and trailing "}" in an expression
Returns:
the result of the resolution, or null if the expression content could not be resolved.

JBoss Metadata Common 7.2.2.Final

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.