1 package at.aic18.g6t4.servicetwitter.configuration;
3 import org.springframework.boot.context.properties.ConfigurationProperties;
4 import org.springframework.validation.annotation.Validated;
6 import javax.validation.Valid;
7 import javax.validation.constraints.NotEmpty;
9 @ConfigurationProperties(prefix = "twitter4j")
11 public class Twitter4jProperties {
13 @Valid private final OAuth oauth = new OAuth();
14 private boolean debug = false;
16 public OAuth getOauth() {
20 public boolean isDebug() {
24 public void setDebug(boolean debug) {
28 public static class OAuth {
30 @NotEmpty private String consumerKey;
31 @NotEmpty private String consumerSecret;
32 @NotEmpty private String accessToken;
33 @NotEmpty private String accessTokenSecret;
35 public String getConsumerKey() {
39 public void setConsumerKey(String consumerKey) {
40 this.consumerKey = consumerKey;
43 public String getConsumerSecret() {
44 return consumerSecret;
47 public void setConsumerSecret(String consumerSecret) {
48 this.consumerSecret = consumerSecret;
51 public String getAccessToken() {
55 public void setAccessToken(String accessToken) {
56 this.accessToken = accessToken;
59 public String getAccessTokenSecret() {
60 return accessTokenSecret;
63 public void setAccessTokenSecret(String accessTokenSecret) {
64 this.accessTokenSecret = accessTokenSecret;