com.amazon.ask.Skill Java Examples
The following examples show how to use
com.amazon.ask.Skill.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MvcSkillApplication.java From ask-sdk-frameworks-java with Apache License 2.0 | 6 votes |
/** * @return builds the {@link Skill} from its modules {@link SkillModule}. */ public Skill getSkill() { List<SkillModule> modules = getModules(); // Let all modules configure their MVC runtime MvcSdkModule.Builder builder = MvcSdkModule.builder(); for (SkillModule module : modules) { module.buildMvc(builder); } // Accumulate all models from the modules and build the whole SkillModel builder.withModel(buildSkillModel(modules).getModel()); MvcSdkModule sdkModule = builder.build(); return getSkillBuilder() .registerSdkModule(sdkModule) .build(); }
Example #2
Source File: DefaultRequestEnvelopeService.java From micronaut-aws with Apache License 2.0 | 5 votes |
@Nullable @Override public ResponseEnvelope process(@NonNull @NotNull RequestEnvelope requestEnvelope) { for (Skill skill : skills) { ResponseEnvelope skillResponse = skill.invoke(requestEnvelope); if (skillResponse != null) { return skillResponse; } } return null; }
Example #3
Source File: StandardSkillFactory.java From micronaut-aws with Apache License 2.0 | 5 votes |
/** * @param alexaSkillConfiguration Alexa Skill Configuration * @return An Alexa Skill using the {@link AlexaSkillBuilder} and the {@link SkillBuilderProvider} bean. */ @EachBean(AlexaSkillConfiguration.class) public Skill createSkill(@Parameter AlexaSkillConfiguration alexaSkillConfiguration) { AlexaSkill alexaSkill = alexaSkillBuilder.buildSkill(skillBuilderProvider.getSkillBuilder(), alexaSkillConfiguration); if (alexaSkill instanceof Skill) { return ((Skill) alexaSkill); } return null; }
Example #4
Source File: MissingAlexaSkillConfigurationSkillFactory.java From micronaut-aws with Apache License 2.0 | 5 votes |
/** * * @return An Skill using the {@link AlexaSkillBuilder} and the {@link SkillBuilderProvider} bean. */ @Singleton public Skill createSkill() { AlexaSkill alexaSkill = alexaSkillBuilder.buildSkill(skillBuilderProvider.getSkillBuilder(), null); if (alexaSkill instanceof Skill) { return (Skill) alexaSkill; } return null; }
Example #5
Source File: DefaultRequestEnvelopeService.java From micronaut-aws with Apache License 2.0 | 2 votes |
/** * * @param skills List of available Skills */ public DefaultRequestEnvelopeService(List<Skill> skills) { this.skills = skills.stream().sorted(OrderUtil.COMPARATOR).collect(Collectors.toList()); }