public PluginSimpleContent(final PluginSimpleContent pluginContent, final String template, final Map<CodeType, String> codeMap) { super(pluginContent.getName(), pluginContent.getType(), pluginContent.getPath()); this.codeMap = new HashMap<CodeType, String>(pluginContent.getCodeMap() != null ? pluginContent.getCodeMap() : Collections.<CodeType, String>emptyMap()); if (codeMap != null && !codeMap.isEmpty()) { for (final Map.Entry<CodeType, String> codeTypeStringEntry : codeMap.entrySet()) { this.codeMap.put(codeTypeStringEntry.getKey(), codeTypeStringEntry.getValue()); } } this.template = pluginContent.getTemplate(); if (template != null) { this.template = template; } this.css = pluginContent.getCss(); this.frameworks = new HashSet<Framework>(pluginContent.getFrameworks() != null ? pluginContent.getFrameworks() : Collections.<Framework>emptyList()); this.language = pluginContent.getLanguage(); }
super(pluginContent.getName(), pluginContent.getType(), pluginContent.getPath()); this.codeMap = new HashMap<CodeType, String>(pluginContent.getCodeMap() != null ? pluginContent.getCodeMap() : Collections.<CodeType, String>emptyMap()); if (codeMap != null && !codeMap.isEmpty()) {
private Path createPlugin(String name, PluginType type, Framework framework) { pluginServices.createNewPlugin(name, type); verify(pluginAddedEvent, times(1)).fire(any(PluginAdded.class)); reset(pluginAddedEvent); final PluginSimpleContent pluginSimpleContent = buildPlugin(name, type, framework); pluginServices.save(pluginSimpleContent, ""); verify(pluginSavedEvent, times(1)).fire(any(PluginSaved.class)); reset(pluginSavedEvent); return pluginSimpleContent.getPath(); }
private Path createPlugin(String name, PluginType type, Framework framework) { pluginServices.createNewPlugin(name, type); verify(pluginAddedEvent, times(1)).fire(any(PluginAdded.class)); reset(pluginAddedEvent); final PluginSimpleContent pluginSimpleContent = buildPlugin(name, type, framework); pluginServices.save(pluginSimpleContent, ""); verify(pluginSavedEvent, times(1)).fire(any(PluginSaved.class)); reset(pluginSavedEvent); return pluginSimpleContent.getPath(); }