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

Improve javadoc for all addons #15667

Merged
merged 3 commits into from
Sep 30, 2023
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public void injectRequire(ScriptEngine engine) {
/**
* Configure the optional elements of the Ruby Environment
*
* @param engine Engine in which to configure environment
* @param scriptEngine Engine in which to configure environment
*/
public void configureRubyEnvironment(ScriptEngine scriptEngine) {
getConfigurationElements(OptionalConfigurationElement.Type.RUBY_ENVIRONMENT).forEach(configElement -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public Collection<String> getTypes() {

@Override
public @Nullable Object get(String scriptIdentifier, String type) throws IllegalArgumentException {

Map<String, Object> forScript = idToTypes.computeIfAbsent(scriptIdentifier, k -> new HashMap<>());
return forScript.computeIfAbsent(type,
k -> Objects.nonNull(types.get(k)) ? types.get(k).apply(scriptIdentifier) : null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public Collection<String> getTypes() {

@Override
public @Nullable Object get(String scriptIdentifier, String type) throws IllegalArgumentException {

Map<String, Object> forScript = idToTypes.computeIfAbsent(scriptIdentifier, k -> new HashMap<>());
return forScript.computeIfAbsent(type,
k -> Objects.nonNull(types.get(k)) ? types.get(k).apply(scriptIdentifier) : null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public interface AdorneHubChangeNotify {
/**
* Notify listener about state change of on/off and brightness state
*
* @param zoneID zone ID for which change occurred
* @param zoneId zone ID for which change occurred
* @param onOff new on/off state
* @param brightness new brightness
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
import com.google.gson.JsonObject;

/**
* The {@link $AirqHandler} is responsible for retrieving all information from the air-Q device
* The {@link AirqHandler} is responsible for retrieving all information from the air-Q device
* and change properties and channels accordingly.
*
* @author Aurelio Caliaro - Initial contribution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.openhab.core.thing.ThingTypeUID;

/**
* The {@link AirQualityBinding} class defines common constants, which are
* The {@link AirQualityBindingConstants} class defines common constants, which are
* used across the whole binding.
*
* @author Gaël L'hopital - Initial contribution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.eclipse.jdt.annotation.Nullable;

/**
* The {@link ADCCommand} class represents an alarm decoder command, and contains the static methods and definitions
* The {@link ADCommand} class represents an alarm decoder command, and contains the static methods and definitions
* used to construct one. Not all supported AD commands are necessarily used by the current binding.
*
* @author Bob Adair - Initial contribution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.openhab.core.thing.ThingTypeUID;

/**
* The {@link AllPlayBinding} class defines common constants, which are
* The {@link AllPlayBindingConstants} class defines common constants, which are
* used across the whole binding.
*
* @author Dominic Lerbs - Initial contribution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface PacketCapturingHandler {
/**
* Callback method to handle a captured packet.
*
* @param macAddress The mac address which sent the packet
* @param sourceMacAddress The mac address which sent the packet
*/
void packetCaptured(MacAddress sourceMacAddress);
}
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ public void handleCommand(ChannelUID channelUID, Command command) {
// shuffle command
if (channelId.equals(CHANNEL_SHUFFLE)) {
if (command instanceof OnOffType value) {

connection.command(device, "{\"type\":\"ShuffleCommand\",\"shuffle\":\""
+ (value == OnOffType.ON ? "true" : "false") + "\"}");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ private void setShimX509ClientChain(X509Certificate @Nullable [] shimX509ClientC
}
androidtvPKI.setCaCert(shimX509ClientChain[0]);
androidtvPKI.saveKeyStore(config.keystorePassword, this.encryptionKey);

}
} catch (Exception e) {
logger.trace("setShimX509ClientChain Exception", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.eclipse.jdt.annotation.NonNullByDefault;

/**
* The {@link AnthemCommend} is responsible for creating commands to be sent to the
* The {@link AnthemCommand} is responsible for creating commands to be sent to the
* Anthem processor.
*
* @author Mark Hilbush - Initial contribution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.openhab.core.thing.ThingTypeUID;

/**
* The {@link AstroBinding} class defines common constants, which are
* The {@link AstroBindingConstants} class defines common constants, which are
* used across the whole binding.
*
* @author Gerhard Riegler - Initial contribution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,6 @@ public void triggerEvent(String channelId, String event) {

/**
* Adds the provided {@link Job} to the queue (cannot be {@code null})
*
* @return {@code true} if the {@code job} is added to the queue, otherwise {@code false}
*/
public void schedule(Job job, Calendar eventAt) {
long sleepTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public AsuswrtHttpClient(AsuswrtRouter router) {
/**
* Sends a synchronous HTTP request.
*
* The result will be handled in {@link #handleHttpSuccessResponse(String, String) or
* The result will be handled in {@link #handleHttpSuccessResponse(String, String)} or
* {@link #handleHttpResultError(Throwable)}.
*
* If the response should be returned use {@link #getSyncRequest(String, String)} instead.
Expand Down Expand Up @@ -106,7 +106,7 @@ protected void sendSyncRequest(String url, String payload, String command) {
/**
* Sends an asynchronous HTTP request so it does not wait for an answer.
*
* The result will be handled in {@link #handleHttpSuccessResponse(String, String) or
* The result will be handled in {@link #handleHttpSuccessResponse(String, String)} or
* {@link #handleHttpResultError(Throwable)}.
*
* @param url the URL to which the request is sent to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public AsuswrtErrorHandler(Exception ex) {
/**
* Raises a new error.
*
* @param exception the exception
* @param ex the exception
*/
public void raiseError(Exception ex) {
raiseError(ex, "");
Expand All @@ -48,7 +48,7 @@ public void raiseError(Exception ex) {
/**
* Raises a new error.
*
* @param exception the exception
* @param ex the exception
* @param infoMessage optional info message
*/
public void raiseError(Exception ex, @Nullable String infoMessage) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public AsuswrtIpInfo() {
/**
* Constructor.
*
* @param interfaceName name of interface
* @param ifName name of interface
* @param jsonObject with ipInfo
*/
public AsuswrtIpInfo(String ifName, JsonObject jsonObject) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public void updateClientChannels(AsuswrtClientList clientList) {
/**
* Fire Event
*
* @param channelUID chanelUID event belongs to
* @param channel chanelUID event belongs to
* @param event event-name is fired
*/
protected void fireEvent(String channel, String event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.openhab.core.thing.ThingTypeUID;

/**
* The {@link AtlonaBinding} class defines common constants, which are used across the whole binding.
* The {@link AtlonaBindingConstants} class defines common constants, which are used across the whole binding.
*
* @author Tim Roberts - Initial contribution
* @author Michael Lobstein - Add support for AT-PRO3HD 44/66 M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@

/**
*
* A callback to {@link AtlonaHandler} that can be used to update the status, properties and state of the thing.
* A callback to {@link org.openhab.binding.atlona.internal.handler.AtlonaHandler}
* that can be used to update the status, properties and state of the thing.
*
* @author Tim Roberts - Initial contribution
*/
@NonNullByDefault
public interface AtlonaHandlerCallback {
/**
* Callback to the {@link AtlonaHandler} to update the status of the thing.
* Callback to the {@link org.openhab.binding.atlona.internal.handler.AtlonaHandler}
* to update the status of the thing.
*
* @param status a non-null {@link org.openhab.core.thing.ThingStatus}
* @param detail a non-null {@link org.openhab.core.thing.ThingStatusDetail}
Expand All @@ -36,15 +38,17 @@ public interface AtlonaHandlerCallback {
void statusChanged(ThingStatus status, ThingStatusDetail detail, @Nullable String msg);

/**
* Callback to the {@link AtlonaHandler} to update the state of an item
* Callback to the {@link org.openhab.binding.atlona.internal.handler.AtlonaHandler}
* to update the state of an item
*
* @param channelId the non-null, non-empty channel id
* @param state the new non-null {@State}
* @param state the new non-null {@link State}
*/
void stateChanged(String channelId, State state);

/**
* Callback to the {@link AtlonaHandler} to update the property of a thing
* Callback to the {@link org.openhab.binding.atlona.internal.handler.AtlonaHandler}
* to update the property of a thing
*
* @param propertyName a non-null, non-empty property name
* @param propertyValue a non-null, possibly empty property value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
public class AtlonaPro3Config {

/**
* Constant field used in {@link AtlonaDiscovery} to set the config property during discovery. Value of this field
* Constant field used in {@link org.openhab.binding.atlona.internal.discovery.AtlonaDiscovery}
* to set the config property during discovery. Value of this field
* needs to match {@link #ipAddress}
*/
public static final String IP_ADDRESS = "ipAddress";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ public AtlonaPro3Handler(Thing thing, AtlonaPro3Capabilities capabilities) {
* Handles commands to specific channels. This implementation will offload much of its work to the
* {@link AtlonaPro3PortocolHandler}. Basically we validate the type of command for the channel then call the
* {@link AtlonaPro3PortocolHandler} to handle the actual protocol. Special use case is the {@link RefreshType}
* where we call {{@link #handleRefresh(String)} to handle a refresh of the specific channel (which in turn calls
* where we call {{@link #handleRefresh(ChannelUID)} to handle a refresh of the specific channel (which in turn
* calls
* {@link AtlonaPro3PortocolHandler} to handle the actual refresh
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.openhab.core.thing.ThingTypeUID;

/**
* The {@link AutelisBinding} class defines common constants, which are used
* The {@link AutelisBindingConstants} class defines common constants, which are used
* across the whole binding.
*
* @author Dan Cunningham - Initial contribution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* used across the whole binding.
*
* @author Markus Pfleger - Initial contribution
* @author Marcin Czeczko - Added support for planner & calendar data
* @author Marcin Czeczko - Added support for planner and calendar data
*/
@NonNullByDefault
public class AutomowerBindingConstants {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
* @author Markus Pfleger - Initial contribution
* @author Marcin Czeczko - Added support for planner & calendar data
* @author Marcin Czeczko - Added support for planner and calendar data
*/
public class Calendar {
private List<CalendarTask> tasks = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* @author Markus Pfleger - Initial contribution
* @author Marcin Czeczko - Added support for planner & calendar data
* @author Marcin Czeczko - Added support for planner and calendar data
*/
public class Planner {
private long nextStartTimestamp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
* sent to one of the channels.
*
* @author Markus Pfleger - Initial contribution
* @author Marcin Czeczko - Added support for planner & calendar data
* @author Marcin Czeczko - Added support for planner and calendar data
*/
@NonNullByDefault
public class AutomowerHandler extends BaseThingHandler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class ColorControlModel {
/**
* Converts a FRITZ!Box value to a percent value.
*
* @param fritzValue The FRITZ!Box value to be converted
* @param saturation The FRITZ!Box value to be converted
* @return The percent value
*/
public static PercentType toPercent(int saturation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import javax.xml.bind.annotation.XmlRootElement;

/**
* See {@ TemplateModel}.
* See {@link TemplateModel}.
*
* @author Christoph Weitkamp - Initial contribution
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import javax.xml.bind.annotation.XmlRootElement;

/**
* See {@ TemplateModel}.
* See {@link TemplateModel}.
*
* @author Christoph Weitkamp - Initial contribution
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class FritzAhaSetLevelPercentageCallback extends FritzAhaReauthCallback {
*
* @param webIface Interface to FRITZ!Box
* @param ain AIN of the device that should be switched
* @param level Opening level percentage (0 ... 100)
* @param levelPercentage Opening level percentage (0 ... 100)
*/
public FritzAhaSetLevelPercentageCallback(FritzAhaWebInterface webIface, String ain, BigDecimal levelPercentage) {
super(WEBSERVICE_PATH, "switchcmd=setlevelpercentage&level=" + levelPercentage + "&ain=" + ain, webIface, GET,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* The {@link BenqProjectorHandler} is responsible for handling commands, which are
* sent to one of the channels.
*
* Based on 'epsonprojector' originally by Pauli Anttila & Yannick Schaus
* Based on 'epsonprojector' originally by Pauli Anttila and Yannick Schaus
*
* @author Michael Lobstein - Initial contribution
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.eclipse.jdt.annotation.NonNullByDefault;

/**
* Configuration class for {@link AirthingsBinding} device.
* Configuration class for Airthings device.
*
* @author Pauli Anttila - Initial contribution
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
import org.slf4j.LoggerFactory;

/**
* An extended {@link BluetoothDevice} class to handle BlueGiga specific information
* An extended {@link BaseBluetoothDevice} class to handle BlueGiga specific information
*
* @author Chris Jackson - Initial contribution
*/
Expand Down Expand Up @@ -130,7 +130,7 @@ public void run() {
};

/**
* Creates a new {@link BlueGigaBluetoothDevice} which extends {@link BluetoothDevice} for the BlueGiga
* Creates a new {@link BlueGigaBluetoothDevice} which extends {@link BaseBluetoothDevice} for the BlueGiga
* implementation
*
* @param bgHandler the {@link BlueGigaBridgeHandler} that provides the link to the dongle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,6 @@ public void removeEventListener(BlueGigaEventListener listener) {
public void bluegigaEventReceived(@Nullable BlueGigaResponse event) {
if (event instanceof BlueGigaScanResponseEvent scanEvent) {
if (initComplete) {

// We use the scan event to add any devices we hear to the devices list
// The device gets created, and then manages itself for discovery etc.
BluetoothAddress sender = new BluetoothAddress(scanEvent.getSender());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private Optional<BlueGigaUniqueCommand> getNextFrame() {
* FIFO queue. This method queues a {@link BlueGigaCommand} frame without
* waiting for a response.
*
* @param transaction
* @param request
* {@link BlueGigaUniqueCommand}
*/
public void queueFrame(BlueGigaUniqueCommand request) {
Expand Down Expand Up @@ -245,7 +245,6 @@ public boolean transactionEvent(BlueGigaResponse bleResponse, int transactionId)

if (bleCommand instanceof BlueGigaDeviceCommand devCommand
&& bleResponse instanceof BlueGigaDeviceResponse devResponse) {

logger.trace("Expected connection id: {}, received connection id: {}", devCommand.getConnection(),
devResponse.getConnection());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private EirDataType(int key) {
/**
* Lookup function based on the type code. Returns {@link UNKNOWN} if the code does not exist.
*
* @param bluetoothAddressType
* @param eirDataType
* the code to lookup
* @return enumeration value.
*/
Expand Down
Loading