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