001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.display.context;
016    
017    import java.util.UUID;
018    
019    import javax.servlet.http.HttpServletRequest;
020    import javax.servlet.http.HttpServletResponse;
021    
022    /**
023     * @author Iv??n Zaera
024     */
025    public abstract class BaseDisplayContext<T extends DisplayContext>
026            implements DisplayContext {
027    
028            public BaseDisplayContext(
029                    UUID uuid, T parentDisplayContext, HttpServletRequest request,
030                    HttpServletResponse response) {
031    
032                    _uuid = uuid;
033                    this.parentDisplayContext = parentDisplayContext;
034                    this.request = request;
035                    this.response = response;
036            }
037    
038            @Override
039            public UUID getUuid() {
040                    return _uuid;
041            }
042    
043            protected final T parentDisplayContext;
044            protected final HttpServletRequest request;
045            protected final HttpServletResponse response;
046    
047            private final UUID _uuid;
048    
049    }