001
014
015 package com.liferay.dynamic.data.mapping.kernel;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.exception.PortalException;
020 import com.liferay.portal.kernel.service.ServiceContext;
021
022 import java.io.File;
023
024 import java.util.Locale;
025 import java.util.Map;
026
027
030 @ProviderType
031 public interface DDMTemplateManager {
032
033 public static final String TEMPLATE_MODE_CREATE = "create";
034
035 public static final String TEMPLATE_TYPE_DISPLAY = "display";
036
037 public static final String TEMPLATE_TYPE_MACRO = "macro";
038
039 public static final String TEMPLATE_VERSION_DEFAULT = "1.0";
040
041 public DDMTemplate addTemplate(
042 long userId, long groupId, long classNameId, long classPK,
043 long resourceClassNameId, String templateKey,
044 Map<Locale, String> nameMap, Map<Locale, String> descriptionMap,
045 String type, String mode, String language, String script,
046 boolean cacheable, boolean smallImage, String smallImageURL,
047 File smallImageFile, ServiceContext serviceContext)
048 throws PortalException;
049
050 public DDMTemplate fetchTemplate(
051 long groupId, long classNameId, String templateKey);
052
053 public DDMTemplate getTemplate(long templateId) throws PortalException;
054
055 }