]> git.somenet.org - pub/jan/aic18.git/blob - service-twitter/src/main/java/at/aic18/g6t4/servicetwitter/configuration/Twitter4jProperties.java
Merge branch 'vagrant-provisioning' into 'master'
[pub/jan/aic18.git] / service-twitter / src / main / java / at / aic18 / g6t4 / servicetwitter / configuration / Twitter4jProperties.java
1 package at.aic18.g6t4.servicetwitter.configuration;
2
3 import org.springframework.boot.context.properties.ConfigurationProperties;
4 import org.springframework.validation.annotation.Validated;
5
6 import javax.validation.Valid;
7 import javax.validation.constraints.NotEmpty;
8
9 @ConfigurationProperties(prefix = "twitter4j")
10 @Validated
11 public class Twitter4jProperties {
12
13     @Valid private final OAuth oauth = new OAuth();
14     private boolean debug = false;
15
16     public OAuth getOauth() {
17         return oauth;
18     }
19
20     public boolean isDebug() {
21         return debug;
22     }
23
24     public void setDebug(boolean debug) {
25         this.debug = debug;
26     }
27
28     public static class OAuth {
29
30         @NotEmpty private String consumerKey;
31         @NotEmpty private String consumerSecret;
32         @NotEmpty private String accessToken;
33         @NotEmpty private String accessTokenSecret;
34
35         public String getConsumerKey() {
36             return consumerKey;
37         }
38
39         public void setConsumerKey(String consumerKey) {
40             this.consumerKey = consumerKey;
41         }
42
43         public String getConsumerSecret() {
44             return consumerSecret;
45         }
46
47         public void setConsumerSecret(String consumerSecret) {
48             this.consumerSecret = consumerSecret;
49         }
50
51         public String getAccessToken() {
52             return accessToken;
53         }
54
55         public void setAccessToken(String accessToken) {
56             this.accessToken = accessToken;
57         }
58
59         public String getAccessTokenSecret() {
60             return accessTokenSecret;
61         }
62
63         public void setAccessTokenSecret(String accessTokenSecret) {
64             this.accessTokenSecret = accessTokenSecret;
65         }
66
67     }
68
69 }