Initialized the project for my Alexa Skill
This commit is contained in:
Generated
+3
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
Generated
+13
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="WizardSkill" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+20
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="corretto-1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+124
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4" />
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>
|
||||
|
||||
<groupId>com.github.cato447</groupId>
|
||||
<artifactId>WizardSkill</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.amazon.alexa</groupId>
|
||||
<artifactId>ask-sdk</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.github.cato447.handlers;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import com.amazon.ask.dispatcher.request.handler.HandlerInput;
|
||||
import com.amazon.ask.dispatcher.request.handler.RequestHandler;
|
||||
|
||||
import static com.amazon.ask.request.Predicates.intentName;
|
||||
|
||||
import com.amazon.ask.model.Response;
|
||||
|
||||
public class CancelandStopIntentHandler implements RequestHandler {
|
||||
|
||||
public boolean canHandle(HandlerInput input) {
|
||||
return input.matches(intentName("AMAZON.StopIntent").or(intentName("AMAZON.CancelIntent")));
|
||||
}
|
||||
|
||||
public Optional<Response> handle(HandlerInput input) {
|
||||
String speechText = "Bye Bye";
|
||||
return input.getResponseBuilder()
|
||||
.withSpeech(speechText)
|
||||
.withSimpleCard("HelloWorld", speechText)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.github.cato447.handlers;
|
||||
|
||||
import com.amazon.ask.dispatcher.request.handler.HandlerInput;
|
||||
import com.amazon.ask.dispatcher.request.handler.RequestHandler;
|
||||
import com.amazon.ask.model.Response;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import static com.amazon.ask.request.Predicates.intentName;
|
||||
|
||||
public class HelloWorldIntentHandler implements RequestHandler {
|
||||
|
||||
public boolean canHandle(HandlerInput input) {
|
||||
return input.matches(intentName("HelloWorldIntent"));
|
||||
}
|
||||
|
||||
public Optional<Response> handle(HandlerInput input) {
|
||||
String speechText = "I am alive Hello World!";
|
||||
return input.getResponseBuilder()
|
||||
.withSpeech(speechText)
|
||||
.withSimpleCard("Hello World", speechText)
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.github.cato447.handlers;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import com.amazon.ask.dispatcher.request.handler.HandlerInput;
|
||||
import com.amazon.ask.dispatcher.request.handler.RequestHandler;
|
||||
|
||||
import static com.amazon.ask.request.Predicates.intentName;
|
||||
|
||||
import com.amazon.ask.model.Response;
|
||||
|
||||
public class HelpIntentHandler implements RequestHandler {
|
||||
|
||||
public boolean canHandle(HandlerInput input) {
|
||||
return input.matches(intentName("AMAZON.HelpIntent"));
|
||||
}
|
||||
|
||||
public Optional<Response> handle(HandlerInput input) {
|
||||
String speechText = "I am here to say Hello World to You";
|
||||
return input.getResponseBuilder()
|
||||
.withSpeech(speechText)
|
||||
.withSimpleCard("HelloWorld", speechText)
|
||||
.withReprompt(speechText)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.github.cato447.handlers;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import com.amazon.ask.dispatcher.request.handler.HandlerInput;
|
||||
import com.amazon.ask.dispatcher.request.handler.RequestHandler;
|
||||
import com.amazon.ask.model.LaunchRequest;
|
||||
import com.amazon.ask.model.Response;
|
||||
|
||||
import static com.amazon.ask.request.Predicates.requestType;
|
||||
|
||||
public class LaunchRequestHandler implements RequestHandler {
|
||||
|
||||
public boolean canHandle(HandlerInput input) {
|
||||
return input.matches(requestType(LaunchRequest.class));
|
||||
}
|
||||
|
||||
public Optional<Response> handle(HandlerInput input) {
|
||||
String speechText = "Welcome to Hello World, You can say Hello";
|
||||
return input.getResponseBuilder()
|
||||
.withSpeech(speechText)
|
||||
.withSimpleCard("HelloWorld", speechText)
|
||||
.withReprompt(speechText)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.github.cato447.handlers;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import com.amazon.ask.dispatcher.request.handler.HandlerInput;
|
||||
import com.amazon.ask.dispatcher.request.handler.RequestHandler;
|
||||
import com.amazon.ask.model.Response;
|
||||
import com.amazon.ask.model.SessionEndedRequest;
|
||||
|
||||
import static com.amazon.ask.request.Predicates.requestType;
|
||||
|
||||
public class SessionEndedRequestHandler implements RequestHandler {
|
||||
|
||||
public boolean canHandle(HandlerInput input) {
|
||||
return input.matches(requestType(SessionEndedRequest.class));
|
||||
}
|
||||
|
||||
public Optional<Response> handle(HandlerInput input) {
|
||||
return input.getResponseBuilder().build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.github.cato447.main;
|
||||
|
||||
import com.amazon.ask.Skill;
|
||||
import com.amazon.ask.SkillStreamHandler;
|
||||
import com.amazon.ask.Skills;
|
||||
import com.github.cato447.handlers.*;
|
||||
|
||||
|
||||
public class HelloWorldStreamHandler extends SkillStreamHandler {
|
||||
|
||||
private static Skill getSkill(){
|
||||
return Skills.standard()
|
||||
.addRequestHandlers(
|
||||
new CancelandStopIntentHandler(),
|
||||
new HelloWorldIntentHandler(),
|
||||
new HelpIntentHandler(),
|
||||
new LaunchRequestHandler(),
|
||||
new SessionEndedRequestHandler())
|
||||
.withSkillId("Your Amazon ID")
|
||||
.build();
|
||||
}
|
||||
|
||||
public HelloWorldStreamHandler(Skill skill) {
|
||||
super(skill);
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Thu Sep 03 21:20:08 CEST 2020
|
||||
groupId=com.github.cato447
|
||||
artifactId=WizardSkill
|
||||
version=1.0-SNAPSHOT
|
||||
@@ -0,0 +1,2 @@
|
||||
com/github/cato447/handlers/HelloWorldIntentHandler.class
|
||||
com/github/cato447/main/HelloWorldStreamHandler.class
|
||||
@@ -0,0 +1,6 @@
|
||||
/home/bitecoding/Documents/WizardSkill/src/main/java/com/github/cato447/main/HelloWorldStreamHandler.java
|
||||
/home/bitecoding/Documents/WizardSkill/src/main/java/com/github/cato447/handlers/HelloWorldIntentHandler.java
|
||||
/home/bitecoding/Documents/WizardSkill/src/main/java/com/github/cato447/handlers/SessionEndedRequestHandler.java
|
||||
/home/bitecoding/Documents/WizardSkill/src/main/java/com/github/cato447/handlers/HelpIntentHandler.java
|
||||
/home/bitecoding/Documents/WizardSkill/src/main/java/com/github/cato447/handlers/CancelandStopIntentHandler.java
|
||||
/home/bitecoding/Documents/WizardSkill/src/main/java/com/github/cato447/handlers/LaunchRequestHandler.java
|
||||
Reference in New Issue
Block a user