001/**
002 * Copyright (C) 2006-2024 Talend Inc. - www.talend.com
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.talend.sdk.component.api.component;
017
018import static java.lang.annotation.RetentionPolicy.RUNTIME;
019
020import java.lang.annotation.ElementType;
021import java.lang.annotation.Repeatable;
022import java.lang.annotation.Retention;
023import java.lang.annotation.RetentionPolicy;
024import java.lang.annotation.Target;
025
026import org.talend.sdk.component.api.meta.Documentation;
027
028/**
029 * Use to group {@link AfterVariable} annotations.
030 * Can be helpful either if you can't use {@link AfterVariable} as repeatable annotations or just to group annotations.
031 *
032 * Note. This functionality is for the Studio only.
033 */
034@Documentation("Declare the group of after variable `@AfterVariable`, "
035        + "only supported on components - `@PartitionMapper`, `@Processor`, `@Emitter`."
036        + "The functionality is for the Studio only.")
037@Target({ ElementType.TYPE })
038@Retention(RetentionPolicy.RUNTIME)
039@Deprecated
040public @interface AfterVariables {
041
042    AfterVariable[] value();
043
044    /**
045     * Declare after variable for the component.
046     *
047     * Put annotation on {@link org.talend.sdk.component.api.input.Emitter},
048     * {@link org.talend.sdk.component.api.input.PartitionMapper},
049     * {@link org.talend.sdk.component.api.processor.Processor} to declare after variables
050     *
051     * Note. This functionality is for the Studio only.
052     */
053    @Documentation("Declare the after variable, "
054            + "only supported on components - `@PartitionMapper`, `@Processor`, `@Emitter`."
055            + "The functionality is for the Studio only.")
056    @Repeatable(AfterVariables.class)
057    @Target(ElementType.TYPE)
058    @Retention(RetentionPolicy.RUNTIME)
059    @Deprecated
060    @interface AfterVariable {
061
062        /**
063         * @return studio name for variable (like: NB_LINE)
064         */
065        String value();
066
067        /**
068         * @return description of the variable. If it's an empty the key value might be used instead
069         */
070        String description() default "";
071
072        /**
073         * @return type of variable
074         */
075        Class<?> type() default String.class;
076    }
077
078    /**
079     * Mark method that returns container with after variables.
080     *
081     * Note. This functionality is for the Studio only.
082     */
083    @Documentation("Mark method that returns container with after variables map, "
084            + "only supported on components - `@PartitionMapper`, `@Processor`, `@Emitter`."
085            + "The functionality is for the Studio only.")
086    @Target(ElementType.METHOD)
087    @Retention(RUNTIME)
088    @Deprecated
089    @interface AfterVariableContainer {
090    }
091}