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.kernel.util.OrderByComparator;
020 import com.liferay.portal.model.BaseModel;
021 import com.liferay.portal.service.ServiceContext;
022 import com.liferay.portlet.dynamicdatamapping.storage.Field;
023 import com.liferay.portlet.dynamicdatamapping.storage.Fields;
024
025 import javax.servlet.http.HttpServletRequest;
026 import javax.servlet.http.HttpServletResponse;
027
028
031 public interface DDM {
032
033 public Fields getFields(
034 long ddmStructureId, long ddmTemplateId,
035 ServiceContext serviceContext)
036 throws PortalException, SystemException;
037
038 public Fields getFields(
039 long ddmStructureId, long ddmTemplateId, String fieldNamespace,
040 ServiceContext serviceContext)
041 throws PortalException, SystemException;
042
043 public Fields getFields(long ddmStructureId, ServiceContext serviceContext)
044 throws PortalException, SystemException;
045
046 public Fields getFields(
047 long ddmStructureId, String fieldNamespace,
048 ServiceContext serviceContext)
049 throws PortalException, SystemException;
050
051 public String getFileUploadPath(BaseModel<?> baseModel);
052
053 public OrderByComparator getStructureOrderByComparator(
054 String orderByCol, String orderByType);
055
056 public OrderByComparator getTemplateOrderByComparator(
057 String orderByCol, String orderByType);
058
059 public void sendFieldFile(
060 HttpServletRequest request, HttpServletResponse response,
061 Field field)
062 throws Exception;
063
064 public String uploadFieldFile(
065 long structureId, long storageId, BaseModel<?> baseModel,
066 String fieldName, ServiceContext serviceContext)
067 throws Exception;
068
069 public String uploadFieldFile(
070 long structureId, long storageId, BaseModel<?> baseModel,
071 String fieldName, String fieldNamespace,
072 ServiceContext serviceContext)
073 throws Exception;
074
075 }