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.document.library.kernel.display.context;
016    
017    import com.liferay.dynamic.data.mapping.kernel.DDMFormValues;
018    import com.liferay.dynamic.data.mapping.kernel.DDMStructure;
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.servlet.taglib.ui.Menu;
021    import com.liferay.portal.kernel.servlet.taglib.ui.ToolbarItem;
022    
023    import java.io.IOException;
024    
025    import java.util.List;
026    import java.util.Locale;
027    
028    import javax.servlet.ServletException;
029    import javax.servlet.http.HttpServletRequest;
030    import javax.servlet.http.HttpServletResponse;
031    
032    /**
033     * @author Iván Zaera
034     */
035    public interface DLViewFileVersionDisplayContext extends DLDisplayContext {
036    
037            public String getCssClassFileMimeType();
038    
039            public DDMFormValues getDDMFormValues(DDMStructure ddmStructure)
040                    throws PortalException;
041    
042            public List<DDMStructure> getDDMStructures() throws PortalException;
043    
044            public int getDDMStructuresCount() throws PortalException;
045    
046            public String getDiscussionClassName();
047    
048            public long getDiscussionClassPK();
049    
050            public String getDiscussionLabel(Locale locale);
051    
052            public Menu getMenu() throws PortalException;
053    
054            public List<ToolbarItem> getToolbarItems() throws PortalException;
055    
056            public boolean isDownloadLinkVisible() throws PortalException;
057    
058            public boolean isVersionInfoVisible() throws PortalException;
059    
060            public void renderPreview(
061                            HttpServletRequest request, HttpServletResponse response)
062                    throws IOException, ServletException;
063    
064    }