Skip to content

Commit

Permalink
feat(impl): [#528] extract constraints to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmf committed May 13, 2024
1 parent ea44d2f commit 94b5977
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@
import org.eclipse.edc.jsonld.TitaniumJsonLd;
import org.eclipse.edc.spi.monitor.ConsoleMonitor;
import org.eclipse.tractusx.irs.edc.client.policy.AcceptedPolicy;
import org.eclipse.tractusx.irs.edc.client.policy.Constraint;
import org.eclipse.tractusx.irs.edc.client.policy.ConstraintConstants;
import org.eclipse.tractusx.irs.edc.client.policy.Constraints;
import org.eclipse.tractusx.irs.edc.client.policy.Operator;
import org.eclipse.tractusx.irs.edc.client.policy.OperatorType;
import org.eclipse.tractusx.irs.edc.client.policy.Permission;
import org.eclipse.tractusx.irs.edc.client.policy.Policy;
import org.eclipse.tractusx.irs.edc.client.policy.PolicyType;
Expand Down Expand Up @@ -369,10 +367,8 @@ private List<Permission> createPermissions() {
}

private Constraints createConstraints() {
return new Constraints(Collections.emptyList(),
List.of(new Constraint("Membership", new Operator(OperatorType.EQ), "active"),
new Constraint("FrameworkAgreement.traceability", new Operator(OperatorType.EQ), "active"),
new Constraint(EXAMPLE_ACCEPTED_LEFT_OPERAND, new Operator(OperatorType.EQ), "ID 3.1 Trace")));
return new Constraints(Collections.emptyList(), List.of(ConstraintConstants.ACTIVE_MEMBERSHIP,
ConstraintConstants.FRAMEWORK_AGREEMENT_TRACEABILITY_ACTIVE, ConstraintConstants.PURPOSE_ID_3_1_TRACE));
}

@Nested
Expand Down

0 comments on commit 94b5977

Please sign in to comment.