Package org.jasig.portal.utils.cache

Examples of org.jasig.portal.utils.cache.CacheKey


    }

    @OpenEntityManager(unitName = PERSISTENCE_UNIT_NAME)
    @Override
    public AggregatedTabMapping getTabMapping(final String fragmentName, final String tabName) {
        final CacheKey key = CacheKey.build(this.getClass().getName(), tabName);
       
        AggregatedTabMapping tabMapping = this.entityManagerCache.get(PERSISTENCE_UNIT_NAME, key);
        if (tabMapping != null) {
            return tabMapping;
        }
View Full Code Here


    }
   
    @OpenEntityManager(unitName = PERSISTENCE_UNIT_NAME)
    @Override
    public AggregatedPortletMapping getMappedPortletForFname(final String fname) {
        final CacheKey key = CacheKey.build(this.getClass().getName(), fname);
       
        AggregatedPortletMapping portletMapping = this.entityManagerCache.get(PERSISTENCE_UNIT_NAME, key);
        if (portletMapping != null) {
            return portletMapping;
        }
View Full Code Here

                   
                    //If there is an event session get the aggregator specific version of it
                    if (eventSession != null) {
                        final AggregatedGroupConfig aggregatorGroupConfig = getAggregatorGroupConfig(aggregatorType);
                       
                        final CacheKey key = CacheKey.build(EVENT_SESSION_CACHE_KEY_SOURCE, eventSession, aggregatorGroupConfig);
                        EventSession filteredEventSession = this.eventAggregationContext.getAttribute(key);
                        if (filteredEventSession == null) {
                            filteredEventSession = new FilteredEventSession(eventSession, aggregatorGroupConfig);
                            this.eventAggregationContext.setAttribute(key, filteredEventSession);
                        }
View Full Code Here

        protected EventSession getEventSession(PortalEvent item) {
            final String eventSessionId = item.getEventSessionId();
           
            //First check the aggregation context for a cached session event, fall back
            //to asking the DAO if nothing in the context, cache the result
            final CacheKey key = CacheKey.build(EVENT_SESSION_CACHE_KEY_SOURCE, eventSessionId);
            EventSession eventSession = this.eventAggregationContext.getAttribute(key);
            if (eventSession == null) {
                eventSession = eventSessionDao.getEventSession(item);
                this.eventAggregationContext.setAttribute(key, eventSession);
            }
View Full Code Here

            cacheKeyBuilder.addTag(UsernameTaggedCacheEntryPurger.createCacheEntryTag(username));
        }
        cacheKeyBuilder.addAll(policy.getClass(), username,
                principal.getType(), owner, activity, target);
       
        final CacheKey key = cacheKeyBuilder.build();

        final Element element = this.doesPrincipalHavePermissionCache.get(key);
        if (element != null) {
            return (Boolean) element.getValue();
        }
View Full Code Here

        this.layoutCache = layoutCache;
    }

    @Override
    public void cacheLayout(IPerson owner, IUserProfile profile, DistributedUserLayout layout) {
        final CacheKey cacheKey = this.getCacheKey(owner, profile);
        this.layoutCache.put(new Element(cacheKey, layout));
    }
View Full Code Here

        this.layoutCache.put(new Element(cacheKey, layout));
    }
   
    @Override
    public DistributedUserLayout getCachedLayout(IPerson owner, IUserProfile profile) {
        final CacheKey cacheKey = this.getCacheKey(owner, profile);
        final Element element = this.layoutCache.get(cacheKey);
        if (element != null) {
            return (DistributedUserLayout)element.getObjectValue();
        }
        return null;
View Full Code Here

        return null;
    }
   
    @Override
    public void removeCachedLayout(IPerson owner, IUserProfile profile) {
        final CacheKey cacheKey = this.getCacheKey(owner, profile);
        this.layoutCache.remove(cacheKey);
    }
View Full Code Here

            this.logger.trace("{} - Resoure Aggregation Disabled, ignoring event cache and returning parent event reader directly", this.beanName);
            return this.wrappedComponent.getEventReader(request, response);
        }
       
        //Get the key for this request from the target component and see if there is a cache entry
        final CacheKey cacheKey = this.wrappedComponent.getCacheKey(request, response);
        Element element = this.cache.get(cacheKey);
        CachedEventReader<E> cachedEventReader = null;
        if (element != null) {
            cachedEventReader = (CachedEventReader<E>)element.getObjectValue();
        }
View Full Code Here

    /* (non-Javadoc)
     * @see org.jasig.portal.rendering.PipelineComponent#getCacheKey(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    @Override
    public CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) {
        final CacheKey parentKey = this.wrappedComponent.getCacheKey(request, response);
        final CacheKey attributeKey = this.attributeSource.getCacheKey(request, response);
        return CacheKey.build(this.beanName, parentKey, attributeKey);
    }
View Full Code Here

TOP

Related Classes of org.jasig.portal.utils.cache.CacheKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.