Package de.fraunhofer.iese.mydata
Interface IMyDataEnvironment
-
- All Known Subinterfaces:
IMyDataEnvironmentFullFace
public interface IMyDataEnvironmentThis interface describes the public facade to the MyDataEnvironment, regardless whether you use the Library in LOCAL or CLOUD mode. You can use theIMyDataEnvironmentmore 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)
IMyDataEnvironmentinstances 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> TconstructAndRegisterCustomPep(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> TconstructAndRegisterCustomPep(String componentName, Class<T> interfaceOfPep)This method generates a custom PEP from the given interface and registers it to the PMP.StringgetEnvironmentId()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 instanceOperationalModegetOperationalMode()Access to the instance'sOperationalModede.fraunhofer.iese.mydata.component.interfaces.IPolicyEnforcementPointgetPep()de.fraunhofer.iese.mydata.component.interfaces.IBasicManagementServicegetPmp()de.fraunhofer.iese.mydata.solution.SolutionIdgetSolutionId()AnIMyDataEnvironmentinstance is always associated with exactly one solution.java.time.ZoneIdgetTimezone()Get configured timezone for the associated solutionde.fraunhofer.iese.mydata.component.ComponentIdregisterLocalPip(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance)Registers a local PipComponent that is managed by theIMyDataEnvironmentand is accessible to local PDP.de.fraunhofer.iese.mydata.component.ComponentIdregisterLocalPip(String componentName, Object instance)Registers a local PipComponent that is managed by theIMyDataEnvironmentand is accessible to local PDP.de.fraunhofer.iese.mydata.component.ComponentIdregisterLocalPxp(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance)Registers a local PxpComponent that is managed by theIMyDataEnvironmentand is accessible to local PDP.de.fraunhofer.iese.mydata.component.ComponentIdregisterLocalPxp(String componentName, Object instance)Registers a local PxpComponent that is managed by theIMyDataEnvironmentand is accessible to local PDP.de.fraunhofer.iese.mydata.component.ComponentIdregisterManagedPip(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance, List<URI> listOfUrl)Registers a PipComponent that is managed by theIMyDataEnvironmentbut 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.ComponentIdregisterManagedPip(String componentName, Object instance, List<URI> listOfUrl)Registers a PipComponent that is managed by theIMyDataEnvironmentbut 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.ComponentIdregisterManagedPxp(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance, List<URI> listOfUrl)Registers a PxpComponent that is managed by theIMyDataEnvironmentbut 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.ComponentIdregisterManagedPxp(String componentName, Object instance, List<URI> listOfUrl)Registers a PxpComponent that is managed by theIMyDataEnvironmentbut 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.ComponentIdregisterPep(de.fraunhofer.iese.mydata.component.information.PepComponentInformation pepComponentInformation)Registers a PepComponent to the IMyDataEnvironment and its encapsulated PMPde.fraunhofer.iese.mydata.component.ComponentIdregisterUnmanagedPip(de.fraunhofer.iese.mydata.component.information.PipComponentInformation pipComponentInformation)Registers a remote/external PipComponent that is not managed by theIMyDataEnvironment.de.fraunhofer.iese.mydata.component.ComponentIdregisterUnmanagedPxp(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
IMyDataEnvironments environmentId
-
getSolutionId
de.fraunhofer.iese.mydata.solution.SolutionId getSolutionId()
AnIMyDataEnvironmentinstance is always associated with exactly one solution.- Returns:
- the solutionId of the solution the
IMyDataEnvironmentinstance 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.NoSuchEntityExceptionRegisters 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.NoSuchEntityExceptionRegisters 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.NoSuchEntityExceptionRegisters a PipComponent that is managed by theIMyDataEnvironmentbut 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 theIMyDataEnvironmentbut 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.NoSuchEntityExceptionRegisters a local PipComponent that is managed by theIMyDataEnvironmentand is accessible to local PDP.- Parameters:
componentId- the componentIdinstance- the object that should be used as a PipComponent, can implementIPolicyInformationPointbut 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 theIMyDataEnvironmentand is accessible to local PDP.- Parameters:
componentName- the componentNameinstance- the object that should be used as a PipComponent, can implementIPolicyInformationPointbut 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.NoSuchEntityExceptionRegisters 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.NoSuchEntityExceptionRegisters a PxpComponent that is managed by theIMyDataEnvironmentbut 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 theIMyDataEnvironmentbut 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.NoSuchEntityExceptionRegisters a local PxpComponent that is managed by theIMyDataEnvironmentand is accessible to local PDP.- Parameters:
componentId- the componentIdinstance- the object that should be used as a PxpComponent, can implementIPolicyExecutionPointbut 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 theIMyDataEnvironmentand is accessible to local PDP.- Parameters:
componentName- the componentNameinstance- the object that should be used as a PxpComponent, can implementIPolicyExecutionPointbut 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.InitializationExceptionThis 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
ZoneIdthat identifies the timezone
-
getPmp
de.fraunhofer.iese.mydata.component.interfaces.IBasicManagementService getPmp()
- Returns:
- the
IBasicManagementServicefor this environment
-
getPep
de.fraunhofer.iese.mydata.component.interfaces.IPolicyEnforcementPoint getPep()
- Returns:
- a
DefaultPolicyEnforcementPointthat can be used for enforcement
-
-