Package de.fraunhofer.iese.mydata.pmp
Class PolicyManagementPoint
- java.lang.Object
-
- de.fraunhofer.iese.mydata.pmp.PolicyManagementPoint
-
- All Implemented Interfaces:
IComponentService
,IBasicManagementService
,IMyDataComponent
,IPolicyService
,ITimerService
public class PolicyManagementPoint extends Object implements IBasicManagementService
The core implementation for a policy management point.- Author:
- Fraunhofer IESE
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PolicyManagementPoint.TimerJob
-
Constructor Summary
Constructors Constructor Description PolicyManagementPoint(ComponentId componentId, PdpComponentInformation pdpComponentInformation, IPolicyDecisionPoint policyDecisionPoint, java.time.ZoneId timeZone, org.quartz.Scheduler timerScheduler, ConnectorFactory connectorFactory)
-
Method Summary
-
-
-
Constructor Detail
-
PolicyManagementPoint
public PolicyManagementPoint(ComponentId componentId, PdpComponentInformation pdpComponentInformation, IPolicyDecisionPoint policyDecisionPoint, java.time.ZoneId timeZone, org.quartz.Scheduler timerScheduler, ConnectorFactory connectorFactory) throws InvalidEntityException
- Throws:
InvalidEntityException
-
-
Method Detail
-
getHealth
public HealthStatus getHealth()
- Specified by:
getHealth
in interfaceIMyDataComponent
-
getId
public ComponentId getId()
- Specified by:
getId
in interfaceIMyDataComponent
-
reset
public boolean reset()
- Specified by:
reset
in interfaceIMyDataComponent
-
addPolicy
public PolicyId addPolicy(Policy policy) throws IOException, ResourceUpdateException, InvalidEntityException, ConflictingResourceException, NoSuchEntityException
- Specified by:
addPolicy
in interfaceIPolicyService
- Throws:
IOException
ResourceUpdateException
InvalidEntityException
ConflictingResourceException
NoSuchEntityException
-
policyExists
public boolean policyExists(PolicyId policyId) throws InvalidEntityException
- Specified by:
policyExists
in interfaceIPolicyService
- Throws:
InvalidEntityException
-
getPolicy
public Policy getPolicy(PolicyId policyId) throws NoSuchEntityException, InvalidEntityException
- Specified by:
getPolicy
in interfaceIPolicyService
- Throws:
NoSuchEntityException
InvalidEntityException
-
getPolicies
public Set<Policy> getPolicies(SolutionId solutionId) throws InvalidEntityException
- Specified by:
getPolicies
in interfaceIPolicyService
- Throws:
InvalidEntityException
-
getRevokedPolicies
public Set<Policy> getRevokedPolicies(SolutionId solutionId) throws InvalidEntityException
- Specified by:
getRevokedPolicies
in interfaceIPolicyService
- Throws:
InvalidEntityException
-
listRevokedPolicies
public Set<PolicyId> listRevokedPolicies(SolutionId solutionId) throws InvalidEntityException
- Specified by:
listRevokedPolicies
in interfaceIPolicyService
- Throws:
InvalidEntityException
-
listPolicies
public Set<PolicyId> listPolicies(SolutionId solutionId) throws InvalidEntityException
- Specified by:
listPolicies
in interfaceIPolicyService
- Throws:
InvalidEntityException
-
getDeployedPolicies
public Set<Policy> getDeployedPolicies()
- Specified by:
getDeployedPolicies
in interfaceIPolicyService
-
getDeployedPolicies
public Set<Policy> getDeployedPolicies(SolutionId solutionId) throws InvalidEntityException
- Specified by:
getDeployedPolicies
in interfaceIPolicyService
- Throws:
InvalidEntityException
-
listDeployedPolicies
public Set<PolicyId> listDeployedPolicies(SolutionId solutionId) throws InvalidEntityException
- Specified by:
listDeployedPolicies
in interfaceIPolicyService
- Throws:
InvalidEntityException
-
isPolicyDeployed
public boolean isPolicyDeployed(PolicyId policyId) throws InvalidEntityException
- Specified by:
isPolicyDeployed
in interfaceIPolicyService
- Throws:
InvalidEntityException
-
updatePolicy
public PolicyId updatePolicy(Policy policy) throws IOException, ResourceUpdateException, NoSuchEntityException, InvalidEntityException
- Specified by:
updatePolicy
in interfaceIPolicyService
- Throws:
IOException
ResourceUpdateException
NoSuchEntityException
InvalidEntityException
-
deployPolicy
public void deployPolicy(PolicyId policyId) throws IOException, NoSuchEntityException, ResourceUpdateException, InvalidEntityException
- Specified by:
deployPolicy
in interfaceIPolicyService
- Throws:
IOException
NoSuchEntityException
ResourceUpdateException
InvalidEntityException
-
revokePolicy
public void revokePolicy(PolicyId policyId) throws IOException, NoSuchEntityException, ResourceUpdateException, InvalidEntityException
- Specified by:
revokePolicy
in interfaceIPolicyService
- Throws:
IOException
NoSuchEntityException
ResourceUpdateException
InvalidEntityException
-
deletePolicy
public void deletePolicy(PolicyId policyId) throws ResourceUpdateException, NoSuchEntityException, InvalidEntityException
- Specified by:
deletePolicy
in interfaceIPolicyService
- Throws:
ResourceUpdateException
NoSuchEntityException
InvalidEntityException
-
addTimer
public TimerId addTimer(Timer timer) throws ResourceUpdateException, ConflictingResourceException, InvalidEntityException, NoSuchEntityException
- Specified by:
addTimer
in interfaceITimerService
- Throws:
ResourceUpdateException
ConflictingResourceException
InvalidEntityException
NoSuchEntityException
-
getTimer
public Timer getTimer(TimerId timerId) throws NoSuchEntityException, InvalidEntityException
- Specified by:
getTimer
in interfaceITimerService
- Throws:
NoSuchEntityException
InvalidEntityException
-
getTimers
public Set<Timer> getTimers(SolutionId solutionId) throws InvalidEntityException
- Specified by:
getTimers
in interfaceITimerService
- Throws:
InvalidEntityException
-
listTimers
public Set<TimerId> listTimers(SolutionId solutionId) throws InvalidEntityException
- Specified by:
listTimers
in interfaceITimerService
- Throws:
InvalidEntityException
-
getDeployedTimers
public Set<Timer> getDeployedTimers(SolutionId solutionId) throws InvalidEntityException
- Specified by:
getDeployedTimers
in interfaceITimerService
- Throws:
InvalidEntityException
-
listDeployedTimers
public Set<TimerId> listDeployedTimers(SolutionId solutionId) throws InvalidEntityException
- Specified by:
listDeployedTimers
in interfaceITimerService
- Throws:
InvalidEntityException
-
isTimerDeployed
public boolean isTimerDeployed(TimerId timerId) throws NoSuchEntityException, InvalidEntityException
- Specified by:
isTimerDeployed
in interfaceITimerService
- Throws:
NoSuchEntityException
InvalidEntityException
-
deployTimer
public void deployTimer(TimerId timerId) throws NoSuchEntityException, ResourceUpdateException, InvalidEntityException
- Specified by:
deployTimer
in interfaceITimerService
- Throws:
NoSuchEntityException
ResourceUpdateException
InvalidEntityException
-
revokeTimer
public void revokeTimer(TimerId timerId) throws NoSuchEntityException, ResourceUpdateException, InvalidEntityException
- Specified by:
revokeTimer
in interfaceITimerService
- Throws:
NoSuchEntityException
ResourceUpdateException
InvalidEntityException
-
deleteTimer
public void deleteTimer(TimerId timerId) throws ResourceUpdateException, NoSuchEntityException, InvalidEntityException
- Specified by:
deleteTimer
in interfaceITimerService
- Throws:
ResourceUpdateException
NoSuchEntityException
InvalidEntityException
-
timerExists
public boolean timerExists(TimerId timerId) throws InvalidEntityException
- Specified by:
timerExists
in interfaceITimerService
- Throws:
InvalidEntityException
-
addPdp
public ComponentId addPdp(PdpComponentInformation component) throws ConflictingResourceException, InvalidEntityException
- Specified by:
addPdp
in interfaceIComponentService
- Throws:
ConflictingResourceException
InvalidEntityException
-
addPep
public ComponentId addPep(PepComponentInformation component) throws ConflictingResourceException, InvalidEntityException
- Specified by:
addPep
in interfaceIComponentService
- Throws:
ConflictingResourceException
InvalidEntityException
-
addPip
public ComponentId addPip(PipComponentInformation component) throws IOException, ConflictingResourceException, InvalidEntityException
- Specified by:
addPip
in interfaceIComponentService
- Throws:
IOException
ConflictingResourceException
InvalidEntityException
-
addPxp
public ComponentId addPxp(PxpComponentInformation component) throws IOException, ConflictingResourceException, InvalidEntityException
- Specified by:
addPxp
in interfaceIComponentService
- Throws:
IOException
ConflictingResourceException
InvalidEntityException
-
pdpExists
public boolean pdpExists(ComponentId componentId) throws InvalidEntityException
- Specified by:
pdpExists
in interfaceIComponentService
- Throws:
InvalidEntityException
-
pepExists
public boolean pepExists(ComponentId componentId) throws InvalidEntityException
- Specified by:
pepExists
in interfaceIComponentService
- Throws:
InvalidEntityException
-
pipExists
public boolean pipExists(ComponentId componentId) throws InvalidEntityException
- Specified by:
pipExists
in interfaceIComponentService
- Throws:
InvalidEntityException
-
pxpExists
public boolean pxpExists(ComponentId componentId) throws InvalidEntityException
- Specified by:
pxpExists
in interfaceIComponentService
- Throws:
InvalidEntityException
-
getPdp
public PdpComponentInformation getPdp() throws NoSuchEntityException
- Specified by:
getPdp
in interfaceIComponentService
- Throws:
NoSuchEntityException
-
getPep
public PepComponentInformation getPep(ComponentId id) throws NoSuchEntityException, InvalidEntityException
- Specified by:
getPep
in interfaceIComponentService
- Throws:
NoSuchEntityException
InvalidEntityException
-
getPip
public PipComponentInformation getPip(ComponentId id) throws NoSuchEntityException, InvalidEntityException
- Specified by:
getPip
in interfaceIComponentService
- Throws:
NoSuchEntityException
InvalidEntityException
-
getPxp
public PxpComponentInformation getPxp(ComponentId id) throws NoSuchEntityException, InvalidEntityException
- Specified by:
getPxp
in interfaceIComponentService
- Throws:
NoSuchEntityException
InvalidEntityException
-
getPipState
public HealthStatus getPipState(ComponentId id) throws NoSuchEntityException, InvalidEntityException, IOException
- Specified by:
getPipState
in interfaceIComponentService
- Throws:
NoSuchEntityException
InvalidEntityException
IOException
-
getPxpState
public HealthStatus getPxpState(ComponentId id) throws NoSuchEntityException, InvalidEntityException, IOException
- Specified by:
getPxpState
in interfaceIComponentService
- Throws:
NoSuchEntityException
InvalidEntityException
IOException
-
getAllComponentStates
public Map<ComponentId,HealthStatus> getAllComponentStates(SolutionId solutionId)
- Specified by:
getAllComponentStates
in interfaceIComponentService
-
lookupPep
public Set<PepComponentInformation> lookupPep(SolutionId solutionId) throws InvalidEntityException
- Specified by:
lookupPep
in interfaceIComponentService
- Throws:
InvalidEntityException
-
lookupPip
public Set<PipComponentInformation> lookupPip(SolutionId solutionId, MethodInterfaceDescription query) throws InvalidEntityException
- Specified by:
lookupPip
in interfaceIComponentService
- Throws:
InvalidEntityException
-
lookupPxp
public Set<PxpComponentInformation> lookupPxp(SolutionId solutionId, MethodInterfaceDescription query) throws InvalidEntityException
- Specified by:
lookupPxp
in interfaceIComponentService
- Throws:
InvalidEntityException
-
updatePdp
public ComponentId updatePdp(PdpComponentInformation component) throws NoSuchEntityException, ResourceUpdateException, InvalidEntityException
- Specified by:
updatePdp
in interfaceIComponentService
- Throws:
NoSuchEntityException
ResourceUpdateException
InvalidEntityException
-
updatePep
public ComponentId updatePep(PepComponentInformation component) throws NoSuchEntityException, ResourceUpdateException, InvalidEntityException
- Specified by:
updatePep
in interfaceIComponentService
- Throws:
NoSuchEntityException
ResourceUpdateException
InvalidEntityException
-
updatePip
public ComponentId updatePip(PipComponentInformation component) throws NoSuchEntityException, ResourceUpdateException, InvalidEntityException, IOException
- Specified by:
updatePip
in interfaceIComponentService
- Throws:
NoSuchEntityException
ResourceUpdateException
InvalidEntityException
IOException
-
updatePxp
public ComponentId updatePxp(PxpComponentInformation component) throws NoSuchEntityException, ResourceUpdateException, InvalidEntityException, IOException
- Specified by:
updatePxp
in interfaceIComponentService
- Throws:
NoSuchEntityException
ResourceUpdateException
InvalidEntityException
IOException
-
deletePep
public void deletePep(ComponentId componentId) throws NoSuchEntityException, ResourceUpdateException, InvalidEntityException, IOException
- Specified by:
deletePep
in interfaceIComponentService
- Throws:
NoSuchEntityException
ResourceUpdateException
InvalidEntityException
IOException
-
deletePip
public void deletePip(ComponentId componentId) throws NoSuchEntityException, ResourceUpdateException, InvalidEntityException, IOException
- Specified by:
deletePip
in interfaceIComponentService
- Throws:
NoSuchEntityException
ResourceUpdateException
InvalidEntityException
IOException
-
deletePxp
public void deletePxp(ComponentId componentId) throws NoSuchEntityException, ResourceUpdateException, InvalidEntityException, IOException
- Specified by:
deletePxp
in interfaceIComponentService
- Throws:
NoSuchEntityException
ResourceUpdateException
InvalidEntityException
IOException
-
getRevokedTimers
public Set<Timer> getRevokedTimers(SolutionId solutionId) throws InvalidEntityException
- Specified by:
getRevokedTimers
in interfaceITimerService
- Throws:
InvalidEntityException
-
listRevokedTimers
public Set<TimerId> listRevokedTimers(SolutionId solutionId) throws InvalidEntityException
- Specified by:
listRevokedTimers
in interfaceITimerService
- Throws:
InvalidEntityException
-
updateTimer
public TimerId updateTimer(Timer timer) throws ResourceUpdateException, NoSuchEntityException, InvalidEntityException, ConflictingResourceException
- Specified by:
updateTimer
in interfaceITimerService
- Throws:
ResourceUpdateException
NoSuchEntityException
InvalidEntityException
ConflictingResourceException
-
-