private String resolveExpressionString ( final String unresolvedString ) throws OperationFailedException { // parseAndResolve should only be providing expressions with no leading or trailing chars assert unresolvedString . startsWith ( "${" ) && unresolvedString . endsWith ( "}" ) ; // Default result is no change from input String result = unresolvedString ; ModelNode resolveNode = new ModelNode ( new ValueExpression ( unresolvedString ) ) ; // Try plug-in resolution; i.e. vault resolvePluggableExpression ( resolveNode ) ; if ( resolveNode . getType ( ) == ModelType . EXPRESSION ) { // resolvePluggableExpression did nothing. Try standard resolution String resolvedString = resolveStandardExpression ( resolveNode ) ; if ( ! unresolvedString . equals ( resolvedString ) ) { // resolveStandardExpression made progress result = resolvedString ; } // else there is nothing more we can do with this string } else { // resolvePluggableExpression made progress result = resolveNode . asString ( ) ; } return result ; }
Resolve the given string using any plugin and the DMR resolve method