use of org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Property in project kie-wb-common by kiegroup.
the class ProcessPropertyWriter method setProcessVariables.
public void setProcessVariables(ProcessVariables processVariables) {
String value = processVariables.getValue();
DeclarationList declarationList = DeclarationList.fromString(value);
List<Property> properties = process.getProperties();
declarationList.getDeclarations().forEach(decl -> {
VariableScope.Variable variable = variableScope.declare(this.process.getId(), decl.getIdentifier(), decl.getType());
properties.add(variable.getTypedIdentifier());
this.itemDefinitions.add(variable.getTypeDeclaration());
});
}
use of org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Property in project webcert by sklintyg.
the class GrpCollectPollerTest method buildResp.
private CollectResponseType buildResp(ProgressStatusType progressStatusType) {
CollectResponseType resp = new CollectResponseType();
resp.setProgressStatus(progressStatusType);
Property p = new Property();
p.setName("Subject.SerialNumber");
p.setValue(PERSON_ID);
resp.getAttributes().add(p);
return resp;
}
use of org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Property in project kie-wb-common by kiegroup.
the class MultipleInstanceActivityPropertyWriterTest method mockProperty.
private Property mockProperty(String name, String itemSubjectRef) {
Property property = mock(Property.class);
when(property.getId()).thenReturn(name);
when(property.getName()).thenReturn(name);
ItemDefinition itemDefinition = mock(ItemDefinition.class);
when(itemDefinition.getId()).thenReturn(itemSubjectRef);
when(property.getItemSubjectRef()).thenReturn(itemDefinition);
return property;
}
use of org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Property in project kie-wb-common by kiegroup.
the class OutputAssignmentReaderTest method testFromAssociationWithPropertyId.
@Test
public void testFromAssociationWithPropertyId() {
Property property = mockProperty(TARGET_ID, null);
DataOutputAssociation outputAssociation = mockDataOutputAssociation(SOURCE_NAME, property);
OutputAssignmentReader outputReader = OutputAssignmentReader.fromAssociation(outputAssociation);
assertNotNull(outputReader);
assertResult(SOURCE_NAME, TARGET_ID, AssociationDeclaration.Type.SourceTarget, outputReader.getAssociationDeclaration());
}
use of org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Property in project kie-wb-common by kiegroup.
the class MultipleInstanceActivityPropertyWriter method setCollectionOutput.
public void setCollectionOutput(String collectionOutput) {
if (isEmpty(collectionOutput)) {
return;
}
setUpLoopCharacteristics();
String suffix = "OUT_COLLECTION";
String id = Ids.dataOutput(activity.getId(), suffix);
DataOutput dataOutputElement = createDataOutput(id, suffix);
addSafe(ioSpec.getDataOutputs(), dataOutputElement);
Optional<Property> property = findPropertyById(collectionOutput);
Optional<DataObject> dataObject = findDataObjectById(collectionOutput);
if (property.isPresent()) {
processDataOutput(dataOutputElement, property.get());
} else if (dataObject.isPresent()) {
processDataOutput(dataOutputElement, dataObject.get());
}
}
Aggregations