001
014
015 package com.liferay.portlet.dynamicdatamapping.util;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.model.BaseModel;
020 import com.liferay.portal.service.ServiceContext;
021 import com.liferay.portlet.dynamicdatamapping.storage.Field;
022 import com.liferay.portlet.dynamicdatamapping.storage.Fields;
023
024 import javax.servlet.http.HttpServletRequest;
025 import javax.servlet.http.HttpServletResponse;
026
027
030 public interface DDM {
031
032 public Fields getFields(
033 long ddmStructureId, long ddmTemplateId,
034 ServiceContext serviceContext)
035 throws PortalException, SystemException;
036
037 public Fields getFields(
038 long ddmStructureId, long ddmTemplateId, String fieldNamespace,
039 ServiceContext serviceContext)
040 throws PortalException, SystemException;
041
042 public Fields getFields(long ddmStructureId, ServiceContext serviceContext)
043 throws PortalException, SystemException;
044
045 public Fields getFields(
046 long ddmStructureId, String fieldNamespace,
047 ServiceContext serviceContext)
048 throws PortalException, SystemException;
049
050 public String getFileUploadPath(BaseModel<?> baseModel);
051
052 public void sendFieldFile(
053 HttpServletRequest request, HttpServletResponse response,
054 Field field)
055 throws Exception;
056
057 public String uploadFieldFile(
058 long structureId, long storageId, BaseModel<?> baseModel,
059 String fieldName, ServiceContext serviceContext)
060 throws Exception;
061
062 public String uploadFieldFile(
063 long structureId, long storageId, BaseModel<?> baseModel,
064 String fieldName, String fieldNamespace,
065 ServiceContext serviceContext)
066 throws Exception;
067
068 }