All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fluxtion.builder.annotation.SepBuilder Maven / Gradle / Ivy

/*
 * Copyright (C) 2019 V12 Technology Ltd.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the Server Side Public License, version 1,
 * as published by MongoDB, Inc.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * Server Side License for more details.
 *
 * You should have received a copy of the Server Side Public License
 * along with this program.  If not, see 
 * .
 */
package com.fluxtion.builder.annotation;

import com.fluxtion.builder.node.SEPConfig;
import java.lang.annotation.Documented;
import static java.lang.annotation.ElementType.METHOD;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.CLASS;
import java.lang.annotation.Target;

/**
 *
 * Mark a method as a SEP builder. The method must accept one argument of type
 * {@link SEPConfig}. The receiving method will use the provided
 * {@link SEPConfig} instance to define the static event processor that Fluxtion
 * will generate.

* Individual methods or whole classes can be disabled by adding the * {@link Disabled} * annotation to either a method or class respectively. * * @author V12 Technology Ltd. */ @Target(value = {METHOD}) @Retention(value = CLASS) @Documented public @interface SepBuilder { /** * the name of the package the generated artifacts will be written to. * * @return package name */ String packageName(); /** * The name of the generated {@link EventHandler} * * @return event handler name */ String name(); /** * Output directory for Fluxtion generated source artifacts. The default * directory is supplied in the generation process, setting this value * overrides the default. Using maven the typical values are: *

    *
  • target/generated-sources/fluxtion *
  • target/generated-test-sources/fluxtion *
  • src/main/java *
* * @return overridden output directory */ String outputDir() default "src/main/java"; /** * Output directory for generated meta-data describing the static event * processor typical. The default directory is supplied in the generation * process, setting this value overrides the default. Using maven typical * values are: *
    *
  • src/main/resources *
  • src/test/resources *
* * @return overridden resource directory */ String resourceDir() default ""; /** * USE WITH CARE

* Cleans output directory of all files before generating artefacts. if two * annotations are configured in the same build with the * same output directory, setting this option to true will have * unpredictable results. * * @return */ boolean cleanOutputDir() default true; /** * call the lifecycle initialise method on the generated SEP * @return */ boolean initialise() default true; }