Java Code Examples for org.eclipse.smarthome.core.thing.ThingUID#getBindingId()

The following examples show how to use org.eclipse.smarthome.core.thing.ThingUID#getBindingId() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DiscoveryResultImpl.java    From smarthome with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public String getBindingId() {
    ThingUID thingId = this.thingUID;
    if (thingId != null) {
        return thingId.getBindingId();
    }
    return "";
}
 
Example 2
Source File: ThingImpl.java    From smarthome with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @param thingUID
 * @throws IllegalArgumentException
 * @deprecated use {@link #ThingImpl(ThingTypeUID, ThingUID)} instead.
 */
@Deprecated
public ThingImpl(ThingUID thingUID) throws IllegalArgumentException {
    if ("".equals(thingUID.getThingTypeId())) {
        throw new IllegalArgumentException(
                "The given ThingUID does not specify a ThingType. You might want to use ThingImpl(ThingTypeUID, ThingUID) instead.");
    }
    this.uid = thingUID;
    this.thingTypeUID = new ThingTypeUID(thingUID.getBindingId(), thingUID.getThingTypeId());
}