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.portlet.dynamicdatamapping.util;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
020    import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
021    import com.liferay.portal.theme.ThemeDisplay;
022    import com.liferay.portlet.dynamicdatamapping.model.DDMStructure;
023    import com.liferay.portlet.dynamicdatamapping.model.DDMTemplate;
024    
025    import java.util.Locale;
026    import java.util.Set;
027    
028    /**
029     * @author Eduardo Garcia
030     */
031    @ProviderType
032    public interface DDMDisplay {
033    
034            public String getAvailableFields();
035    
036            public DDMPermissionHandler getDDMPermissionHandler();
037    
038            public String getEditStructureDefaultValuesURL(
039                            LiferayPortletRequest liferayPortletRequest,
040                            LiferayPortletResponse liferayPortletResponse,
041                            DDMStructure structure, String redirectURL, String backURL)
042                    throws Exception;
043    
044            public String getEditTemplateBackURL(
045                            LiferayPortletRequest liferayPortletRequest,
046                            LiferayPortletResponse liferayPortletResponse, long classNameId,
047                            long classPK, String portletResource)
048                    throws Exception;
049    
050            public String getEditTemplateTitle(
051                    DDMStructure structure, DDMTemplate template, Locale locale);
052    
053            public String getEditTemplateTitle(long classNameId, Locale locale);
054    
055            public String getPortletId();
056    
057            public String getStorageType();
058    
059            public String getStructureName(Locale locale);
060    
061            public String getStructureType();
062    
063            public long[] getTemplateClassNameIds(long classNameId);
064    
065            public long[] getTemplateClassPKs(
066                            long companyId, long classNameId, long classPK)
067                    throws Exception;
068    
069            public long[] getTemplateGroupIds(
070                            ThemeDisplay themeDisplay, boolean includeAncestorTemplates)
071                    throws Exception;
072    
073            public long getTemplateHandlerClassNameId(
074                    DDMTemplate template, long classNameId);
075    
076            public Set<String> getTemplateLanguageTypes();
077    
078            public String getTemplateMode();
079    
080            public String getTemplateType();
081    
082            public String getTemplateType(DDMTemplate template, Locale locale);
083    
084            public String getViewTemplatesBackURL(
085                            LiferayPortletRequest liferayPortletRequest,
086                            LiferayPortletResponse liferayPortletResponse, long classPK)
087                    throws Exception;
088    
089            public Set<String> getViewTemplatesExcludedColumnNames();
090    
091            public String getViewTemplatesTitle(
092                    DDMStructure structure, boolean controlPanel, boolean search,
093                    Locale locale);
094    
095            /**
096             * @deprecated As of 7.0.0
097             */
098            @Deprecated
099            public String getViewTemplatesTitle(
100                    DDMStructure structure, boolean controlPanel, Locale locale);
101    
102            public String getViewTemplatesTitle(DDMStructure structure, Locale locale);
103    
104            public boolean isShowAddStructureButton();
105    
106            public boolean isShowStructureSelector();
107    
108    }