Skip to content
Snippets Groups Projects
Commit 75daa648 authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

Merge remote-tracking branch 'origin/develop' into documentation/verifier

parents 21ac0ff3 897c7256
Branches
Tags
No related merge requests found
Showing
with 184 additions and 97 deletions
......@@ -21,7 +21,7 @@
<artifactId>dmn-verifier-parent</artifactId>
<groupId>de.unikoblenz.fgbks</groupId>
<relativePath>../dmnverifierparent/pom.xml</relativePath>
<version>0.9.6</version>
<version>0.9.7</version>
</parent>
<properties>
......
package de.unikoblenz.fgbks.api;
import static de.unikoblenz.fgbks.core.dmn.verification.metrics.DmnVerificationMetricsService.PUBLIC_TOKEN;
import static javax.ws.rs.core.Response.Status.BAD_REQUEST;
import de.unikoblenz.fgbks.core.dmn.verification.DmnVerificationService;
......@@ -10,6 +11,7 @@ import de.unikoblenz.fgbks.core.dmn.verification.verifier.types.VerificationType
import java.util.List;
import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
......@@ -33,14 +35,16 @@ public class Verification {
/**
* Method to generate all verifications for a dmn with all registered verifiers.
*
* @param token the token for the metric statistics
* @param payload the dmn as XML format as
* @return a JSON String, which represents a {@link VerifierResultSet}
*/
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.TEXT_XML)
public Response verifyAll(String payload) {
return checkResult(dmnVerificationService.generate(payload));
public Response verifyAll(
@DefaultValue(PUBLIC_TOKEN) @QueryParam("token") String token, String payload) {
return checkResult(dmnVerificationService.generate(payload, token));
}
/**
......@@ -60,6 +64,7 @@ public class Verification {
* VerificationType}. The types are listed in the query param "typeName". Multiple typeNames can
* be requested.
*
* @param token the token for the metric statistics
* @param typeNames the "typeName"(s) of a {@link VerificationType}
* @param payload the dmn as XML format as
* @return a JSON String, which represents a {@link VerifierResultSet}
......@@ -68,8 +73,11 @@ public class Verification {
@Path("/types")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.TEXT_XML)
public Response verifyTypes(@QueryParam("typeName") List<String> typeNames, String payload) {
return checkResult(dmnVerificationService.generateFromTypes(typeNames, payload));
public Response verifyTypes(
@DefaultValue(PUBLIC_TOKEN) @QueryParam("token") String token,
@QueryParam("typeName") List<String> typeNames,
String payload) {
return checkResult(dmnVerificationService.generateFromTypes(typeNames, payload, token));
}
/**
......@@ -88,6 +96,7 @@ public class Verification {
* Method to generate all verifications for a dmn with the given name of a {@link
* ClassificationType}.
*
* @param token the token for the metric statistics
* @param classificationName the name of a {@link ClassificationType}
* @param payload the dmn as XML format as
* @return a JSON String, which represents a {@link VerifierResultSet}
......@@ -97,21 +106,24 @@ public class Verification {
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.TEXT_XML)
public Response verifyClassification(
@PathParam("classificationName") String classificationName, String payload) {
@DefaultValue(PUBLIC_TOKEN) @QueryParam("token") String token,
@PathParam("classificationName") String classificationName,
String payload) {
return checkResult(
dmnVerificationService.generateFromClassification(classificationName, payload));
dmnVerificationService.generateFromClassification(classificationName, payload, token));
}
/**
* Method to get all registered classification types.
*
* @param token the token for the metric statistics
* @return a list of {@link ClassificationType} as a JSON String.
*/
@GET
@Path("/metrics")
@Produces(MediaType.APPLICATION_JSON)
public Response metrics() {
return Response.accepted(dmnVerificationMetricsService.getMetrics()).build();
public Response metrics(@DefaultValue(PUBLIC_TOKEN) @QueryParam("token") String token) {
return Response.accepted(dmnVerificationMetricsService.getMetrics(token)).build();
}
private Response checkResult(VerifierResultSet resultSet) {
......
......@@ -24,7 +24,7 @@ public class Text extends AbstractStringValueObject {
@Override
protected Integer getMaxLength() {
return 1000;
return 5000;
}
@Override
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDefinition;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDefinitions;
/**
* A definition id, representing the id of a {@link VDmnDefinition}.
* A definition id, representing the id of a {@link VDmnDefinitions}.
*/
@JsonIdentifier("definitionId")
public class DefinitionId extends AbstractId {
......
......@@ -18,7 +18,7 @@ public interface VDmnColumn extends VDmnElement {
*
* @return the {@link VDmnDecisionTable}
*/
VDmnDecisionTable getDmnDecisionTable();
VDmnDecisionTable getVDmnDecisionTable();
/**
* Check, if the given column is a {@link VDmnInputColumn}. If this method returns true, than
......@@ -90,16 +90,16 @@ public interface VDmnColumn extends VDmnElement {
*
* @return the {@link VDmnDecision}
*/
default VDmnDecision getDmnDecision() {
return getDmnDecisionTable().getDmnDecision();
default VDmnDecision getVDmnDecision() {
return getVDmnDecisionTable().getVDmnDecision();
}
/**
* Get the {@link VDmnDefinition}.
* Get the {@link VDmnDefinitions}.
*
* @return the {@link VDmnDefinition}
* @return the {@link VDmnDefinitions}
*/
default VDmnDefinition getDmnDefinition() {
return getDmnDecisionTable().getDmnDefinition();
default VDmnDefinitions getDmnDefinition() {
return getVDmnDecisionTable().getVDmnDefinition();
}
}
......@@ -2,6 +2,7 @@ package de.unikoblenz.fgbks.core.dmn.domain.vdmn;
import de.unikoblenz.fgbks.core.dmn.domain.ids.DecisionId;
import java.util.List;
import org.camunda.bpm.model.dmn.instance.Decision;
/**
* The decision node contains the {@link VDmnDecisionTable} and a list of {@link VDmnNode}s, which
......@@ -9,15 +10,22 @@ import java.util.List;
*/
public interface VDmnDecision extends VDmnNode {
/**
* Get the original decision object.
*
* @return the {@link Decision}
*/
Decision getDecision();
/**
* Get the list of {@link VDmnNode}, which are are information requirements for the decision. See
* also {@link VDmnNode#getInformationProvidingDecisions()}.
*
* @return the list of {@link VDmnNode}s
*/
List<VDmnNode> getDmnInformationRequirements();
List<VDmnNode> getVDmnInformationRequirements();
VDmnDecisionTable getDmnDecisionTable();
VDmnDecisionTable getVDmnDecisionTable();
default DecisionId getDecisionId() {
return (DecisionId) getId();
......
......@@ -6,6 +6,7 @@ import de.unikoblenz.fgbks.core.dmn.domain.ids.RuleId;
import java.util.List;
import java.util.stream.Collectors;
import org.camunda.bpm.model.dmn.HitPolicy;
import org.camunda.bpm.model.dmn.instance.DecisionTable;
/**
* The decision table contains a list of {@link VDmnColumn}s ({@link VDmnInputColumn}s and {@link
......@@ -13,12 +14,18 @@ import org.camunda.bpm.model.dmn.HitPolicy;
*/
public interface VDmnDecisionTable extends VDmnElement {
/**
* Get the original decision table.
*
* @return the {@link DecisionTable}
*/
DecisionTable getDecisionTable();
/**
* Get the {@link VDmnDecision} of the decision table.
*
* @return the {@link VDmnDecision}
*/
VDmnDecision getDmnDecision();
VDmnDecision getVDmnDecision();
/**
* Get the {@link HitPolicy} of the decision table.
......@@ -32,21 +39,21 @@ public interface VDmnDecisionTable extends VDmnElement {
*
* @return a list of {@link VDmnOutputColumn}s
*/
List<VDmnOutputColumn> getOutputColumns();
List<VDmnOutputColumn> getVDmnOutputColumns();
/**
* Get all {@link VDmnInputColumn}s of the decision table.
*
* @return a list of {@link VDmnInputColumn}s
*/
List<VDmnInputColumn> getInputColumns();
List<VDmnInputColumn> getVDmnInputColumns();
/**
* Get all {@link VDmnRule}s of the decision table.
*
* @return a list of {@link VDmnRule}s
*/
List<VDmnRule> getRules();
List<VDmnRule> getVDmnRules();
/**
* Get all {@link RuleId}s of the decision table.
......@@ -54,7 +61,7 @@ public interface VDmnDecisionTable extends VDmnElement {
* @return a list of {@link RuleId}s
*/
default List<RuleId> getRulesIds() {
return getRules().stream()
return getVDmnRules().stream()
.map(VDmnRule::getRuleId)
.collect(Collectors.toList()); // TODO optimize (e.g. cache)
}
......@@ -73,7 +80,7 @@ public interface VDmnDecisionTable extends VDmnElement {
*
* @return the {@link DefinitionId}
*/
default VDmnDefinition getDmnDefinition() {
return getDmnDecision().getDmnDefinition();
default VDmnDefinitions getVDmnDefinition() {
return getVDmnDecision().getVDmnDefinition();
}
}
......@@ -3,27 +3,35 @@ package de.unikoblenz.fgbks.core.dmn.domain.vdmn;
import de.unikoblenz.fgbks.core.dmn.domain.ids.AbstractId;
import de.unikoblenz.fgbks.core.dmn.domain.ids.DefinitionId;
import java.util.List;
import org.camunda.bpm.model.dmn.instance.Definitions;
/**
* The definition is the root element for a dmn table and contains all {@link VDmnDecision}s and all
* {@link VDmnInputData}. Furthermore, all elements of the dmn table can be accessed with {@link
* VDmnDefinition#getElementById}.
* VDmnDefinitions#getElementById}.
*/
public interface VDmnDefinition extends VDmnElement {
public interface VDmnDefinitions extends VDmnElement {
/**
* Get the original Definitions.
*
* @return the {@link Definitions}
*/
Definitions getDefinitions();
/**
* Get the list of {@link VDmnDecision}s.
*
* @return the list of {@link VDmnDecision}s
*/
List<VDmnDecision> getDmnDecisions();
List<VDmnDecision> getVDmnDecisions();
/**
* Get the list of {@link VDmnInputData}s.
*
* @return the list of {@link VDmnInputData}s
*/
List<VDmnInputData> getDmnInputData();
List<VDmnInputData> getVDmnInputData();
/**
* Get the vdmn element with the given id.
......
......@@ -3,6 +3,7 @@ package de.unikoblenz.fgbks.core.dmn.domain.vdmn;
import de.unikoblenz.fgbks.core.dmn.domain.ids.InputExpressionId;
import de.unikoblenz.fgbks.core.dmn.domain.ids.InputId;
import java.util.List;
import org.camunda.bpm.model.dmn.instance.Input;
/**
* This interface represents a input column in a {@link VDmnDecisionTable}. A column contains a list
......@@ -10,9 +11,12 @@ import java.util.List;
*/
public interface VDmnInputColumn extends VDmnColumn {
// For future work:
// List<VDmnInputColumn> getConnectedOutputColumns();
// List<VDmnNode> getConnectedNodes();
/**
* Get the original Input.
*
* @return the {@link Input}
*/
Input getInput();
/**
* Get the {@link InputExpressionId}.
......@@ -37,7 +41,7 @@ public interface VDmnInputColumn extends VDmnColumn {
*
* @return the list of {@link VDmnInputValue}s
*/
default List<VDmnInputValue> getInputValues() {
default List<VDmnInputValue> getVDmnInputValues() {
return (List<VDmnInputValue>) (List<?>) getValues();
}
}
package de.unikoblenz.fgbks.core.dmn.domain.vdmn;
import de.unikoblenz.fgbks.core.dmn.domain.ids.InputDataId;
import org.camunda.bpm.model.dmn.instance.InputData;
/**
* A input data node is a information providing information object for {@link VDmnDecision}s.
*/
public interface VDmnInputData extends VDmnNode {
/**
* Get the original Input Data.
*
* @return the {@link InputData}
*/
InputData getInputData();
/**
* Get the {@link InputDataId}.
*
......
......@@ -2,6 +2,7 @@ package de.unikoblenz.fgbks.core.dmn.domain.vdmn;
import de.unikoblenz.fgbks.base.utils.boundary.Boundary;
import de.unikoblenz.fgbks.core.dmn.domain.ids.InputEntryId;
import org.camunda.bpm.model.dmn.instance.InputEntry;
/**
* This interface represents a single input value (or cell) in a {@link VDmnDecisionTable}. This is
......@@ -9,6 +10,13 @@ import de.unikoblenz.fgbks.core.dmn.domain.ids.InputEntryId;
*/
public interface VDmnInputValue extends VDmnValue {
/**
* Get the original Input Entry.
*
* @return the {@link InputEntry
*/
InputEntry getInputEntry();
/**
* Get the {@link Boundary} instance of the value.
*
......@@ -30,7 +38,7 @@ public interface VDmnInputValue extends VDmnValue {
*
* @return the {@link VDmnInputColumn}
*/
default VDmnInputColumn getDmnInputColumn() {
return (VDmnInputColumn) getDmnColumn();
default VDmnInputColumn getVDmnInputColumn() {
return (VDmnInputColumn) getVDmnColumn();
}
}
......@@ -11,15 +11,15 @@ import java.util.Optional;
public interface VDmnNode extends VDmnElement {
/**
* Get the {@link VDmnDefinition}.
* Get the {@link VDmnDefinitions}.
*
* @return the {@link VDmnDefinition}
* @return the {@link VDmnDefinitions}
*/
VDmnDefinition getDmnDefinition();
VDmnDefinitions getVDmnDefinition();
/**
* Get a list of {@link VDmnDecision}s, which has this current node as information requirement.
* See also {@link VDmnDecision#getDmnInformationRequirements()}.
* See also {@link VDmnDecision#getVDmnInformationRequirements()}.
*
* @return a list of {@link VDmnDecision}s
*/
......
......@@ -2,6 +2,7 @@ package de.unikoblenz.fgbks.core.dmn.domain.vdmn;
import de.unikoblenz.fgbks.core.dmn.domain.ids.OutputId;
import java.util.List;
import org.camunda.bpm.model.dmn.instance.Output;
/**
* This interface represents a output column in a {@link VDmnDecisionTable}. A column contains a
......@@ -9,9 +10,12 @@ import java.util.List;
*/
public interface VDmnOutputColumn extends VDmnColumn {
// TODO: For future work:
// List<VDmnInputColumn> getConnectedInputColumns();
// List<VDmnNode> getConnectedNodes();
/**
* Get original Output.
*
* @return the {@link Output}
*/
Output getOutput();
/**
* Get the {@link OutputId} of the column.
......@@ -27,7 +31,7 @@ public interface VDmnOutputColumn extends VDmnColumn {
*
* @return the list of {@link VDmnOutputValue}.
*/
default List<VDmnOutputValue> getDmnOutputValues() {
default List<VDmnOutputValue> getVDmnOutputValues() {
return (List<VDmnOutputValue>) (List<?>) getValues();
}
}
package de.unikoblenz.fgbks.core.dmn.domain.vdmn;
import de.unikoblenz.fgbks.core.dmn.domain.ids.OutputEntryId;
import org.camunda.bpm.model.dmn.instance.OutputEntry;
/**
* This interface represents a single output value (or cell) in a {@link VDmnDecisionTable}. This is
......@@ -8,6 +9,13 @@ import de.unikoblenz.fgbks.core.dmn.domain.ids.OutputEntryId;
*/
public interface VDmnOutputValue extends VDmnValue {
/**
* Get the original Output Entry.
*
* @return the {@link OutputEntry}
*/
OutputEntry getOutputEntry();
/**
* Get the {@link OutputEntryId}.
*
......@@ -22,7 +30,7 @@ public interface VDmnOutputValue extends VDmnValue {
*
* @return the {@link VDmnOutputColumn}.
*/
default VDmnOutputColumn getDmnOutputColumn() {
return (VDmnOutputColumn) getDmnColumn();
default VDmnOutputColumn getVDmnOutputColumn() {
return (VDmnOutputColumn) getVDmnColumn();
}
}
......@@ -3,6 +3,7 @@ package de.unikoblenz.fgbks.core.dmn.domain.vdmn;
import de.unikoblenz.fgbks.core.dmn.domain.common.RowNumber;
import de.unikoblenz.fgbks.core.dmn.domain.ids.RuleId;
import java.util.List;
import org.camunda.bpm.model.dmn.instance.Rule;
/**
* This interface represents a single rule (or row) in a {@link VDmnDecisionTable}. A rule contains
......@@ -10,6 +11,13 @@ import java.util.List;
*/
public interface VDmnRule extends VDmnElement {
/**
* Get the original Rule.
*
* @return the {@link Rule}
*/
Rule getRule();
/**
* Get the {@link RowNumber} of the rule inside the dmn table.
*
......@@ -22,21 +30,21 @@ public interface VDmnRule extends VDmnElement {
*
* @return the {@link VDmnDecisionTable}.
*/
VDmnDecisionTable getDmnDecisionTable();
VDmnDecisionTable getVDmnDecisionTable();
/**
* Get a list of {@link VDmnInputValue}s.
*
* @return the list of {@link VDmnInputValue}
*/
List<VDmnInputValue> getDmnInputValues();
List<VDmnInputValue> getVDmnInputValues();
/**
* Get a list of {@link VDmnOutputValue}s.
*
* @return the list of {@link VDmnOutputValue}
*/
List<VDmnOutputValue> getDmnOutputValues();
List<VDmnOutputValue> getVDmnOutputValues();
/**
* Get the {@link RuleId} of the {@link VDmnRule}.
......@@ -52,16 +60,16 @@ public interface VDmnRule extends VDmnElement {
*
* @return the {@link VDmnDecision}.
*/
default VDmnDecision getDmnDecision() {
return getDmnDecisionTable().getDmnDecision();
default VDmnDecision getVDmnDecision() {
return getVDmnDecisionTable().getVDmnDecision();
}
/**
* Get the {@link VDmnDefinition}.
* Get the {@link VDmnDefinitions}.
*
* @return the {@link VDmnDefinition}.
* @return the {@link VDmnDefinitions}.
*/
default VDmnDefinition getDmnDefinition() {
return getDmnDecision().getDmnDefinition();
default VDmnDefinitions getVDmnDefinition() {
return getVDmnDecision().getVDmnDefinition();
}
}
......@@ -23,7 +23,7 @@ public interface VDmnValue extends VDmnElement {
*
* @return the {@link VDmnRule}
*/
VDmnRule getDmnRule();
VDmnRule getVDmnRule();
/**
* Get the original text of the value.
......@@ -44,7 +44,7 @@ public interface VDmnValue extends VDmnElement {
*
* @return the {@link VDmnColumn}
*/
VDmnColumn getDmnColumn();
VDmnColumn getVDmnColumn();
/**
* Get the possible string values, which are defined in {@link VDmnColumn#getPredefinedValues()}.
......@@ -52,16 +52,16 @@ public interface VDmnValue extends VDmnElement {
* @return an optional list of string values.
*/
default Optional<List<StringValue>> getPossiblePredefinedValues() {
return getDmnColumn().getPredefinedValues();
return getVDmnColumn().getPredefinedValues();
}
/**
* Get the {@link DefinitionId} of the {@link VDmnDefinition}.
* Get the {@link DefinitionId} of the {@link VDmnDefinitions}.
*
* @return the {@link DefinitionId}.
*/
default DefinitionId getDefinitionId() {
return getDmnDefinition().getDefinitionId();
return getVDmnDefinition().getDefinitionId();
}
/**
......@@ -70,7 +70,7 @@ public interface VDmnValue extends VDmnElement {
* @return the {@link DecisionId}.
*/
default DecisionId getDecisionId() {
return getDmnDecision().getDecisionId();
return getVDmnDecision().getDecisionId();
}
/**
......@@ -79,7 +79,7 @@ public interface VDmnValue extends VDmnElement {
* @return the {@link DecisionTableId}.
*/
default DecisionTableId getDecisionTableId() {
return getDmnDecisionTable().getDecisionTableId();
return getVDmnDecisionTable().getDecisionTableId();
}
/**
......@@ -88,7 +88,7 @@ public interface VDmnValue extends VDmnElement {
* @return the {@link VTypeRef}.
*/
default VTypeRef getTypeRef() {
return getDmnColumn().getTypeRef();
return getVDmnColumn().getTypeRef();
}
/**
......@@ -97,7 +97,7 @@ public interface VDmnValue extends VDmnElement {
* @return the {@link RuleId}.
*/
default RuleId getRuleId() {
return getDmnRule().getRuleId();
return getVDmnRule().getRuleId();
}
/**
......@@ -106,7 +106,7 @@ public interface VDmnValue extends VDmnElement {
* @return the {@link RowNumber}.
*/
default RowNumber getRowNumber() {
return getDmnRule().getRowNumber();
return getVDmnRule().getRowNumber();
}
/**
......@@ -115,7 +115,7 @@ public interface VDmnValue extends VDmnElement {
* @return true, if the value is a input value
*/
default boolean isInputValue() {
return getDmnColumn().isInputColumn();
return getVDmnColumn().isInputColumn();
}
/**
......@@ -124,7 +124,7 @@ public interface VDmnValue extends VDmnElement {
* @return true, if the value is a output value
*/
default boolean isOutputValue() {
return getDmnColumn().isOutputColumn();
return getVDmnColumn().isOutputColumn();
}
/**
......@@ -132,8 +132,8 @@ public interface VDmnValue extends VDmnElement {
*
* @return the {@link VDmnDecisionTable}.
*/
default VDmnDecisionTable getDmnDecisionTable() {
return getDmnColumn().getDmnDecisionTable();
default VDmnDecisionTable getVDmnDecisionTable() {
return getVDmnColumn().getVDmnDecisionTable();
}
/**
......@@ -141,16 +141,16 @@ public interface VDmnValue extends VDmnElement {
*
* @return the {@link VDmnDecision}.
*/
default VDmnDecision getDmnDecision() {
return getDmnDecisionTable().getDmnDecision();
default VDmnDecision getVDmnDecision() {
return getVDmnDecisionTable().getVDmnDecision();
}
/**
* Get the {@link VDmnDefinition}.
* Get the {@link VDmnDefinitions}.
*
* @return the {@link VDmnDefinition}.
* @return the {@link VDmnDefinitions}.
*/
default VDmnDefinition getDmnDefinition() {
return getDmnDecision().getDmnDefinition();
default VDmnDefinitions getVDmnDefinition() {
return getVDmnDecision().getVDmnDefinition();
}
}
......@@ -30,7 +30,7 @@ public abstract class AbstractVDmnColumnImpl extends AbstractVDmnElement impleme
}
@Override
public VDmnDecisionTable getDmnDecisionTable() {
public VDmnDecisionTable getVDmnDecisionTable() {
return dmnDecisionTable;
}
......
......@@ -2,7 +2,7 @@ package de.unikoblenz.fgbks.core.dmn.domain.vdmn.impl;
import de.unikoblenz.fgbks.base.domain.Name;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDecision;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDefinition;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDefinitions;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnNode;
import java.util.ArrayList;
import java.util.Collections;
......@@ -14,7 +14,7 @@ import java.util.Optional;
*/
public abstract class AbstractVDmnNode extends AbstractVDmnElement implements VDmnNode {
protected VDmnDefinition dmnDefinition;
protected VDmnDefinitions dmnDefinition;
protected List<VDmnDecision> informationProvidingDecisions;
protected Name name;
......@@ -23,7 +23,7 @@ public abstract class AbstractVDmnNode extends AbstractVDmnElement implements VD
}
@Override
public VDmnDefinition getDmnDefinition() {
public VDmnDefinitions getVDmnDefinition() {
return dmnDefinition;
}
......
......@@ -12,14 +12,14 @@ import java.util.Optional;
*/
public abstract class AbstractVDmnValue extends AbstractVDmnElement implements VDmnValue {
protected VDmnRule dmnRule;
protected VDmnRule rule;
protected Text text;
protected Description description;
protected VDmnColumn dmnColumn;
protected VDmnColumn column;
@Override
public VDmnRule getDmnRule() {
return dmnRule;
public VDmnRule getVDmnRule() {
return rule;
}
@Override
......@@ -33,7 +33,7 @@ public abstract class AbstractVDmnValue extends AbstractVDmnElement implements V
}
@Override
public VDmnColumn getDmnColumn() {
return dmnColumn;
public VDmnColumn getVDmnColumn() {
return column;
}
}
......@@ -4,20 +4,22 @@ import de.unikoblenz.fgbks.base.domain.Name;
import de.unikoblenz.fgbks.core.dmn.domain.ids.DecisionId;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDecision;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDecisionTable;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDefinition;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDefinitions;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnNode;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.commons.lang3.Validate;
import org.camunda.bpm.model.dmn.instance.Decision;
/**
* Implementation of {@link VDmnDecision}
*/
public class VDmnDecisionImpl extends AbstractVDmnNode implements VDmnDecision {
private VDmnDecisionTable dmnDecisionTable;
private List<VDmnNode> informationRequirements;
protected Decision decision;
protected VDmnDecisionTable dmnDecisionTable;
protected List<VDmnNode> informationRequirements;
private VDmnDecisionImpl() {
super();
......@@ -25,12 +27,17 @@ public class VDmnDecisionImpl extends AbstractVDmnNode implements VDmnDecision {
}
@Override
public List<VDmnNode> getDmnInformationRequirements() {
public Decision getDecision() {
return decision;
}
@Override
public List<VDmnNode> getVDmnInformationRequirements() {
return Collections.unmodifiableList(informationRequirements);
}
@Override
public VDmnDecisionTable getDmnDecisionTable() {
public VDmnDecisionTable getVDmnDecisionTable() {
return dmnDecisionTable;
}
......@@ -45,7 +52,12 @@ public class VDmnDecisionImpl extends AbstractVDmnNode implements VDmnDecision {
public class Builder extends AbstractDmnElementBuilder<VDmnDecisionImpl> {
public Builder withDmnDefinition(VDmnDefinition dmnDefinition) {
public Builder withDecision(Decision decision) {
value.decision = decision;
return this;
}
public Builder withVDmnDefinition(VDmnDefinitions dmnDefinition) {
value.dmnDefinition = dmnDefinition;
return this;
}
......@@ -55,15 +67,15 @@ public class VDmnDecisionImpl extends AbstractVDmnNode implements VDmnDecision {
return this;
}
public Builder withDmnDecisionTable(VDmnDecisionTable dmnDecisionTable) {
public Builder withVDmnDecisionTable(VDmnDecisionTable dmnDecisionTable) {
value.dmnDecisionTable = dmnDecisionTable;
return this;
}
public Builder withDmnDecisionTableFromBuilder(
public Builder withVDmnDecisionTableFromBuilder(
VDmnDecisionTableImpl.Builder dmnDecisionTableBuilder) {
withDmnDecisionTable(dmnDecisionTableBuilder.getUnbuildValue());
dmnDecisionTableBuilder.withDmnDecision(value);
withVDmnDecisionTable(dmnDecisionTableBuilder.getUnbuildValue());
dmnDecisionTableBuilder.withVDmnDecision(value);
return this;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment