Merge pull request #100 from microsoft/tb-projectsetup

Future project setup
This commit is contained in:
tracyboehrer 2019-09-03 15:30:03 -05:00 коммит произвёл GitHub
Родитель c38bf800e3 0c87793a51
Коммит 454fe48f27
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
19 изменённых файлов: 1652 добавлений и 460 удалений

Просмотреть файл

@ -0,0 +1,200 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-java</artifactId>
<version>4.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>bot-ai-luis-v3</artifactId>
<packaging>jar</packaging>
<version>4.0.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Bot Framework Dialogs</description>
<url>https://dev.botframework.com/</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<name>Bot Framework Development</name>
<email></email>
<organization>Microsoft</organization>
<organizationUrl>https://dev.botframework.com/</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/Microsoft/botbuilder-java</connection>
<developerConnection>scm:git:https://github.com/Microsoft/botbuilder-java</developerConnection>
<url>https://github.com/Microsoft/botbuilder-java</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.deploy.skip>false</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-builder</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-configuration</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-applicationinsights</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</distributionManagement>
<profiles>
<profile>
<id>build</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<analysisCache>true</analysisCache>
<excludes>
<exclude>**/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<configuration>
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<outputDirectory>../../cobertura-report/bot-ai-luis-v3</outputDirectory>
<format>xml</format>
<maxmem>256m</maxmem>
<!-- aggregated reports for multi-module projects -->
<aggregate>true</aggregate>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>publish</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

Просмотреть файл

@ -0,0 +1,197 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-java</artifactId>
<version>4.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>bot-ai-qna</artifactId>
<packaging>jar</packaging>
<version>4.0.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Bot Framework Dialogs</description>
<url>https://dev.botframework.com/</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<name>Bot Framework Development</name>
<email></email>
<organization>Microsoft</organization>
<organizationUrl>https://dev.botframework.com/</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/Microsoft/botbuilder-java</connection>
<developerConnection>scm:git:https://github.com/Microsoft/botbuilder-java</developerConnection>
<url>https://github.com/Microsoft/botbuilder-java</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.deploy.skip>false</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-builder</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-configuration</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</distributionManagement>
<profiles>
<profile>
<id>build</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<analysisCache>true</analysisCache>
<excludes>
<exclude>**/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<configuration>
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<outputDirectory>../../cobertura-report/bot-ai-qna</outputDirectory>
<format>xml</format>
<maxmem>256m</maxmem>
<!-- aggregated reports for multi-module projects -->
<aggregate>true</aggregate>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>publish</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

Просмотреть файл

@ -0,0 +1,198 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-java</artifactId>
<version>4.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>bot-applicationinsights</artifactId>
<packaging>jar</packaging>
<version>4.0.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Bot Framework Dialogs</description>
<url>https://dev.botframework.com/</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<name>Bot Framework Development</name>
<email></email>
<organization>Microsoft</organization>
<organizationUrl>https://dev.botframework.com/</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/Microsoft/botbuilder-java</connection>
<developerConnection>scm:git:https://github.com/Microsoft/botbuilder-java</developerConnection>
<url>https://github.com/Microsoft/botbuilder-java</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.deploy.skip>false</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-core</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-builder</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</distributionManagement>
<profiles>
<profile>
<id>build</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<analysisCache>true</analysisCache>
<excludes>
<exclude>**/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<configuration>
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<outputDirectory>../../cobertura-report/bot-applicationinsights</outputDirectory>
<format>xml</format>
<maxmem>256m</maxmem>
<!-- aggregated reports for multi-module projects -->
<aggregate>true</aggregate>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>publish</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

197
libraries/bot-azure/pom.xml Normal file
Просмотреть файл

