com.streamsets.pipeline.api.Dependency Maven / Gradle / Ivy
/*
* Copyright 2017 StreamSets Inc.
*
* 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.streamsets.pipeline.api;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* A Dependency specifies a configuration this config depends on. The name of the config and
* the values that triggers this config can be specified using this.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Dependency {
/**
* The name of the configuration this configuration depends on, if any.
*
* If it depends on another configuration, this configuration will be displayed only if the depends on
* configuration value matches one of the trigger values.
*
* If using {@link ConfigDefBean} configuration variables can be in different classes and at different depths.
* For these cases, if the depends on configuration variable is not in the same class as the configuration
* variable referring to it, use ^[CONFIGURATION NAME] to specify the full configuration name from the stage.
* Or use [CONFIGURATION NAME]^...^ to specify a relative configuration name, going back from the current
* configuration.
*
* @see #triggeredByValues()
*/
String configName();
/**
* The trigger values of configName that activate this configuration.
*
* @see #configName()
*
*/
String[] triggeredByValues();
}