Package de.fraunhofer.iese.mydata
Interface IMyDataEnvironment
-
- All Known Subinterfaces:
IMyDataEnvironmentFullFace
public interface IMyDataEnvironment
This interface describes the public facade to the MyDataEnvironment, regardless whether you use the Library in LOCAL or CLOUD mode. You can use theIMyDataEnvironment
more or less transparent, but you will have to pay special attention when registering PIP/PXP components because they need to be accessible to the PDP. Currently we distinguish three modes in which a service component can be registered to the MyDataEnvironment:- local: component instance will be registered to the
MyDataEnvironment, will be accessible to local PDP and component information
will be published to PMP; no need to provide further information like URL.
see
registerLocalPip(ComponentId, Object)
- managed: component instance will be registered to the
MyDataEnvironment, can programmatically be retrieved via
getManagedPip(ComponentId)
/getManagedPxp(ComponentId)
and the corresponding component information is published to the PMP. You are in charge to make the component accessible for the PDP under the specified URL. seeregisterManagedPip(ComponentId, Object, List)
- unmanaged: component will not be managed by the MyDataEnvironment,
only the component information is published to the PMP. You are in charge
to make the component accessible for the PDP. see
registerUnmanagedPip(PipComponentInformation)
IMyDataEnvironment
instances can be created and retrieved by using theMyDataEnvironmentManager
- See Also:
MyDataEnvironmentManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
constructAndRegisterCustomPep(de.fraunhofer.iese.mydata.component.ComponentId componentId, Class<T> interfaceOfPep)
This method generates a custom PEP from the given interface and registers it to the PMP.<T> T
constructAndRegisterCustomPep(String componentName, Class<T> interfaceOfPep)
This method generates a custom PEP from the given interface and registers it to the PMP.String
getEnvironmentId()
Optional<de.fraunhofer.iese.mydata.component.interfaces.IPolicyInformationPoint>
getManagedPip(de.fraunhofer.iese.mydata.component.ComponentId componentId)
Retrieves a previously registered managed Pip instanceOptional<de.fraunhofer.iese.mydata.component.interfaces.IPolicyExecutionPoint>
getManagedPxp(de.fraunhofer.iese.mydata.component.ComponentId componentId)
Retrieves a previously registered managed Pxp instanceOperationalMode
getOperationalMode()
Access to the instance'sOperationalMode
de.fraunhofer.iese.mydata.component.interfaces.IPolicyEnforcementPoint
getPep()
de.fraunhofer.iese.mydata.component.interfaces.IBasicManagementService
getPmp()
de.fraunhofer.iese.mydata.solution.SolutionId
getSolutionId()
AnIMyDataEnvironment
instance is always associated with exactly one solution.java.time.ZoneId
getTimezone()
Get configured timezone for the associated solutionde.fraunhofer.iese.mydata.component.ComponentId
registerLocalPip(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance)
Registers a local PipComponent that is managed by theIMyDataEnvironment
and is accessible to local PDP.de.fraunhofer.iese.mydata.component.ComponentId
registerLocalPip(String componentName, Object instance)
Registers a local PipComponent that is managed by theIMyDataEnvironment
and is accessible to local PDP.de.fraunhofer.iese.mydata.component.ComponentId
registerLocalPxp(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance)
Registers a local PxpComponent that is managed by theIMyDataEnvironment
and is accessible to local PDP.de.fraunhofer.iese.mydata.component.ComponentId
registerLocalPxp(String componentName, Object instance)
Registers a local PxpComponent that is managed by theIMyDataEnvironment
and is accessible to local PDP.de.fraunhofer.iese.mydata.component.ComponentId
registerManagedPip(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance, List<URI> listOfUrl)
Registers a PipComponent that is managed by theIMyDataEnvironment
but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from theIMyDataEnvironment
; seegetManagedPip(ComponentId)
.de.fraunhofer.iese.mydata.component.ComponentId
registerManagedPip(String componentName, Object instance, List<URI> listOfUrl)
Registers a PipComponent that is managed by theIMyDataEnvironment
but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from theIMyDataEnvironment
; seegetManagedPip(ComponentId)
.de.fraunhofer.iese.mydata.component.ComponentId
registerManagedPxp(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance, List<URI> listOfUrl)
Registers a PxpComponent that is managed by theIMyDataEnvironment
but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from theIMyDataEnvironment
; seegetManagedPxp(ComponentId)
.de.fraunhofer.iese.mydata.component.ComponentId
registerManagedPxp(String componentName, Object instance, List<URI> listOfUrl)
Registers a PxpComponent that is managed by theIMyDataEnvironment
but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from theIMyDataEnvironment
; seegetManagedPxp(ComponentId)
.de.fraunhofer.iese.mydata.component.ComponentId
registerPep(de.fraunhofer.iese.mydata.component.information.PepComponentInformation pepComponentInformation)
Registers a PepComponent to the IMyDataEnvironment and its encapsulated PMPde.fraunhofer.iese.mydata.component.ComponentId
registerUnmanagedPip(de.fraunhofer.iese.mydata.component.information.PipComponentInformation pipComponentInformation)
Registers a remote/external PipComponent that is not managed by theIMyDataEnvironment
.de.fraunhofer.iese.mydata.component.ComponentId
registerUnmanagedPxp(de.fraunhofer.iese.mydata.component.information.PxpComponentInformation pxpComponentInformation)
Registers a remote/external PxpComponent that is not managed by theIMyDataEnvironment
.
-
-
-
Method Detail
-
getEnvironmentId
String getEnvironmentId()
- Returns:
- the
IMyDataEnvironment
s environmentId
-
getSolutionId
de.fraunhofer.iese.mydata.solution.SolutionId getSolutionId()
AnIMyDataEnvironment
instance is always associated with exactly one solution.- Returns:
- the solutionId of the solution the
IMyDataEnvironment
instance is associated with.
-
getOperationalMode
OperationalMode getOperationalMode()
Access to the instance'sOperationalMode
- Returns:
- the instance's
OperationalMode
-
registerPep
de.fraunhofer.iese.mydata.component.ComponentId registerPep(de.fraunhofer.iese.mydata.component.information.PepComponentInformation pepComponentInformation) throws IOException, de.fraunhofer.iese.mydata.exception.ResourceUpdateException, de.fraunhofer.iese.mydata.exception.ConflictingResourceException, de.fraunhofer.iese.mydata.exception.InvalidEntityException, de.fraunhofer.iese.mydata.exception.NoSuchEntityException
Registers a PepComponent to the IMyDataEnvironment and its encapsulated PMP- Parameters:
pepComponentInformation
- the PipComponentInformation- Returns:
- the componentId
- Throws:
IOException
- communication failurede.fraunhofer.iese.mydata.exception.ConflictingResourceException
- the conflicting resource exceptionde.fraunhofer.iese.mydata.exception.ResourceUpdateException
- the resource update exceptionde.fraunhofer.iese.mydata.exception.InvalidEntityException
- the invalid entity exceptionde.fraunhofer.iese.mydata.exception.NoSuchEntityException
-
registerUnmanagedPip
de.fraunhofer.iese.mydata.component.ComponentId registerUnmanagedPip(de.fraunhofer.iese.mydata.component.information.PipComponentInformation pipComponentInformation) throws IOException, de.fraunhofer.iese.mydata.exception.ResourceUpdateException, de.fraunhofer.iese.mydata.exception.ConflictingResourceException, de.fraunhofer.iese.mydata.exception.InvalidEntityException, de.fraunhofer.iese.mydata.exception.NoSuchEntityException
Registers a remote/external PipComponent that is not managed by theIMyDataEnvironment
.- Parameters:
pipComponentInformation
- the PipComponentInformation- Returns:
- the componentId
- Throws:
IOException
- communication failurede.fraunhofer.iese.mydata.exception.ConflictingResourceException
- the conflicting resource exceptionde.fraunhofer.iese.mydata.exception.ResourceUpdateException
- the resource update exceptionde.fraunhofer.iese.mydata.exception.InvalidEntityException
- the invalid entity exceptionde.fraunhofer.iese.mydata.exception.NoSuchEntityException
-
registerManagedPip
de.fraunhofer.iese.mydata.component.ComponentId registerManagedPip(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance, List<URI> listOfUrl) throws de.fraunhofer.iese.mydata.exception.InvalidEntityException, de.fraunhofer.iese.mydata.exception.ResourceUpdateException, de.fraunhofer.iese.mydata.exception.ConflictingResourceException, IOException, de.fraunhofer.iese.mydata.exception.NoSuchEntityException
Registers a PipComponent that is managed by theIMyDataEnvironment
but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from theIMyDataEnvironment
; seegetManagedPip(ComponentId)
.- Parameters:
componentId
- the componentIdinstance
- the instancelistOfUrl
- the URL under which you will expose the PipComponent to be used by the PDP.- Returns:
- the componentId
- Throws:
IOException
- communication failurede.fraunhofer.iese.mydata.exception.ConflictingResourceException
- the conflicting resource exceptionde.fraunhofer.iese.mydata.exception.ResourceUpdateException
- the resource update exceptionde.fraunhofer.iese.mydata.exception.InvalidEntityException
- the invalid entity exceptionde.fraunhofer.iese.mydata.exception.NoSuchEntityException
-
registerManagedPip
de.fraunhofer.iese.mydata.component.ComponentId registerManagedPip(String componentName, Object instance, List<URI> listOfUrl) throws de.fraunhofer.iese.mydata.exception.InvalidEntityException, de.fraunhofer.iese.mydata.exception.ResourceUpdateException, de.fraunhofer.iese.mydata.exception.ConflictingResourceException, IOException, de.fraunhofer.iese.mydata.exception.NoSuchEntityException
Registers a PipComponent that is managed by theIMyDataEnvironment
but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from theIMyDataEnvironment
; seegetManagedPip(ComponentId)
.- Parameters:
componentName
- the componentNameinstance
- the instancelistOfUrl
- the URL under which you will expose the PipComponent to be used by the PDP.- Returns:
- the componentId
- Throws:
IOException
- communication failurede.fraunhofer.iese.mydata.exception.ConflictingResourceException
- the conflicting resource exceptionde.fraunhofer.iese.mydata.exception.ResourceUpdateException
- the resource update exceptionde.fraunhofer.iese.mydata.exception.InvalidEntityException
- the invalid entity exceptionde.fraunhofer.iese.mydata.exception.NoSuchEntityException
-
registerLocalPip
de.fraunhofer.iese.mydata.component.ComponentId registerLocalPip(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance) throws IOException, de.fraunhofer.iese.mydata.exception.InvalidEntityException, de.fraunhofer.iese.mydata.exception.ResourceUpdateException, de.fraunhofer.iese.mydata.exception.ConflictingResourceException, de.fraunhofer.iese.mydata.exception.NoSuchEntityException
Registers a local PipComponent that is managed by theIMyDataEnvironment
and is accessible to local PDP.- Parameters:
componentId
- the componentIdinstance
- the object that should be used as a PipComponent, can implementIPolicyInformationPoint
but does not have to.- Returns:
- the componentId
- Throws:
IOException
- communication failurede.fraunhofer.iese.mydata.exception.ConflictingResourceException
- the conflicting resource exceptionde.fraunhofer.iese.mydata.exception.ResourceUpdateException
- the resource update exceptionde.fraunhofer.iese.mydata.exception.InvalidEntityException
- the invalid entity exceptionde.fraunhofer.iese.mydata.exception.NoSuchEntityException
-
registerLocalPip
de.fraunhofer.iese.mydata.component.ComponentId registerLocalPip(String componentName, Object instance) throws IOException, de.fraunhofer.iese.mydata.exception.InvalidEntityException, de.fraunhofer.iese.mydata.exception.ResourceUpdateException, de.fraunhofer.iese.mydata.exception.ConflictingResourceException, de.fraunhofer.iese.mydata.exception.NoSuchEntityException
Registers a local PipComponent that is managed by theIMyDataEnvironment
and is accessible to local PDP.- Parameters:
componentName
- the componentNameinstance
- the object that should be used as a PipComponent, can implementIPolicyInformationPoint
but does not have to.- Returns:
- the componentId
- Throws:
IOException
- communication failurede.fraunhofer.iese.mydata.exception.ConflictingResourceException
- the conflicting resource exceptionde.fraunhofer.iese.mydata.exception.ResourceUpdateException
- the resource update exceptionde.fraunhofer.iese.mydata.exception.InvalidEntityException
- the invalid entity exceptionde.fraunhofer.iese.mydata.exception.NoSuchEntityException
-
registerUnmanagedPxp
de.fraunhofer.iese.mydata.component.ComponentId registerUnmanagedPxp(de.fraunhofer.iese.mydata.component.information.PxpComponentInformation pxpComponentInformation) throws IOException, de.fraunhofer.iese.mydata.exception.ResourceUpdateException, de.fraunhofer.iese.mydata.exception.ConflictingResourceException, de.fraunhofer.iese.mydata.exception.InvalidEntityException, de.fraunhofer.iese.mydata.exception.NoSuchEntityException
Registers a remote/external PxpComponent that is not managed by theIMyDataEnvironment
.- Parameters:
pxpComponentInformation
- the PxpComponentInformation- Returns:
- the componentId
- Throws:
IOException
- communication failurede.fraunhofer.iese.mydata.exception.ConflictingResourceException
- the conflicting resource exceptionde.fraunhofer.iese.mydata.exception.ResourceUpdateException
- the resource update exceptionde.fraunhofer.iese.mydata.exception.InvalidEntityException
- the invalid entity exceptionde.fraunhofer.iese.mydata.exception.NoSuchEntityException
-
registerManagedPxp
de.fraunhofer.iese.mydata.component.ComponentId registerManagedPxp(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance, List<URI> listOfUrl) throws de.fraunhofer.iese.mydata.exception.InvalidEntityException, de.fraunhofer.iese.mydata.exception.ResourceUpdateException, de.fraunhofer.iese.mydata.exception.ConflictingResourceException, IOException, de.fraunhofer.iese.mydata.exception.NoSuchEntityException
Registers a PxpComponent that is managed by theIMyDataEnvironment
but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from theIMyDataEnvironment
; seegetManagedPxp(ComponentId)
.- Parameters:
componentId
- the componentIdinstance
- the instancelistOfUrl
- the URL under which you will expose the PxpComponent to be used by the PDP.- Returns:
- the componentId
- Throws:
IOException
- communication failurede.fraunhofer.iese.mydata.exception.ConflictingResourceException
- the conflicting resource exceptionde.fraunhofer.iese.mydata.exception.ResourceUpdateException
- the resource update exceptionde.fraunhofer.iese.mydata.exception.InvalidEntityException
- the invalid entity exceptionde.fraunhofer.iese.mydata.exception.NoSuchEntityException
-
registerManagedPxp
de.fraunhofer.iese.mydata.component.ComponentId registerManagedPxp(String componentName, Object instance, List<URI> listOfUrl) throws de.fraunhofer.iese.mydata.exception.InvalidEntityException, de.fraunhofer.iese.mydata.exception.ResourceUpdateException, de.fraunhofer.iese.mydata.exception.ConflictingResourceException, IOException, de.fraunhofer.iese.mydata.exception.NoSuchEntityException
Registers a PxpComponent that is managed by theIMyDataEnvironment
but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from theIMyDataEnvironment
; seegetManagedPxp(ComponentId)
.- Parameters:
componentName
- the componentNameinstance
- the instancelistOfUrl
- the URL under which you will expose the PxpComponent to be used by the PDP.- Returns:
- the componentId
- Throws:
IOException
- communication failurede.fraunhofer.iese.mydata.exception.ConflictingResourceException
- the conflicting resource exceptionde.fraunhofer.iese.mydata.exception.ResourceUpdateException
- the resource update exceptionde.fraunhofer.iese.mydata.exception.InvalidEntityException
- the invalid entity exceptionde.fraunhofer.iese.mydata.exception.NoSuchEntityException
-
registerLocalPxp
de.fraunhofer.iese.mydata.component.ComponentId registerLocalPxp(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance) throws IOException, de.fraunhofer.iese.mydata.exception.InvalidEntityException, de.fraunhofer.iese.mydata.exception.ResourceUpdateException, de.fraunhofer.iese.mydata.exception.ConflictingResourceException, de.fraunhofer.iese.mydata.exception.NoSuchEntityException
Registers a local PxpComponent that is managed by theIMyDataEnvironment
and is accessible to local PDP.- Parameters:
componentId
- the componentIdinstance
- the object that should be used as a PxpComponent, can implementIPolicyExecutionPoint
but does not have to.- Returns:
- the componentId
- Throws:
IOException
- communication failurede.fraunhofer.iese.mydata.exception.ConflictingResourceException
- the conflicting resource exceptionde.fraunhofer.iese.mydata.exception.ResourceUpdateException
- the resource update exceptionde.fraunhofer.iese.mydata.exception.InvalidEntityException
- the invalid entity exceptionde.fraunhofer.iese.mydata.exception.NoSuchEntityException
-
registerLocalPxp
de.fraunhofer.iese.mydata.component.ComponentId registerLocalPxp(String componentName, Object instance) throws IOException, de.fraunhofer.iese.mydata.exception.InvalidEntityException, de.fraunhofer.iese.mydata.exception.ResourceUpdateException, de.fraunhofer.iese.mydata.exception.ConflictingResourceException, de.fraunhofer.iese.mydata.exception.NoSuchEntityException
Registers a local PxpComponent that is managed by theIMyDataEnvironment
and is accessible to local PDP.- Parameters:
componentName
- the componentNameinstance
- the object that should be used as a PxpComponent, can implementIPolicyExecutionPoint
but does not have to.- Returns:
- the componentId
- Throws:
IOException
- communication failurede.fraunhofer.iese.mydata.exception.ConflictingResourceException
- the conflicting resource exceptionde.fraunhofer.iese.mydata.exception.ResourceUpdateException
- the resource update exceptionde.fraunhofer.iese.mydata.exception.InvalidEntityException
- the invalid entity exceptionde.fraunhofer.iese.mydata.exception.NoSuchEntityException
-
getManagedPip
Optional<de.fraunhofer.iese.mydata.component.interfaces.IPolicyInformationPoint> getManagedPip(de.fraunhofer.iese.mydata.component.ComponentId componentId)
Retrieves a previously registered managed Pip instance- Parameters:
componentId
- the componentId- Returns:
- the previously registered managed Pip instance
-
getManagedPxp
Optional<de.fraunhofer.iese.mydata.component.interfaces.IPolicyExecutionPoint> getManagedPxp(de.fraunhofer.iese.mydata.component.ComponentId componentId)
Retrieves a previously registered managed Pxp instance- Parameters:
componentId
- the componentId- Returns:
- the previously registered managed Pxp instance
-
constructAndRegisterCustomPep
<T> T constructAndRegisterCustomPep(de.fraunhofer.iese.mydata.component.ComponentId componentId, Class<T> interfaceOfPep) throws de.fraunhofer.iese.mydata.exception.InitializationException
This method generates a custom PEP from the given interface and registers it to the PMP. Make sure you call this method at most once per componentId/interface.- Type Parameters:
T
- Type of the Interface- Parameters:
componentId
- the componentIdinterfaceOfPep
- The Interface to generate a PEP for.- Returns:
- the generated implementation of the custom PEP
- Throws:
de.fraunhofer.iese.mydata.exception.InitializationException
- in case of an error and when there is no PDP available
-
constructAndRegisterCustomPep
<T> T constructAndRegisterCustomPep(String componentName, Class<T> interfaceOfPep) throws de.fraunhofer.iese.mydata.exception.InitializationException
This method generates a custom PEP from the given interface and registers it to the PMP. Make sure you call this method at most once per componentId/interface.- Type Parameters:
T
- Type of the Interface- Parameters:
componentName
- the componentNameinterfaceOfPep
- The Interface to generate a PEP for.- Returns:
- the generated implementation of the custom PEP
- Throws:
de.fraunhofer.iese.mydata.exception.InitializationException
- in case of an error and when there is no PDP available
-
getTimezone
java.time.ZoneId getTimezone()
Get configured timezone for the associated solution- Returns:
- the
ZoneId
that identifies the timezone
-
getPmp
de.fraunhofer.iese.mydata.component.interfaces.IBasicManagementService getPmp()
- Returns:
- the
IBasicManagementService
for this environment
-
getPep
de.fraunhofer.iese.mydata.component.interfaces.IPolicyEnforcementPoint getPep()
- Returns:
- a
DefaultPolicyEnforcementPoint
that can be used for enforcement
-
-