forked from eclipse-archived/smarthome
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows adding some configuration properties onto links, e.g. though Switch someItem { channel="a:b:c:channel" [ foo="bar", answer=42, always=true ] } or the REST API. As a consequence, ItemChannelLinks now also can be updated through the REST API. fixes eclipse-archived#583 Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
- Loading branch information
Simon Kaufmann
committed
Sep 22, 2017
1 parent
8da1e67
commit d2deb3e
Showing
18 changed files
with
188 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...del.item/src/org/eclipse/smarthome/model/internal/valueconverter/ItemValueConverters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Copyright (c) 2014-2017 by the respective copyright holders. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.eclipse.smarthome.model.internal.valueconverter; | ||
|
||
import org.eclipse.smarthome.model.core.valueconverter.ValueTypeToStringConverter; | ||
import org.eclipse.xtext.common.services.DefaultTerminalConverters; | ||
import org.eclipse.xtext.conversion.IValueConverter; | ||
import org.eclipse.xtext.conversion.ValueConverter; | ||
|
||
import com.google.inject.Inject; | ||
|
||
/** | ||
* Registers {@link IValueConverter}s for the items language. | ||
* | ||
* @author Simon Kaufmann - initial contribution and API. | ||
* | ||
*/ | ||
public class ItemValueConverters extends DefaultTerminalConverters { | ||
|
||
@Inject | ||
private ValueTypeToStringConverter valueTypeToStringConverter; | ||
|
||
@ValueConverter(rule = "ValueType") | ||
public IValueConverter<Object> ValueType() { | ||
return valueTypeToStringConverter; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.