Skip to content

Commit 7cb8129

Browse files
authored
add stereotypes (#44)
1 parent d9508dd commit 7cb8129

7 files changed

Lines changed: 189 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package it.aboutbits.springboot.toolbox.stereotype;
2+
3+
import org.springframework.core.annotation.AliasFor;
4+
import org.springframework.stereotype.Component;
5+
6+
import java.lang.annotation.Documented;
7+
import java.lang.annotation.ElementType;
8+
import java.lang.annotation.Retention;
9+
import java.lang.annotation.RetentionPolicy;
10+
import java.lang.annotation.Target;
11+
12+
@Target({ElementType.TYPE})
13+
@Retention(RetentionPolicy.RUNTIME)
14+
@Documented
15+
@Component
16+
public @interface Action {
17+
18+
/**
19+
* The value may indicate a suggestion for a logical component name,
20+
* to be turned into a Spring bean in case of an autodetected component.
21+
*
22+
* @return the suggested component name, if any (or empty String otherwise)
23+
*/
24+
@AliasFor(annotation = Component.class)
25+
String value() default "";
26+
}
27+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package it.aboutbits.springboot.toolbox.stereotype;
2+
3+
import org.springframework.core.annotation.AliasFor;
4+
import org.springframework.stereotype.Component;
5+
6+
import java.lang.annotation.Documented;
7+
import java.lang.annotation.ElementType;
8+
import java.lang.annotation.Retention;
9+
import java.lang.annotation.RetentionPolicy;
10+
import java.lang.annotation.Target;
11+
12+
@Target({ElementType.TYPE})
13+
@Retention(RetentionPolicy.RUNTIME)
14+
@Documented
15+
@Component
16+
public @interface Client {
17+
18+
/**
19+
* The value may indicate a suggestion for a logical component name,
20+
* to be turned into a Spring bean in case of an autodetected component.
21+
*
22+
* @return the suggested component name, if any (or empty String otherwise)
23+
*/
24+
@AliasFor(annotation = Component.class)
25+
String value() default "";
26+
}
27+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package it.aboutbits.springboot.toolbox.stereotype;
2+
3+
import org.springframework.core.annotation.AliasFor;
4+
import org.springframework.stereotype.Component;
5+
6+
import java.lang.annotation.Documented;
7+
import java.lang.annotation.ElementType;
8+
import java.lang.annotation.Retention;
9+
import java.lang.annotation.RetentionPolicy;
10+
import java.lang.annotation.Target;
11+
12+
@Target({ElementType.TYPE})
13+
@Retention(RetentionPolicy.RUNTIME)
14+
@Documented
15+
@Component
16+
public @interface Guard {
17+
18+
/**
19+
* The value may indicate a suggestion for a logical component name,
20+
* to be turned into a Spring bean in case of an autodetected component.
21+
*
22+
* @return the suggested component name, if any (or empty String otherwise)
23+
*/
24+
@AliasFor(annotation = Component.class)
25+
String value() default "";
26+
}
27+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package it.aboutbits.springboot.toolbox.stereotype;
2+
3+
import org.springframework.core.annotation.AliasFor;
4+
import org.springframework.stereotype.Component;
5+
6+
import java.lang.annotation.Documented;
7+
import java.lang.annotation.ElementType;
8+
import java.lang.annotation.Retention;
9+
import java.lang.annotation.RetentionPolicy;
10+
import java.lang.annotation.Target;
11+
12+
@Target({ElementType.TYPE})
13+
@Retention(RetentionPolicy.RUNTIME)
14+
@Documented
15+
@Component
16+
public @interface Job {
17+
18+
/**
19+
* The value may indicate a suggestion for a logical component name,
20+
* to be turned into a Spring bean in case of an autodetected component.
21+
*
22+
* @return the suggested component name, if any (or empty String otherwise)
23+
*/
24+
@AliasFor(annotation = Component.class)
25+
String value() default "";
26+
}
27+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package it.aboutbits.springboot.toolbox.stereotype;
2+
3+
import org.springframework.core.annotation.AliasFor;
4+
import org.springframework.stereotype.Component;
5+
6+
import java.lang.annotation.Documented;
7+
import java.lang.annotation.ElementType;
8+
import java.lang.annotation.Retention;
9+
import java.lang.annotation.RetentionPolicy;
10+
import java.lang.annotation.Target;
11+
12+
@Target({ElementType.TYPE})
13+
@Retention(RetentionPolicy.RUNTIME)
14+
@Documented
15+
@Component
16+
public @interface Loader {
17+
18+
/**
19+
* The value may indicate a suggestion for a logical component name,
20+
* to be turned into a Spring bean in case of an autodetected component.
21+
*
22+
* @return the suggested component name, if any (or empty String otherwise)
23+
*/
24+
@AliasFor(annotation = Component.class)
25+
String value() default "";
26+
}
27+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package it.aboutbits.springboot.toolbox.stereotype;
2+
3+
import org.springframework.core.annotation.AliasFor;
4+
import org.springframework.stereotype.Component;
5+
6+
import java.lang.annotation.Documented;
7+
import java.lang.annotation.ElementType;
8+
import java.lang.annotation.Retention;
9+
import java.lang.annotation.RetentionPolicy;
10+
import java.lang.annotation.Target;
11+
12+
@Target({ElementType.TYPE})
13+
@Retention(RetentionPolicy.RUNTIME)
14+
@Documented
15+
@Component
16+
public @interface Store {
17+
18+
/**
19+
* The value may indicate a suggestion for a logical component name,
20+
* to be turned into a Spring bean in case of an autodetected component.
21+
*
22+
* @return the suggested component name, if any (or empty String otherwise)
23+
*/
24+
@AliasFor(annotation = Component.class)
25+
String value() default "";
26+
}
27+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package it.aboutbits.springboot.toolbox.stereotype;
2+
3+
import org.springframework.core.annotation.AliasFor;
4+
import org.springframework.stereotype.Component;
5+
6+
import java.lang.annotation.Documented;
7+
import java.lang.annotation.ElementType;
8+
import java.lang.annotation.Retention;
9+
import java.lang.annotation.RetentionPolicy;
10+
import java.lang.annotation.Target;
11+
12+
@Target({ElementType.TYPE})
13+
@Retention(RetentionPolicy.RUNTIME)
14+
@Documented
15+
@Component
16+
public @interface Validator {
17+
18+
/**
19+
* The value may indicate a suggestion for a logical component name,
20+
* to be turned into a Spring bean in case of an autodetected component.
21+
*
22+
* @return the suggested component name, if any (or empty String otherwise)
23+
*/
24+
@AliasFor(annotation = Component.class)
25+
String value() default "";
26+
}
27+

0 commit comments

Comments
 (0)