Camel
  1. Camel
  2. CAMEL-4629

Add support for loading script from file/classpath in the groovy/ognl/mvel etc components

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.11.0
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      This allows these language components to be more usable, and for people to have scripts in external resources in the classpath or the file system.

      The script can be loaded like this code:

              if (ResourceHelper.hasScheme(script)) {
                  InputStream is = loadResource(script);
                  answer = getCamelContext().getTypeConverter().convertTo(String.class, is);
                  IOHelper.close(is);
              } else {
                  // already a script so no need to load
      

        Issue Links

          Activity

          Claus Ibsen created issue -
          Claus Ibsen made changes -
          Field Original Value New Value
          Link This issue is related to CAMEL-4627 [ CAMEL-4627 ]
          Claus Ibsen made changes -
          Fix Version/s 2.11 [ 12321695 ]
          Fix Version/s 2.10.0 [ 12317612 ]
          Claus Ibsen made changes -
          Assignee Claus Ibsen [ davsclaus ]
          Claus Ibsen made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Claus Ibsen
              Reporter:
              Claus Ibsen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development