/**
  * Copyright 2017 Hortonworks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at

  *   http://www.apache.org/licenses/LICENSE-2.0

  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
 **/

public abstract class Script<I, O, E> implements Serializable {
    protected final String expression;
    protected final E scriptEngine;

    /**
     * Sets the {@link Expression} to be evaluated by the {@link ScriptEngine}
     */
    public Script(String expression, ScriptEngine<E> scriptEngine) {
        this.expression = expression;
        this.scriptEngine = scriptEngine.getEngine();
    }

    public abstract O evaluate(I input) throws ScriptException;

    @Override
    public String toString() {
        return "Script{" + expression + ", scriptEngine=" + scriptEngine + '}';
    }
}

@@ -597,16 +597,768 @@
 .%0A **/%0A%0A
+package com.hortonworks.streamline.streams.runtime.script;%0A%0Aimport com.hortonworks.streamline.streams.StreamlineEvent;%0Aimport com.hortonworks.streamline.streams.layout.component.rule.expression.Expression;%0Aimport com.hortonworks.streamline.streams.runtime.script.engine.ScriptEngine;%0Aimport javax.script.ScriptException;%0Aimport java.io.Serializable;%0A%0A/**%0A * Evaluates the %7B@link Expression%7D with the %7B@link ScriptEngine%7D for each %7B@code Input%7D%0A * @param %3CI%3E The type of input on which this script is evaluated, e.g. %7B@code tuple%7D for %7B@code Apache Storm%7D or %7B@link StreamlineEvent%7D%0A * @param %3CO%3E The type of output returned after the script is evaluated with %7B@link Script#evaluate(I)%7D.%0A * @param %3CE%3E The Script Engine used to evaluate the scripts%0A */%0A
 public a

Fix license issue with Script.java