Search in sources :

Example 6 with AuthorityRequirement

use of org.kie.dmn.model.api.AuthorityRequirement in project drools by kiegroup.

the class KnowledgeSourceConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    KnowledgeSource ks = (KnowledgeSource) parent;
    for (AuthorityRequirement ar : ks.getAuthorityRequirement()) {
        writeChildrenNode(writer, context, ar, AUTHORITY_REQUIREMENT);
    }
    if (ks.getType() != null)
        writeChildrenNode(writer, context, ks.getType(), TYPE);
    if (ks.getOwner() != null)
        writeChildrenNode(writer, context, ks.getOwner(), OWNER);
}
Also used : TKnowledgeSource(org.kie.dmn.model.v1_2.TKnowledgeSource) KnowledgeSource(org.kie.dmn.model.api.KnowledgeSource) AuthorityRequirement(org.kie.dmn.model.api.AuthorityRequirement)

Example 7 with AuthorityRequirement

use of org.kie.dmn.model.api.AuthorityRequirement in project drools by kiegroup.

the class BusinessKnowledgeModelConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    BusinessKnowledgeModel bkm = (BusinessKnowledgeModel) parent;
    if (bkm.getEncapsulatedLogic() != null)
        writeChildrenNode(writer, context, bkm.getEncapsulatedLogic(), ENCAPSULATED_LOGIC);
    // Now as Invocable: if (bkm.getVariable() != null) writeChildrenNode(writer, context, bkm.getVariable(), VARIABLE);
    for (KnowledgeRequirement i : bkm.getKnowledgeRequirement()) {
        writeChildrenNode(writer, context, i, KNOWLEDGE_REQUIREMENT);
    }
    for (AuthorityRequirement a : bkm.getAuthorityRequirement()) {
        writeChildrenNode(writer, context, a, AUTHORITY_REQUIREMENT);
    }
}
Also used : KnowledgeRequirement(org.kie.dmn.model.api.KnowledgeRequirement) BusinessKnowledgeModel(org.kie.dmn.model.api.BusinessKnowledgeModel) TBusinessKnowledgeModel(org.kie.dmn.model.v1_3.TBusinessKnowledgeModel) AuthorityRequirement(org.kie.dmn.model.api.AuthorityRequirement)

Example 8 with AuthorityRequirement

use of org.kie.dmn.model.api.AuthorityRequirement in project drools by kiegroup.

the class KnowledgeSourceConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    KnowledgeSource ks = (KnowledgeSource) parent;
    for (AuthorityRequirement ar : ks.getAuthorityRequirement()) {
        writeChildrenNode(writer, context, ar, AUTHORITY_REQUIREMENT);
    }
    if (ks.getType() != null)
        writeChildrenNode(writer, context, ks.getType(), TYPE);
    if (ks.getOwner() != null)
        writeChildrenNode(writer, context, ks.getOwner(), OWNER);
}
Also used : KnowledgeSource(org.kie.dmn.model.api.KnowledgeSource) TKnowledgeSource(org.kie.dmn.model.v1_4.TKnowledgeSource) AuthorityRequirement(org.kie.dmn.model.api.AuthorityRequirement)

Example 9 with AuthorityRequirement

use of org.kie.dmn.model.api.AuthorityRequirement in project drools by kiegroup.

the class BusinessKnowledgeModelConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    BusinessKnowledgeModel bkm = (BusinessKnowledgeModel) parent;
    if (bkm.getEncapsulatedLogic() != null)
        writeChildrenNode(writer, context, bkm.getEncapsulatedLogic(), ENCAPSULATED_LOGIC);
    // Now as Invocable: if (bkm.getVariable() != null) writeChildrenNode(writer, context, bkm.getVariable(), VARIABLE);
    for (KnowledgeRequirement i : bkm.getKnowledgeRequirement()) {
        writeChildrenNode(writer, context, i, KNOWLEDGE_REQUIREMENT);
    }
    for (AuthorityRequirement a : bkm.getAuthorityRequirement()) {
        writeChildrenNode(writer, context, a, AUTHORITY_REQUIREMENT);
    }
}
Also used : KnowledgeRequirement(org.kie.dmn.model.api.KnowledgeRequirement) TBusinessKnowledgeModel(org.kie.dmn.model.v1_4.TBusinessKnowledgeModel) BusinessKnowledgeModel(org.kie.dmn.model.api.BusinessKnowledgeModel) AuthorityRequirement(org.kie.dmn.model.api.AuthorityRequirement)

Example 10 with AuthorityRequirement

use of org.kie.dmn.model.api.AuthorityRequirement in project drools by kiegroup.

the class AuthorityRequirementConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    AuthorityRequirement ar = (AuthorityRequirement) parent;
    if (ar.getRequiredDecision() != null)
        writeChildrenNode(writer, context, ar.getRequiredDecision(), REQUIRED_DECISION);
    if (ar.getRequiredInput() != null)
        writeChildrenNode(writer, context, ar.getRequiredInput(), REQUIRED_INPUT);
    if (ar.getRequiredAuthority() != null)
        writeChildrenNode(writer, context, ar.getRequiredAuthority(), REQUIRED_AUTHORITY);
}
Also used : AuthorityRequirement(org.kie.dmn.model.api.AuthorityRequirement) TAuthorityRequirement(org.kie.dmn.model.v1_4.TAuthorityRequirement)

Aggregations

AuthorityRequirement (org.kie.dmn.model.api.AuthorityRequirement)16 KnowledgeRequirement (org.kie.dmn.model.api.KnowledgeRequirement)8 BusinessKnowledgeModel (org.kie.dmn.model.api.BusinessKnowledgeModel)4 DMNElementReference (org.kie.dmn.model.api.DMNElementReference)4 Decision (org.kie.dmn.model.api.Decision)4 Expression (org.kie.dmn.model.api.Expression)4 InformationRequirement (org.kie.dmn.model.api.InformationRequirement)4 KnowledgeSource (org.kie.dmn.model.api.KnowledgeSource)4 TAuthorityRequirement (org.kie.dmn.model.v1_1.TAuthorityRequirement)1 TBusinessKnowledgeModel (org.kie.dmn.model.v1_1.TBusinessKnowledgeModel)1 TDecision (org.kie.dmn.model.v1_1.TDecision)1 TKnowledgeSource (org.kie.dmn.model.v1_1.TKnowledgeSource)1 TAuthorityRequirement (org.kie.dmn.model.v1_2.TAuthorityRequirement)1 TBusinessKnowledgeModel (org.kie.dmn.model.v1_2.TBusinessKnowledgeModel)1 TDecision (org.kie.dmn.model.v1_2.TDecision)1 TKnowledgeSource (org.kie.dmn.model.v1_2.TKnowledgeSource)1 TAuthorityRequirement (org.kie.dmn.model.v1_3.TAuthorityRequirement)1 TBusinessKnowledgeModel (org.kie.dmn.model.v1_3.TBusinessKnowledgeModel)1 TDecision (org.kie.dmn.model.v1_3.TDecision)1 TKnowledgeSource (org.kie.dmn.model.v1_3.TKnowledgeSource)1