Package org.jasig.portal.character.stream

Examples of org.jasig.portal.character.stream.CharacterEventReader


* @version $Revision$
*/
public class JsonWrapperFilteringCharacterEventReaderTest {
    @Test
    public void testFilteringEvents() {
        final CharacterEventReader baseEventReader = new CharacterEventBufferReader(Arrays.asList(
                CharacterDataEventImpl.create("<layout>"),
                JsonLayoutPlaceholderEventImpl.INSTANCE,
                CharacterDataEventImpl.create("{'yay':json}"),
                JsonLayoutPlaceholderEventImpl.INSTANCE,
                CharacterDataEventImpl.create("</layout>")).listIterator());
View Full Code Here


    public PipelineEventReader<CharacterEventReader, CharacterEvent> getEventReader(HttpServletRequest request, HttpServletResponse response) {
        final long startTime = System.nanoTime();
       
        final PipelineEventReader<CharacterEventReader, CharacterEvent> pipelineEventReader = this.wrappedComponent.getEventReader(request, response);
       
        final CharacterEventReader eventReader = pipelineEventReader.getEventReader();

        final AnalyticsIncorporatingEventReader portletIncorporatingEventReader = new AnalyticsIncorporatingEventReader(eventReader, request, startTime);
       
        final Map<String, String> outputProperties = pipelineEventReader.getOutputProperties();
        return new PipelineEventReaderImpl<CharacterEventReader, CharacterEvent>(portletIncorporatingEventReader, outputProperties);
View Full Code Here

     */
    @Override
    public PipelineEventReader<CharacterEventReader, CharacterEvent> getEventReader(HttpServletRequest request, HttpServletResponse response) {
        final PipelineEventReader<CharacterEventReader, CharacterEvent> pipelineEventReader = this.wrappedComponent.getEventReader(request, response);
       
        final CharacterEventReader eventReader = pipelineEventReader.getEventReader();
        final PortletIncorporatingEventReader portletIncorporatingEventReader = new PortletIncorporatingEventReader(eventReader, request, response);
       
        final Map<String, String> outputProperties = pipelineEventReader.getOutputProperties();
        return new PipelineEventReaderImpl<CharacterEventReader, CharacterEvent>(portletIncorporatingEventReader, outputProperties);
    }
View Full Code Here

     * @see org.jasig.portal.rendering.PipelineComponent#getEventReader(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    @Override
    public PipelineEventReader<CharacterEventReader, CharacterEvent> getEventReader(HttpServletRequest request, HttpServletResponse response) {
        final PipelineEventReader<CharacterEventReader, CharacterEvent> pipelineEventReader = this.wrappedComponent.getEventReader(request, response);
        final CharacterEventReader eventReader = pipelineEventReader.getEventReader();
        final JsonWrapperFilteringCharacterEventReader jsonWrapperFilteringCharacterEventReader = new JsonWrapperFilteringCharacterEventReader(eventReader);
        final Map<String, String> outputProperties = pipelineEventReader.getOutputProperties();
        return new PipelineEventReaderImpl<CharacterEventReader, CharacterEvent>(jsonWrapperFilteringCharacterEventReader, outputProperties);
    }
View Full Code Here

     */
    @Override
    public PipelineEventReader<CharacterEventReader, CharacterEvent> getEventReader(HttpServletRequest request, HttpServletResponse response) {
        final PipelineEventReader<CharacterEventReader, CharacterEvent> pipelineEventReader = this.wrappedComponent.getEventReader(request, response);
       
        final CharacterEventReader eventReader = pipelineEventReader.getEventReader();
       
        final LoggingCharacterEventReader loggingEventReader = new LoggingCharacterEventReader(eventReader);
       
        final Map<String, String> outputProperties = pipelineEventReader.getOutputProperties();
        return new PipelineEventReaderImpl<CharacterEventReader, CharacterEvent>(loggingEventReader, outputProperties);
View Full Code Here

     */
    @Override
    public PipelineEventReader<CharacterEventReader, CharacterEvent> getEventReader(HttpServletRequest request, HttpServletResponse response) {
        final PipelineEventReader<CharacterEventReader, CharacterEvent> pipelineEventReader = this.wrappedComponent.getEventReader(request, response);

        final CharacterEventReader eventReader = pipelineEventReader.getEventReader();
       
        final List<CharacterEvent> eventBuffer = new LinkedList<CharacterEvent>();
        while (eventReader.hasNext()) {
            final CharacterEvent event = eventReader.next();
           
            switch (event.getEventType()) {
                case PORTLET_HEADER: {
                    final PortletHeaderPlaceholderEvent headerEvent = (PortletHeaderPlaceholderEvent)event;
                    final IPortletWindowId portletWindowId = headerEvent.getPortletWindowId();
View Full Code Here

TOP

Related Classes of org.jasig.portal.character.stream.CharacterEventReader

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.