@ -0,0 +1,197 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-java</artifactId>
<version>4.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>bot-azure</artifactId>
<packaging>jar</packaging>
<version>4.0.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Bot Framework Integration Core</description>
<url>https://dev.botframework.com/</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<name>Bot Framework Development</name>
<email></email>
<organization>Microsoft</organization>
<organizationUrl>https://dev.botframework.com/</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/Microsoft/botbuilder-java</connection>
<developerConnection>scm:git:https://github.com/Microsoft/botbuilder-java</developerConnection>
<url>https://github.com/Microsoft/botbuilder-java</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.deploy.skip>false</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-builder</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</distributionManagement>
<profiles>
<profile>
<id>build</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<configuration>
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<outputDirectory>../../cobertura-report/bot-azure</outputDirectory>
<format>xml</format>
<maxmem>256m</maxmem>
<!-- aggregated reports for multi-module projects -->
<aggregate>true</aggregate>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>publish</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

Просмотреть файл

@ -12,7 +12,7 @@
<artifactId>bot-builder</artifactId>
<packaging>jar</packaging>
<version>4.0-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Bot Framework Connector</description>
@ -92,12 +92,10 @@
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-schema</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-connector</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
</dependencies>

Просмотреть файл

@ -1,25 +0,0 @@
{
"configuration": {
"name": "Default",
"appenders": {
"Console": {
"name": "Console-Appender",
"target": "SYSTEM_OUT",
"PatternLayout": {"pattern": "[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n"}
}
},
"loggers": {
"logger": [
{
"name": "com.microsoft.bot.builder",
"level": "debug",
"appender-ref": [{"ref": "Console-Appender", "level": "debug"}]
}
],
"root": {
"level": "warn",
"appender-ref": {"ref": "Console-Appender","level": "warn"}
}
}
}
}

Просмотреть файл

@ -0,0 +1,188 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-java</artifactId>
<version>4.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>bot-configuration</artifactId>
<packaging>jar</packaging>
<version>4.0.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Bot Framework Dialogs</description>
<url>https://dev.botframework.com/</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<name>Bot Framework Development</name>
<email></email>
<organization>Microsoft</organization>
<organizationUrl>https://dev.botframework.com/</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/Microsoft/botbuilder-java</connection>
<developerConnection>scm:git:https://github.com/Microsoft/botbuilder-java</developerConnection>
<url>https://github.com/Microsoft/botbuilder-java</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.deploy.skip>false</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</distributionManagement>
<profiles>
<profile>
<id>build</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<analysisCache>true</analysisCache>
<excludes>
<exclude>**/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<configuration>
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<outputDirectory>../../cobertura-report/bot-configuration</outputDirectory>
<format>xml</format>
<maxmem>256m</maxmem>
<!-- aggregated reports for multi-module projects -->
<aggregate>true</aggregate>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>publish</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

Просмотреть файл

@ -94,7 +94,6 @@
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-schema</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
</dependencies>

Просмотреть файл

@ -0,0 +1,203 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-java</artifactId>
<version>4.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>bot-dialogs</artifactId>
<packaging>jar</packaging>
<version>4.0.0-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Bot Framework Dialogs</description>
<url>https://dev.botframework.com/</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<name>Bot Framework Development</name>
<email></email>
<organization>Microsoft</organization>
<organizationUrl>https://dev.botframework.com/</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/Microsoft/botbuilder-java</connection>
<developerConnection>scm:git:https://github.com/Microsoft/botbuilder-java</developerConnection>
<url>https://github.com/Microsoft/botbuilder-java</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.deploy.skip>false</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-documentdb</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<version>11.0.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-builder</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>MyGet</id>
<url>${repo.url}</url>
</repository>
</distributionManagement>
<profiles>
<profile>
<id>build</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<analysisCache>true</analysisCache>
<excludes>
<exclude>**/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<configuration>
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<outputDirectory>../../cobertura-report/bot-dialogs</outputDirectory>
<format>xml</format>
<maxmem>256m</maxmem>
<!-- aggregated reports for multi-module projects -->
<aggregate>true</aggregate>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>publish</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

