Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix add-on type inconsistencies #2508

Merged
merged 2 commits into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
@NonNullByDefault
public class CommunityKarafAddonHandler implements MarketplaceAddonHandler {
private static final Path KAR_CACHE_PATH = Path.of(OpenHAB.getUserDataFolder(), "marketplace", "kar");
private static final List<String> SUPPORTED_EXT_TYPES = List.of("automation", "binding", "io", "persistence",
private static final List<String> SUPPORTED_EXT_TYPES = List.of("automation", "binding", "misc", "persistence",
"transformation", "ui", "voice");
private static final String KAR_DOWNLOAD_URL_PROPERTY = "kar_download_url";
private static final String KAR_EXTENSION = ".kar";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
@Component(immediate = true)
@NonNullByDefault
public class CommunityBundleAddonHandler extends MarketplaceBundleInstaller implements MarketplaceAddonHandler {
private static final List<String> SUPPORTED_EXT_TYPES = List.of("automation", "binding", "io", "persistence",
private static final List<String> SUPPORTED_EXT_TYPES = List.of("automation", "binding", "misc", "persistence",
"transformation", "ui", "voice");
private static final String JAR_DOWNLOAD_URL_PROPERTY = "jar_download_url";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ public class CommunityMarketplaceAddonService implements AddonService {
private static final Map<String, AddonType> TAG_ADDON_TYPE_MAP = Map.of( //
"automation", new AddonType("automation", "Automation"), //
"binding", new AddonType("binding", "Bindings"), //
"io", new AddonType("io", "I/O Services"), //
"persistence", new AddonType("persistence", "Persistence Services"), //
"misc", new AddonType("misc", "Misc"), //
"persistence", new AddonType("persistence", "Persistence"), //
"transformation", new AddonType("transformation", "Transformations"), //
"ui", new AddonType("ui", "User Interfaces"), //
"voice", new AddonType("voice", "Voices"));
"voice", new AddonType("voice", "Voice"));

private final Logger logger = LoggerFactory.getLogger(CommunityMarketplaceAddonService.class);
private final Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();
Expand Down Expand Up @@ -336,7 +336,7 @@ private Addon convertTopicItemToAddon(DiscourseTopicItem topic, List<DiscourseUs

String maturity = tags.stream().filter(CODE_MATURITY_LEVELS::contains).findAny().orElse(null);

HashMap<String, Object> properties = new HashMap<>(10);
Map<String, Object> properties = new HashMap<>(10);
properties.put("created_at", createdDate);
properties.put("like_count", likeCount);
properties.put("views", views);
Expand Down Expand Up @@ -386,7 +386,7 @@ private Addon convertTopicToAddon(DiscourseTopicResponseDTO topic) {

String maturity = tags.stream().filter(CODE_MATURITY_LEVELS::contains).findAny().orElse(null);

HashMap<String, Object> properties = new HashMap<>(10);
Map<String, Object> properties = new HashMap<>(10);
properties.put("created_at", createdDate);
properties.put("updated_at", updatedDate);
properties.put("last_posted", lastPostedDate);
Expand Down