private ModuleType getPlayActionType(Locale locale) { return new ActionType(PlayActionHandler.TYPE_ID, getConfigPlayDesc(locale), "play a sound", "Plays a sound file.", null, Visibility.VISIBLE, new ArrayList<>(), new ArrayList<>()); }
private ModuleType getSayActionType(Locale locale) { return new ActionType(SayActionHandler.TYPE_ID, getConfigSayDesc(locale), "say something", "Speaks a given text through a natural voice.", null, Visibility.VISIBLE, new ArrayList<>(), new ArrayList<>()); }
public static ActionType map(CompositeActionTypeDTO actionTypeDto) { if (actionTypeDto.children == null || actionTypeDto.children.isEmpty()) { return new ActionType(actionTypeDto.uid, ConfigDescriptionDTOMapper.map(actionTypeDto.configDescriptions), actionTypeDto.label, actionTypeDto.description, actionTypeDto.tags, actionTypeDto.visibility, actionTypeDto.inputs, actionTypeDto.outputs); } else { return new CompositeActionType(actionTypeDto.uid, ConfigDescriptionDTOMapper.map(actionTypeDto.configDescriptions), actionTypeDto.label, actionTypeDto.description, actionTypeDto.tags, actionTypeDto.visibility, actionTypeDto.inputs, actionTypeDto.outputs, ActionDTOMapper.mapDto(actionTypeDto.children)); } }
public ActionType buildModuleType(String UID, Map<String, Set<ModuleInformation>> moduleInformation) { Set<ModuleInformation> mis = moduleInformation.get(UID); List<ConfigDescriptionParameter> configDescriptions = new ArrayList<>(); if (mis != null && mis.size() > 0) { ModuleInformation mi = (ModuleInformation) mis.toArray()[0]; ActionModuleKind kind = ActionModuleKind.SINGLE; if (mi.getConfigName() != null && mi.getThingUID() != null) { logger.error( "ModuleType with UID {} has thingUID ({}) and multi-service ({}) property set, ignoring it.", UID, mi.getConfigName(), mi.getThingUID()); return null; } else if (mi.getConfigName() != null) { kind = ActionModuleKind.SERVICE; } else if (mi.getThingUID() != null) { kind = ActionModuleKind.THING; } ConfigDescriptionParameter configParam = buildConfigParam(mis, kind); if (configParam != null) { configDescriptions.add(configParam); } ActionType at = new ActionType(UID, configDescriptions, mi.getLabel(), mi.getDescription(), mi.getTags(), mi.getVisibility(), mi.getInputs(), mi.getOutputs()); return at; } return null; }
at.getVisibility(), inputs, outputs, modules); } else { lat = new ActionType(moduleTypeUID, lconfigDescriptions, llabel, ldescription, at.getTags(), at.getVisibility(), inputs, outputs);
result = new ActionType(mType.getUID(), mType.getConfigurationDescriptions(), mType.getLabel(), mType.getDescription(), mType.getTags(), mType.getVisibility(), m.getInputs(), m.getOutputs()); } else {