001
014
015 package com.liferay.portal.kernel.backgroundtask;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.repository.model.FileEntry;
019 import com.liferay.portal.kernel.repository.model.Folder;
020 import com.liferay.portal.model.BaseModel;
021
022 import java.io.File;
023 import java.io.InputStream;
024 import java.io.Serializable;
025
026 import java.util.Date;
027 import java.util.List;
028 import java.util.Map;
029
030
033 public interface BackgroundTask {
034
035 public void addAttachment(long userId, String fileName, File file)
036 throws PortalException;
037
038 public void addAttachment(
039 long userId, String fileName, InputStream inputStream)
040 throws PortalException;
041
042 public Folder addAttachmentsFolder() throws PortalException;
043
044 public List<FileEntry> getAttachmentsFileEntries() throws PortalException;
045
046 public int getAttachmentsFileEntriesCount() throws PortalException;
047
048 public long getAttachmentsFolderId();
049
050 public long getBackgroundTaskId();
051
052 public long getCompanyId();
053
054 public Date getCompletionDate();
055
056 public Date getCreateDate();
057
058 public long getGroupId();
059
060 public BaseModel<?> getModel();
061
062 public String getName();
063
064 public String getServletContextNames();
065
066 public int getStatus();
067
068 public String getStatusLabel();
069
070 public String getStatusMessage();
071
072 public Map<String, Serializable> getTaskContextMap();
073
074 public String getTaskExecutorClassName();
075
076 public long getUserId();
077
078 public boolean isCompleted();
079
080 public boolean isInProgress();
081
082 public void setTaskContextMap(Map<String, Serializable> taskContextMap);
083
084 }