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 the IMyDataEnvironment 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:

    IMyDataEnvironment instances can be created and retrieved by using the MyDataEnvironmentManager

    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 instance
      Optional<de.fraunhofer.iese.mydata.component.interfaces.IPolicyExecutionPoint> getManagedPxp​(de.fraunhofer.iese.mydata.component.ComponentId componentId)
      Retrieves a previously registered managed Pxp instance
      OperationalMode getOperationalMode()
      Access to the instance's OperationalMode
      de.fraunhofer.iese.mydata.component.interfaces.IPolicyEnforcementPoint getPep()  
      de.fraunhofer.iese.mydata.component.interfaces.IBasicManagementService getPmp()  
      de.fraunhofer.iese.mydata.solution.SolutionId getSolutionId()
      An IMyDataEnvironment instance is always associated with exactly one solution.
      java.time.ZoneId getTimezone()
      Get configured timezone for the associated solution
      de.fraunhofer.iese.mydata.component.ComponentId registerLocalPip​(de.fraunhofer.iese.mydata.component.ComponentId componentId, Object instance)
      Registers a local PipComponent that is managed by the IMyDataEnvironment 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 the IMyDataEnvironment 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 the IMyDataEnvironment 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 the IMyDataEnvironment 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 the IMyDataEnvironment but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from the IMyDataEnvironment; see getManagedPip(ComponentId).
      de.fraunhofer.iese.mydata.component.ComponentId registerManagedPip​(String componentName, Object instance, List<URI> listOfUrl)
      Registers a PipComponent that is managed by the IMyDataEnvironment but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from the IMyDataEnvironment; see getManagedPip(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 the IMyDataEnvironment but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from the IMyDataEnvironment; see getManagedPxp(ComponentId).
      de.fraunhofer.iese.mydata.component.ComponentId registerManagedPxp​(String componentName, Object instance, List<URI> listOfUrl)
      Registers a PxpComponent that is managed by the IMyDataEnvironment but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from the IMyDataEnvironment; see getManagedPxp(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 PMP
      de.fraunhofer.iese.mydata.component.ComponentId registerUnmanagedPip​(de.fraunhofer.iese.mydata.component.information.PipComponentInformation pipComponentInformation)
      Registers a remote/external PipComponent that is not managed by the IMyDataEnvironment.
      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 the IMyDataEnvironment.
    • Method Detail

      • getSolutionId

        de.fraunhofer.iese.mydata.solution.SolutionId getSolutionId()
        An IMyDataEnvironment instance is always associated with exactly one solution.
        Returns:
        the solutionId of the solution the IMyDataEnvironment instance is associated with.
      • 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 failure
        de.fraunhofer.iese.mydata.exception.ConflictingResourceException - the conflicting resource exception
        de.fraunhofer.iese.mydata.exception.ResourceUpdateException - the resource update exception
        de.fraunhofer.iese.mydata.exception.InvalidEntityException - the invalid entity exception
        de.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 the IMyDataEnvironment.
        Parameters:
        pipComponentInformation - the PipComponentInformation
        Returns:
        the componentId
        Throws:
        IOException - communication failure
        de.fraunhofer.iese.mydata.exception.ConflictingResourceException - the conflicting resource exception
        de.fraunhofer.iese.mydata.exception.ResourceUpdateException - the resource update exception
        de.fraunhofer.iese.mydata.exception.InvalidEntityException - the invalid entity exception
        de.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 the IMyDataEnvironment but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from the IMyDataEnvironment; see getManagedPip(ComponentId).
        Parameters:
        componentId - the componentId
        instance - the instance
        listOfUrl - the URL under which you will expose the PipComponent to be used by the PDP.
        Returns:
        the componentId
        Throws:
        IOException - communication failure
        de.fraunhofer.iese.mydata.exception.ConflictingResourceException - the conflicting resource exception
        de.fraunhofer.iese.mydata.exception.ResourceUpdateException - the resource update exception
        de.fraunhofer.iese.mydata.exception.InvalidEntityException - the invalid entity exception
        de.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 the IMyDataEnvironment but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from the IMyDataEnvironment; see getManagedPip(ComponentId).
        Parameters:
        componentName - the componentName
        instance - the instance
        listOfUrl - the URL under which you will expose the PipComponent to be used by the PDP.
        Returns:
        the componentId
        Throws:
        IOException - communication failure
        de.fraunhofer.iese.mydata.exception.ConflictingResourceException - the conflicting resource exception
        de.fraunhofer.iese.mydata.exception.ResourceUpdateException - the resource update exception
        de.fraunhofer.iese.mydata.exception.InvalidEntityException - the invalid entity exception
        de.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 the IMyDataEnvironment and is accessible to local PDP.
        Parameters:
        componentId - the componentId
        instance - the object that should be used as a PipComponent, can implement IPolicyInformationPoint but does not have to.
        Returns:
        the componentId
        Throws:
        IOException - communication failure
        de.fraunhofer.iese.mydata.exception.ConflictingResourceException - the conflicting resource exception
        de.fraunhofer.iese.mydata.exception.ResourceUpdateException - the resource update exception
        de.fraunhofer.iese.mydata.exception.InvalidEntityException - the invalid entity exception
        de.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 the IMyDataEnvironment and is accessible to local PDP.
        Parameters:
        componentName - the componentName
        instance - the object that should be used as a PipComponent, can implement IPolicyInformationPoint but does not have to.
        Returns:
        the componentId
        Throws:
        IOException - communication failure
        de.fraunhofer.iese.mydata.exception.ConflictingResourceException - the conflicting resource exception
        de.fraunhofer.iese.mydata.exception.ResourceUpdateException - the resource update exception
        de.fraunhofer.iese.mydata.exception.InvalidEntityException - the invalid entity exception
        de.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 the IMyDataEnvironment.
        Parameters:
        pxpComponentInformation - the PxpComponentInformation
        Returns:
        the componentId
        Throws:
        IOException - communication failure
        de.fraunhofer.iese.mydata.exception.ConflictingResourceException - the conflicting resource exception
        de.fraunhofer.iese.mydata.exception.ResourceUpdateException - the resource update exception
        de.fraunhofer.iese.mydata.exception.InvalidEntityException - the invalid entity exception
        de.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 the IMyDataEnvironment but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from the IMyDataEnvironment; see getManagedPxp(ComponentId).
        Parameters:
        componentId - the componentId
        instance - the instance
        listOfUrl - the URL under which you will expose the PxpComponent to be used by the PDP.
        Returns:
        the componentId
        Throws:
        IOException - communication failure
        de.fraunhofer.iese.mydata.exception.ConflictingResourceException - the conflicting resource exception
        de.fraunhofer.iese.mydata.exception.ResourceUpdateException - the resource update exception
        de.fraunhofer.iese.mydata.exception.InvalidEntityException - the invalid entity exception
        de.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 the IMyDataEnvironment but you are in charge to expose it accessible to the PDP via the specified URL Managed Components can be retrieved from the IMyDataEnvironment; see getManagedPxp(ComponentId).
        Parameters:
        componentName - the componentName
        instance - the instance
        listOfUrl - the URL under which you will expose the PxpComponent to be used by the PDP.
        Returns:
        the componentId
        Throws:
        IOException - communication failure
        de.fraunhofer.iese.mydata.exception.ConflictingResourceException - the conflicting resource exception
        de.fraunhofer.iese.mydata.exception.ResourceUpdateException - the resource update exception
        de.fraunhofer.iese.mydata.exception.InvalidEntityException - the invalid entity exception
        de.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 the IMyDataEnvironment and is accessible to local PDP.
        Parameters:
        componentId - the componentId
        instance - the object that should be used as a PxpComponent, can implement IPolicyExecutionPoint but does not have to.
        Returns:
        the componentId
        Throws:
        IOException - communication failure
        de.fraunhofer.iese.mydata.exception.ConflictingResourceException - the conflicting resource exception
        de.fraunhofer.iese.mydata.exception.ResourceUpdateException - the resource update exception
        de.fraunhofer.iese.mydata.exception.InvalidEntityException - the invalid entity exception
        de.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 the IMyDataEnvironment and is accessible to local PDP.
        Parameters:
        componentName - the componentName
        instance - the object that should be used as a PxpComponent, can implement IPolicyExecutionPoint but does not have to.
        Returns:
        the componentId
        Throws:
        IOException - communication failure
        de.fraunhofer.iese.mydata.exception.ConflictingResourceException - the conflicting resource exception
        de.fraunhofer.iese.mydata.exception.ResourceUpdateException - the resource update exception
        de.fraunhofer.iese.mydata.exception.InvalidEntityException - the invalid entity exception
        de.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 componentId
        interfaceOfPep - 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 componentName
        interfaceOfPep - 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