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.image.gallery.display.kernel.display.context;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.repository.model.FileVersion;
019    import com.liferay.portal.kernel.servlet.taglib.ui.Menu;
020    import com.liferay.portal.kernel.servlet.taglib.ui.MenuItem;
021    
022    import java.util.List;
023    import java.util.UUID;
024    
025    import javax.servlet.http.HttpServletRequest;
026    import javax.servlet.http.HttpServletResponse;
027    
028    /**
029     * @author Iv??n Zaera
030     */
031    public class BaseIGViewFileVersionDisplayContext
032            extends BaseIGDisplayContext<IGViewFileVersionDisplayContext>
033            implements IGViewFileVersionDisplayContext {
034    
035            public BaseIGViewFileVersionDisplayContext(
036                    UUID uuid, IGViewFileVersionDisplayContext parentIGDisplayContext,
037                    HttpServletRequest request, HttpServletResponse response,
038                    FileVersion fileVersion) {
039    
040                    super(uuid, parentIGDisplayContext, request, response);
041    
042                    this.fileVersion = fileVersion;
043            }
044    
045            @Override
046            public Menu getMenu() throws PortalException {
047                    return parentDisplayContext.getMenu();
048            }
049    
050            @Override
051            public List<MenuItem> getMenuItems() throws PortalException {
052                    return parentDisplayContext.getMenuItems();
053            }
054    
055            protected FileVersion fileVersion;
056    
057    }