2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.astro.internal.job;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.astro.internal.AstroHandlerFactory;
17 import org.openhab.binding.astro.internal.handler.AstroThingHandler;
20 * Scheduled job for planet positions
22 * @author Gerhard Riegler - Initial contribution
23 * @author Amit Kumar Mondal - Implementation to be compliant with ESH Scheduler
26 public final class PositionalJob extends AbstractJob {
31 * @param thingUID thing UID
32 * @throws IllegalArgumentException
33 * if the provided argument is {@code null}
35 public PositionalJob(String thingUID) {
41 AstroThingHandler astroHandler = AstroHandlerFactory.getHandler(getThingUID());
42 if (astroHandler != null) {
43 astroHandler.publishPositionalInfo();
45 LOGGER.trace("AstroThingHandler is null");
50 public String toString() {
51 return "Positional job " + getThingUID();