Class MpDomainCache

java.lang.Object
io.higson.runtime.core.domain.MpDomainCache
All Implemented Interfaces:
DomainCache

public class MpDomainCache extends Object implements DomainCache
Cache of domain objects divided into profiles. Only the profiles for which at least one domain object is available. Only objects assigned to system region version or without regions completed.
Author:
Ania
  • Field Details

  • Constructor Details

    • MpDomainCache

      public MpDomainCache()
  • Method Details

    • setup

      public void setup(DomainCacheManager manager)
      Specified by:
      setup in interface DomainCache
    • setUserSessionProvider

      public void setUserSessionProvider(MpUserSessionProvider sessionProvider)
      Specified by:
      setUserSessionProvider in interface DomainCache
    • setVersionJdbcDao

      public void setVersionJdbcDao(VersionDao versionDao)
      Specified by:
      setVersionJdbcDao in interface DomainCache
    • getProfiles

      public Set<String> getProfiles()
      List of profiles which contain domain objects (at least 1 object)
      Specified by:
      getProfiles in interface DomainCache
      Returns:
      set of profiles
    • getDomain

      public DomainObject getDomain(String profileCode, String objectPath)
      Description copied from interface: DomainCache
      returns domain object from given domain's path. Uses system active versions to resolve domain tree.
      Specified by:
      getDomain in interface DomainCache
      Parameters:
      profileCode - profile code
      objectPath - domain path
      Returns:
      found domain object or null, if object does not exist
    • getDomainWithAllVersions

      public DomainObject getDomainWithAllVersions(String profileCode, String objectPath)
      Description copied from interface: DomainCache
      returns domain object from given domain's path. Uses all versions to resolve domain tree.
      Specified by:
      getDomainWithAllVersions in interface DomainCache
      Parameters:
      profileCode - profile code
      objectPath - domain path
      Returns:
      found domain object or null, if object does not exist
    • getDomain

      public DomainObject getDomain(String profileCode, String objectPath, EffectiveVersionConfiguration configuration)
      Description copied from interface: DomainCache
      returns domain object from given domain's path. Uses system active versions overwritten by versions and date from configuration to resolve domain tree.
      Specified by:
      getDomain in interface DomainCache
      Parameters:
      profileCode - profile code
      objectPath - domain path
      configuration - configuration holding date and/or versions to override system active versions
      Returns:
      found domain object or null, if object does not exist
      See Also:
    • invalidateCache

      public void invalidateCache()
      Specified by:
      invalidateCache in interface DomainCache
    • getHeadOrSessionDomain

      protected DomainObject getHeadOrSessionDomain(String profile, String path, EffectiveVersionConfiguration configuration)
    • normalizeCode

      protected String normalizeCode(String profile)
    • normalizePath

      protected String normalizePath(String domainPath)
    • isUserRelated

      protected boolean isUserRelated()
    • isHeadRelated

      protected boolean isHeadRelated()