001package org.intellimate.izou.sdk.frameworks.music.resources; 002 003import org.intellimate.izou.identification.Identification; 004import org.intellimate.izou.sdk.frameworks.music.Capabilities; 005import org.intellimate.izou.sdk.resource.Resource; 006 007import java.util.HashMap; 008 009/** 010 * this class is used to hold the capabilities-resource for events,can also be obtained via the resourceManager 011 * @author LeanderK 012 * @version 1.0 013 */ 014public class CapabilitiesResource extends Resource<HashMap<String, Boolean>> { 015 @SuppressWarnings("SpellCheckingInspection") 016 public static final String RESOURCE_ID = "izou.music.resource.capabilitesresource"; 017 018 /** 019 * creates a new Resource. 020 * This method is thread-safe. 021 */ 022 public CapabilitiesResource() { 023 super(RESOURCE_ID); 024 } 025 026 /** 027 * creates a new Resource. 028 * This method is thread-safe. 029 * 030 * @param provider the Provider of the Resource 031 */ 032 public CapabilitiesResource(Identification provider) { 033 super(RESOURCE_ID, provider); 034 } 035 036 /** 037 * creates a new Resource. 038 * This method is thread-safe. 039 * 040 * @param provider the Provider of the Resource 041 * @param capabilities the capabilities 042 */ 043 public CapabilitiesResource(Identification provider, Capabilities capabilities) { 044 super(RESOURCE_ID, provider, capabilities.write()); 045 } 046 047 /** 048 * creates a new Resource. 049 * This method is thread-safe. 050 * 051 * @param provider the Provider of the Resource 052 * @param consumer the ID of the Consumer 053 */ 054 public CapabilitiesResource(Identification provider, Identification consumer) { 055 super(RESOURCE_ID, provider, consumer); 056 } 057 058 /** 059 * creates a new Resource. 060 * This method is thread-safe. 061 * 062 * @param provider the Provider of the Resource 063 * @param capabilities the capabilities 064 * @param consumer the ID of the Consumer 065 */ 066 public CapabilitiesResource(Identification provider, Capabilities capabilities, Identification consumer) { 067 super(RESOURCE_ID, provider, capabilities.write(), consumer); 068 } 069}