StringCacheEntry.java :  » Portal » uPortal-3.1.2 » org » jasig » portal » Java Open Source

Java Open Source » Portal » uPortal 3.1.2 
uPortal 3.1.2 » org » jasig » portal » StringCacheEntry.java
/**
 * Copyright (c) 2000-2009, Jasig, Inc.
 * See license distributed with this file and available online at
 * https://www.ja-sig.org/svn/jasig-parent/tags/rel-10/license-header.txt
 */
package org.jasig.portal;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.jasig.portal.serialize.CachingSerializer;

public class StringCacheEntry implements CacheEntry {
    
    private String characters;
    
    public StringCacheEntry(String characters) {
        this.characters = characters;
    }
    
    public void replayCache(CachingSerializer serializer, ChannelManager cm,
        HttpServletRequest req, HttpServletResponse res) throws PortalException {
        try {
            serializer.printRawCharacters(characters);
        } catch (IOException e) {
            throw new PortalException(e);
        }
    }

    public CacheType getCacheType() {
        return CacheType.CHARACTERS;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.