Class RemovedSpaceAndComponentInstanceChecker


  • @Bean
    public class RemovedSpaceAndComponentInstanceChecker
    extends Object
    Centralizing the determination of the removed status of component instances and spaces.

    The aim of this implementation is to determinate by a deep data verification the status of a component instance or a space. Deep data verification means that the status is verified at component instance or space data and also at parent space links.

    An other aim of this implementation is also to provide some performances by using some computing caches. These caches MUST be scoped only to the treatment context. Due to this behavior, be careful to not keep an instance reference into a kind of singleton.

    • Method Detail

      • resetWithCacheSizeOf

        public RemovedSpaceAndComponentInstanceChecker resetWithCacheSizeOf​(Integer cacheSize)
        Initializes cache size with the given value.

        Calling this method resets the checker instance state (so it clears caches).

        Parameters:
        cacheSize - integer representing a cache size. Null means no cache size.
        Returns:
        itself.
      • isRemovedComponentInstanceById

        public boolean isRemovedComponentInstanceById​(String instanceId)
        Indicates if the component instance represented by the given identifier is removed.

        Removed status is computed from component instance data and those of linked parent spaces.

        Parameters:
        instanceId - identifier of a component instance.
        Returns:
        true if component MUST be considered as removed.
      • isRemovedSpaceById

        public boolean isRemovedSpaceById​(String spaceId)
        Indicates if the space represented by the given identifier is removed.

        Removed status is computed from space data and those of linked parent spaces.

        Parameters:
        spaceId - identifier of a space.
        Returns:
        true if space MUST be considered as removed.