Commit 4084b177ca8f787901ca13925e78e258c2e563ea
Merge remote-tracking branch 'origin/Scheduler' into Scheduler
# Conflicts: # docker/wildfly/volumes/conf/beuthbot.properties # services/Common/src/main/java/de/bht/beuthbot/model/Intent.java # services/MainBot/src/main/java/de/bht/beuthbot/scheduler/SchedulerBean.java # settings.gradle
Showing
7 changed files
with
86 additions
and
16 deletions
docker/wildfly/volumes/conf/beuthbot.properties
1 | -WEB_URL = https://wcwettfhwr.localtunnel.me | 1 | +WEB_URL = https://tlhiuqrvbl.localtunnel.me |
2 | 2 | ||
3 | 3 | ||
4 | # Webhook token you set in the Facebook App Settings | 4 | # Webhook token you set in the Facebook App Settings |
5 | -FACEBOOK_WEBHOOK_TOKEN = bhtchatbot | 5 | +FACEBOOK_WEBHOOK_TOKEN = local-beuth-bot |
6 | 6 | ||
7 | # Facebook Message Token for your page | 7 | # Facebook Message Token for your page |
8 | -FACEBOOK_BOT_TOKEN = XXXXX | ||
9 | - | ||
10 | -FACEBOOK_ACCESS_TOKEN = XXXXX|XXXXX-XXXXX | 8 | +FACEBOOK_BOT_TOKEN = EAAX3bENbCzcBAGESpNG7XBqXiZBvOzwX7quURCwBlzpjFuWyd0JH8HFUrhmu167IjWBMPcSki8ZCtZAZBR0CS4ZAV1r4nAZCqayLZAbPxvJVIxVw0NHm9gG7f6qahc18Wh0IZCKkTUqYLPfGbZAbAUMHsbAAcbZBeTbBmVS6ydHtxLyvSCwXJgh1ob |
11 | 9 | ||
10 | +FACEBOOK_ACCESS_TOKEN = 1679419242122039|XVLpgA2YMXcwWQCg1Sj_hGKuNwM | ||
12 | 11 | ||
13 | 12 | ||
14 | # API.ai client token | 13 | # API.ai client token |
@@ -18,10 +17,9 @@ API_AI_TOKEN = XXXXX | @@ -18,10 +17,9 @@ API_AI_TOKEN = XXXXX | ||
18 | # Your WebHook URL e.g.: https://yourdomain.com/webhook/ | 17 | # Your WebHook URL e.g.: https://yourdomain.com/webhook/ |
19 | TELEGRAM_WEBHOOK_URL = /telegram/getUpdates | 18 | TELEGRAM_WEBHOOK_URL = /telegram/getUpdates |
20 | 19 | ||
21 | - | ||
22 | # Your Bot Token e.g.: 000000000:AAAAa0aAA_aaA-Aaaa0A0Aa_a0aa0A0AAAA | 20 | # Your Bot Token e.g.: 000000000:AAAAa0aAA_aaA-Aaaa0A0Aa_a0aa0A0AAAA |
23 | -TELEGRAM_BOT_TOKEN = 451726698:AAH2qwZaWOgn1IU1CjJU-HjHDMODG6DEkN0 | ||
24 | - | 21 | +TELEGRAM_BOT_TOKEN = 452768505:AAHNXEYi9nSHcmVc4b3799I00uTZmK53wl4\ |
22 | + | ||
25 | 23 | ||
26 | 24 | ||
27 | BING_SPEECH_LOCALE = global | 25 | BING_SPEECH_LOCALE = global |
services/FaceBook/build.gradle
@@ -2,26 +2,24 @@ apply plugin: 'java' | @@ -2,26 +2,24 @@ apply plugin: 'java' | ||
2 | apply plugin: 'war' | 2 | apply plugin: 'war' |
3 | apply plugin: 'checkstyle' | 3 | apply plugin: 'checkstyle' |
4 | 4 | ||
5 | +sourceCompatibility = 1.8 | ||
6 | + | ||
5 | repositories { | 7 | repositories { |
6 | mavenCentral() | 8 | mavenCentral() |
7 | } | 9 | } |
8 | 10 | ||
9 | dependencies { | 11 | dependencies { |
10 | - | ||
11 | compile project(':services:Common'), | 12 | compile project(':services:Common'), |
12 | "org.jboss.spec:jboss-javaee-7.0:1.1.0.Final", | 13 | "org.jboss.spec:jboss-javaee-7.0:1.1.0.Final", |
13 | "org.apache.httpcomponents:httpclient:4.5.3", | 14 | "org.apache.httpcomponents:httpclient:4.5.3", |
14 | "org.apache.httpcomponents:httpmime:4.3.1", | 15 | "org.apache.httpcomponents:httpmime:4.3.1", |
15 | "org.json:json:20160810" | 16 | "org.json:json:20160810" |
16 | - | ||
17 | providedCompile "org.slf4j:slf4j-api:1.7.25", | 17 | providedCompile "org.slf4j:slf4j-api:1.7.25", |
18 | "org.jboss.resteasy:resteasy-client:3.1.3.Final", | 18 | "org.jboss.resteasy:resteasy-client:3.1.3.Final", |
19 | "org.jboss.resteasy:resteasy-jaxrs-all:3.1.3.Final" | 19 | "org.jboss.resteasy:resteasy-jaxrs-all:3.1.3.Final" |
20 | 20 | ||
21 | } | 21 | } |
22 | 22 | ||
23 | -sourceCompatibility = 1.8 | ||
24 | - | ||
25 | war { | 23 | war { |
26 | destinationDir new File(project.rootProject.projectDir, 'docker/wildfly/volumes/deployments/') | 24 | destinationDir new File(project.rootProject.projectDir, 'docker/wildfly/volumes/deployments/') |
27 | archiveName "facebook.war" | 25 | archiveName "facebook.war" |
services/FaceBook/src/main/java/de/bht/beuthbot/messenger/facebook/FacebookReceiveAdapter.java
@@ -106,7 +106,6 @@ public class FacebookReceiveAdapter { | @@ -106,7 +106,6 @@ public class FacebookReceiveAdapter { | ||
106 | processQueue.route(new TaskMessage(facebookBotMessage)); | 106 | processQueue.route(new TaskMessage(facebookBotMessage)); |
107 | 107 | ||
108 | } | 108 | } |
109 | - | ||
110 | } | 109 | } |
111 | 110 | ||
112 | return "\nReceived\n"; | 111 | return "\nReceived\n"; |
services/JSONRequester/build.gradle
0 → 100644
1 | +apply plugin: 'java' | ||
2 | +apply plugin: 'war' | ||
3 | +apply plugin: 'checkstyle' | ||
4 | + | ||
5 | +sourceCompatibility = 1.8 | ||
6 | + | ||
7 | +repositories { | ||
8 | + mavenCentral() | ||
9 | +} | ||
10 | + | ||
11 | +dependencies { | ||
12 | + compile project(':services:Common'), | ||
13 | + "org.jboss.spec:jboss-javaee-7.0:1.1.0.Final", | ||
14 | + "org.apache.httpcomponents:httpclient:4.5.3", | ||
15 | + "org.apache.httpcomponents:httpmime:4.3.1", | ||
16 | + "org.json:json:20160810" | ||
17 | + providedCompile "org.slf4j:slf4j-api:1.7.25", | ||
18 | + "org.jboss.resteasy:resteasy-client:3.1.3.Final", | ||
19 | + "org.jboss.resteasy:resteasy-jaxrs-all:3.1.3.Final" | ||
20 | +} | ||
21 | + | ||
22 | +war { | ||
23 | + destinationDir new File(project.rootProject.projectDir, 'docker/wildfly/volumes/deployments/') | ||
24 | + archiveName "jsonrequester.war" | ||
25 | +} | ||
0 | \ No newline at end of file | 26 | \ No newline at end of file |
services/JSONRequester/src/main/java/de/bht/beuthbot/JSONRequester/JSONRequester.java
0 → 100644
1 | +package de.bht.beuthbot.JSONRequester; | ||
2 | + | ||
3 | +import de.bht.beuthbot.attachments.AttachmentStore; | ||
4 | +import de.bht.beuthbot.jms.ProcessQueue; | ||
5 | +import javafx.application.Application; | ||
6 | + | ||
7 | +import javax.annotation.PostConstruct; | ||
8 | +import javax.annotation.Resource; | ||
9 | +import javax.ejb.Singleton; | ||
10 | +import javax.ejb.Startup; | ||
11 | + | ||
12 | +@Singleton | ||
13 | +@Startup | ||
14 | +public class JSONRequester { | ||
15 | + | ||
16 | + //private final Logger logger = LoggerFactory.getLogger(JSONRequester.class); | ||
17 | + | ||
18 | + /** Injected JMS MessageQueue */ | ||
19 | + @Resource(lookup = "java:global/global/ProcessQueueBean") | ||
20 | + private ProcessQueue processQueue; | ||
21 | + | ||
22 | + /** Injected AttachmentStore */ | ||
23 | + @Resource(lookup = "java:global/global/AttachmentStoreBean") | ||
24 | + private AttachmentStore attachmentStore; | ||
25 | + | ||
26 | + /** BeuthBot Application Bean */ | ||
27 | + @Resource(lookup = "java:global/global/ApplicationBean") | ||
28 | + private Application application; | ||
29 | + | ||
30 | + //CONSTRUCTOR | ||
31 | + @PostConstruct | ||
32 | + public void init(){ | ||
33 | + //logger.debug("JSONRequester initiated!"); | ||
34 | + } | ||
35 | + | ||
36 | + public String getJSONForURL(de.bht.beuthbot.JSONRequester.JSONRequestObject requestObject) { | ||
37 | + //ResteasyClient client = new ResteasyClientBuilder().build(); | ||
38 | + //ResteasyWebTarget target = client.target(UriBuilder.fromPath(requestObject.getRequestUrl())); | ||
39 | + //JSONRequestInterface jsonProxy = target.proxy(JSONRequestInterface.class); | ||
40 | + | ||
41 | + //Response response = jsonProxy.sendRequest(); | ||
42 | + | ||
43 | + //String responseAsString = response.readEntity(String.class); | ||
44 | + | ||
45 | + return ""; | ||
46 | + } | ||
47 | +} |
services/Telegram/build.gradle
@@ -2,6 +2,8 @@ apply plugin: 'java' | @@ -2,6 +2,8 @@ apply plugin: 'java' | ||
2 | apply plugin: 'war' | 2 | apply plugin: 'war' |
3 | apply plugin: 'checkstyle' | 3 | apply plugin: 'checkstyle' |
4 | 4 | ||
5 | +sourceCompatibility = 1.8 | ||
6 | + | ||
5 | repositories { | 7 | repositories { |
6 | mavenCentral() | 8 | mavenCentral() |
7 | } | 9 | } |
@@ -20,8 +22,6 @@ dependencies { | @@ -20,8 +22,6 @@ dependencies { | ||
20 | 22 | ||
21 | } | 23 | } |
22 | 24 | ||
23 | -sourceCompatibility = 1.8 | ||
24 | - | ||
25 | war { | 25 | war { |
26 | destinationDir new File(project.rootProject.projectDir, 'docker/wildfly/volumes/deployments/') | 26 | destinationDir new File(project.rootProject.projectDir, 'docker/wildfly/volumes/deployments/') |
27 | archiveName "telegram.war" | 27 | archiveName "telegram.war" |
settings.gradle
@@ -8,6 +8,9 @@ include ( | @@ -8,6 +8,9 @@ include ( | ||
8 | 'services:MainBot', | 8 | 'services:MainBot', |
9 | 'services:LoggingStatistics', | 9 | 'services:LoggingStatistics', |
10 | 'services:Telegram', | 10 | 'services:Telegram', |
11 | - 'services:Scheduler' | 11 | + 'services:Scheduler', |
12 | + 'services:JSONRequester' | ||
12 | ) | 13 | ) |
14 | +//findProject(':services:Scheduler')?.name = 'Scheduler' | ||
15 | +//findProject(':services:JSONRequester')?.name = 'JSONRequester' | ||
13 | 16 |