Class DomainCache


  • @Technical
    @Bean
    @Singleton
    public class DomainCache
    extends Object
    Cache with all the Silverpeas domains being used.
    • Constructor Detail

      • DomainCache

        protected DomainCache()
    • Method Detail

      • clearCache

        public void clearCache()
        Clears the cache.
      • setDomains

        public void setDomains​(List<Domain> domains)
        Sets the following domains in the cache after clearing it.
        Parameters:
        domains - the domains to set in the cache. They replace all the domains present in the cache.
      • addDomain

        public Domain addDomain​(Domain domain)
        Adds the specified domain into the cache if and only if there is no yet a domain with the same unique identifier.
        Parameters:
        domain - the domain to add.
        Returns:
        either the added domain or the domain with the same identifier in the cache.
      • removeDomain

        public void removeDomain​(String id)
        Removes from the cache the domain with the specified identifier.
        Parameters:
        id - the unique identifier of a domain.