Class NotEvaluableExpression


  • public class NotEvaluableExpression
    extends java.lang.Object
    An instance of this class is used as the return value from the doNotEval SpEL helper which makes it possible to skip SpEL evaluation in other SpEL helpers e.g. toJson.

    For example, in the evaluation context is defined only fileMap object:

    
     Map<String, Object> fileMap = Collections.singletonMap("owner", "managed-by-${team}");
     

    An exception will be thrown in attempt to get JSON because of fileMap contains SpEL inside.

    
     ${#toJson(fileMap)}
     

    In the given case fileMap contains SpEL for another tool e.g. Terraform. Use doNotEval to let Spinnaker know that this SpEL should be evaluated by a different tool. No exceptions are thrown this way.

    
     ${#toJson(#doNotEval(fileMap))}
     
    • Constructor Summary

      Constructors 
      Constructor Description
      NotEvaluableExpression​(java.lang.Object expression)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getExpression()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NotEvaluableExpression

        public NotEvaluableExpression​(java.lang.Object expression)
    • Method Detail

      • getExpression

        public java.lang.Object getExpression()