blob: c15e618e366b4aaac33244645b5799fb3bb1e271 [file] [log] [blame]
/*
* Copyright 2019 WeBank
*
* 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.
*/
package com.webank.wedatasphere.linkis.entrance.interceptor
import com.webank.wedatasphere.linkis.common.exception.{ErrorException, WarnException}
import com.webank.wedatasphere.linkis.protocol.task.Task
/**
* Created by enjoyyin on 2018/9/4.
*/
trait EntranceInterceptor {
/**
* The apply function is to supplement the information of the incoming parameter task, making the content of this task more complete.
  * Additional information includes: database information supplement, custom variable substitution, code check, limit limit, etc.
* apply函数是对传入参数task进行信息的补充,使得这个task的内容更加完整。
* 补充的信息包括: 数据库信息补充、自定义变量替换、代码检查、limit限制等
* @param task
* @param logAppender Used to cache the necessary reminder logs and pass them to the upper layer(用于缓存必要的提醒日志,传给上层)
* @return
*/
@throws[ErrorException]
def apply(task: Task, logAppender: java.lang.StringBuilder): Task
}