Class PdpJavaConnector
- java.lang.Object
-
- de.fraunhofer.iese.mydata.connector.java.PdpJavaConnector
-
- All Implemented Interfaces:
IMyDataComponent
,IPolicyDecisionPoint
public class PdpJavaConnector extends Object implements IPolicyDecisionPoint
-
-
Constructor Summary
Constructors Constructor Description PdpJavaConnector(IPolicyDecisionPoint pdp)
PdpJavaConnector(URI uri)
PdpJavaConnector(URI uri, Authentication auth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addToBlacklist(Set<SolutionId> ids)
boolean
clearAllCaches(SolutionId solutionId)
AuthorizationDecision
decisionRequest(Event event)
List<AuthorizationDecision>
decisionRequests(List<Event> events)
boolean
deploy(Policy policy, java.time.ZoneId zoneIdOfSolution)
boolean
evaluate(Event event)
boolean
evaluate(Set<Event> events)
HealthStatus
getHealth()
ComponentId
getId()
boolean
isInFailureMode()
boolean
isWhitelistModeEnabled()
Set<String>
listDeployedPolicies()
boolean
removeFromBlacklist(Set<SolutionId> ids)
boolean
reset()
boolean
revokePolicy(PolicyId policyId)
void
setFailureMode(boolean active)
boolean
updatePolicy(Policy policy, java.time.ZoneId zoneIdOfSolution)
boolean
updatePolicyAndId(Policy policyWithNewId, java.time.ZoneId zoneId, PolicyId oldPolicyId)
-
-
-
Constructor Detail
-
PdpJavaConnector
public PdpJavaConnector(IPolicyDecisionPoint pdp)
-
PdpJavaConnector
public PdpJavaConnector(URI uri)
-
PdpJavaConnector
public PdpJavaConnector(URI uri, Authentication auth)
-
-
Method Detail
-
getId
public ComponentId getId() throws IOException
- Specified by:
getId
in interfaceIMyDataComponent
- Throws:
IOException
-
reset
public boolean reset() throws IOException, NoSuchEntityException
- Specified by:
reset
in interfaceIMyDataComponent
- Throws:
IOException
NoSuchEntityException
-
getHealth
public HealthStatus getHealth() throws IOException
- Specified by:
getHealth
in interfaceIMyDataComponent
- Throws:
IOException
-
clearAllCaches
public boolean clearAllCaches(@Nullable SolutionId solutionId) throws IOException
- Specified by:
clearAllCaches
in interfaceIPolicyDecisionPoint
- Throws:
IOException
-
decisionRequest
public AuthorizationDecision decisionRequest(Event event) throws IOException, EvaluationUndecidableException
- Specified by:
decisionRequest
in interfaceIPolicyDecisionPoint
- Throws:
IOException
EvaluationUndecidableException
-
listDeployedPolicies
public Set<String> listDeployedPolicies() throws IOException
- Specified by:
listDeployedPolicies
in interfaceIPolicyDecisionPoint
- Throws:
IOException
-
addToBlacklist
public boolean addToBlacklist(Set<SolutionId> ids) throws IOException
- Specified by:
addToBlacklist
in interfaceIPolicyDecisionPoint
- Throws:
IOException
-
decisionRequests
public List<AuthorizationDecision> decisionRequests(List<Event> events) throws IOException
- Specified by:
decisionRequests
in interfaceIPolicyDecisionPoint
- Throws:
IOException
-
deploy
public boolean deploy(Policy policy, java.time.ZoneId zoneIdOfSolution) throws IOException, ConflictingPolicyException
- Specified by:
deploy
in interfaceIPolicyDecisionPoint
- Throws:
IOException
ConflictingPolicyException
-
evaluate
public boolean evaluate(Event event) throws IOException
- Specified by:
evaluate
in interfaceIPolicyDecisionPoint
- Throws:
IOException
-
evaluate
public boolean evaluate(Set<Event> events) throws IOException
- Specified by:
evaluate
in interfaceIPolicyDecisionPoint
- Throws:
IOException
-
removeFromBlacklist
public boolean removeFromBlacklist(Set<SolutionId> ids) throws IOException
- Specified by:
removeFromBlacklist
in interfaceIPolicyDecisionPoint
- Throws:
IOException
-
revokePolicy
public boolean revokePolicy(PolicyId policyId) throws IOException, ResourceUpdateException
- Specified by:
revokePolicy
in interfaceIPolicyDecisionPoint
- Throws:
IOException
ResourceUpdateException
-
setFailureMode
public void setFailureMode(boolean active) throws IOException
- Specified by:
setFailureMode
in interfaceIPolicyDecisionPoint
- Throws:
IOException
-
updatePolicy
public boolean updatePolicy(Policy policy, java.time.ZoneId zoneIdOfSolution) throws IOException, ResourceUpdateException
- Specified by:
updatePolicy
in interfaceIPolicyDecisionPoint
- Throws:
IOException
ResourceUpdateException
-
updatePolicyAndId
public boolean updatePolicyAndId(Policy policyWithNewId, java.time.ZoneId zoneId, PolicyId oldPolicyId) throws IOException, ResourceUpdateException
- Specified by:
updatePolicyAndId
in interfaceIPolicyDecisionPoint
- Throws:
IOException
ResourceUpdateException
-
isWhitelistModeEnabled
public boolean isWhitelistModeEnabled()
- Specified by:
isWhitelistModeEnabled
in interfaceIPolicyDecisionPoint
-
isInFailureMode
public boolean isInFailureMode()
- Specified by:
isInFailureMode
in interfaceIPolicyDecisionPoint
-
-