Class DomainCache
- java.lang.Object
-
- org.silverpeas.core.admin.domain.model.DomainCache
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DomainCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.void
clearCache()
Clears the cache.Optional<Domain>
getDomain(String id)
void
removeDomain(String id)
Removes from the cache the domain with the specified identifier.void
setDomains(List<Domain> domains)
Sets the following domains in the cache after clearing it.
-
-
-
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.
-
-