001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.trash.util;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.search.Hits;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.Group;
022    import com.liferay.portal.theme.ThemeDisplay;
023    import com.liferay.portlet.trash.model.TrashEntry;
024    
025    import java.util.Date;
026    import java.util.List;
027    
028    import javax.portlet.PortletURL;
029    
030    import javax.servlet.http.HttpServletRequest;
031    
032    /**
033     * @author Julio Camarero
034     */
035    public interface Trash {
036    
037            public void addBaseModelBreadcrumbEntries(
038                            HttpServletRequest request, String className, long classPK,
039                            PortletURL containerModelURL)
040                    throws PortalException, SystemException;
041    
042            public void addContainerModelBreadcrumbEntries(
043                            HttpServletRequest request, String className, long classPK,
044                            PortletURL containerModelURL)
045                    throws PortalException, SystemException;
046    
047            public void deleteEntriesAttachments(
048                            long companyId, long repositoryId, Date date,
049                            String[] attachmentFileNames)
050                    throws PortalException, SystemException;
051    
052            public List<TrashEntry> getEntries(Hits hits)
053                    throws PortalException, SystemException;
054    
055            public OrderByComparator getEntryOrderByComparator(
056                    String orderByCol, String orderByType);
057    
058            public int getMaxAge(Group group) throws PortalException, SystemException;
059    
060            public String getNewName(ThemeDisplay themeDisplay, String oldName);
061    
062            public String getOriginalTitle(String title);
063    
064            public String getTrashTime(String title, String separator);
065    
066            public String getTrashTitle(long trashEntryId);
067    
068            public boolean isInTrash(String className, long classPK)
069                    throws PortalException, SystemException;
070    
071            public boolean isTrashEnabled(long groupId)
072                    throws PortalException, SystemException;
073    
074    }