001
014
015 package com.liferay.portlet.trash.util;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.exception.PortalException;
020 import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
021 import com.liferay.portal.kernel.search.Hits;
022 import com.liferay.portal.kernel.util.OrderByComparator;
023 import com.liferay.portal.model.Group;
024 import com.liferay.portal.model.TrashedModel;
025 import com.liferay.portal.theme.ThemeDisplay;
026 import com.liferay.portlet.trash.model.TrashEntry;
027
028 import java.util.Date;
029 import java.util.List;
030
031 import javax.portlet.ActionRequest;
032 import javax.portlet.PortletException;
033 import javax.portlet.PortletURL;
034
035 import javax.servlet.http.HttpServletRequest;
036
037
040 @ProviderType
041 public interface Trash {
042
043 public static final String TRASH_TIME_SEPARATOR = "_TRASH_TIME_";
044
045 public void addBaseModelBreadcrumbEntries(
046 HttpServletRequest request,
047 LiferayPortletResponse liferayPortletResponse, String className,
048 long classPK, PortletURL containerModelURL)
049 throws PortalException, PortletException;
050
051 public void addContainerModelBreadcrumbEntries(
052 HttpServletRequest request,
053 LiferayPortletResponse liferayPortletResponse, String className,
054 long classPK, PortletURL containerModelURL)
055 throws PortalException, PortletException;
056
057 public void addTrashSessionMessages(
058 ActionRequest actionRequest, List<TrashedModel> trashedModels);
059
060 public void addTrashSessionMessages(
061 ActionRequest actionRequest, List<TrashedModel> trashedModels,
062 String cmd);
063
064 public void addTrashSessionMessages(
065 ActionRequest actionRequest, TrashedModel trashedModel);
066
067 public void addTrashSessionMessages(
068 ActionRequest actionRequest, TrashedModel trashedModel, String cmd);
069
070 public void deleteEntriesAttachments(
071 long companyId, long repositoryId, Date date,
072 String[] attachmentFileNames)
073 throws PortalException;
074
075 public List<TrashEntry> getEntries(Hits hits) throws PortalException;
076
077 public OrderByComparator<TrashEntry> getEntryOrderByComparator(
078 String orderByCol, String orderByType);
079
080 public int getMaxAge(Group group) throws PortalException;
081
082 public String getNewName(String oldName, String token);
083
084 public String getNewName(
085 ThemeDisplay themeDisplay, String className, long classPK,
086 String oldName)
087 throws PortalException;
088
089 public String getOriginalTitle(String title);
090
091 public String getOriginalTitle(String title, String paramName);
092
093 public String getTrashTime(String title, String separator);
094
095 public String getTrashTitle(long trashEntryId);
096
097 public PortletURL getViewContentURL(
098 HttpServletRequest request, String className, long classPK)
099 throws PortalException;
100
101 public boolean isInTrash(String className, long classPK)
102 throws PortalException;
103
104 public boolean isTrashEnabled(Group group);
105
106 public boolean isTrashEnabled(long groupId) throws PortalException;
107
108 }