[ 
https://issues.apache.org/jira/browse/NIFI-3688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15992951#comment-15992951
 ] 

ASF GitHub Bot commented on NIFI-3688:
--------------------------------------

Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1662#discussion_r114324386
  
    --- Diff: 
nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/src/main/java/org/apache/nifi/processors/groovyx/flow/GroovySessionFile.java
 ---
    @@ -0,0 +1,284 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You 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.
    + */
    +package org.apache.nifi.processors.groovyx.flow;
    +
    +import org.apache.nifi.flowfile.FlowFile;
    +import org.apache.nifi.processor.io.OutputStreamCallback;
    +import org.apache.nifi.processor.io.StreamCallback;
    +import org.apache.nifi.processor.io.InputStreamCallback;
    +
    +import groovy.lang.Writable;
    +import groovy.lang.Closure;
    +import groovy.lang.MetaClass;
    +import groovy.lang.GroovyObject;
    +import org.codehaus.groovy.runtime.InvokerHelper;
    +
    +
    +import java.io.InputStream;
    +import java.io.InputStreamReader;
    +import java.io.OutputStream;
    +import java.io.IOException;
    +import java.io.OutputStreamWriter;
    +import java.io.Writer;
    +
    +/**
    + * SessionFile with groovy specific methods.
    + */
    +public class GroovySessionFile extends SessionFile implements GroovyObject 
{
    +    private transient MetaClass metaClass;
    +
    +    protected GroovySessionFile(ProcessSessionWrap session, FlowFile f) {
    +        super(session, f);
    +        setMetaClass(null); //set defult metaclass
    --- End diff --
    
    Minor typo here (default vs defult)


> Create extended groovy scripting processor
> ------------------------------------------
>
>                 Key: NIFI-3688
>                 URL: https://issues.apache.org/jira/browse/NIFI-3688
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Dmitry Lukyanov
>            Priority: Minor
>
> The idea is to simplify groovy scripting.
> Main targets:
> - to be compatible with existing groovy scripting
> - simplify read/write attributes
> - simplify read/write content
> - avoid closure casting to nifi types like `StreamCallback`
> - simplify and provide visibility when accessing to controller services from 
> script



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to