Просмотреть файл

@ -1,111 +1,111 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.bot.builder.dialogs;
import com.microsoft.bot.builder.BotAssert;
import com.microsoft.bot.builder.TurnContext;
import java.util.HashMap;
import java.util.concurrent.CompletableFuture;
/**
* Base class for controls
*/
public abstract class Dialog
{
/**
* Starts the dialog. Depending on the dialog, its possible for the dialog to finish
* immediately so it's advised to check the completion Object returned by `begin()` and ensure
* that the dialog is still active before continuing.
* @param context Context for the current turn of the conversation with the user.
* @param state A state Object that the dialog will use to persist its current state. This should be an empty Object which the dialog will populate. The bot should persist this with its other conversation state for as long as the dialog is still active.
* @param options (Optional) additional options supported by the dialog.
* @return DialogCompletion result
*/
public CompletableFuture<DialogCompletion> Begin(TurnContext context, HashMap<String, Object> state)
{
return Begin(context, state, null);
}
public CompletableFuture<DialogCompletion> Begin(TurnContext context, HashMap<String, Object> state, HashMap<String, Object> options)
{
BotAssert.ContextNotNull(context);
if (state == null)
throw new NullPointerException("HashMap<String, Object> state");
// Create empty dialog set and ourselves to it
// TODO: Complete
//DialogSet dialogs = new DialogSet();
//dialogs.Add("dialog", (IDialog)this);
// Start the control
//HashMap<String, Object> result = null;
/*
// TODO Complete
await dc.Begin("dialog", options);
*/
CompletableFuture<DialogCompletion> result = null;
/*
if (dc.ActiveDialog != null) {
result = new DialogCompletion();
result.setIsActive(true);
result.setIsCompleted(false);
}
else{
result = new DialogCompletion();
result.setIsActive(false);
result.setIsCompleted(true);
result.setResult(result);
}
*/
return result;
}
/**
* Passes a users reply to the dialog for further processing.The bot should keep calling
* 'continue()' for future turns until the dialog returns a completion Object with
* 'isCompleted == true'. To cancel or interrupt the prompt simply delete the `state` Object
* being persisted.
* @param context Context for the current turn of the conversation with the user.
* @param state A state Object that was previously initialized by a call to [begin()](#begin).
* @return DialogCompletion result
*/
public CompletableFuture<DialogCompletion> Continue(TurnContext context, HashMap<String, Object> state)
{
BotAssert.ContextNotNull(context);
if (state == null)
throw new NullPointerException("HashMap<String, Object>");
// Create empty dialog set and ourselves to it
// TODO: daveta
//DialogSet dialogs = new DialogSet();
//dialogs.Add("dialog", (IDialog)this);
// Continue the dialog
//HashMap<String, Object> result = null;
CompletableFuture<DialogCompletion> result = null;
/*
TODO: daveta
var dc = new DialogContext(dialogs, context, state, (r) => { result = r; });
if (dc.ActiveDialog != null)
{
await dc.Continue();
return dc.ActiveDialog != null
?
new DialogCompletion { IsActive = true, IsCompleted = false }
:
new DialogCompletion { IsActive = false, IsCompleted = true, Result = result };
}
else
{
return new DialogCompletion { IsActive = false, IsCompleted = false };
}
*/
return result;
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.bot.dialogs;
import com.microsoft.bot.builder.BotAssert;
import com.microsoft.bot.builder.TurnContext;
import java.util.HashMap;
import java.util.concurrent.CompletableFuture;
/**
* Base class for controls
*/
public abstract class Dialog
{
/**
* Starts the dialog. Depending on the dialog, its possible for the dialog to finish
* immediately so it's advised to check the completion Object returned by `begin()` and ensure
* that the dialog is still active before continuing.
* @param context Context for the current turn of the conversation with the user.
* @param state A state Object that the dialog will use to persist its current state. This should be an empty Object which the dialog will populate. The bot should persist this with its other conversation state for as long as the dialog is still active.
* @param options (Optional) additional options supported by the dialog.
* @return DialogCompletion result
*/
public CompletableFuture<DialogCompletion> Begin(TurnContext context, HashMap<String, Object> state)
{
return Begin(context, state, null);
}
public CompletableFuture<DialogCompletion> Begin(TurnContext context, HashMap<String, Object> state, HashMap<String, Object> options)
{
BotAssert.ContextNotNull(context);
if (state == null)
throw new NullPointerException("HashMap<String, Object> state");
// Create empty dialog set and ourselves to it
// TODO: Complete
//DialogSet dialogs = new DialogSet();
//dialogs.Add("dialog", (IDialog)this);
// Start the control
//HashMap<String, Object> result = null;
/*
// TODO Complete
await dc.Begin("dialog", options);
*/
CompletableFuture<DialogCompletion> result = null;
/*
if (dc.ActiveDialog != null) {
result = new DialogCompletion();
result.setIsActive(true);
result.setIsCompleted(false);
}
else{
result = new DialogCompletion();
result.setIsActive(false);
result.setIsCompleted(true);
result.setResult(result);
}
*/
return result;
}
/**
* Passes a users reply to the dialog for further processing.The bot should keep calling
* 'continue()' for future turns until the dialog returns a completion Object with
* 'isCompleted == true'. To cancel or interrupt the prompt simply delete the `state` Object
* being persisted.
* @param context Context for the current turn of the conversation with the user.
* @param state A state Object that was previously initialized by a call to [begin()](#begin).
* @return DialogCompletion result
*/
public CompletableFuture<DialogCompletion> Continue(TurnContext context, HashMap<String, Object> state)
{
BotAssert.ContextNotNull(context);
if (state == null)
throw new NullPointerException("HashMap<String, Object>");
// Create empty dialog set and ourselves to it
// TODO: daveta
//DialogSet dialogs = new DialogSet();
//dialogs.Add("dialog", (IDialog)this);
// Continue the dialog
//HashMap<String, Object> result = null;
CompletableFuture<DialogCompletion> result = null;
/*
TODO: daveta
var dc = new DialogContext(dialogs, context, state, (r) => { result = r; });
if (dc.ActiveDialog != null)
{
await dc.Continue();
return dc.ActiveDialog != null
?
new DialogCompletion { IsActive = true, IsCompleted = false }
:
new DialogCompletion { IsActive = false, IsCompleted = true, Result = result };
}
else
{
return new DialogCompletion { IsActive = false, IsCompleted = false };
}
*/
return result;
}
}

Просмотреть файл

@ -1,54 +1,54 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.bot.builder.dialogs;
import java.util.HashMap;
/**
* Result returned to the caller of one of the various stack manipulation methods and used to
* return the result from a final call to `DialogContext.end()` to the bots logic.
*/
public class DialogCompletion
{
/**
* If 'true' the dialog is still active.
*/
boolean _isActive;
public void setIsActive(boolean isActive) {
this._isActive = isActive;
}
public boolean getIsActive() {
return this._isActive;
}
/**
* If 'true' the dialog just completed and the final [result](#result) can be retrieved.
*/
boolean _isCompleted;
public void setIsCompleted(boolean isCompleted)
{
this._isCompleted = isCompleted;
}
public boolean getIsCompleted()
{
return this._isCompleted;
}
/**
* Result returned by a dialog that was just ended.This will only be populated in certain
* cases:
* - The bot calls `dc.begin()` to start a new dialog and the dialog ends immediately.
* - The bot calls `dc.continue()` and a dialog that was active ends.
* In all cases where it's populated, [active](#active) will be `false`.
*/
HashMap<String, Object> _result;
public HashMap<String, Object> getResult() {
return _result;
}
public void setResult(HashMap<String, Object> result) {
this._result = result;
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.bot.dialogs;
import java.util.HashMap;
/**
* Result returned to the caller of one of the various stack manipulation methods and used to
* return the result from a final call to `DialogContext.end()` to the bots logic.
*/
public class DialogCompletion
{
/**
* If 'true' the dialog is still active.
*/
boolean _isActive;
public void setIsActive(boolean isActive) {
this._isActive = isActive;
}
public boolean getIsActive() {
return this._isActive;
}
/**
* If 'true' the dialog just completed and the final [result](#result) can be retrieved.
*/
boolean _isCompleted;
public void setIsCompleted(boolean isCompleted)
{
this._isCompleted = isCompleted;
}
public boolean getIsCompleted()
{
return this._isCompleted;
}
/**
* Result returned by a dialog that was just ended.This will only be populated in certain
* cases:
* - The bot calls `dc.begin()` to start a new dialog and the dialog ends immediately.
* - The bot calls `dc.continue()` and a dialog that was active ends.
* In all cases where it's populated, [active](#active) will be `false`.
*/
HashMap<String, Object> _result;
public HashMap<String, Object> getResult() {
return _result;
}
public void setResult(HashMap<String, Object> result) {
this._result = result;
}
}

Просмотреть файл

@ -1,50 +1,50 @@
/*
public class DialogContainer implements IDialogContinue
{
protected DialogSet Dialogs { get; set; }
protected string DialogId { get; set; }
public DialogContainer(string dialogId, DialogSet dialogs = null)
{
if (string.IsNullOrEmpty(dialogId))
throw new ArgumentNullException(nameof(dialogId));
Dialogs dialogs = (dialogs != null) ? dialogs : new DialogSet();
DialogId = dialogId;
}
public async Task DialogBegin(DialogContext dc, IDictionary<string, object> dialogArgs = null)
{
if (dc == null)
throw new ArgumentNullException(nameof(dc));
// Start the controls entry point dialog.
IDictionary<string, object> result = null;
var cdc = new DialogContext(this.Dialogs, dc.Context, dc.ActiveDialog.State, (r) => { result = r; });
await cdc.Begin(DialogId, dialogArgs);
// End if the controls dialog ends.
if (cdc.ActiveDialog == null)
{
await dc.End(result);
}
}
public async Task DialogContinue(DialogContext dc)
{
if (dc == null)
throw new ArgumentNullException(nameof(dc));
// Continue controls dialog stack.
IDictionary<string, object> result = null;
var cdc = new DialogContext(this.Dialogs, dc.Context, dc.ActiveDialog.State, (r) => { result = r; });
await cdc.Continue();
// End if the controls dialog ends.
if (cdc.ActiveDialog == null)
{
await dc.End(result);
}
}
}
*/
/*
public class DialogContainer implements IDialogContinue
{
protected DialogSet Dialogs { get; set; }
protected string DialogId { get; set; }
public DialogContainer(string dialogId, DialogSet dialogs = null)
{
if (string.IsNullOrEmpty(dialogId))
throw new ArgumentNullException(nameof(dialogId));
Dialogs dialogs = (dialogs != null) ? dialogs : new DialogSet();
DialogId = dialogId;
}
public async Task DialogBegin(DialogContext dc, IDictionary<string, object> dialogArgs = null)
{
if (dc == null)
throw new ArgumentNullException(nameof(dc));
// Start the controls entry point dialog.
IDictionary<string, object> result = null;
var cdc = new DialogContext(this.Dialogs, dc.Context, dc.ActiveDialog.State, (r) => { result = r; });
await cdc.Begin(DialogId, dialogArgs);
// End if the controls dialog ends.
if (cdc.ActiveDialog == null)
{
await dc.End(result);
}
}
public async Task DialogContinue(DialogContext dc)
{
if (dc == null)
throw new ArgumentNullException(nameof(dc));
// Continue controls dialog stack.
IDictionary<string, object> result = null;
var cdc = new DialogContext(this.Dialogs, dc.Context, dc.ActiveDialog.State, (r) => { result = r; });
await cdc.Continue();
// End if the controls dialog ends.
if (cdc.ActiveDialog == null)
{
await dc.End(result);
}
}
}
*/

Просмотреть файл

@ -1,167 +1,167 @@
package com.microsoft.bot.builder.dialogs;
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Builder SDK GitHub:
// https://github.com/Microsoft/BotBuilder
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
/**
* Encapsulates a method that represents the code to execute after a result is available.
*
* The result is often a message from the user.
*
* @param T The type of the result.
* @param context The dialog context.
* @param result The result.
* @return A task that represents the code that will resume after the result is available.
*/
/*
public interface ResumeAfter
{
CompletableFuture invoke(DialogContext contenxt, Available)
}
public delegate Task ResumeAfter<in T>(IDialogContext context, IAwaitable<T> result);
*/
/**
* Encapsulate a method that represents the code to start a dialog.
* @param context The dialog context.
* @return A task that represents the start code for a dialog.
*/
//public delegate Task StartAsync(IDialogContext context);
/**
* The context for the execution of a dialog's conversational process.
*/
// DAVETA: TODO
// public interface DialogContext extends
public interface DialogContext {
}
/**
* Helper methods.
*/
/*
public static partial class Extensions
{*/
/**
* Post a message to be sent to the user, using previous messages to establish a conversation context.
*
* If the locale parameter is not set, locale of the incoming message will be used for reply.
*
* @param botToUser Communication channel to use.
* @param text The message text.
* @param locale The locale of the text.
* @return A task that represents the post operation.
*/
/*
public static async Task PostAsync(this BotToUser botToUser, string text, string locale = null)
{
var message = botToUser.MakeMessage();
message.Text = text;
if (!string.IsNullOrEmpty(locale))
{
message.Locale = locale;
}
await botToUser.PostAsync(message);
}
*/
/**
* Post a message and optional SSML to be sent to the user, using previous messages to establish a conversation context.
*
* If the locale parameter is not set, locale of the incoming message will be used for reply.
*
* @param botToUser Communication channel to use.
* @param text The message text.
* @param speak The SSML markup for text to speech.
* @param options The options for the message.
* @param locale The locale of the text.
* @return A task that represents the post operation.
*/
/* public static async Task SayAsync(this BotToUser botToUser, string text, string speak = null, MessageOptions options = null, string locale = null)
{
var message = botToUser.MakeMessage();
message.Text = text;
message.Speak = speak;
if (!string.IsNullOrEmpty(locale))
{
message.Locale = locale;
}
if (options != null)
{
message.InputHint = options.InputHint;
message.TextFormat = options.TextFormat;
message.AttachmentLayout = options.AttachmentLayout;
message.Attachments = options.Attachments;
message.Entities = options.Entities;
}
await botToUser.PostAsync(message);
}*/
/**
* Suspend the current dialog until the user has sent a message to the bot.
* @param stack The dialog stack.
* @param resume The method to resume when the message has been received.
*/
/*
public static void Wait(this IDialogStack stack, ResumeAfter<MessageActivity> resume)
{
stack.Wait<MessageActivity>(resume);
}
*/
/**
* Call a child dialog, add it to the top of the stack and post the message to the child dialog.
* @param R The type of result expected from the child dialog.
* @param stack The dialog stack.
* @param child The child dialog.
* @param resume The method to resume when the child dialog has completed.
* @param message The message that will be posted to child dialog.
* @return A task representing the Forward operation.
*/
/* public static async Task Forward<R>(this IDialogStack stack, IDialog<R> child, ResumeAfter<R> resume, MessageActivity message)
{
await stack.Forward<R, MessageActivity>(child, resume, message, token);
}
}*/
package com.microsoft.bot.dialogs;
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Builder SDK GitHub:
// https://github.com/Microsoft/BotBuilder
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
/**
* Encapsulates a method that represents the code to execute after a result is available.
*
* The result is often a message from the user.
*
* @param T The type of the result.
* @param context The dialog context.
* @param result The result.
* @return A task that represents the code that will resume after the result is available.
*/
/*
public interface ResumeAfter
{
CompletableFuture invoke(DialogContext contenxt, Available)
}
public delegate Task ResumeAfter<in T>(IDialogContext context, IAwaitable<T> result);
*/
/**
* Encapsulate a method that represents the code to start a dialog.
* @param context The dialog context.
* @return A task that represents the start code for a dialog.
*/
//public delegate Task StartAsync(IDialogContext context);
/**
* The context for the execution of a dialog's conversational process.
*/
// DAVETA: TODO
// public interface DialogContext extends
public interface DialogContext {
}
/**
* Helper methods.
*/
/*
public static partial class Extensions
{*/
/**
* Post a message to be sent to the user, using previous messages to establish a conversation context.
*
* If the locale parameter is not set, locale of the incoming message will be used for reply.
*
* @param botToUser Communication channel to use.
* @param text The message text.
* @param locale The locale of the text.
* @return A task that represents the post operation.
*/
/*
public static async Task PostAsync(this BotToUser botToUser, string text, string locale = null)
{
var message = botToUser.MakeMessage();
message.Text = text;
if (!string.IsNullOrEmpty(locale))
{
message.Locale = locale;
}
await botToUser.PostAsync(message);
}
*/
/**
* Post a message and optional SSML to be sent to the user, using previous messages to establish a conversation context.
*
* If the locale parameter is not set, locale of the incoming message will be used for reply.
*
* @param botToUser Communication channel to use.
* @param text The message text.
* @param speak The SSML markup for text to speech.
* @param options The options for the message.
* @param locale The locale of the text.
* @return A task that represents the post operation.
*/
/* public static async Task SayAsync(this BotToUser botToUser, string text, string speak = null, MessageOptions options = null, string locale = null)
{
var message = botToUser.MakeMessage();
message.Text = text;
message.Speak = speak;
if (!string.IsNullOrEmpty(locale))
{
message.Locale = locale;
}
if (options != null)
{
message.InputHint = options.InputHint;
message.TextFormat = options.TextFormat;
message.AttachmentLayout = options.AttachmentLayout;
message.Attachments = options.Attachments;
message.Entities = options.Entities;
}
await botToUser.PostAsync(message);
}*/
/**
* Suspend the current dialog until the user has sent a message to the bot.
* @param stack The dialog stack.
* @param resume The method to resume when the message has been received.
*/
/*
public static void Wait(this IDialogStack stack, ResumeAfter<MessageActivity> resume)
{
stack.Wait<MessageActivity>(resume);
}
*/
/**
* Call a child dialog, add it to the top of the stack and post the message to the child dialog.
* @param R The type of result expected from the child dialog.
* @param stack The dialog stack.
* @param child The child dialog.
* @param resume The method to resume when the child dialog has completed.
* @param message The message that will be posted to child dialog.
* @return A task representing the Forward operation.
*/
/* public static async Task Forward<R>(this IDialogStack stack, IDialog<R> child, ResumeAfter<R> resume, MessageActivity message)
{
await stack.Forward<R, MessageActivity>(child, resume, message, token);
}
}*/

Просмотреть файл

@ -1,19 +1,19 @@
package com.microsoft.bot.builder.dialogs;
// TODO: daveta remove this - not sure where this came from
/**
* Interface for all Dialog objects that can be added to a `DialogSet`. The dialog should generally
* be a singleton and added to a dialog set using `DialogSet.add()` at which point it will be
* assigned a unique ID.
*/
public interface IDialog
{
/**
* Method called when a new dialog has been pushed onto the stack and is being activated.
* @param dc The dialog context for the current turn of conversation.
* @param dialogArgs (Optional) arguments that were passed to the dialog during `begin()` call that started the instance.
*/
//CompleteableFuture DialogBegin(DialogContext dc, IDictionary<string, object> dialogArgs = null);
//CompleteableFuture DialogBegin(DialogContext dc, HashMap<string, object> dialogArgs);
//CompleteableFuture DialogBegin(DialogContext dc);
}
package com.microsoft.bot.dialogs;
// TODO: daveta remove this - not sure where this came from
/**
* Interface for all Dialog objects that can be added to a `DialogSet`. The dialog should generally
* be a singleton and added to a dialog set using `DialogSet.add()` at which point it will be
* assigned a unique ID.
*/
public interface IDialog
{
/**
* Method called when a new dialog has been pushed onto the stack and is being activated.
* @param dc The dialog context for the current turn of conversation.
* @param dialogArgs (Optional) arguments that were passed to the dialog during `begin()` call that started the instance.
*/
//CompleteableFuture DialogBegin(DialogContext dc, IDictionary<string, object> dialogArgs = null);
//CompleteableFuture DialogBegin(DialogContext dc, HashMap<string, object> dialogArgs);
//CompleteableFuture DialogBegin(DialogContext dc);
}

Просмотреть файл

@ -1,21 +1,21 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.bot.builder.dialogs;
import java.util.concurrent.CompletableFuture;
/**
* Interface Dialog objects that can be continued.
*/
public interface IDialogContinue extends IDialog
{
/**
* Method called when an instance of the dialog is the "current" dialog and the
* user replies with a new activity. The dialog will generally continue to receive the users
* replies until it calls either `DialogSet.end()` or `DialogSet.begin()`.
* If this method is NOT implemented then the dialog will automatically be ended when the user replies.
* @param dc The dialog context for the current turn of conversation.
*/
CompletableFuture DialogContinue(DialogContext dc);
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.bot.dialogs;
import java.util.concurrent.CompletableFuture;
/**
* Interface Dialog objects that can be continued.
*/
public interface IDialogContinue extends IDialog
{
/**
* Method called when an instance of the dialog is the "current" dialog and the
* user replies with a new activity. The dialog will generally continue to receive the users
* replies until it calls either `DialogSet.end()` or `DialogSet.begin()`.
* If this method is NOT implemented then the dialog will automatically be ended when the user replies.
* @param dc The dialog context for the current turn of conversation.
*/
CompletableFuture DialogContinue(DialogContext dc);
}

Просмотреть файл

@ -1,4 +1,4 @@
package com.microsoft.bot.builder.dialogs;
package com.microsoft.bot.dialogs;
import com.microsoft.bot.schema.AttachmentLayoutTypes;
import com.microsoft.bot.schema.TextFormatTypes;

Просмотреть файл

@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.bot.builder.prompts;
package com.microsoft.bot.dialogs.prompts;
import com.microsoft.bot.schema.CardAction;

Просмотреть файл

@ -57,16 +57,10 @@
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-schema</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-connector</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>

45
pom.xml
Просмотреть файл

@ -128,14 +128,57 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-schema</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-connector</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-builder</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-dialogs</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-configuration</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-ai-luis-v3</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-applicationinsights</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>libraries/bot-schema</module>
<module>libraries/bot-builder</module>
<module>libraries/bot-connector</module>
<module>libraries/bot-builder</module>
<module>libraries/bot-integration-core</module>
<module>libraries/bot-dialogs</module>
<module>libraries/bot-configuration</module>
<module>libraries/bot-ai-luis-v3</module>
<module>libraries/bot-ai-qna</module>
<module>libraries/bot-applicationinsights</module>
<module>libraries/bot-azure</module>
<module>samples/bot-connector-sample</module>
<module>samples/servlet-echo</module>
<module>samples/spring-echo</module>