Class JBossASSimpleExpressionResolver

java.lang.Object
org.jboss.metadata.property.JBossASSimpleExpressionResolver
All Implemented Interfaces:
SimpleExpressionResolver
Direct Known Subclasses:
PropertiesPropertyResolver, SystemPropertyResolver

public abstract class JBossASSimpleExpressionResolver extends Object implements SimpleExpressionResolver
Base class for SimpleExpressionResolver implementations that handle traditional JBoss AS style expressions, with syntax key[,key]*[:defaultValue]. This class handles:
  1. any defaultValue if all key values are unresolvable
  2. separation of multiple comma-delimited key values
  3. the special cases where key is the string "/" or ":", returning File.separator and File.pathSeparator, respectively.
Author:
Brian Stansberry (c) 2014 Red Hat Inc.
  • Constructor Details

    • JBossASSimpleExpressionResolver

      public JBossASSimpleExpressionResolver()
  • Method Details

    • resolveExpressionContent

      public SimpleExpressionResolver.ResolutionResult resolveExpressionContent(String expressionContent)
      Parses the given expression, extracting any key if present and returning the resolved value, if available, or, if not, returning any default value that is present. See the class javadoc for full details.
      Specified by:
      resolveExpressionContent in interface SimpleExpressionResolver
      Parameters:
      expressionContent - the expression
      Returns:
      the resolved value, or null if the value cannot be resolved
    • resolveKey

      protected abstract String resolveKey(String key)
      Resolve a value with the given key.
      Parameters:
      key - the key. Will not be null
      Returns:
      the resolved value, or null if no value corresponds to key