-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/upgrade_edc_v0.10.1' into 'develop'
feature/upgrade_edc_v0.10.1 See merge request upm-inesdata/inesdata-connector!44
- Loading branch information
Showing
11 changed files
with
75 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 15 additions & 4 deletions
19
.../java/org/upm/inesdata/edc/extension/policy/functions/ReferringConnectorDutyFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
package org.upm.inesdata.edc.extension.policy.functions; | ||
|
||
import org.eclipse.edc.policy.engine.spi.AtomicConstraintFunction; | ||
import org.eclipse.edc.policy.engine.spi.PolicyContext; | ||
import org.eclipse.edc.participant.spi.ParticipantAgentPolicyContext; | ||
import org.eclipse.edc.policy.engine.spi.AtomicConstraintRuleFunction; | ||
import org.eclipse.edc.policy.model.Duty; | ||
import org.eclipse.edc.policy.model.Operator; | ||
import org.eclipse.edc.spi.monitor.Monitor; | ||
import org.eclipse.edc.spi.result.Result; | ||
|
||
/** AtomicConstraintFunction to validate the referring connector claim for edc duties. */ | ||
public class ReferringConnectorDutyFunction extends AbstractReferringConnectorValidation | ||
implements AtomicConstraintFunction<Duty> { | ||
implements AtomicConstraintRuleFunction<Duty, ParticipantAgentPolicyContext> { | ||
|
||
public ReferringConnectorDutyFunction(Monitor monitor) { | ||
super(monitor); | ||
} | ||
|
||
@Override | ||
public boolean evaluate(Operator operator, Object rightValue, Duty rule, PolicyContext context) { | ||
public boolean evaluate(Operator operator, Object rightValue, Duty rule, ParticipantAgentPolicyContext context) { | ||
return evaluate(operator, rightValue, context); | ||
} | ||
|
||
@Override | ||
public Result<Void> validate(Operator operator, Object rightValue, Duty rule) { | ||
return AtomicConstraintRuleFunction.super.validate(operator, rightValue, rule); | ||
} | ||
|
||
@Override | ||
public String name() { | ||
return AtomicConstraintRuleFunction.super.name(); | ||
} | ||
} |
19 changes: 15 additions & 4 deletions
19
...org/upm/inesdata/edc/extension/policy/functions/ReferringConnectorPermissionFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
package org.upm.inesdata.edc.extension.policy.functions; | ||
|
||
import org.eclipse.edc.policy.engine.spi.AtomicConstraintFunction; | ||
import org.eclipse.edc.policy.engine.spi.PolicyContext; | ||
import org.eclipse.edc.participant.spi.ParticipantAgentPolicyContext; | ||
import org.eclipse.edc.policy.engine.spi.AtomicConstraintRuleFunction; | ||
import org.eclipse.edc.policy.model.Operator; | ||
import org.eclipse.edc.policy.model.Permission; | ||
import org.eclipse.edc.spi.monitor.Monitor; | ||
import org.eclipse.edc.spi.result.Result; | ||
|
||
/** AtomicConstraintFunction to validate the referring connector claim for edc permissions. */ | ||
public class ReferringConnectorPermissionFunction extends AbstractReferringConnectorValidation | ||
implements AtomicConstraintFunction<Permission> { | ||
implements AtomicConstraintRuleFunction<Permission, ParticipantAgentPolicyContext> { | ||
|
||
public ReferringConnectorPermissionFunction(Monitor monitor) { | ||
super(monitor); | ||
} | ||
|
||
@Override | ||
public boolean evaluate(Operator operator, Object rightValue, Permission rule, PolicyContext context) { | ||
public boolean evaluate(Operator operator, Object rightValue, Permission rule, ParticipantAgentPolicyContext context) { | ||
return evaluate(operator, rightValue, context); | ||
} | ||
|
||
@Override | ||
public Result<Void> validate(Operator operator, Object rightValue, Permission rule) { | ||
return AtomicConstraintRuleFunction.super.validate(operator, rightValue, rule); | ||
} | ||
|
||
@Override | ||
public String name() { | ||
return AtomicConstraintRuleFunction.super.name(); | ||
} | ||
} |
19 changes: 15 additions & 4 deletions
19
...rg/upm/inesdata/edc/extension/policy/functions/ReferringConnectorProhibitionFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
package org.upm.inesdata.edc.extension.policy.functions; | ||
|
||
import org.eclipse.edc.policy.engine.spi.AtomicConstraintFunction; | ||
import org.eclipse.edc.policy.engine.spi.PolicyContext; | ||
import org.eclipse.edc.participant.spi.ParticipantAgentPolicyContext; | ||
import org.eclipse.edc.policy.engine.spi.AtomicConstraintRuleFunction; | ||
import org.eclipse.edc.policy.model.Operator; | ||
import org.eclipse.edc.policy.model.Prohibition; | ||
import org.eclipse.edc.spi.monitor.Monitor; | ||
import org.eclipse.edc.spi.result.Result; | ||
|
||
/** AtomicConstraintFunction to validate the referring connector claim edc prohibitions. */ | ||
public class ReferringConnectorProhibitionFunction extends AbstractReferringConnectorValidation | ||
implements AtomicConstraintFunction<Prohibition> { | ||
implements AtomicConstraintRuleFunction<Prohibition, ParticipantAgentPolicyContext> { | ||
|
||
public ReferringConnectorProhibitionFunction(Monitor monitor) { | ||
super(monitor); | ||
} | ||
|
||
@Override | ||
public boolean evaluate(Operator operator, Object rightValue, Prohibition rule, PolicyContext context) { | ||
public boolean evaluate(Operator operator, Object rightValue, Prohibition rule, ParticipantAgentPolicyContext context) { | ||
return evaluate(operator, rightValue, context); | ||
} | ||
|
||
@Override | ||
public Result<Void> validate(Operator operator, Object rightValue, Prohibition rule) { | ||
return AtomicConstraintRuleFunction.super.validate(operator, rightValue, rule); | ||
} | ||
|
||
@Override | ||
public String name() { | ||
return AtomicConstraintRuleFunction.super.name(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters