psdi.webclient.system.controller

Class LabelCacheMgr

  • java.lang.Object
    • psdi.webclient.system.controller.LabelCacheMgr
    • Constructor Detail

      • LabelCacheMgr

        public LabelCacheMgr()
    • Method Detail

      • makeKey

        public static java.lang.String makeKey(java.lang.String locale,
                                               java.lang.String app,
                                               java.lang.String type)
        probably is a better way to do this, but we want a single key for the labelCache hashmap
        Parameters:
        locale - The locale for the key
        app - The application for the key
        type - The type of the key
        Returns:
        The key to use when fetching from label cache
      • getAppLabelCache

        public static LabelCache getAppLabelCache(java.lang.String app,
                                                  WebClientSession wcs)
        Returns a suitable cache for the given locale, app, and type. It firsts looks in it's cache, if not found, then it tries to load it from the database. If still not found, then it returns an empty cache.
        Parameters:
        app - The application
        wcs - The SessionContext
        Returns:
        Desired LabelCache
      • setLabelCache

        @Deprecated
        public static void setLabelCache(java.lang.String cacheId,
                                                     WebClientSession wcs,
                                                     LabelCache cache)
        Deprecated. 
      • clearCache

        public static LabelCache clearCache(java.lang.String app,
                                            WebClientSession wcs)
        Clears a cache from the labelcache for a given app (used if you want to force a reload of the cache next time around)
        Parameters:
        app - The application
        Returns:
        The cache
      • clearAll

        public static void clearAll()
        Clears all caches from the labelcache
      • removeRepLibraryLabels

        public static void removeRepLibraryLabels()