/** * Utility method for localization of TriggerTypes. * * @param ct is a TriggerType for localization. * @param bundle the bundle providing localization resources. * @param moduleTypeUID is a TriggerType uid. * @param locale represents a specific geographical, political, or cultural region. * @param lconfigDescriptions are TriggerType localized config descriptions. * @param llabel is a TriggerType localized label. * @param ldescription is a TriggerType localized description. * @return localized TriggerType. */ private TriggerType createLocalizedTriggerType(TriggerType tt, Bundle bundle, String moduleTypeUID, Locale locale, List<ConfigDescriptionParameter> lconfigDescriptions, String llabel, String ldescription) { List<Output> outputs = ModuleTypeI18nUtil.getLocalizedOutputs(i18nProvider, tt.getOutputs(), bundle, moduleTypeUID, locale); TriggerType ltt = null; if (tt instanceof CompositeTriggerType) { List<Trigger> modules = ModuleI18nUtil.getLocalizedModules(i18nProvider, ((CompositeTriggerType) tt).getChildren(), bundle, moduleTypeUID, ModuleTypeI18nUtil.MODULE_TYPE, locale); ltt = new CompositeTriggerType(moduleTypeUID, lconfigDescriptions, llabel, ldescription, tt.getTags(), tt.getVisibility(), outputs, modules); } else { ltt = new TriggerType(moduleTypeUID, lconfigDescriptions, llabel, ldescription, tt.getTags(), tt.getVisibility(), outputs); } return ltt; }
public void addTriggerType(TriggerType triggerType) { modules.add(triggerType.getUID()); scriptedCustomModuleTypeProvider.addModuleType(triggerType); }
result = new TriggerType(mType.getUID(), mType.getConfigurationDescriptions(), mType.getLabel(), mType.getDescription(), mType.getTags(), mType.getVisibility(), m.getOutputs());
private static <T extends TriggerTypeDTO> T map(final TriggerType triggerType, final T triggerTypeDto) { fillProperties(triggerType, triggerTypeDto); triggerTypeDto.outputs = triggerType.getOutputs(); return triggerTypeDto; }
public static TriggerType map(final CompositeTriggerTypeDTO triggerTypeDto) { if (triggerTypeDto.children == null || triggerTypeDto.children.isEmpty()) { return new TriggerType(triggerTypeDto.uid, ConfigDescriptionDTOMapper.map(triggerTypeDto.configDescriptions), triggerTypeDto.label, triggerTypeDto.description, triggerTypeDto.tags, triggerTypeDto.visibility, triggerTypeDto.outputs); } else { return new CompositeTriggerType(triggerTypeDto.uid, ConfigDescriptionDTOMapper.map(triggerTypeDto.configDescriptions), triggerTypeDto.label, triggerTypeDto.description, triggerTypeDto.tags, triggerTypeDto.visibility, triggerTypeDto.outputs, TriggerDTOMapper.mapDto(triggerTypeDto.children)); } }
msg + " Trigger Type with UID \"" + triggerTypeUID + "\" does not exist!"); checkCompatibility(msg, connection, input, triggerType.getOutputs());
getConfigurationDescriptionRecords(moduleType.getConfigurationDescriptions()))); if (moduleType instanceof TriggerType) { moduleTypeContent.addAll(collectRecords(columnWidths, OUTPUTS, ((TriggerType) moduleType).getOutputs()));
TriggerType tt = (TriggerType) mtRegistry.get(t.getTypeUID()); if (tt != null) { initTagsMap(t.getId(), tt.getOutputs(), triggerOutputTags);