mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Fix JavaDoc issues (#4004)
Fixes various issues including wrong parameter names, references, links and dangling JavaDocs. Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
+1
-1
@@ -129,7 +129,7 @@ public class MarketplaceRuleTemplateProvider extends AbstractManagedProvider<Rul
|
||||
* This adds a new rule template to the persistent storage from its YAML representation.
|
||||
*
|
||||
* @param uid the UID to be used for the template
|
||||
* @param json the template content as a YAML string
|
||||
* @param yaml the template content as a YAML string
|
||||
*
|
||||
* @throws ParsingException if the content cannot be parsed correctly
|
||||
*/
|
||||
|
||||
+1
@@ -22,6 +22,7 @@ import org.openhab.core.addon.AddonParameter;
|
||||
import org.openhab.core.config.core.xml.util.GenericUnmarshaller;
|
||||
import org.openhab.core.config.core.xml.util.NodeIterator;
|
||||
|
||||
import com.thoughtworks.xstream.converters.Converter;
|
||||
import com.thoughtworks.xstream.converters.UnmarshallingContext;
|
||||
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
|
||||
|
||||
|
||||
+2
-1
@@ -26,7 +26,8 @@ import org.slf4j.LoggerFactory;
|
||||
* objects by a {@link AddonInfoReader} for a certain bundle.
|
||||
* <p>
|
||||
* This implementation registers each {@link AddonInfo} object at the {@link XmlAddonInfoProvider} which is itself
|
||||
* registered as {@link AddonInfoProvider} service at the <i>OSGi</i> service registry.
|
||||
* registered as {@link org.openhab.core.addon.AddonInfoProvider AddonInfoProvider} service at the <i>OSGi</i> service
|
||||
* registry.
|
||||
* <p>
|
||||
* If there is a {@link ConfigDescription} object within the {@link AddonInfoXmlResult} object, it is added to the
|
||||
* {@link AbstractXmlConfigDescriptionProvider} which is itself registered as <i>OSGi</i> service at the service
|
||||
|
||||
+1
@@ -20,6 +20,7 @@ import org.openhab.core.addon.AddonMatchProperty;
|
||||
import org.openhab.core.config.core.xml.util.GenericUnmarshaller;
|
||||
import org.openhab.core.config.core.xml.util.NodeIterator;
|
||||
|
||||
import com.thoughtworks.xstream.converters.Converter;
|
||||
import com.thoughtworks.xstream.converters.UnmarshallingContext;
|
||||
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
|
||||
|
||||
|
||||
+1
@@ -21,6 +21,7 @@ import org.openhab.core.addon.AddonParameter;
|
||||
import org.openhab.core.config.core.xml.util.GenericUnmarshaller;
|
||||
import org.openhab.core.config.core.xml.util.NodeIterator;
|
||||
|
||||
import com.thoughtworks.xstream.converters.Converter;
|
||||
import com.thoughtworks.xstream.converters.UnmarshallingContext;
|
||||
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
|
||||
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ public class AudioPlayer extends Thread {
|
||||
/**
|
||||
* Constructs an AudioPlayer to play the passed AudioSource
|
||||
*
|
||||
* @param audioSource The AudioSource to play
|
||||
* @param audioStream The AudioStream to play
|
||||
*/
|
||||
public AudioPlayer(AudioStream audioStream) {
|
||||
this.audioStream = audioStream;
|
||||
|
||||
+2
-1
@@ -16,7 +16,8 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.core.events.AbstractEvent;
|
||||
|
||||
/**
|
||||
* This is an {@link Event} that is sent when a web client should play an audio stream from a url.
|
||||
* This is an {@link org.openhab.core.events.Event Event} that is sent when a web client should play an audio stream
|
||||
* from a url.
|
||||
*
|
||||
* @author Kai Kreuzer - Initial contribution and API
|
||||
*/
|
||||
|
||||
+1
-3
@@ -89,7 +89,6 @@ public class OAuthClientServiceImpl implements OAuthClientService {
|
||||
/**
|
||||
* It should only be used internally, thus the access is package level
|
||||
*
|
||||
* @param bundleContext Bundle Context
|
||||
* @param handle The handle produced previously from
|
||||
* {@link org.openhab.core.auth.client.oauth2.OAuthFactory#createOAuthClientService}
|
||||
* @param storeHandler Storage handler
|
||||
@@ -119,12 +118,11 @@ public class OAuthClientServiceImpl implements OAuthClientService {
|
||||
/**
|
||||
* It should only be used internally, thus the access is package level
|
||||
*
|
||||
* @param bundleContext Bundle Context*
|
||||
* @param handle The handle produced previously from
|
||||
* {@link org.openhab.core.auth.client.oauth2.OAuthFactory#createOAuthClientService}*
|
||||
* @param storeHandler Storage handler
|
||||
* @param httpClientFactory Http client factory
|
||||
* @param persistedParams These parameters are static with respect to the OAuth provider and thus can be persisted.
|
||||
* @param params These parameters are static with respect to the OAuth provider and thus can be persisted.
|
||||
* @return OAuthClientServiceImpl an instance
|
||||
*/
|
||||
static OAuthClientServiceImpl createInstance(String handle, OAuthStoreHandler storeHandler,
|
||||
|
||||
+5
-3
@@ -356,14 +356,16 @@ public class OAuthConnector {
|
||||
|
||||
/**
|
||||
* This is a special case where the httpClient (jetty) is created due to the need for certificate pinning.
|
||||
* If certificate pinning is needed, please refer to {@code TrustManagerProvider}. The http client is
|
||||
* created, used and then shutdown immediately after use. There is little reason to cache the client/ connections
|
||||
* If certificate pinning is needed, please refer to
|
||||
* {@code org.openhab.core.io.net.http.ExtensibleTrustManager ExtensibleTrustManager}.
|
||||
* The http client is created, used and then shutdown immediately after use. There is little reason to cache the
|
||||
* client/ connections
|
||||
* because oauth requests are short; and it may take hours/ days before the next request is needed.
|
||||
*
|
||||
* @param tokenUrl access token url
|
||||
* @return http client. This http client
|
||||
* @throws OAuthException If any exception is thrown while starting the http client.
|
||||
* @see TrustManagerProvider
|
||||
* @see org.openhab.core.io.net.http.ExtensibleTrustManager
|
||||
*/
|
||||
private HttpClient createHttpClient(String tokenUrl) throws OAuthException {
|
||||
HttpClient httpClient = httpClientFactory.createHttpClient(HTTP_CLIENT_CONSUMER_NAME);
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ import org.openhab.core.test.storage.VolatileStorage;
|
||||
|
||||
/**
|
||||
* The {@link OAuthStoreHandlerTest} contains tests for
|
||||
* {@link org.openhab.core.auth.oauth2client.OAuthStoreHandlerImpl}
|
||||
* {@link org.openhab.core.auth.oauth2client.internal.OAuthStoreHandlerImpl}
|
||||
*
|
||||
* @author Jacob Laursen - Initial contribution
|
||||
*/
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public class ScriptModuleTypeProvider extends AbstractProvider<ModuleType> imple
|
||||
}
|
||||
|
||||
/**
|
||||
* This method creates the {@link ConfigurationDescriptionParameter}s used by the generated ScriptActionType and
|
||||
* This method creates the {@link ConfigDescriptionParameter}s used by the generated ScriptActionType and
|
||||
* ScriptConditionType. {@link AbstractScriptModuleHandler} requires that the names of these be 'type' and 'script'.
|
||||
*
|
||||
* @return a list of {#link ConfigurationDescriptionParameter}s
|
||||
|
||||
+2
-2
@@ -44,9 +44,9 @@ public class RulePredicates {
|
||||
* <br/>
|
||||
* The name space is part of the UID and the prefix thereof.
|
||||
* <br/>
|
||||
* If the UID does not contain a {@link PREFIX_SEPARATOR} {@code null} will be returned.
|
||||
* If the UID does not contain a {@link #PREFIX_SEPARATOR} {@code null} will be returned.
|
||||
* <br/>
|
||||
* If the UID does contain a {@link PREFIX_SEPARATOR} the prefix until the first occurrence will be returned.
|
||||
* If the UID does contain a {@link #PREFIX_SEPARATOR} the prefix until the first occurrence will be returned.
|
||||
* <br/>
|
||||
* If the prefix would have a zero length {@code null} will be returned.
|
||||
*
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ final class RuleExecutionSimulator {
|
||||
* @param rule {@link Rule} to be simulated.
|
||||
* @param from {@link ZonedDateTime} earliest time to be contained in the rule simulation.
|
||||
* @param until {@link ZonedDateTime} latest time to be contained in the rule simulation.
|
||||
* @param cron cron-expression to be evaluated for determining the execution times.
|
||||
* @param temporalAdjuster {@link SchedulerTemporalAdjuster} to be evaluated for determining the execution times.
|
||||
* @return a list of expected executions.
|
||||
*/
|
||||
private List<RuleExecution> simulateExecutionsForCronBasedRule(Rule rule, ZonedDateTime from, ZonedDateTime until,
|
||||
|
||||
+2
-2
@@ -63,7 +63,7 @@ import org.slf4j.LoggerFactory;
|
||||
* The {@link RuleRegistryImpl} provides basic functionality for managing {@link Rule}s.
|
||||
* It can be used to
|
||||
* <ul>
|
||||
* <li>Add Rules with the {@link #add(Rule)}, {@link #added(Provider, Rule)}, {@link #addProvider(RuleProvider)}
|
||||
* <li>Add Rules with the {@link #add(Rule)}, {@link #added(Provider, Rule)}, {@link #addProvider(Provider)}
|
||||
* methods.</li>
|
||||
* <li>Get the existing rules with the {@link #get(String)}, {@link #getAll()}, {@link #getByTag(String)},
|
||||
* {@link #getByTags(String[])} methods.</li>
|
||||
@@ -130,7 +130,7 @@ public class RuleRegistryImpl extends AbstractRegistry<Rule, String, RuleProvide
|
||||
/**
|
||||
* Activates this component. Called from DS.
|
||||
*
|
||||
* @param componentContext this component context.
|
||||
* @param bundleContext this component context.
|
||||
*/
|
||||
@Override
|
||||
@Activate
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import org.openhab.core.automation.Trigger;
|
||||
import org.openhab.core.config.core.Configuration;
|
||||
|
||||
/**
|
||||
* This class is implementation of {@link Trigger} modules used in the {@link RuleEngine}s.
|
||||
* This class is implementation of {@link Trigger} modules used in the rule engines.
|
||||
*
|
||||
* @author Yordan Mihaylov - Initial contribution
|
||||
*/
|
||||
|
||||
+1
-2
@@ -82,7 +82,7 @@ public abstract class AbstractCommandProvider<@NonNull E> implements ServiceTrac
|
||||
* high performance at runtime of the system, when the Rule Engine asks for any particular object, instead of
|
||||
* waiting it for parsing every time.
|
||||
* <p>
|
||||
* The Map has for keys UIDs of the objects and for values {@link Localizer}s of the objects.
|
||||
* The Map has for keys UIDs of the objects and for values the objects.
|
||||
*/
|
||||
protected final Map<String, E> providedObjectsHolder = new HashMap<>();
|
||||
|
||||
@@ -101,7 +101,6 @@ public abstract class AbstractCommandProvider<@NonNull E> implements ServiceTrac
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is inherited from {@link AbstractPersistentProvider}.
|
||||
* Extends parent's functionality with closing the {@link Parser} service tracker.
|
||||
* Clears the {@link #parsers}, {@link #providedObjectsHolder}, {@link #providerPortfolio}
|
||||
*/
|
||||
|
||||
+1
-3
@@ -71,7 +71,7 @@ public class CommandlineModuleTypeProvider extends AbstractCommandProvider<Modul
|
||||
* add any new functionality to the constructors of the providers. Only provides consistency by invoking the
|
||||
* parent's constructor.
|
||||
*
|
||||
* @param context is the {@code BundleContext}, used for creating a tracker for {@link Parser} services.
|
||||
* @param bundleContext is the {@code BundleContext}, used for creating a tracker for {@link Parser} services.
|
||||
* @param moduleTypeRegistry a ModuleTypeRegistry service
|
||||
*/
|
||||
public CommandlineModuleTypeProvider(BundleContext bundleContext, ModuleTypeRegistry moduleTypeRegistry) {
|
||||
@@ -152,8 +152,6 @@ public class CommandlineModuleTypeProvider extends AbstractCommandProvider<Modul
|
||||
/**
|
||||
* This method is responsible for removing a set of objects loaded from a specified file or URL resource.
|
||||
*
|
||||
* @param providerType specifies the provider responsible for removing the objects loaded from a specified file or
|
||||
* URL resource.
|
||||
* @param url is a specified file or URL resource.
|
||||
* @return the string <b>SUCCESS</b>.
|
||||
*/
|
||||
|
||||
-2
@@ -146,8 +146,6 @@ public class CommandlineTemplateProvider extends AbstractCommandProvider<RuleTem
|
||||
/**
|
||||
* This method is responsible for removing a set of objects loaded from a specified file or URL resource.
|
||||
*
|
||||
* @param providerType specifies the provider responsible for removing the objects loaded from a specified file or
|
||||
* URL resource.
|
||||
* @param url is a specified file or URL resource.
|
||||
* @return the string <b>SUCCESS</b>.
|
||||
*/
|
||||
|
||||
+3
-4
@@ -323,7 +323,6 @@ public class Printer {
|
||||
* This method is responsible for printing the strings, representing the auxiliary automation objects.
|
||||
*
|
||||
* @param columnWidths represents the column widths of the table.
|
||||
* @param width represents the table width.
|
||||
* @param prop is a property name of the property with value the collection of the auxiliary automation objects for
|
||||
* printing.
|
||||
* @param list with the auxiliary automation objects for printing.
|
||||
@@ -530,10 +529,10 @@ public class Printer {
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is responsible for printing the set of {@link Input}s or {@link Output}s or {@link Inputs}s.
|
||||
* This method is responsible for printing the set of tags.
|
||||
*
|
||||
* @param set is the set of {@link Input}s or {@link Output}s or {@link Inputs}s for printing.
|
||||
* @return a formated string, representing the set of {@link Input}s or {@link Output}s or {@link Input}s.
|
||||
* @param tags is the set of tags for printing.
|
||||
* @return a formatted string, representing the set of tags.
|
||||
*/
|
||||
private static String getTagsRecord(Set<String> tags) {
|
||||
if (tags == null || tags.isEmpty()) {
|
||||
|
||||
+1
-2
@@ -65,8 +65,7 @@ public class CompositeModuleHandlerFactory extends BaseModuleHandlerFactory impl
|
||||
/**
|
||||
* The constructor of system handler factory for composite module types.
|
||||
*
|
||||
* @param context is a bundle context
|
||||
* @param mtManager is a module type manager
|
||||
* @param mtRegistry is a module type registry
|
||||
* @param re is a rule engine
|
||||
*/
|
||||
public CompositeModuleHandlerFactory(ModuleTypeRegistry mtRegistry, RuleEngineImpl re) {
|
||||
|
||||
+2
-2
@@ -114,10 +114,10 @@ public class CompositeTriggerHandler
|
||||
|
||||
/**
|
||||
* The {@link CompositeTriggerHandler} sets itself as callback to the child triggers and store the callback to the
|
||||
* rule engine. In this way the trigger of composite type will be notified always when some of the child triggers
|
||||
* rule engine. In this way the trigger of composite type will always be notified when some of the child triggers
|
||||
* are triggered and has an opportunity to set the outputs of parent trigger to the rule context.
|
||||
*
|
||||
* @see org.openhab.core.automation.handler.TriggerHandler#setTriggerHandlerCallback(org.openhab.core.automation.handler.TriggerHandlerCallback)
|
||||
* @see org.openhab.core.automation.handler.TriggerHandler#setCallback(ModuleHandlerCallback)
|
||||
*/
|
||||
@Override
|
||||
public void setCallback(@Nullable ModuleHandlerCallback callback) {
|
||||
|
||||
-3
@@ -50,9 +50,6 @@ public class ItemCommandActionHandler extends BaseActionModuleHandler {
|
||||
|
||||
/**
|
||||
* constructs a new ItemCommandActionHandler
|
||||
*
|
||||
* @param module
|
||||
* @param moduleTypes
|
||||
*/
|
||||
public ItemCommandActionHandler(Action module, EventPublisher eventPublisher, ItemRegistry itemRegistry) {
|
||||
super(module);
|
||||
|
||||
-7
@@ -162,12 +162,6 @@ public abstract class AbstractResourceBundleProvider<@NonNull E> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is used to initialize field {@link #queue}, when the instance of
|
||||
* {@link AutomationResourceBundlesEventQueue} is created.
|
||||
*
|
||||
* @param queue provides an access to the queue for processing bundles.
|
||||
*/
|
||||
protected AutomationResourceBundlesEventQueue getQueue() {
|
||||
return queue;
|
||||
}
|
||||
@@ -399,7 +393,6 @@ public abstract class AbstractResourceBundleProvider<@NonNull E> {
|
||||
* This method is called from {@link #processAutomationProvider(Bundle)} to process the loading of the provided
|
||||
* objects.
|
||||
*
|
||||
* @param vendor is a holder of information about the bundle providing data for import.
|
||||
* @param parser the {@link Parser} which is responsible for parsing of a particular format in which the provided
|
||||
* objects are presented
|
||||
* @param url the resource which is used for loading the objects.
|
||||
|
||||
+1
-3
@@ -43,9 +43,7 @@ public class HostFragmentMappingUtil {
|
||||
/**
|
||||
* This method is used to get the host bundles of the parameter which is a fragment bundle.
|
||||
*
|
||||
* @param pkgAdmin
|
||||
*
|
||||
* @param bundle an OSGi fragment bundle.
|
||||
* @param fragment an OSGi fragment bundle.
|
||||
* @return a list with the hosts of the <code>fragment</code> parameter.
|
||||
*/
|
||||
static List<Bundle> returnHostBundles(Bundle fragment) {
|
||||
|
||||
+1
-3
@@ -61,8 +61,6 @@ public class ModuleTypeResourceBundleProvider extends AbstractResourceBundleProv
|
||||
/**
|
||||
* This constructor is responsible for initializing the path to resources and tracking the
|
||||
* {@link ModuleTypeRegistry}.
|
||||
*
|
||||
* @param context is the {@code BundleContext}, used for creating a tracker for {@link Parser} services.
|
||||
*/
|
||||
@Activate
|
||||
public ModuleTypeResourceBundleProvider(final @Reference ModuleTypeI18nService moduleTypeI18nService) {
|
||||
@@ -138,7 +136,7 @@ public class ModuleTypeResourceBundleProvider extends AbstractResourceBundleProv
|
||||
/**
|
||||
* This method is used to localize the {@link ModuleType}s.
|
||||
*
|
||||
* @param element is the {@link ModuleType} that must be localized.
|
||||
* @param defModuleType is the {@link ModuleType} that must be localized.
|
||||
* @param locale represents a specific geographical, political, or cultural region.
|
||||
* @return the localized {@link ModuleType}.
|
||||
*/
|
||||
|
||||
-2
@@ -53,8 +53,6 @@ public class RuleResourceBundleImporter extends AbstractResourceBundleProvider<R
|
||||
/**
|
||||
* This constructor is responsible for initializing the path to resources and tracking the managing service of the
|
||||
* {@link Rule}s.
|
||||
*
|
||||
* @param registry the managing service of the {@link Rule}s.
|
||||
*/
|
||||
public RuleResourceBundleImporter() {
|
||||
super(ROOT_DIRECTORY + "/rules/");
|
||||
|
||||
+9
-12
@@ -28,7 +28,6 @@ import org.openhab.core.automation.internal.provider.i18n.RuleTemplateI18nUtil;
|
||||
import org.openhab.core.automation.parser.Parser;
|
||||
import org.openhab.core.automation.template.RuleTemplate;
|
||||
import org.openhab.core.automation.template.RuleTemplateProvider;
|
||||
import org.openhab.core.automation.template.Template;
|
||||
import org.openhab.core.automation.template.TemplateProvider;
|
||||
import org.openhab.core.automation.type.ModuleType;
|
||||
import org.openhab.core.common.registry.Provider;
|
||||
@@ -46,15 +45,15 @@ import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.ReferencePolicy;
|
||||
|
||||
/**
|
||||
* This class is implementation of {@link TemplateProvider}. It serves for providing {@link RuleTemplates}s by loading
|
||||
* This class is implementation of {@link TemplateProvider}. It serves for providing {@link RuleTemplate}s by loading
|
||||
* bundle resources. It extends functionality of {@link AbstractResourceBundleProvider} by specifying:
|
||||
* <ul>
|
||||
* <li>the path to resources, corresponding to the {@link RuleTemplates}s - root directory
|
||||
* <li>the path to resources, corresponding to the {@link RuleTemplate}s - root directory
|
||||
* {@link AbstractResourceBundleProvider#ROOT_DIRECTORY} with sub-directory "templates".
|
||||
* <li>type of the {@link Parser}s, corresponding to the {@link RuleTemplates}s - {@link Parser#PARSER_TEMPLATE}
|
||||
* <li>specific functionality for loading the {@link RuleTemplates}s
|
||||
* <li>type of the {@link Parser}s, corresponding to the {@link RuleTemplate}s - {@link Parser#PARSER_TEMPLATE}
|
||||
* <li>specific functionality for loading the {@link RuleTemplate}s
|
||||
* <li>tracking the managing service of the {@link ModuleType}s.
|
||||
* <li>tracking the managing of the {@link RuleTemplates}s.
|
||||
* <li>tracking the managing of the {@link RuleTemplate}s.
|
||||
* </ul>
|
||||
*
|
||||
* @author Ana Dimova - Initial contribution
|
||||
@@ -72,9 +71,7 @@ public class TemplateResourceBundleProvider extends AbstractResourceBundleProvid
|
||||
|
||||
/**
|
||||
* This constructor is responsible for initializing the path to resources and tracking the managing service of the
|
||||
* {@link ModuleType}s and the managing service of the {@link RuleTemplates}s.
|
||||
*
|
||||
* @param context is the {@code BundleContext}, used for creating a tracker for {@link Parser} services.
|
||||
* {@link ModuleType}s and the managing service of the {@link RuleTemplate}s.
|
||||
*/
|
||||
@Activate
|
||||
public TemplateResourceBundleProvider(final @Reference ConfigI18nLocalizationService configI18nService,
|
||||
@@ -151,11 +148,11 @@ public class TemplateResourceBundleProvider extends AbstractResourceBundleProvid
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is used to localize the {@link Template}s.
|
||||
* This method is used to localize the {@link RuleTemplate}s.
|
||||
*
|
||||
* @param element is the {@link Template} that must be localized.
|
||||
* @param defTemplate is the {@link RuleTemplate} that must be localized.
|
||||
* @param locale represents a specific geographical, political, or cultural region.
|
||||
* @return the localized {@link Template}.
|
||||
* @return the localized {@link RuleTemplate}.
|
||||
*/
|
||||
private @Nullable RuleTemplate getPerLocale(@Nullable RuleTemplate defTemplate, @Nullable Locale locale) {
|
||||
if (locale == null || defTemplate == null) {
|
||||
|
||||
+5
-5
@@ -58,7 +58,7 @@ public class Vendor {
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor initialize the {@link vendorId} and the {@link vendorVersion} of the vendor with corresponding
|
||||
* This constructor initialize the {@link #vendorID} and the {@link #vendorVersion} of the vendor with corresponding
|
||||
* bundle ID and bundle version of a bundle that provides resources for the automation objects.
|
||||
*
|
||||
* @param name a bundle symbolic name of a bundle that providing resources for automation objects.
|
||||
@@ -71,7 +71,7 @@ public class Vendor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter of {@link vendorSymbolicName}.
|
||||
* Getter of {@link #vendorSymbolicName}.
|
||||
*
|
||||
* @return a bundle symbolic name of a bundle that provides resources for the automation objects.
|
||||
*/
|
||||
@@ -80,7 +80,7 @@ public class Vendor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter of {@link vendorId}.
|
||||
* Getter of {@link #vendorID}.
|
||||
*
|
||||
* @return a bundle symbolic name of a bundle that provides resources for the automation objects.
|
||||
*/
|
||||
@@ -89,7 +89,7 @@ public class Vendor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter of {@link vendorVersion}.
|
||||
* Getter of {@link #vendorVersion}.
|
||||
*
|
||||
* @return a bundle version of a bundle that provides resources for the automation objects.
|
||||
*/
|
||||
@@ -98,7 +98,7 @@ public class Vendor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter of {@link vendorVersion}.
|
||||
* Setter of {@link #vendorVersion}.
|
||||
*
|
||||
* @param version a bundle version of a bundle that provides resources for the automation objects.
|
||||
*/
|
||||
|
||||
+2
-2
@@ -19,8 +19,8 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.core.service.WatchService;
|
||||
|
||||
/**
|
||||
* This class is an implementation of {@link AbstractWatchService} which is responsible for tracking changes in file
|
||||
* system by Java WatchService.
|
||||
* This class is an implementation of {@link WatchService.WatchEventListener} which is responsible for tracking file
|
||||
* system changes.
|
||||
* <p>
|
||||
* It provides functionality for tracking {@link #watchingDir} changes to import or remove the automation objects.
|
||||
*
|
||||
|
||||
+2
-2
@@ -69,7 +69,7 @@ public class ModuleTypeI18nServiceImpl implements ModuleTypeI18nService {
|
||||
/**
|
||||
* This method is used to localize the {@link ModuleType}s.
|
||||
*
|
||||
* @param element is the {@link ModuleType} that must be localized.
|
||||
* @param defModuleType is the {@link ModuleType} that must be localized.
|
||||
* @param locale represents a specific geographical, political, or cultural region.
|
||||
* @return the localized {@link ModuleType}.
|
||||
*/
|
||||
@@ -180,7 +180,7 @@ public class ModuleTypeI18nServiceImpl implements ModuleTypeI18nService {
|
||||
/**
|
||||
* Utility method for localization of TriggerTypes.
|
||||
*
|
||||
* @param ct is a TriggerType for localization.
|
||||
* @param tt 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.
|
||||
|
||||
+4
-2
@@ -25,8 +25,10 @@ import org.openhab.core.i18n.TranslationProvider;
|
||||
import org.osgi.framework.Bundle;
|
||||
|
||||
/**
|
||||
* This class is used as utility for resolving the localized {@link ModuleTypes}s. It automatically infers the key if
|
||||
* the default text is not a constant with the assistance of {@link TranslationProvider}.
|
||||
* This class is used as utility for resolving the localized {@link org.openhab.core.automation.type.ModuleType
|
||||
* ModuleTypes}s.
|
||||
* It automatically infers the key if the default text is not a constant with the assistance of
|
||||
* {@link TranslationProvider}.
|
||||
*
|
||||
* @author Ana Dimova - Initial contribution
|
||||
* @author Yordan Mihaylov - updates related to api changes
|
||||
|
||||
-2
@@ -30,8 +30,6 @@ import org.osgi.framework.Bundle;
|
||||
* is itself registered as {@link ConfigDescriptionProvider} service at the <i>OSGi</i> service registry.
|
||||
*
|
||||
* @author Michael Grammling - Initial contribution
|
||||
*
|
||||
* @see ConfigDescriptionXmlProviderFactory
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class ConfigDescriptionXmlProvider implements XmlDocumentProvider<List<ConfigDescription>> {
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ public abstract class XmlDocumentReader<@NonNull T> {
|
||||
*
|
||||
* @param xstream the XStream object to be configured
|
||||
*
|
||||
* @see https://x-stream.github.io/security.html
|
||||
* @see <a href="https://x-stream.github.io/security.html">XStream - Security Aspects</a>
|
||||
*/
|
||||
protected void configureSecurity(XStream xstream) {
|
||||
xstream.allowTypesByWildcard(DEFAULT_ALLOWED_TYPES_WILDCARD);
|
||||
|
||||
+2
-2
@@ -85,7 +85,7 @@ public class XmlDocumentReaderTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://x-stream.github.io/CVE-2013-7285.html
|
||||
* @see <a href="https://x-stream.github.io/CVE-2013-7285.html">XStream - CVE-2013-7285</a>
|
||||
*/
|
||||
@Test
|
||||
public void defaultSecurityProtectsAgainstRemoteCodeExecution() throws Exception {
|
||||
@@ -105,7 +105,7 @@ public class XmlDocumentReaderTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://x-stream.github.io/CVE-2017-7957.html
|
||||
* @see <a href="https://x-stream.github.io/CVE-2017-7957.html">XStream - CVE-2017-7957</a>
|
||||
*/
|
||||
@Test
|
||||
public void defaultSecurityProtectsAgainstDenialOfServiceAttacks() throws Exception {
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ import org.slf4j.LoggerFactory;
|
||||
* <ul>
|
||||
* <li>Currently every returned frame is considered as success, regex matching is not implemented.
|
||||
* <li>Frames are sent only on startup (or if an {@link org.openhab.core.addon.AddonInfoProvider}
|
||||
* calls {@link setAddonCandidates}), no background scanning.
|
||||
* calls {@link #setAddonCandidates(List)}), no background scanning.
|
||||
* <ul>
|
||||
*
|
||||
* @apiNote The {@link IpAddonFinder} is still under active development, it has initially
|
||||
|
||||
+1
-1
@@ -415,7 +415,7 @@ public class InstallServiceCommand implements Action {
|
||||
/**
|
||||
* Silently close outputstream
|
||||
*
|
||||
* @param is
|
||||
* @param os
|
||||
* outputstream
|
||||
*/
|
||||
private void safeClose(OutputStream os) {
|
||||
|
||||
+2
-1
@@ -526,7 +526,8 @@ public class HttpUtil {
|
||||
* Check whether the content data is a JPEG file checking file start and end bytes.
|
||||
* {@link URLConnection#guessContentTypeFromStream(InputStream)} is wrong for some JPEG files.
|
||||
*
|
||||
* @see https://en.wikipedia.org/wiki/JPEG#Syntax_and_structure
|
||||
* @see <a href="https://en.wikipedia.org/wiki/JPEG#Syntax_and_structure">JPEG Syntax and structure</a>
|
||||
*
|
||||
* @param data the data as buffer of bytes
|
||||
* @return <code>true</code> if the content is a JPEG file, <code>false</code> otherwise
|
||||
*/
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory;
|
||||
* {@code javax.annotation.security.PermitAll} and {@code javax.annotation.security.DenyAll}
|
||||
* on resource methods and sub-resource methods.
|
||||
*
|
||||
* Ported from {@link RolesAllowedDynamicFeature} with modifications.
|
||||
* Ported from the Jersey {@code RolesAllowedDynamicFeature} class with modifications.
|
||||
*
|
||||
* @author Paul Sandoz - initial contribution
|
||||
* @author Martin Matula - initial contribution
|
||||
|
||||
+2
-1
@@ -19,7 +19,8 @@ import org.openhab.core.auth.AuthenticationException;
|
||||
* An exception when the token endpoint encounters an error and must return an error response, according to RFC 6749
|
||||
* Section 5.2.
|
||||
*
|
||||
* {@linkplain https://tools.ietf.org/html/rfc6749#section-5.2}
|
||||
* @see <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-5.2">RFC 6749: Issuing an Access Token - Error
|
||||
* Response</a>
|
||||
*
|
||||
* @author Yannick Schaus - initial contribution
|
||||
*/
|
||||
|
||||
+2
-1
@@ -17,7 +17,8 @@ import org.openhab.core.auth.User;
|
||||
/**
|
||||
* A DTO object for a successful token endpoint response, as per RFC 6749, Section 5.1.
|
||||
*
|
||||
* {@linkplain https://tools.ietf.org/html/rfc6749#section-5.1}
|
||||
* @see <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-5.1">RFC 6749: Issuing an Access Token -
|
||||
* Successful Response</a>
|
||||
*
|
||||
* @author Yannick Schaus - initial contribution
|
||||
*/
|
||||
|
||||
+2
-1
@@ -15,7 +15,8 @@ package org.openhab.core.io.rest.auth.internal;
|
||||
/**
|
||||
* A DTO object for an unsuccessful token endpoint response, as per RFC 6749, Section 5.2.
|
||||
*
|
||||
* {@linkplain https://tools.ietf.org/html/rfc6749#section-5.2}
|
||||
* @see <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-5.2">RFC 6749: Issuing an Access Token - Error
|
||||
* Response</a>
|
||||
*
|
||||
* @author Yannick Schaus - initial contribution
|
||||
*/
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ public class UserSecurityContext implements AuthenticationSecurityContext {
|
||||
* Constructs a security context from an instance of {@link User}
|
||||
*
|
||||
* @param user the user
|
||||
* @param the related {@link Authentication}
|
||||
* @param authentication the related {@link Authentication}
|
||||
* @param authenticationScheme the scheme that was used to authenticate the user, e.g. "Basic"
|
||||
*/
|
||||
public UserSecurityContext(User user, Authentication authentication, String authenticationScheme) {
|
||||
|
||||
+2
-1
@@ -25,7 +25,8 @@ import org.osgi.dto.DTO;
|
||||
* Data transfer object until UIs are fixed.
|
||||
*
|
||||
* <p>
|
||||
* {@link https://github.com/openhab/openhab-core/issues/1216}
|
||||
*
|
||||
* @see <a href="https://github.com/openhab/openhab-core/issues/1216">Sitemap Events: registration response buggy</a>
|
||||
*
|
||||
* @author Markus Rathgeb - Initial contribution
|
||||
*/
|
||||
|
||||
-3
@@ -333,9 +333,6 @@ public class SitemapResource
|
||||
|
||||
/**
|
||||
* Subscribes the connecting client to the stream of sitemap events.
|
||||
*
|
||||
* @return {@link EventOutput} object associated with the incoming
|
||||
* connection.
|
||||
*/
|
||||
@GET
|
||||
@Path(SEGMENT_EVENTS + "/{subscriptionid: [a-zA-Z_0-9-]+}")
|
||||
|
||||
+2
-2
@@ -264,7 +264,7 @@ public class ModbusLibraryWrapper {
|
||||
/**
|
||||
* Convert {@link ModbusRegisterArray} to array of {@link Register}
|
||||
*
|
||||
* @param bits
|
||||
* @param arr
|
||||
* @return
|
||||
*/
|
||||
public static Register[] convertRegisters(ModbusRegisterArray arr) {
|
||||
@@ -303,7 +303,7 @@ public class ModbusLibraryWrapper {
|
||||
/**
|
||||
* Invoke callback with the data received
|
||||
*
|
||||
* @param message original request
|
||||
* @param request original request
|
||||
* @param callback callback for read
|
||||
* @param response Modbus library response object
|
||||
*/
|
||||
|
||||
+2
-2
@@ -444,7 +444,7 @@ public class ModbusManagerImpl implements ModbusManager {
|
||||
*
|
||||
* In case connection cannot be established, callback is called with {@link ModbusConnectionException}
|
||||
*
|
||||
* @param operationId id appened to log messages for identifying the operation
|
||||
* @param timer the timer having an operationId that is appended to log messages for identifying the operation
|
||||
* @param oneOffTask whether this is one-off, or execution of previously scheduled poll
|
||||
* @param task task representing the read or write operation
|
||||
* @return {@link ModbusSlaveConnection} to the endpoint as specified by the task, or empty {@link Optional} when
|
||||
@@ -575,7 +575,7 @@ public class ModbusManagerImpl implements ModbusManager {
|
||||
}
|
||||
|
||||
int tryIndex = 0;
|
||||
/**
|
||||
/*
|
||||
* last execution is tracked such that the endpoint is not spammed on retry. First retry can be executed
|
||||
* right away since getConnection ensures enough time has passed since last transaction. More precisely,
|
||||
* ModbusSlaveConnectionFactoryImpl sleeps on activate() (i.e. before returning connection).
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ public class SimpleStopWatch {
|
||||
*
|
||||
* First StopWatch is resumed, then action is applied. Finally the StopWatch is suspended.
|
||||
*
|
||||
* @param supplier action to time
|
||||
* @param runnable action to time
|
||||
* @return return value from supplier
|
||||
*/
|
||||
public void timeRunnable(Runnable runnable) {
|
||||
|
||||
+1
-2
@@ -695,8 +695,7 @@ public class SmokeTest extends IntegrationTestSupport {
|
||||
/**
|
||||
*
|
||||
* @param unexpectedCount number of unexpected callback calls
|
||||
* @param callbackCalled number of callback calls (including unexpected)
|
||||
* @param dataReceived number of expected callback calls (onBits or onRegisters)
|
||||
* @param expectedCount number of expected callback calls (onBits or onRegisters)
|
||||
* @param pollStartMillis poll start time in milliepoch
|
||||
* @param expectedPollAverageMin average poll period should be at least greater than this
|
||||
* @param expectedPollAverageMax average poll period less than this
|
||||
|
||||
+1
-2
@@ -30,8 +30,7 @@ public interface SerialPortProvider {
|
||||
* Gets the {@link SerialPortIdentifier} if it is available or null otherwise.
|
||||
*
|
||||
* @param portName The ports name.
|
||||
* @return The created {@link SerialPort}.
|
||||
* @throws NoSuchPortException If the serial port does not exist.
|
||||
* @return The created {@link SerialPort} or <code>null</code> if the serial port does not exist.
|
||||
* @throws UnsupportedCommOperationException
|
||||
* @throws PortInUseException
|
||||
*/
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* This service is an implementation of an openHAB {@link AddonSuggestionFinderService} using the Karaf features
|
||||
* This service is an implementation of an openHAB {@link AddonFinderService} using the Karaf features
|
||||
* service. This service allows dynamic installation/removal of add-on suggestion finders.
|
||||
*
|
||||
* @author Mark Herwege - Initial contribution
|
||||
|
||||
-1
@@ -34,7 +34,6 @@ public class Exec {
|
||||
*
|
||||
* @param commandLine
|
||||
* the command line to execute
|
||||
* @see http://www.peterfriese.de/running-applescript-from-java/
|
||||
*/
|
||||
public static void executeCommandLine(String... commandLine) {
|
||||
ExecUtil.executeCommandLine(commandLine);
|
||||
|
||||
-2
@@ -74,8 +74,6 @@ public abstract class ScriptException extends Exception {
|
||||
|
||||
/**
|
||||
* Creates a ScriptException with one Error.
|
||||
*
|
||||
* @param errors
|
||||
*/
|
||||
private ScriptException(final String scriptText, final ScriptError error) {
|
||||
super(error.getMessage()); // ?
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ public class GenericItemChannelLinkProvider extends AbstractProvider<ItemChannel
|
||||
implements BindingConfigReader, ItemChannelLinkProvider {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(GenericItemChannelLinkProvider.class);
|
||||
/** caches binding configurations. maps itemNames to {@link BindingConfig}s */
|
||||
/** caches binding configurations. maps itemNames to {@link ItemChannelLink}s */
|
||||
protected Map<String, Set<ItemChannelLink>> itemChannelLinkMap = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import org.openhab.core.thing.binding.ThingHandler;
|
||||
import org.openhab.core.thing.binding.ThingHandlerCallback;
|
||||
|
||||
/**
|
||||
* Tests cases for {@link MagicONOffLightHandler}. The tests provide mocks for supporting entities using Mockito.
|
||||
* Tests cases for {@link MagicColorLightHandler}. The tests provide mocks for supporting entities using Mockito.
|
||||
*
|
||||
* @author Henning Treu - Initial contribution
|
||||
*/
|
||||
|
||||
+4
-2
@@ -12,18 +12,20 @@
|
||||
*/
|
||||
package org.openhab.core.thing.binding.firmware;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.thing.ThingStatus;
|
||||
import org.openhab.core.thing.ThingStatusDetail;
|
||||
import org.openhab.core.thing.ThingUID;
|
||||
import org.openhab.core.thing.firmware.FirmwareUpdateService;
|
||||
|
||||
/**
|
||||
* The {@link FirmwareUpdateHandler} can be implemented and registered as an OSGi service in order to update the
|
||||
* firmware for the physical device of a {@link Thing}. The {@link FirmwareUpdateService} tracks each firmware
|
||||
* update handler and starts the firmware update process by the operation
|
||||
* {@link FirmwareUpdateService#updateFirmware(org.openhab.core.thing.ThingUID, FirmwareUID, java.util.Locale)}
|
||||
* .
|
||||
* {@link FirmwareUpdateService#updateFirmware(ThingUID, String, Locale)}.
|
||||
*
|
||||
* @author Thomas Höfer - Initial contribution
|
||||
*/
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
*
|
||||
* For updates which are based on a percentage progress it is optional to define a sequence of {@link ProgressStep}s and
|
||||
* to use the {@link ProgressCallback#next()} method. In order to indicate that the percentage progress has changed, the
|
||||
* method {@link ProgressCallback#update(progress)} has to be used. It allows to update the percentage progress to a
|
||||
* method {@link ProgressCallback#update(int)} has to be used. It allows to update the percentage progress to a
|
||||
* value between 0 and 100.
|
||||
*
|
||||
* @author Thomas Höfer - Initial contribution
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import org.osgi.framework.Bundle;
|
||||
* A utility service which localizes {@link ChannelGroupDefinition}.
|
||||
* Falls back to a localized {@link ChannelGroupType} for label and description when not given otherwise.
|
||||
*
|
||||
* @see {@link ThingTypeI18nLocalizationService}
|
||||
* @see org.openhab.core.thing.i18n.ThingTypeI18nLocalizationService ThingTypeI18nLocalizationService
|
||||
*
|
||||
* @author Christoph Weitkamp - Initial contribution
|
||||
*/
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ import org.osgi.framework.Bundle;
|
||||
* A utility service which localises {@link ChannelDefinition}.
|
||||
* Falls back to a localised {@link ChannelType} for label and description when not given otherwise.
|
||||
*
|
||||
* @see {@link ThingTypeI18nLocalizationService}
|
||||
* @see {@link ChannelGroupTypeI18nLocalizationService}
|
||||
* @see org.openhab.core.thing.i18n.ThingTypeI18nLocalizationService ThingTypeI18nLocalizationService
|
||||
* @see org.openhab.core.thing.i18n.ChannelGroupTypeI18nLocalizationService ChannelGroupTypeI18nLocalizationService
|
||||
*
|
||||
* @author Henning Treu - Initial contribution
|
||||
*/
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import org.osgi.framework.Bundle;
|
||||
* A utility service which localizes {@link Profile}s.
|
||||
* Falls back to a localized {@link ProfileType} for label and description when not given otherwise.
|
||||
*
|
||||
* @see {@link ProfileTypeI18nLocalizationService}
|
||||
* @see org.openhab.core.thing.profiles.i18n.ProfileTypeI18nLocalizationService
|
||||
*
|
||||
* @author Christoph Weitkamp - Initial contribution
|
||||
*/
|
||||
|
||||
+2
-4
@@ -39,9 +39,7 @@ public class BridgeType extends ThingType {
|
||||
/**
|
||||
* A new instance of BridgeType.
|
||||
*
|
||||
* @see ThingType(uid, supportedBridgeTypeUIDs, label, description, category, listed, representationProperty,
|
||||
* channelDefinitions, channelGroupDefinitions, properties, configDescriptionURI,
|
||||
* extensibleChannelTypeIds)
|
||||
* @see ThingType#ThingType(ThingTypeUID, List, String, String, String, boolean, String, List, List, Map, URI, List)
|
||||
*
|
||||
* @param uid the unique identifier which identifies this Thing type within the overall system
|
||||
* (must neither be null, nor empty)
|
||||
@@ -60,7 +58,7 @@ public class BridgeType extends ThingType {
|
||||
* @param properties the properties this Thing type provides (could be null)
|
||||
* @param configDescriptionURI the link to the concrete ConfigDescription (could be null)
|
||||
* @param extensibleChannelTypeIds the channel-type ids this thing-type is extensible with (could be null or empty).
|
||||
* @throws IllegalArgumentException if the UID is null or empty, or the the meta information is null
|
||||
* @throws IllegalArgumentException if the UID is null or empty, or the meta information is null
|
||||
*/
|
||||
BridgeType(ThingTypeUID uid, @Nullable List<String> supportedBridgeTypeUIDs, String label,
|
||||
@Nullable String description, @Nullable String category, boolean listed,
|
||||
|
||||
+1
-2
@@ -14,7 +14,6 @@ package org.openhab.core.thing.xml.internal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
@@ -29,7 +28,7 @@ import com.thoughtworks.xstream.converters.ConversionException;
|
||||
* The {@link ChannelGroupTypeXmlResult} is an intermediate XML conversion result object which
|
||||
* contains all parts of a {@link ChannelGroupType} object.
|
||||
* <p>
|
||||
* To create a concrete {@link ChannelGroupType} object, the method {@link #toChannelGroupType(Map)} must be called.
|
||||
* To create a concrete {@link ChannelGroupType} object, the method {@link #toChannelGroupType()} must be called.
|
||||
*
|
||||
* @author Michael Grammling - Initial contribution
|
||||
* @author Chris Jackson - Updated to support channel properties
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ import com.thoughtworks.xstream.converters.ConversionException;
|
||||
* service at the <i>OSGi</i> service registry.
|
||||
* <p>
|
||||
* The {@link ThingTypeXmlProvider} uses an internal cache consisting of {@link #thingTypeRefs},
|
||||
* {@link #channelGroupTypeRefs}, {@link #channelGroupTypes} and {@link #channelTypes}. This cache is used to merge
|
||||
* {@link #channelGroupTypeRefs}, {@link #channelTypeRefs}. This cache is used to merge
|
||||
* first the {@link ChannelType} definitions with the {@link ChannelGroupTypeXmlResult} objects to create valid
|
||||
* {@link ChannelGroupType} objects. After that the {@link ChannelType} and the {@link ChannelGroupType} definitions are
|
||||
* used to merge with the {@link ThingTypeXmlResult} objects to create valid {@link ThingType} objects. After the merge
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import org.openhab.core.thing.link.dto.ItemChannelLinkDTO;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
/**
|
||||
* {@link LinkEventFactoryTests} tests the {@link LinkEventFactory}.
|
||||
* {@link LinkEventFactoryTest} tests the {@link LinkEventFactory}.
|
||||
*
|
||||
* @author Christoph Weitkamp - Initial contribution
|
||||
*/
|
||||
|
||||
@@ -82,7 +82,7 @@ public interface KSService {
|
||||
* @param locale The {@code Locale} in which the target keywords are spoken
|
||||
* @param keyword The keyword which to spot
|
||||
* @return A {@link KSServiceHandle} used to abort keyword spotting
|
||||
* @throws A {@link KSException} if any parameter is invalid or a problem occurs
|
||||
* @throws KSException if any parameter is invalid or a problem occurs
|
||||
*/
|
||||
KSServiceHandle spot(KSListener ksListener, AudioStream audioStream, Locale locale, String keyword)
|
||||
throws KSException;
|
||||
|
||||
@@ -83,7 +83,7 @@ public interface STTService {
|
||||
* @param locale The {@code Locale} in which the target speech is spoken
|
||||
* @param grammars The JSpeech Grammar Format grammar specifying allowed statements
|
||||
* @return A {@link STTServiceHandle} used to abort recognition
|
||||
* @throws A {@link STTException} if any parameter is invalid or a STT problem occurs
|
||||
* @throws STTException if any parameter is invalid or a STT problem occurs
|
||||
*/
|
||||
STTServiceHandle recognize(STTListener sttListener, AudioStream audioStream, Locale locale, Set<String> grammars)
|
||||
throws STTException;
|
||||
|
||||
+4
-4
@@ -90,7 +90,7 @@ public class StandardInterpreter extends AbstractRuleBasedInterpreter {
|
||||
|
||||
@Override
|
||||
public void createRules(@Nullable Locale locale) {
|
||||
/****************************** ENGLISH ******************************/
|
||||
/* ***************************** ENGLISH ***************************** */
|
||||
|
||||
if (locale == null || Objects.equals(locale.getLanguage(), Locale.ENGLISH.getLanguage())) {
|
||||
Expression onOff = alt(cmd("on", OnOffType.ON), cmd("off", OnOffType.OFF));
|
||||
@@ -169,7 +169,7 @@ public class StandardInterpreter extends AbstractRuleBasedInterpreter {
|
||||
Locale.ENGLISH).toArray(Rule[]::new));
|
||||
}
|
||||
|
||||
/****************************** GERMAN ******************************/
|
||||
/* ***************************** GERMAN ***************************** */
|
||||
|
||||
if (locale == null || Objects.equals(locale.getLanguage(), Locale.GERMAN.getLanguage())) {
|
||||
Expression einAnAus = alt(cmd("ein", OnOffType.ON), cmd("an", OnOffType.ON), cmd("aus", OnOffType.OFF));
|
||||
@@ -237,7 +237,7 @@ public class StandardInterpreter extends AbstractRuleBasedInterpreter {
|
||||
Locale.GERMAN).toArray(Rule[]::new));
|
||||
}
|
||||
|
||||
/****************************** FRENCH ******************************/
|
||||
/* ***************************** FRENCH ***************************** */
|
||||
|
||||
if (locale == null || Objects.equals(locale.getLanguage(), Locale.FRENCH.getLanguage())) {
|
||||
Expression allume = alt("allume", "démarre", "active");
|
||||
@@ -304,7 +304,7 @@ public class StandardInterpreter extends AbstractRuleBasedInterpreter {
|
||||
Locale.FRENCH).toArray(Rule[]::new));
|
||||
}
|
||||
|
||||
/****************************** SPANISH ******************************/
|
||||
/* ***************************** SPANISH ***************************** */
|
||||
|
||||
Locale localeES = new Locale("es");
|
||||
if (locale == null || Objects.equals(locale.getLanguage(), localeES.getLanguage())) {
|
||||
|
||||
+6
-6
@@ -153,7 +153,7 @@ public interface OAuthClientService extends AutoCloseable {
|
||||
* @return AccessTokenResponse
|
||||
* @throws IOException IO/ network exceptions
|
||||
* @throws OAuthException Other exceptions
|
||||
* @throws OAuthErrorException Error codes given by authorization provider, as in RFC 6749 section 5.2 Error
|
||||
* @throws OAuthResponseException Error codes given by authorization provider, as in RFC 6749 section 5.2 Error
|
||||
* Response
|
||||
* @see <a href="https://tools.ietf.org/html/rfc6749#section-4.1.3">Access Token Request - rfc6749 section-4.1.3</a>
|
||||
* @see <a href="https://tools.ietf.org/html/rfc6749#section-5.2">Error Response - rfc6749 section-5.2</a>
|
||||
@@ -171,7 +171,7 @@ public interface OAuthClientService extends AutoCloseable {
|
||||
* @return AccessTokenResponse
|
||||
* @throws IOException IO/ network exceptions
|
||||
* @throws OAuthException Other exceptions
|
||||
* @throws OAuthErrorException Error codes given by authorization provider, as in RFC 6749 section 5.2 Error
|
||||
* @throws OAuthResponseException Error codes given by authorization provider, as in RFC 6749 section 5.2 Error
|
||||
* Response
|
||||
* @see <a href="https://tools.ietf.org/html/rfc6749#section-4.3.2">rfc6749 section-4.3.2</>
|
||||
*/
|
||||
@@ -187,7 +187,7 @@ public interface OAuthClientService extends AutoCloseable {
|
||||
*
|
||||
* @return new AccessTokenResponse from authorization server
|
||||
* @throws IOException Web/ network issues etc.
|
||||
* @throws OAuthErrorException For OAUTH error responses.
|
||||
* @throws OAuthResponseException For OAUTH error responses.
|
||||
* @throws OAuthException For other exceptions.
|
||||
* @see <a href="https://tools.ietf.org/html/rfc6749#section-5.2">rfc6749 section-5.2</a>
|
||||
*/
|
||||
@@ -202,7 +202,7 @@ public interface OAuthClientService extends AutoCloseable {
|
||||
* @param scope of the access, a space delimited separated list
|
||||
* @return AccessTokenResponse
|
||||
* @throws IOException Web/ network issues etc.
|
||||
* @throws OAuthErrorException For OAUTH error responses.
|
||||
* @throws OAuthResponseException For OAUTH error responses.
|
||||
* @throws OAuthException For other exceptions.
|
||||
*/
|
||||
AccessTokenResponse getAccessTokenByClientCredentials(@Nullable String scope)
|
||||
@@ -221,7 +221,7 @@ public interface OAuthClientService extends AutoCloseable {
|
||||
* to prevent cross-site forgery.
|
||||
* @return AccessTokenResponse
|
||||
* @throws IOException Web/ network issues etc.
|
||||
* @throws OAuthErrorException For OAUTH error responses.
|
||||
* @throws OAuthResponseException For OAUTH error responses.
|
||||
* @throws OAuthException For other exceptions.
|
||||
* @see <a href="https://tools.ietf.org/html/rfc6749#section-4.2">Implicit Grant - rfc6749 section-4.2</a>
|
||||
*/
|
||||
@@ -253,7 +253,7 @@ public interface OAuthClientService extends AutoCloseable {
|
||||
*
|
||||
* @return AccessTokenResponse or null, depending on situations listed above.
|
||||
* @throws IOException Web/ network issues etc.
|
||||
* @throws OAuthErrorException For OAUTH error responses.
|
||||
* @throws OAuthResponseException For OAUTH error responses.
|
||||
* @throws OAuthException For other exceptions.
|
||||
*/
|
||||
@Nullable
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory;
|
||||
* <br/>
|
||||
* {@code org.openhab.core.threadpool:<poolName>=<poolSize>}
|
||||
* <br/>
|
||||
* All threads will time out after {@link THREAD_TIMEOUT}.
|
||||
* All threads will time out after {@link #THREAD_TIMEOUT}.
|
||||
*
|
||||
* @author Kai Kreuzer - Initial contribution
|
||||
*/
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import org.osgi.framework.Bundle;
|
||||
|
||||
/**
|
||||
* The {@link LanguageResourceBundleManager} class manages all available i18n resources for one
|
||||
* specific <i>OSGi</i> bundle. Any i18n resource is searched within the {@link RESOURCE_DIRECTORY} of the bundle and
|
||||
* specific <i>OSGi</i> bundle. Any i18n resource is searched within the {@link #RESOURCE_DIRECTORY} of the bundle and
|
||||
* <i>not</i> within the general bundle classpath. For the translation, the
|
||||
* i18n mechanism of Java ({@link ResourceBundle}) is used.
|
||||
* <p>
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ public class ResourceBundleTracker extends BundleTracker {
|
||||
/**
|
||||
* This method is used to get the host bundles of the parameter which is a fragment bundle.
|
||||
*
|
||||
* @param bundle an OSGi fragment bundle.
|
||||
* @param fragment an OSGi fragment bundle.
|
||||
* @return a list with the hosts of the <code>fragment</code> parameter.
|
||||
*/
|
||||
private List<Bundle> returnHostBundles(Bundle fragment) {
|
||||
|
||||
+1
-2
@@ -48,8 +48,7 @@ public class GroupFunctionHelper {
|
||||
* arithmetic group function will take unit conversion into account.
|
||||
*
|
||||
* @param function the {@link GroupFunctionDTO} describing the group function.
|
||||
* @param args a list of {@link State}s as arguments for the resulting group function.
|
||||
* @param dimension an optional interface class from {@link Quantity} defining the dimension for unit conversion.
|
||||
* @param baseItem an optional {@link Item} defining the dimension for unit conversion.
|
||||
* @return a {@link GroupFunction} according to the given parameters.
|
||||
*/
|
||||
public GroupFunction createGroupFunction(GroupFunctionDTO function, @Nullable Item baseItem) {
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ public class ManagedMetadataProviderImpl extends AbstractManagedProvider<Metadat
|
||||
/**
|
||||
* Removes all metadata of a given item
|
||||
*
|
||||
* @param itemname the name of the item for which the metadata is to be removed.
|
||||
* @param name the name of the item for which the metadata is to be removed.
|
||||
*/
|
||||
@Override
|
||||
public void removeItemMetadata(String name) {
|
||||
|
||||
+3
-1
@@ -39,6 +39,7 @@ import javax.measure.quantity.Dimensionless;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.core.internal.library.unit.UnitInitializer;
|
||||
import org.openhab.core.items.events.ItemStateEvent;
|
||||
import org.openhab.core.library.unit.MetricPrefix;
|
||||
import org.openhab.core.library.unit.Units;
|
||||
import org.openhab.core.types.Command;
|
||||
@@ -87,7 +88,8 @@ public class QuantityType<T extends Quantity<T>> extends Number
|
||||
|
||||
/**
|
||||
* Creates a dimensionless {@link QuantityType} with scalar 0 and unit {@link AbstractUnit#ONE}.
|
||||
* A default constructor is needed by {@link org.openhab.core.internal.items.ItemUpdater#receiveUpdate})
|
||||
* A default constructor is needed by
|
||||
* {@link org.openhab.core.internal.items.ItemUpdater#receiveUpdate(ItemStateEvent)})
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public QuantityType() {
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ public final class ImperialUnits extends CustomUnits {
|
||||
public static final Unit<VolumetricFlowRate> GALLON_PER_MINUTE = addUnit(
|
||||
new ProductUnit<>(GALLON_LIQUID_US.divide(tech.units.indriya.unit.Units.MINUTE)));
|
||||
|
||||
/**
|
||||
/*
|
||||
* Add unit symbols for imperial units.
|
||||
*/
|
||||
static {
|
||||
|
||||
@@ -233,7 +233,7 @@ public final class Units extends CustomUnits {
|
||||
public static final Unit<DataTransferRate> GIGABIT_PER_SECOND = addUnit(MetricPrefix.GIGA(BIT_PER_SECOND));
|
||||
public static final Unit<DataTransferRate> TERABIT_PER_SECOND = addUnit(MetricPrefix.TERA(BIT_PER_SECOND));
|
||||
|
||||
/**
|
||||
/*
|
||||
* Add unit symbols for custom openHAB units.
|
||||
*/
|
||||
static {
|
||||
|
||||
@@ -458,7 +458,7 @@ public class CronAdjuster implements SchedulerTemporalAdjuster {
|
||||
* because this object is ordered for temporal index no conversion is needed here.
|
||||
*
|
||||
* @param cronExpression the whole cron expression
|
||||
* @param name the cron value to parse
|
||||
* @param value the cron value to parse
|
||||
* @param names map with names of the week
|
||||
* @return temporal index of day of the week
|
||||
*/
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test;
|
||||
import org.openhab.core.JavaTest;
|
||||
|
||||
/**
|
||||
* Tests cases for {@link ExpiringAsyncCache}.
|
||||
* Tests cases for {@link ExpiringCacheAsync}.
|
||||
*
|
||||
* @author David Graeff - Initial contribution
|
||||
*/
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import org.junit.jupiter.api.Test;
|
||||
import org.openhab.core.items.events.ItemEventFactory;
|
||||
|
||||
/**
|
||||
* {@link AbstractEventFactoryTests} tests the {@link org.openhab.core.events.AbstractEventFactory}.
|
||||
* {@link AbstractEventFactoryTest} tests the {@link org.openhab.core.events.AbstractEventFactory}.
|
||||
*
|
||||
* @author Stefan Bußweiler - Initial contribution
|
||||
*/
|
||||
|
||||
-3
@@ -10,9 +10,6 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
/**
|
||||
* @author Stefan Triller - Initial contribution
|
||||
*/
|
||||
package org.openhab.core.items.dto;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.instanceOf;
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import org.openhab.core.types.UnDefType;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
/**
|
||||
* {@link ItemEventFactoryTests} tests the {@link ItemEventFactory}.
|
||||
* {@link ItemEventFactoryTest} tests the {@link ItemEventFactory}.
|
||||
*
|
||||
* @author Stefan Bußweiler - Initial contribution
|
||||
*/
|
||||
|
||||
-2
@@ -10,8 +10,6 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
/**
|
||||
*/
|
||||
package org.openhab.core.model.thing.testsupport.hue;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
Reference in New Issue
Block a user