Search in sources :

Example 11 with Binding

use of org.kie.workbench.common.dmn.api.definition.v1_1.Binding in project kie-wb-common by kiegroup.

the class InvocationPropertyConverter method dmnFromWB.

public static org.kie.dmn.model.v1_1.Invocation dmnFromWB(final Invocation wb) {
    if (wb == null) {
        return null;
    }
    org.kie.dmn.model.v1_1.Invocation result = new org.kie.dmn.model.v1_1.Invocation();
    result.setId(wb.getId().getValue());
    result.setDescription(DescriptionPropertyConverter.dmnFromWB(wb.getDescription()));
    QNamePropertyConverter.setDMNfromWB(wb.getTypeRef(), result::setTypeRef);
    org.kie.dmn.model.v1_1.Expression convertedExpression = ExpressionPropertyConverter.dmnFromWB(wb.getExpression());
    result.setExpression(convertedExpression);
    for (Binding b : wb.getBinding()) {
        org.kie.dmn.model.v1_1.Binding bConverted = BindingPropertyConverter.dmnFromWB(b);
        result.getBinding().add(bConverted);
    }
    return result;
}
Also used : Binding(org.kie.workbench.common.dmn.api.definition.v1_1.Binding) Invocation(org.kie.workbench.common.dmn.api.definition.v1_1.Invocation)

Example 12 with Binding

use of org.kie.workbench.common.dmn.api.definition.v1_1.Binding in project kie-wb-common by kiegroup.

the class InvocationPropertyConverter method wbFromDMN.

public static Invocation wbFromDMN(final org.kie.dmn.model.v1_1.Invocation dmn) {
    if (dmn == null) {
        return null;
    }
    Id id = new Id(dmn.getId());
    Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription());
    QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef());
    Invocation result = new Invocation();
    result.setId(id);
    result.setDescription(description);
    result.setTypeRef(typeRef);
    Expression convertedExpression = ExpressionPropertyConverter.wbFromDMN(dmn.getExpression());
    result.setExpression(convertedExpression);
    for (org.kie.dmn.model.v1_1.Binding b : dmn.getBinding()) {
        Binding bConverted = BindingPropertyConverter.wbFromDMN(b);
        result.getBinding().add(bConverted);
    }
    return result;
}
Also used : Binding(org.kie.workbench.common.dmn.api.definition.v1_1.Binding) Description(org.kie.workbench.common.dmn.api.property.dmn.Description) Invocation(org.kie.workbench.common.dmn.api.definition.v1_1.Invocation) Expression(org.kie.workbench.common.dmn.api.definition.v1_1.Expression) QName(org.kie.workbench.common.dmn.api.property.dmn.QName) Id(org.kie.workbench.common.dmn.api.property.dmn.Id)

Aggregations

Binding (com.google.iam.v1.Binding)6 Binding (org.kie.workbench.common.dmn.api.definition.v1_1.Binding)6 Policy (com.google.iam.v1.Policy)4 InformationItem (org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem)4 Invocation (org.kie.workbench.common.dmn.api.definition.v1_1.Invocation)4 Name (org.kie.workbench.common.dmn.api.property.dmn.Name)3 TopicName (com.google.pubsub.v1.TopicName)2 Expression (org.kie.workbench.common.dmn.api.definition.v1_1.Expression)2 LiteralExpression (org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression)2 GoogleCredential (com.google.api.client.googleapis.auth.oauth2.GoogleCredential)1 HttpRequestInitializer (com.google.api.client.http.HttpRequestInitializer)1 JsonFactory (com.google.api.client.json.JsonFactory)1 CloudIot (com.google.api.services.cloudiot.v1.CloudIot)1 GetIamPolicyRequest (com.google.api.services.cloudiot.v1.model.GetIamPolicyRequest)1 SetIamPolicyRequest (com.google.api.services.cloudiot.v1.model.SetIamPolicyRequest)1 SubscriptionAdminClient (com.google.cloud.pubsub.spi.v1.SubscriptionAdminClient)1 TopicAdminClient (com.google.cloud.pubsub.spi.v1.TopicAdminClient)1 TopicAdminClient (com.google.cloud.pubsub.v1.TopicAdminClient)1 SecurityCenterClient (com.google.cloud.securitycenter.v1.SecurityCenterClient)1 SetIamPolicyRequest (com.google.iam.v1.SetIamPolicyRequest)1